blob_id stringlengths 40 40 | language stringclasses 1
value | repo_name stringlengths 5 116 | path stringlengths 2 241 | src_encoding stringclasses 31
values | length_bytes int64 14 3.6M | score float64 2.52 5.13 | int_score int64 3 5 | detected_licenses listlengths 0 41 | license_type stringclasses 2
values | text stringlengths 14 3.57M | download_success bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|
6ef731c1a5a242e80574bbcdc1bae2830cc7299e | PHP | okante/NovaCollection | /tests/Tests/PullCollectionTest.php | UTF-8 | 928 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Novactive Collection.
*
* @author Luke Visinoni <l.visinoni@novactive.us, luke.visinoni@gmail.com>
* @author Sébastien Morel <s.morel@novactive.us, morel.seb@gmail.com>
* @copyright 2017 Novactive
* @license MIT
*/
declare(strict_types=1);
namespace Novactive\Tests;
use Novactive\Collection... | true |
f09b7f38653a0ce07973c804356e6aeb6b9d08e5 | PHP | phphants/gearman-testing | /web-example.php | UTF-8 | 2,637 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
require_once("shared.php");
if(isset($_REQUEST["job"]))
{
$client = new GearmanClient();
$client->addServer("127.0.0.1");
switch($_REQUEST["job"])
{
case "start":
// Start a new background worker
$data = new stdClass();
$data->location = "portsmouth, uk";
$data->unit = "c";
$job_handle = ... | true |
ba3429d3090306a108cc85878db4c475dc3a1eff | PHP | Hangie921/Comma_project | /temp/back/phpLab/20area.php | UTF-8 | 256 | 2.796875 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>無標題文件</title>
</head>
<body>
<?php
$r=$_REQUEST["radius"];
function getArea($r){
$area = $r*$r*3.14159;
return $area;
};
echo "圓面積為 : " ,getArea($r);
?>
</body>
</html> | true |
45ba88c89e2ba50be7e2aa91ca92ca41384a2e9b | PHP | joeyscarim/pixel_looper | /_loop.php | UTF-8 | 540 | 3 | 3 | [] | no_license | <?php
//loop through and include each pixel
function displayPixels($pixels) {
for($x = 0; $x < count($pixels); $x++) {
include($_SERVER['DOCUMENT_ROOT'].'/pixel_looper/pixels/'.$pixels[$x].'.php');
}
}
// instructions
// add pixels to the pixels folder, individually, with proper names
// i.e. facebook.php with a ... | true |
279b87ecf9809bb2ac892928f161794d3fdfbf89 | PHP | kradwhite/mytarget-api-client | /src/resources/price_lists/PricelistImportErrors.php | UTF-8 | 838 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* User: Aleksandrov Artem
* Date: 20.10.2019
* Time: 21:37
*/
namespace kradwhite\myTarget\api\resources\price_lists;
use kradwhite\myTarget\api\resources\Resource;
/**
* Ресурс, позволяющий получить список ошибок импорта прайс-листов
* Class PricelistImportErrors
* @package kradwhite\myTarget\api\m... | true |
80f265e752ed922b7bd94fefef3745ee87fb0b24 | PHP | vebzical/akhj-1 | /autonkulujenhallinta/inc/src/Akhj/Exception/ExceptionHandler.php | UTF-8 | 1,403 | 3 | 3 | [] | no_license | <?php
/**
* Auton kulujen seurantajärjestelmä
*
*/
namespace Akhj\Exception;
use Akhj\Util\Logger;
use Akhj\View;
/**
* Poikkeusten käsittelijä joka näyttää virhesivun jos kiinniottamaton poikkeus
* pääsee valloilleen.
*
* @author Mikko Rainio
*/
class ExceptionHandler {
public function __construct() {}
... | true |
bf27d3e35607ab73cf38f8b77999b34b147e682a | PHP | ivanrosolen/crud-demo | /back/application/library/Xuplau/Database/MapperDB.php | UTF-8 | 648 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
Namespace Xuplau\Database;
use Respect\Relational\Mapper;
use Respect\Relational\DB as Database;
Class MapperDB
{
private $mapper = null;
private $db = null;
public function __construct() {
$this->getMapper();
}
public function getMapper() {
if(!$this->mapper instance... | true |
d86f26791b409d469b9379314ecbf55abed602c8 | PHP | Acaki/redis-stream-queue | /src/Stream.php | UTF-8 | 1,897 | 2.984375 | 3 | [] | no_license | <?php
namespace RedisStreamQueue;
class Stream extends Redis
{
protected $key;
public function __construct($key)
{
$this->key = $key;
}
public function setKey($key)
{
$this->key = $key;
}
/**
* Create a stream with given key.
* @param string $key the stream... | true |
84f0636a800a20bb183e70fde3b526e3230fd9f4 | PHP | PanchoPuncho/GreenOrchardPhoto | /php/photoshoot_email_client.php | UTF-8 | 1,772 | 2.828125 | 3 | [] | no_license | <?php
// check if fields passed are empty
if ( empty($_GET['event']) ) {
echo "No event provided!";
return 400;
} else if ( empty($_GET['hours']) ) {
echo "No hours provided!";
return 400;
} else if ( empty($_GET['numPhotos']) ) {
echo "No numPhotos provided!";
return 400... | true |
3438c2c0f1ed9a3a938985df8110769f7437f462 | PHP | liucg1995/laravel_quick_admin | /app/Services/RoleService.php | UTF-8 | 4,394 | 2.578125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: yunli
* Date: 2019/4/30
* Time: 上午10:48
*/
namespace App\Services;
use App\Models\CrmAdminRoleModel;
use App\Models\CrmAdminRolePermissionModel;
class RoleService
{
/**
* 列表查询
* @param array $data
* @return mixed
* @user yun.li
* @time 2019... | true |
4e850ddc3cca6e4589173fc9188324640ee93e10 | PHP | draczi/webapp | /app/models/ResetPasswords.php | UTF-8 | 984 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Models;
use Core\Model;
use Core\Validators\{RequiredValidator,EmailValidator};
class ResetPasswords extends Model {
public $id, $token, $user_id, $email;
protected static $_table = 'reset_passwords';
public function validator(){
$this->runValidation(new RequiredValidator($this,['f... | true |
54a3580cd858502ee41ac782c86a5693f62cb5f0 | PHP | fh32000/school-management-system | /database/seeders/ReligionTableSeeder.php | UTF-8 | 1,028 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use App\Models\Religion;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class ReligionTableSeeder extends Seeder
{
/**
* Run the database seeders.
*
* @return void
*/
public function run()
{
$religions = [
[
... | true |
63a1dd754c44d989052afa12930509ebd397d746 | PHP | andreistirb/AndreiStirbPhotography | /send_contact.php | UTF-8 | 435 | 2.765625 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<?php
$name = "$name";
$subject ="$subject";
$message="Date: $date message: $message";
$date = "$date";
$mail_from="$email";
$header="from: $name <$mail_from>";
$to ="andreistirb@yahoo.com";
$send_contact=mail($t... | true |
e618fbd45f36dd81bdbd712ca0c9b5978e4a1739 | PHP | RBoraurito/Single-contact-form | /send.php | UTF-8 | 348 | 2.625 | 3 | [] | no_license | <?php
require_once 'vendor/autoload.php';
use App\Request;
//load Env Variables
$dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
$dotenv->load();
// Send data and return a message
if ($_SERVER["REQUEST_METHOD"] === "POST") {
$request = new Request($_POST); //Check if it is only text or images too
return $r... | true |
42bcd871ce585ecf7699e08b99cfe59ecc762f1f | PHP | juanPabloCesarini/cursoPHP7 | /06 - Estructuras Repetitivas/estructuraWHILE.php | UTF-8 | 659 | 3.609375 | 4 | [] | no_license | <?php
/*
while (condición) {
# code...
}
*/
// el código se va a ejecutar mientras la condición se cumpla
$i=0;
while ($i<=10){
echo $i ."<br>";
$i++;
}
$j=0;
$vector[0] = "juanpi";
$vector[1] = "gonza";
$vector[2] = "sebas";
$vector[3] = "marce";
$vector[4] = "naty";
while ($vector[$j] != "naty" ){
... | true |
a53cf76822f4ff1124dc858690c18f7fc85de9ec | PHP | AnSwErYWJ/PHP-Training | /php/变量.php | UTF-8 | 178 | 3.28125 | 3 | [] | no_license | <?php
/*定义变量*/
$var_name = "变量";
$n =10;
var_dump($var_name);//显示变量的数据类型和值
echo $var_name;
echo "<br />";//换行
var_dump($n);
echo $n;
?> | true |
d4d349f6635b55c6bbde74e2c3af05c9a65cfbc9 | PHP | arifzorro/travel | /libs/Session.php | UTF-8 | 1,028 | 2.734375 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
class Session {
public static $usernicename;
public static function init(){
@session_st... | true |
bd15f2e408c4d9e8f3c5292add74b2c39ed1760c | PHP | demon72/epictype | /cfg/function/function.php | UTF-8 | 6,725 | 2.71875 | 3 | [] | no_license | <?php
function ids($row, $key, $id = 'id', $type = 'string')
{
if (is_array($row))
{
$arr = array();
foreach($row as $r)
{
if ($key == 'array')
$a = $r;
else
$a = $r[$key];
if ($type == 'array[]')
{
if ($id==''){
$arr[][] = $a;
}elseif (is_array... | true |
6b92f8804b11a563266596de35eb002b635e9af2 | PHP | Basti25/rbmvc | /core/rbmvc/Request.php | UTF-8 | 1,007 | 2.703125 | 3 | [] | no_license | <?php
namespace core\rbmvc;
class Request {
private $params;
private $getParams;
private $postParams;
public function __construct() {
$this->getParams = $_GET;
$this->postParams = $_POST;
$this->params = array_merge($this->getParams, $this->postParam... | true |
4b9b7778eef69d766f8485f0d1d4fbd6da505462 | PHP | magichoward/google-php | /lib/GusDeCooL/GooglePhp/Component/ChildInterface.php | UTF-8 | 217 | 2.625 | 3 | [] | no_license | <?php
namespace GusDeCooL\GooglePhp\Component;
interface ChildInterface {
public function getParent();
public function setParent($parent);
/**
* API Key
* @return string
*/
public function getKey();
} | true |
c777d4628ae1402f1f8e1f9e12fce2ca82e94bee | PHP | fransiti/dinamikfikir | /app/Controllers/Organizer/ModelCaller.php | UTF-8 | 837 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controllers\Organizer;
use App\Models\CommentModel;
use App\Models\ContentModel;
use App\Models\NotificationsModel;
use App\Models\UserModel;
class ModelCaller
{
public $ContentModel;
public $UserModel;
public $CommentModel;
public $NotificationModel;
public function __con... | true |
c51f12ac70aa74f04eb10e6b36fa1d996a8fc6fa | PHP | Neppord/phocate | /src/Parsing/Token/IfFailEitherParser.php | UTF-8 | 769 | 2.671875 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace Phocate\Parsing\Token;
use Phocate\Parsing\EitherParser;
use Phocate\Parsing\EitherResult;
use Phocate\Parsing\NothingEitherResult;
class IfFailEitherParser extends EitherParser
{
/** @var EitherParser */
private $first;
/** @var EitherParser */
private $o... | true |
ab692e4bea770798ffc983f974551c6e64be5e54 | PHP | artyom-developer/sinergia-prueba | /server-sinergia/database/seeders/TiposListasSeeder.php | UTF-8 | 861 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
Use App\Models\TiposListas;
Use Log;
class TiposListasSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Log::info("Ejecuto seeder de tipos de listas");
$tiposLi... | true |
b1f9663f894513a5d26f8b4c206cca18860b86b4 | PHP | miguel2896/fundamentos-php | /CodeIgniter/application/controllers/consulta.php | UTF-8 | 2,869 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
*
*/
class Consulta extends CI_Controller //Clase del controlador que simpre ereda de la clase CI_controller
{
function __construct()
{
parent::__construct();//constructor del padre
$this->load->helper('form');//inicializar el helper ... | true |
bd93fbfbbe1af8140dba80c9fe43d4c4f9d6f6a9 | PHP | Charityzed/testDrivenDev | /cubic.php | UTF-8 | 143 | 2.515625 | 3 | [] | no_license | <?php
class Cubic{
var $var;
function Cubic(){
}
function getCubic($var){
return $var*$var*$var;
}
}
?> | true |
ae4ee74345b8b172b778714d2053039300f42cf5 | PHP | richmahn/dokuwiki-plugin-odt | /ODT/ODTTemplateDH.php | UTF-8 | 7,416 | 2.515625 | 3 | [] | no_license | <?php
/**
* ODTTemplateDH: docHandler for creating a document from
* an ODT template.
*
* Most code was taken from renderer.php.
*
* @license GPL 2 (http://www.gnu.org/licenses/gpl.html)
* @author Andreas Gohr <andi@splitbrain.org>
* @author Aurelien Bompard <aurelien@bompard.org>
* @author LarsDW223
*/
//... | true |
e5f15621adabe833ff23d6b0a1e5ddc478f408ab | PHP | emsifa/cobain-rakit-validation | /index.php | UTF-8 | 3,356 | 3.28125 | 3 | [] | no_license | <?php
// Buat function untuk mempermudah mengambil data error
function get_error($key) {
// Ambil errors pada $_GET
// kalau nggak ada isi dengan array kosong aja.
$errors = isset($_GET['errors']) ? (array) $_GET['errors'] : [];
// Ambil pesan error
$error = isset($errors[$key]) ? $errors[$key... | true |
2a6b6f8a4fd8fdf4ebd6a970031631de867ca8d3 | PHP | damianociarla/test | /library/uec-media-provider-embed/src/UEC/Media/Provider/Embed/Adapter/EmbedAdapterInterface.php | UTF-8 | 2,102 | 2.625 | 3 | [] | no_license | <?php
namespace UEC\Media\Provider\Embed\Adapter;
use UEC\Media\Provider\Embed\Parser\ParserInterface;
interface EmbedAdapterInterface
{
/**
* Set parser
*
* @param ParserInterface $parser
* @return EmbedAdapterInterface
*/
public function setParser(ParserInterface $parser);
/**... | true |
e88346611ae2773198cc234777029fa942e8a473 | PHP | tautvydascoding/2017-10-09-kurso-medziaga | /uzduotys_visos/MAMP/uzduotis13/tautvydas/2-php-foreach/index.php | UTF-8 | 1,610 | 3.296875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<?php
echo "<h1>Mokomes PHP foreach cikla</h1>";
$ezeras = "Vistytis";
$zuvis = "karosas";
$skaicius = "devyniu";
printf( "Uz %s juru ir 5 kalnu yra ezeras %s, kuriam gyvena %s ", ... | true |
defbd21b2ba7cd691606f4694c6fc147d1a2551e | PHP | ivanavilesc/solemne2 | /config/Utils.php | UTF-8 | 551 | 2.671875 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Utils
*
* @author Ivan Aviles
*/
class Utils {
public function getURL(){
... | true |
77635f19e7e79b1e2acb9b8f7b19b3230a2ef63e | PHP | keiwatanabe42/practice_php | /chap5_2/5-3/extract_characters.php | UTF-8 | 1,580 | 4.03125 | 4 | [] | no_license | <?php // 文字数を数える
// 文字数によって料金を計算して文字数と値段を文字列で返す
function calcPrice($str){
$price = 3000;
$countStr = mb_strlen($str);
// 11文字目から1文字あたり100円増し
if($countStr > 10){
$price += 100 * ($countStr - 10);
}
// 3桁区切り
$price = number_format($price);
$result = "{$countStr}文字{$price}円";
re... | true |
d017dccb4e7239f3d923615bc54f9c4aa671b12b | PHP | alex-mitcu7/Joana | /receiveAnswer.php | UTF-8 | 731 | 2.6875 | 3 | [] | no_license | <?php
session_start();
require_once('./unirest-php/src/Unirest.php');
// Ask the question and receive an answer
$link = "https://webknox-question-answering.p.mashape.com/questions/answers" .
"?answerLookup=false&answerSearch=false&question=" .
$_SESSION['question'] . "%3F";
$response = Unire... | true |
9b237cbb02c5be5d451872d4223abc2792c305a2 | PHP | jakobhoiras/Sirius | /set_game_time.php | UTF-8 | 9,556 | 2.609375 | 3 | [] | no_license | <?php
require 'Mysql.php';
$mysql = new Mysql_spil();
if( $_POST && !empty($_POST['name1']) && !empty($_POST['name2']) && !empty($_POST['name3']) && !empty($_POST['name4'])) {
$mysql->save_team($_POST['name1'],$_POST['name2'],$_POST['name3'],$_POST['name4']);
}
?>
<html>
<head>
<title>
... | true |
bafc1ec0b3c8b44cde5faa462bf4ec3ba301be0a | PHP | F9lke/freshloop-controlunit | /model/Model.class.php | UTF-8 | 1,415 | 3.078125 | 3 | [] | no_license | <?php
class Model {
protected $db = false;
protected $tables;
var $id = false;
var $data = false;
/**
* Model constructor
*/
public function __construct()
{
$this->db = $GLOBALS['db'];
$this->data = array();
$this->tables = $this->db->select("SHOW TABLES");
array_walk( $this->tabl... | true |
41c9a980416c64e3a6a50006b2fc6d1344dbbc31 | PHP | Acronyms/Betisier | /include/pages/ville/listerVilles.inc.php | UTF-8 | 571 | 3 | 3 | [] | no_license | <?php
$db=new Mypdo();
$manager= new VilleManager($db);
?>
<h1>Liste des villes</h1>
<p>Actuellement <?php echo $manager->getNbVilles()->nbVilles; ?> villes sont enregistrées</p>
<!-- tableau des villes enregistrées -->
<table class="tableCli">
<tr class="hautTableau">
<td>Numéro</td>
<td>Nom</td>
</tr>
<?p... | true |
20cee0c0cf2f7e599a04036b9decce1d9593ab1a | PHP | amikhmel/spark | /app/Response.php | UTF-8 | 1,677 | 2.90625 | 3 | [] | no_license | <?php
/**
* @author advisor
*
*/
class Response {
private static $_instance = null;
public static function getInstance() {
if (self::$_instance == null) {
self::$_instance = new self();
}
return self::$_instance;
}
private function __cons... | true |
e419e6811bfced4d6dc05e41dbded603a44a7421 | PHP | efueger/laravel_site_opening-hours | /app/Http/Controllers/QueryController.php | UTF-8 | 10,112 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Formatters\FormatsOpeninghours;
use Carbon\Carbon;
use Illuminate\Http\Request;
date_default_timezone_set('Europe/Brussels');
class QueryController extends Controller
{
use FormatsOpeninghours;
/**
* Handle an openinghours query
*
* @param Reque... | true |
c1d723a6c67f74c5ab2a368897d1f50c96c1cda6 | PHP | QuangDat95/Casetudy2 | /quanly_banhang/admin/model/DatabaseConnect.php | UTF-8 | 404 | 2.890625 | 3 | [] | no_license | <?php
namespace Model;
use PDO;
class DatabaseConnect{
protected $_db = null;
public function __construct(){
$username = 'root'; //tên đăng nhập CSDL
$password = ''; // mật khẩu
$options = array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8");
$this->_db = new PDO('mysql:host... | true |
8da88300294052dfe3ddb945f80f3493e12a1020 | PHP | emanuelfs4/cyb14138.github.com | /CS952/shop/report3.php | WINDOWS-1252 | 1,169 | 2.609375 | 3 | [] | no_license | <?php
include "DBFunctions.php";
$ordid = $_REQUEST['ordid'];
$username = $_REQUEST['username'];
$password = $_REQUEST['password'];
$conn = MakeConn($username, $password);
$stmnt = DBExecute($conn, "SELECT * FROM orderdet, products where products_prodnum = orderdet_prodnum and orderdet_ordernum = '".$ordid."'");... | true |
0196304a4ca507f5ae1dbc2296949870c3495c7e | PHP | bichenhui/larvavel | /app/Http/Controllers/Wechat/ApiController.php | UTF-8 | 3,405 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Wechat;
use App\Models\Keyword;
use App\Models\ResponseBase;
use App\Models\Rule;
use App\Servies\WechatService;
use Houdunwang\WeChat\WeChat;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class ApiController extends Controller
{
//微信后台接口配置 url 填写地址指向该方法
//调用... | true |
171773c2b0fa880e1c686b979b279a6b624fecf7 | PHP | sitecues/sitecues-inspire | /account.php | UTF-8 | 1,971 | 2.546875 | 3 | [] | no_license | <?php
require_once('class/inspire.class.php');
require_once('class/account.class.php');
if (isset($_GET['action'])) {
switch ($_GET['action']) {
case 'getAccount':
$showProgress = isset($_GET['progress']) ? $_GET['progress'] : true;
$account = (new account($showProgress))->getAccount($_GET['id']);
... | true |
7508fdf2db1c42a29a3e931a7caf7e233a1a9ba3 | PHP | koenvw/MT-ComparEval | /app/model/Tasks.php | UTF-8 | 4,729 | 2.703125 | 3 | [
"CC-BY-NC-3.0",
"Apache-2.0"
] | permissive | <?php
/**
* Tasks handles operations on tasks table.
*/
class Tasks {
private $db;
public function __construct( Nette\Database\Context $db ) {
$this->db = $db;
}
public function getTask( $taskId ) {
return $this->db->table( 'tasks' )->wherePrimary( $taskId )->fetch();
}
public function getTaskMetrics( ... | true |
799f688ddda34823318a0683b3989c7cc06487ca | PHP | toniolo77/sis_penna | /Aplicación/api_penna/database/migrations/2017_05_05_203203_personal_tablas2.php | UTF-8 | 1,071 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class PersonalTablas2 extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tecnico', func... | true |
350ad885e1238dde740a0d6526beab8530800c6f | PHP | AndreasCaldewei/fkt | /app/Http/Controllers/Company/CompanyController.php | UTF-8 | 781 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Company;
use App\Http\Controllers\Controller;
use App\Models\Company;
use Illuminate\Http\Request;
class CompanyController extends Controller
{
public function index () {
return response()->json(Company::all(), 200);
}
public function create(Request $request... | true |
fcff6ea05b762d4efe98bb636087b2ce81c11aa0 | PHP | delrioz/paginacao | /paginacao/app/Mail/NovoContato.php | UTF-8 | 1,661 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
class NovoContato extends Mailable
{
use Queueable, SerializesModels;
/*declarando atributos de acordo com os campos em questão*/
publ... | true |
361158a9a6da49648e0951d12aac0c02ad82e8d4 | PHP | cnwakama/Audiogene_Collection | /app/Controller/PatientsController.php | UTF-8 | 3,982 | 2.640625 | 3 | [] | no_license | <?php
//App::uses('ArraySource','Datasources.Model/DataSource');
class PatientsController extends AppController{
public $helpers = array('Html', 'Form');
public $newData = ' ';
public function index(){
$this->set('audiograms', $this->Patient->find('all'));
}
/**
* format json object and array of $paths t... | true |
7f4c829f9ea30bd3db667b40d708de0f3a578d47 | PHP | jahndev/blesta2pbxware | /helpers/data_structure/array/data_structure_array.php | UTF-8 | 3,605 | 3.28125 | 3 | [] | no_license | <?php
/**
* Array Data Structure helper
*
* Provides utility methods to assist in manipulating arrays.
*
* @package blesta
* @subpackage blesta.helpers.data_structure.array
* @copyright Copyright (c) 2010, Phillips Data, Inc.
* @license http://www.blesta.com/license/ The Blesta License Agreeme... | true |
c1feaa74c30854bc0d277206d058bc352ecbe991 | PHP | josegonzalez/php-queuesadilla | /tests/josegonzalez/Queuesadilla/Utility/DsnParserTraitTest.php | UTF-8 | 2,746 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace josegonzalez\Queuesadilla\Utility;
use InvalidArgumentException;
use josegonzalez\Queuesadilla\TestCase;
use josegonzalez\Queuesadilla\Utility\DsnParserTrait;
class DsnParserTraitTest extends TestCase
{
/**
* @covers josegonzalez\Queuesadilla\Utility\DsnParserTrait::parseDsn
*/
publ... | true |
0d0cace2c0cf759aaa0cc9597fe41e87d8484612 | PHP | ljcqx/yiistudio | /protected/controllers/UploadController.php | UTF-8 | 2,365 | 2.546875 | 3 | [] | no_license | <?php
class UploadController extends Controller
{
public function actionIndex()
{
$this->render('index');
}
public function actionCreate()
{
$model = new UploadForm();
if(isset($_POST['UploadForm']))
{
$model->attributes = $_POST['UploadForm'];
$... | true |
3e518e48c53f32d0fcfa86e7ea77bf078c85eecf | PHP | tb-private/lokisalle | /vendor/Form/Form.class.php | UTF-8 | 3,231 | 2.9375 | 3 | [] | no_license | <?php
namespace Form;
use Lib;
use Form\Field;
use Entity\Entity;
use Form\Field\Submit;
class Form
{
protected $entity;
public $fields = array();
protected $method;
protected $action;
public function __construct($entity = NULL, $method = NULL)
{
$this->setEntity($entity);
$this->method = ($meth... | true |
510dd5acc82fd561422c65618869614324653240 | PHP | artiku/Greedit | /prax4/index.php | UTF-8 | 1,834 | 2.78125 | 3 | [] | no_license | <?php
include 'header.php';
include 'php/db_connect.php';
// reddit hot alg
function hot_alg($a, $b, $c) {
$t = strtotime($c) - 1134028003;
$x = $a - $b;
$y; $z;
if ($x > 0) { $y = 1; }
else if ($x == 0) { $y = 0; }
else { $y = -1;}
if (abs($x) >= 1) { $z = abs($x); }
else { $z = 1; }
$ans = log... | true |
92335ecc736db4629c3a81034e98371cd5107406 | PHP | gbajekal/RecordOnHold | /record/test.php | UTF-8 | 2,689 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
require_once 'vendor\autoload.php';
require_once '../common/functions.php';
require_once 'vendor\microsoft\windowsazure\src\WindowsAzure.php';
use WindowsAzure\Common\ServicesBuilder;
use MicrosoftAzure\Storage\Blob\Models\CreateContainerOptions;
use MicrosoftAzure\Storage\Blob\Models\PublicAccessTy... | true |
e01dc0e3bb907f98027f8546956e9950855d6e38 | PHP | LeonardoPerez312/Hotel | /app/Modules/empleados.php | UTF-8 | 5,336 | 2.9375 | 3 | [] | no_license | <?php
namespace App\Models;
use App\Interfaces\Model;
use Carbon\Carbon;
use Exception;
use JetBrains\PhpStorm\Pure;
use JsonSerializable;
require_once ("AbstractDBConnection.php");
require_once (__DIR__."\..\Interfaces\Model.php");
require_once (__DIR__.'/../../vendor/autoload.php');
class empleados extends Abstrac... | true |
a51a101f44956c30c3ff435441e0186628ef6a4c | PHP | dogcalas/cursoframework | /saue/lib/ZendExt/WF/WFObject/Entidades/ExternalPackage.php | UTF-8 | 1,034 | 2.53125 | 3 | [] | no_license | <?php
class ZendExt_WF_WFObject_Entidades_ExternalPackage extends ZendExt_WF_WFObject_Base_Complex {
private $hRef;
public function __construct($parent) {
parent::__construct($parent);
$this->tagName = 'ExternalPackage';
}
public function clonar() {
return;
}... | true |
b8987cd93b801810a487fa1cabcb2fb12323debe | PHP | fanguangjian/PHP-covid | /PHP B/organ/error.php | UTF-8 | 1,520 | 3.109375 | 3 | [] | no_license | <?php
//php错误处理
//header("Content-type:text/html;charset=utf-8");//处理脚本
$a = 100;
echo $a;
$b = 0;
if($b == 0){
//人为触发错误
trigger_error("除数不能为0!"); //默认Notice, 代码会继续执行
// trigger_error('除数不能为0', E_USER_ERROR);
}
echo "hello";
echo $a / $b;
//以下无法显示
// PHP Notice: 除数不能为0! in /usercode/file.php on lin... | true |
472be409243e74c33fe29d6b5f068edb3c7bc80b | PHP | genkgo/xsl | /src/Stream.php | UTF-8 | 3,319 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Genkgo\Xsl;
use Genkgo\Xsl\Exception\ReadOnlyStreamException;
use Genkgo\Xsl\Exception\StreamException;
use Genkgo\Xsl\Exception\TransformationException;
final class Stream
{
const PROTOCOL = 'gxsl://';
const HOST = 'localhost';
const ROOT = '#root';
... | true |
4fec98a0587e5fe2bf270e6594d364f9f28400b2 | PHP | alejandrojs-dev/sistema-tecnoline | /app/Services/ModuleService.php | UTF-8 | 4,360 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Models\Module;
use App\Http\Resources\ModuleCollection;
use App\Http\Resources\ModuleResource;
use App\Enums\HttpStatusCode;
use App\Interfaces\IBaseService;
use Exception;
use Illuminate\Support\Facades\DB;
class ModuleService implements IBaseService
{
public function all()
... | true |
e6ee6eb021a3f2fc3312ea329d69afbb8558ffda | PHP | codebrainbv/parcelwoo | /parcelcheckout/webshop/_webshop.php | UTF-8 | 5,116 | 2.609375 | 3 | [] | no_license | <?php
require(SOFTWARE_PATH . '/wp-load.php');
class webshop
{
// Return the software name
public static function getSoftwareName()
{
return 'Wordpress 3.9.1 en WooCommerce 3.0.0+';
}
// Return the software code
public static function getSoftwareCode()
{
return str_replace('_', '-', subst... | true |
1f3914f5d04318cc40f4e1579b5a467b6dcfb38f | PHP | ChristinaX/victorina | /classes/Category.php | UTF-8 | 1,831 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
class Category {
public $id = null;
public $name = null;
public function __construct( $data=array() ) {
if (isset($data['id'])) $this->id = (int) $data['id'];
if (isset($data['name'])) $this->name = $data['name'];
}
public function storeFormValues ( $params ) {
... | true |
8d69adf1f9697c6c62a088182a162448a551b042 | PHP | ju1ius/xdg-mime | /src/MimeType.php | UTF-8 | 2,901 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace ju1ius\XdgMime;
use ju1ius\XdgMime\Exception\InvalidMimeType;
final class MimeType implements \Stringable
{
/**
* @var array<string, self>
*/
private static array $instances = [];
private function __construct(
public readonly string $media,
... | true |
a001f43a66b6fd7097a1ddf65348b0641500762f | PHP | shamudra/shahriar | /lab6/registration.php | UTF-8 | 4,004 | 2.8125 | 3 | [] | no_license | <?php
$message = "";
if($_SERVER['REQUEST_METHOD'] == 'POST'){
if(isset($_POST["first_name"]) && isset($_POST["last_name"]) && isset($_POST["address"]) && isset($_POST["user_name"]) && isset($_POST["password"])){
$first_name = $_POST["first_name"];
$last_name = $_POST["last_nam... | true |
cab553e2445e169d36e7838452000478d892d192 | PHP | kilesss/mvc | /core/validator/validatorInterface/MainInterface.php | UTF-8 | 222 | 2.703125 | 3 | [] | no_license | <?php
namespace validator\validatorInterface;
// Under construction
interface MainInterface
{
public function validate(array $data, array $validatorRules);
public function parseRules(array $validatorRules);
} | true |
0ff4da96b681b559a4a74f077368656b6f9c8528 | PHP | ddawx123/wordpress_sso_plugin | /wp-sso/libs/common.class.php | UTF-8 | 4,302 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
class Common {
static private $_instance = null; //定义实例化空白对象
private $_apiurl = 'https://passport.dingstudio.cn/api?format=json&action=verify'; //定义SSO服务端地址
/**
* 构造函数
*/
private function __construct() {
header('Content-Type: application/json; charset=UTF-8');
}
/... | true |
ba7a976c3a80b038973234a18411445d46169d97 | PHP | WillRadi/laracast_5.7-From-Scratch | /greyscale/app/Assigin.php | UTF-8 | 128 | 2.609375 | 3 | [] | no_license | <?php
namespace App;
class Assigin implements Contract
{
public function create($terms)
{
echo $terms;
}
} | true |
3063843e5c86e18dee20b5a275443e521cfddb6c | PHP | dadlian/chantico | /controller/users/UserController.inc | UTF-8 | 8,222 | 2.515625 | 3 | [] | no_license | <?php
use Wadapi\Http\RequestHandler;
use Wadapi\Http\ResponseHandler;
use Wadapi\System\SettingsManager;
use Wadapi\Persistence\DatabaseAdministrator;
use Wadapi\Persistence\SQLGateway;
use Wadapi\Persistence\Searcher;
use Wadapi\Persistence\Sorter;
use Wadapi\Persistence\Criterion;
abstract class UserContro... | true |
0c08190be302bcf79a0caa0ce0be41b47a395951 | PHP | subeshb1/GrabCheap | /Practice/index.php | UTF-8 | 98 | 2.703125 | 3 | [] | no_license |
<?php
require "oop.php";
$person = new Person('Subesh',20);
echo $person->sentence();
?>
| true |
27052e2529e53481281cb808fb65ef8f519465e0 | PHP | joevansanttos/PROJEK | /production/php/bancos/banco-projeto.php | UTF-8 | 866 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
function listaProjetos($conexao){
$projetos = array();
$query = "select * from projetos";
$resultado = mysqli_query($conexao, $query);
while ($projeto = mysqli_fetch_assoc($resultado)) {
array_push($projetos, $projeto);
}
return $projetos;
}
function buscaProjeto($conexao, $id_... | true |
6ec45ee862a2c581b16943062f619209e46d9f48 | PHP | mrjasmin/CMS | /application/controllers/articles.php | UTF-8 | 1,652 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class Articles extends CI_Controller {
public function __construct(){
parent::__construct();
$this->load->model('article');
$this->load->model('page');
$this->load->helper('form');
$this->load->helper('date');
$this->load->library('form_validation');
}
function index(){
if($this->sessi... | true |
50cd03b48f8682dad43057576cfecbba0d5425af | PHP | ronan-gloo/pipe-process-poc | /src/Operation/Collect.php | UTF-8 | 1,252 | 3.078125 | 3 | [] | no_license | <?php
namespace Batch\Operation;
class Collect implements OperationInterface, FlushableInterface
{
/**
* @var callable
*/
private $collector;
/**
* @var int
*/
private $amount;
/**
* @var array
*/
private $elements = [];
/**
* @var integer
*/
p... | true |
4ed1fc588941f0e996461dd05afd4dd2cb621f12 | PHP | OpenCode/scribble | /class/articlesmanagement.php | UTF-8 | 5,836 | 2.921875 | 3 | [] | no_license | <?php
// return the id of the last published article
define('ARTICLE_HOME', 'article.php');
define('ARTICLE', 'articles/');
define('TITLES_FILE','parameters/id_articles');
define('TAGS_FILE', 'parameters/id_tags');
define('DATE_FILE', 'parameters/id_date');
function LastArticle($directory)
{
// Set the dir... | true |
db03bf7f6b82388f490c125a826215ce8e979520 | PHP | richard-gc/crudpedido | /crudarea.php | UTF-8 | 2,013 | 2.53125 | 3 | [] | no_license | <?php
!isset($_POST)?die("acesso denegado"): '';
require 'conexion.class.php';
$bd=new Conexion();
if(isset($_POST['registrar'])){
$area_id=$_POST['area_id'];
$nombre=$_POST['nombre'];
if(empty($area_id)||empty($nombre)) {
header("location: area.php?error=falta un dato");
}else{
i... | true |
1eff1e3dda35e976d6e3a006badeda279109c7ab | PHP | olkaf123/symfony-forum | /src/Service/DetailsService.php | UTF-8 | 906 | 2.875 | 3 | [] | no_license | <?php
/**
* Details service.
*/
namespace App\Service;
use App\Entity\Details;
use App\Repository\DetailsRepository;
/**
* Class DetailsService.
*/
class DetailsService
{
/**
* Details repository.
*
* @var \App\Repository\DetailsRepository
*/
private $detailsRepository;
/**
... | true |
0b5652832c163bc2b5b7ee7dd6842ebc728a7dac | PHP | cordoval/chamilo_phpperu | /application/personal_messenger/php/lib/personal_messenger_manager/personal_messenger_manager.class.php | UTF-8 | 13,361 | 2.5625 | 3 | [] | no_license | <?php
namespace application\personal_messenger;
use common\libraries\ObjectTable;
use common\libraries\WebApplication;
use common\libraries\Request;
use common\libraries\Translation;
use common\libraries\Application;
use common\libraries\Session;
/**
* $Id: personal_messenger_manager.class.php 205 2009-11-1... | true |
0d01fd61a6c899205d0bffc9a2ef4ec13ad8e516 | PHP | leid200/billingsystem | /up.php | UTF-8 | 2,258 | 2.96875 | 3 | [] | no_license | <?php
// Include the database configuration file
require_once 'config.php';
#$id = $_GET['id'];
$id = $_GET['id']; // get id through query string
$qry = mysqli_query($link,"select * from donar where id='$id'"); // select query
$data = mysqli_fetch_array($qry); // fetch data
// If file upload form is su... | true |
c9ffce78b558b1d6a81211080c78f20347ce31cd | PHP | Craig240z/CodeUp-Web-Exercises | /drills.php | UTF-8 | 1,484 | 4.125 | 4 | [] | no_license | <?php
// Step 1. Do the following drills & exercises in PHP.
// Step 2. Commit your answers to github and send me the link. Call the file "drills.php" or something similar.
// Step 3. Don't forget to go into `vagrant ssh` and do `php -a` if you need a PHP console for rapid testing out of ideas.
// Step 4. Don't forget... | true |
b180ad65ca1ce9479c573cdd1b1c6a5ae3715729 | PHP | PHPsummer/webdir.github.io | /App/Admin/Controller/CategoryController.class.php | UTF-8 | 4,676 | 2.625 | 3 | [] | no_license | <?php
header("content-type:text/html;charset=utf8");
class CategoryController extends CommonController
{
//显示所有分类
public function index()
{
/********未排序之前********/
/*//取出所有的分类
$category = new CategoryModel();
$data = $category->getAllCates();
//打印数据看看
echo "<p... | true |
34d11dfd3e79032b115c018297b23422a25a2b76 | PHP | adesinak4/trove | /portal/update-password.php | UTF-8 | 2,163 | 2.65625 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: access");
header("Access-Control-Allow-Methods: POST");
header("Content-Type: application/json; charset=UTF-8");
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With");
req... | true |
fd0e24cccc411829f74631c66b5ceafd28811f8e | PHP | nullcookies/supporbot | /app/Conversations/MenuConversation.php | UTF-8 | 1,479 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Conversations;
use Illuminate\Foundation\Inspiring;
use BotMan\BotMan\Messages\Incoming\Answer;
use BotMan\BotMan\Messages\Outgoing\Question;
use BotMan\BotMan\Messages\Outgoing\Actions\Button;
use BotMan\BotMan\Messages\Conversations\Conversation;
class MenuConversation extends Conversation
{
... | true |
305ebdbbd9b2f1db179bc8895b32a107084a7ed9 | PHP | Vogusov/myFramework | /m/M_User.php | UTF-8 | 2,981 | 2.96875 | 3 | [] | no_license | <?php
namespace fw1\m;
require_once __DIR__ . '/../vendor/autoload.php';
class M_User {
private $user_login, $user_name, $user_id, $user_password;
private $connect;
public function __construct() {
$this->connect = $this->connectingDb();
}
// хэширование пароля
protected function hashUserPassword($... | true |
966b23eda6470163cfe92755cba9717221e95efb | PHP | 99aed/99aed.com | /manage/createcat.php | UTF-8 | 3,564 | 2.765625 | 3 | [] | no_license | <?php
error_reporting(E_ERROR | E_PARSE);
include("../includes/db.php");
include("../includes/function.php");
$action =$_GET["action"];
$cat_id =$_GET["catid"];
// selecting category from category table if option is edit
$selectcat = mysql_query("select * from category where id='$cat_id'") or die ("select * from cate... | true |
6e8178c1b96b47247f761a5f7c7f737ce5e68810 | PHP | douglashall/Tygra | /lib/ConfigGroup.php | UTF-8 | 790 | 2.765625 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
/**
* @package Config
*/
/**
* Handles multiple config files
* @package Config
*/
class ConfigGroup extends Config
{
protected $configs = array();
public function addConfig(Config $config)
{
$this->configs[] = $config;
$config->addConfig($this);
$this->addVars($config->get... | true |
a7b3f77291411031214fad0592fad93fcc80713b | PHP | RamiroAlvaro/ProyectoDeSoftware | /system/View.php | UTF-8 | 1,881 | 2.6875 | 3 | [] | no_license | <?php
class View
{
private $controlador;
private $twig;
private $error;
private $mensaje;
private $titulo;
private $encabezado;
private $session;
public function __construct(Request $peticion) {
$this->controlador = strtolower($peticion->getC... | true |
31d812fa13ee86d90a77a9f3ebd745511ff0b4f7 | PHP | bobbychen1999/PHP-story-website | /src/homepage.php | UTF-8 | 2,679 | 3.015625 | 3 | [] | no_license | <!DOCTYPE HTML>
<html lang="en">
<head>
<title>all stories</title>
</head>
<?php
require 'database.php';
session_start();
// check if it is a registered user or a guest
//guest
if ($_SESSION["username"] == "") {
echo '<form action = "login.php" method = "POST">';
echo '<input type="hidden" name="token" value... | true |
2fb42c88025e22a7ea797b9a98dd881fec4e445a | PHP | railken/advent2020 | /src/Day4/PuzzleACommand.php | UTF-8 | 1,348 | 2.9375 | 3 | [] | no_license | <?php
namespace Railken\Advent2020\Day4;
use Illuminate\Support\Collection;
use Railken\Advent2020\BaseCommand;
class PuzzleACommand extends BaseCommand
{
/**
* Name of the command
*
* @var string
*/
protected $name = 'day4:puzzleA';
/**
* Convert input file into a Collection
... | true |
c4c7c61a26390b30c7adc8ce21840b45d850123d | PHP | vara1991/WCS_Projet-1bis | /pages/connection.php | UTF-8 | 1,980 | 2.671875 | 3 | [] | no_license | <?php
session_start();
include('../layouts/head.php');
include('../controller/controller.php');
if($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['connecter'])){
$error = [];
if(empty($_POST['pseudo'])) {
$error['pseudo'] = "Vous avez oublié votre pseudo";
}
... | true |
8c0d83b4eb0f0eaa20c01aaa80e97f62fd3ea521 | PHP | adityagunawan/php-test-area | /tes-logic/hackerrank/reapeted-string.php | UTF-8 | 443 | 3.578125 | 4 | [] | no_license | <?php
function countString($s, $n) {
$a = (int)($n / strlen($s));
$sisa = $n % strlen($s);
$sisa_string = substr($s, 0, $sisa);
$b = 0;
$c = 0;
for ($i = 0; $i<strlen($s); $i++) {
if($s[$i] == 'a') {
$b++;
}
}
for ($i = 0; $i<strlen($sisa_string); $i++) {
... | true |
00fe27c4dbb1e7405aa0ce735e1b4936ce428df1 | PHP | samuraix888/Tugas_Workshop_SI_WEB | /Tugas_5/typedata/typedata6.php | UTF-8 | 673 | 3.453125 | 3 | [] | no_license | !DOCTYPE html> <!--documen yang diproses adalah html-->
<html><!--pemrograman kode html dimulai-->
<body><!--body open/tubuh, isinya ya semua elemen elemen yg ditampilin di web kaya gambar, paragraf dll-->
<?php/*<?php adalah awal mulai script php dimulai*/
class Car /*calas bernama car*/{
function Car()/*functio... | true |
835ce2512a874b99e26bc3f0babef53a36dfe09e | PHP | marlonrodler/orientado-a-objetos-php | /heranca.php | UTF-8 | 1,940 | 3.609375 | 4 | [] | no_license | <?php
#HERANÇA
//Final -> impede a ser extendida
abstract class Conta//classe só estrutural
{
protected $agencia;
protected $conta;
protected $saldo;
public function __construct($agencia, $conta, $saldo)
{
$this->agencia = $agencia;
$this->conta = $conta;
$this->conta = $co... | true |
e44ee06c59668585708251b42527436aa543948f | PHP | SiyahKare/moonlight | /application/models/BlogModel.php | UTF-8 | 1,800 | 2.609375 | 3 | [] | no_license | <?php defined('BASEPATH') || exit('Direct script access is prohibited.');
class BlogModel extends CI_Model {
public function blogStatus(){
$res = $this->db->select()->get('blogstatus')->row_array();
return $res;
}
public function blogStatusSet($fields){
$this->db->where(['id'=> 1])->update('blogstatus',$f... | true |
6e9b8d29e564c994c0b6ca17237529a574207e78 | PHP | Enzo-rc/IFR-Module-V | /projet/views/exercice30.php | UTF-8 | 931 | 3.234375 | 3 | [] | no_license | <div class="exercice">
<div>
<h3>Exercice 30</h3><br>
<h4>Consigne :</h4><br>
<p>Créer une fonction qui s'appelle quelleDate().<br>Elle devra retourner une string représentant la date actuelle sous le format suivant DD/MM/YYYY<br>
Où DD représente le jour actuelle, MM le mois actuel ... | true |
e5b4e4a40fe93a9b09cca0705bd95b881d7959d1 | PHP | DanielMabadeje/Start-My-Simple-PHP-Framework | /Core/DBPdo.php | UTF-8 | 3,674 | 3.4375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Core;
/* Singleton Class for PDO */
class DBPdo
{
//Singleton Instance
protected static $instance;
//PDO Connection
protected static $connection;
//Settings array to hold PDO configurations via pdo.php
protected static $settings = array();
/**
* Return PDO object ... | true |
06d44b8fb797b2642746f1d8553631d855a5156e | PHP | awnishmmg/Zwave-mvc-project | /zwave-project/web-app/model/user/User_model.php | UTF-8 | 1,872 | 2.59375 | 3 | [] | no_license | <?php
class User_model{
private $tablename = 'tbl_user';
private $column_pk = 'user_id';
private $column_name = 'name';
private $column_company_name = 'company_name';
private $column_email = 'email';
private $column_mobile_no = 'mobile_no';
private $column_landline = 'landline';
private $column_company_descr... | true |
a69c5794e1adb0bf48a598e5bd61ee621f9ed55a | PHP | pH7Software/pH7-Social-Dating-CMS | /_protected/framework/Acl/Acl.class.php | UTF-8 | 1,715 | 2.765625 | 3 | [
"MIT",
"GPL-3.0-only",
"LicenseRef-scancode-philippe-de-muyter"
] | permissive | <?php
/**
* @title ACL (Access Control Lists) Main Class
*
* @author Pierre-Henry Soria <hello@ph7builder.com>
* @copyright (c) 2012-2022, Pierre-Henry Soria. All Rights Reserved.
* @license MIT License; See LICENSE.md and COPYRIGHT.md in the root directory.
* @package ... | true |
a4fd0310307d589a3025843822d067b7881839f3 | PHP | nekobato/samishimbow | /server/command/updatetag.php | UTF-8 | 1,487 | 2.765625 | 3 | [] | no_license | <?php
require_once('mysqli.class.php');
$post = $_GET;
$check_user = new db('SELECT * FROM user WHERE id = "'.$post['id'].'"');
if ($check_user->result_rows() > 0) {
$user = $check_user->result_row_array();
oldtag($user['tag1']);
oldtag($user['tag2']);
oldtag($user['tag3']);
$insert_user = new db('UPDATE s... | true |
9b30b4adb7fb7b3dc76dc5ac149a96726501f4f6 | PHP | RegeleViteaz/learn-language | /app/core/DatabaseConfig.php | UTF-8 | 663 | 2.65625 | 3 | [] | no_license | <?php
// database Connection variables
define('HOST', 'localhost'); // Database host name ex. localhost
define('USER', 'root'); // Database user. ex. root ( if your on local server)
define('PASSWORD', ''); // user password (if password is not set for user then keep it empty )
define('DATABASE', 'phpprojectandre... | true |
04f6e6a3d94283f6adb6e0423a4030932f6c9d6d | PHP | rstoetter/phpdoc-md | /src/Generator.php | UTF-8 | 23,776 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
// Rainer Stötter: added argument --sort-see, April 2017
// Rainer Stötter: added return values and descriptions, April 2017
// Rainer Stötter: removed file extension .md from link, April 2017
// Rainer Stötter: added argument --public-off, April 2017
// Rainer Stötter: added argument --private-off, April 2017
/... | true |
d15e6433ab7f52082a68a49878af0ee3dfb419eb | PHP | WeiEast/CommLogin | /app/Services/CommService.php | UTF-8 | 8,151 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use Monolog\Logger;
class CommService{
public function index(){
echo $this->cookieFile;
}
protected $cookieFile = '';
protected $billFile = '';
protected $extFile = '';
const COOKIE_PATH = '/home/public/cookie/';
const BILL_PAT... | true |
ff5fc7ce6bd82884a288e7da7f05b895f4b42ee0 | PHP | andreAguia/grh | /_classes/class.CargoComissao.php | UTF-8 | 29,609 | 2.6875 | 3 | [] | no_license | <?php
class CargoComissao {
/**
* Abriga as várias rotina do Cadastro de cargo em Comissao
*
* @author André Águia (Alat) - alataguia@gmail.com
*/
###########################################################
/**
* Método Construtor
*/
public function __cons... | true |
26bc826aac0cbf5ba911d2ec16b9cff087400017 | PHP | orodicio/ejerciciosPHP | /Ejercicios_PHP_01/ejercicio1.php | UTF-8 | 396 | 3.703125 | 4 | [] | no_license | <?php
$n1 = random_int(1,10);
$n2 = random_int(1,10);
echo "suma: $n1 + $n2 = ".($n1+$n2)."<br/>";
echo "resta: $n1 - $n2 = ".($n1-$n2)."<br/>";
echo "multiplicacion: $n1 * $n2 = ".($n1*$n2)."<br/>";
echo "division: $n1 / $n2 = ".($n1/$n2)."<br/>";
echo "modulo: $n1 % $n2 = ".($n1%$n2)."<br/>";
$n3 = 1;
for($i = 0;$... | true |
968fc736d63bf9049ea43172e088c488bc9e279e | PHP | shanethehat/php-hocon | /src/PhpHocon/PhpHocon.php | UTF-8 | 1,006 | 2.875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace PhpHocon;
use PhpHocon\Generator\Generator;
use PhpHocon\Generator\GeneratorFactory;
use PhpHocon\Token\HoconTokenizer;
use PhpHocon\Token\Tokenizer;
class PhpHocon
{
/**
* @var Tokenizer
*/
private $tokenizer;
/**
* @var GeneratorFactory
*/
private $generatorFact... | true |