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
2e9473b528bec3e882f51d2ff7e35a008a812006
PHP
dvg18/backend-php-chat
/app/routes.php
UTF-8
9,979
2.796875
3
[ "BSD-3-Clause" ]
permissive
<?php // Routes use App\Middleware\AuthMiddleware; use App\Middleware\GuestMiddleware; use App\Middleware\RoleMiddleware; //сохранить диалог $app->post('/chat', function ($request, $response){ $json_data = $request->getParsedBody(); $visitor = $json_data['visitor']; $user = $json_data['user']; $messag...
true
2814976a6f2538c2dd52a5840e11b444011132f5
PHP
brianykim/OS-work
/code/php/column.php
UTF-8
921
2.9375
3
[]
no_license
<?php $host ="localhost"; $user="user12"; $pass = "34klq*"; $db = "mydb"; $r = mysql_connect($host,$user,$pass); if(!$r) { echo "Could not connect to server\n"; trigger_error(mysql_error(), E_USER_ERROR); } else { echo "Connection established\n"; } $r2 = mysql_select_db($db); if(!$r2) { echo "Cannot select dat...
true
625dc832beef0c65d25f00114891d27ace79f92a
PHP
4iwi33/JuniorKit
/foreach/index.php
UTF-8
1,156
3.8125
4
[]
no_license
<?php $birth = [ "Tom" => "1980-11-22", "Nick" => "1981-05-05", "Jim" => "1981-05-05", "Mike" => "1981-05-05", "Mick" => "1981-05-05", "Nike" => "1981-05-05" ]; foreach ($birth as $key => $value) echo "$key Was Born $value <br>"; // $key - это ключи(имена) // $value -это значения(даты) ...
true
b9a08190753f381ea5914b91facb716488d6ec37
PHP
Jihell/LibraryRBTree
/src/Model/AbstractNode.php
UTF-8
4,551
3.265625
3
[ "MIT" ]
permissive
<?php /** * @package library * @author Joseph LEMOINE <j.lemoine@ludi.cat> * @link https://ludi.cat */ namespace Jihel\Library\RBTree\Model; /** * Class Node */ abstract class AbstractNode implements NodeInterface { /** * id the value tha we will compare. * Basically it's an integer....
true
88eabebe1dad6497abe8558d6cd46de63d4a1f89
PHP
edisonramaa/supermetrics_api
/Services/ResponseService.php
UTF-8
3,015
3
3
[]
no_license
<?php /** * Created by PhpStorm. * User: Edison * Date: 11/28/2019 * Time: 1:20 AM */ namespace Services; use Services\Interfaces\IResponseService; /** * Class ResponseService */ class ResponseService implements IResponseService { /** * @var array $_successStatuses */ protected $_successStatu...
true
01d63bc427fc0ddefcd3f495b74456af4b575276
PHP
zyl6868/bh
/common/clients/OrganizationService.php
UTF-8
6,344
2.734375
3
[ "BSD-3-Clause" ]
permissive
<?php /** * Created by PhpStorm. * User: WangShiKui * Date: 18-2-27 * Time: 上午10:19 */ namespace common\clients; use common\components\MicroServiceRequest; use common\models\pos\SeClassMembers; use Httpful\Mime; use Yii; class OrganizationService { /** * @var null */ private $uri = null; ...
true
0d34b90d6309d45d5faebba3a5eabcfcf90597a9
PHP
Kanta62/WEB-TECHNOLOGIES-KANTA
/Lab_Task_05/Lab_Task_05/Source Code/controller/addProductControler.php
UTF-8
551
2.65625
3
[]
no_license
<?php require_once ('../model/model.php'); $tableName = 'product'; if(isset($_POST['submit'])) { $data['Name'] = $_POST['name']; $data['BuyingPrice'] = $_POST['bprice']; $data['SellingPrice'] = $_POST['sprice']; if(empty($_POST['display'])){ $data['display'] = "No"; } else{ $data['display'] = $_POST['displ...
true
49564a245efa689345ab06f2147f2a4ab50acc9c
PHP
201732110125/github
/tp_blog/tp5.1/think/application/admin/controller/Index.php
UTF-8
2,260
2.609375
3
[ "Apache-2.0" ]
permissive
<?php namespace app\admin\controller; use think\Controller; class Index extends Controller { public function index() { $arr = ['a' => 'apple', 'b' => 'banana']; halt($arr); } //后台登陆 public function login() { if (request()->isAjax()) {//如果是Ajax请求,request()表示请求方式 ...
true
13f356ac89eb86bce82c2e38868eea4958d4caaf
PHP
mrkekseek/book247
/database/migrations/2017_01_09_224806_add_profile_name_to_financial_profiles_table.php
UTF-8
749
2.515625
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class AddProfileNameToFinancialProfilesTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::table('financial_profiles', function (Blue...
true
a963de9293de3f542535be84c09dc7832d9eee4b
PHP
sudirmansyah1/kamus-bahasa-isyarat-kmp-boyermoore
/admin/authentication.php
UTF-8
1,815
2.65625
3
[]
no_license
<?php // mengaktifkan session php session_start(); // menghubungkan dengan koneksi include '../assets/config.php'; // menangkap data yang dikirim dari form $username = $_POST['username']; $password = $_POST['password']; $password2 = md5($password); // Untuk menjaga keamanan password maka password dilakuk...
true
43d218bdca63637fcf15c3fc9c14e99dd525ac7d
PHP
SinanDumandzha/Teknasyon-PHP-Bootcamp
/week-05/views/post-store.php
UTF-8
1,067
2.765625
3
[ "MIT" ]
permissive
<?php require_once '../autoloader.php'; require_once('../class/Post.class.php'); require_once('../class/Section.class.php'); $post = new Post; $section=new Section; if(isset($_POST['content'])) { $author=(string) $_POST["author"]; $content=(string) $_POST["content"]; i...
true
2e4ec248ed5b9d4c95b8d3de37745f1cc6cc7c2b
PHP
xpeedstudio/mogo-portfolio-wordpress-themes
/framework-customizations/extensions/shortcodes/shortcodes/list/views/view.php
UTF-8
5,254
2.5625
3
[]
no_license
<?php if (!defined('FW')) { die('Forbidden'); /** * @var array $atts */ } ?> <?php $list = 'ul'; if ($atts['list_type']['selected_value'] == 'list-numbers') { $list = 'ol'; } ?> <div class="fw-list <?php echo esc_attr($atts['list_type']['selected_value']); ?> <?php echo esc_attr($atts['separator...
true
cf7c46ab78906ce6c45a04fb8432ef745e9306dd
PHP
h136799711/201506bbjie
/Application/Uclient/Model/OAuth2TypeModel.class.php
UTF-8
1,093
2.8125
3
[ "MIT" ]
permissive
<?php /** * Created by PhpStorm. * User: hebidu * Date: 15/7/1 * Time: 16:11 */ namespace Uclient\Model; /** * 第三方账户登录\注册类型枚举 * Class OAuth2FromEnum * @package Uclient\Model */ class OAuth2TypeModel { /** * 来源QQ注册 */ const QQ = 1; /** * 来源微信注册 */ const WEIXIN = 2; /*...
true
182ede2b9c90192969ca4054c29e8192e6d14c70
PHP
eslamabdelbasset1/MagBuy
/utility/blocked_user.php
UTF-8
854
2.640625
3
[ "MIT" ]
permissive
<?php // Start Session if (session_status() == PHP_SESSION_NONE) { session_start(); } require_once 'autoloader.php'; if(isset($_SESSION['loggedUser']) ) { try { $userDao = \model\database\UserDao::getInstance(); if (!$userDao->checkEnabled($_SESSION['loggedUser'])){ $_SESSION[...
true
9817ce8f14744bca7cf338a0668fcd2a2d6a25dc
PHP
alzerid/Arbitrage
/framework/cli/CCLIBaseApplication.class.php
UTF-8
322
2.71875
3
[]
no_license
<? abstract class CCLIBaseApplication { protected $_description; public function getApplicationDescription() { return $this->_description; } public function getApplicationName() { return strtolower(preg_replace('/Application$/', '', get_class($this))); } abstract public function getApplicationType(); } ?...
true
ea4d61da5d9c9bacf03a204ac8a8cef41b9ad3f2
PHP
maintaina-com/Service_Weather
/lib/Horde/Service/Weather/Forecast/Base.php
UTF-8
3,480
3
3
[]
permissive
<?php /** * This file contains the Horde_Service_Weather_Forecast class for abstracting * access to forecast data. Provides a simple iterator for a collection of * forecast periods. * * Copyright 2011-2017 Horde LLC (http://www.horde.org/) * * @author Michael J Rubinsky <mrubinsk@horde.org> * @license http:/...
true
432d4b7f46564cec77a9ff63c8c3ccd91b2f284a
PHP
Ju-Long/htdocs
/C203/P04CreateMyLyrics/doExercise2a.php
UTF-8
115
2.609375
3
[]
no_license
<?php $start = $_POST['start']; $end = $_POST['end']; for($i = $start; $i <= $end; $i++){ echo $i."<br>"; } ?>
true
db61e09aad3db785e8a99498ffe2ccccd6294185
PHP
elinoretenorio/php-headless-crud-for-movies-db
/src/Keyword/KeywordModel.php
UTF-8
1,218
3.140625
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Movies\Keyword; use JsonSerializable; class KeywordModel implements JsonSerializable { private int $keywordId; private string $keywordName; public function __construct(KeywordDto $dto = null) { if ($dto === null) { return; } ...
true
e73c62c4679d4744751d17e7ed7fa525a4e3ba2f
PHP
tk-wing/laravel-booklikes
/app/Models/Bookshelf.php
UTF-8
748
2.53125
3
[ "MIT" ]
permissive
<?php namespace App\Models; use Illuminate\Database\Eloquent\Model; class Bookshelf extends Model { protected $table = 'bookshelves'; protected $primaryKey = 'id'; protected $fillable = ['user_id', 'title', 'auto']; public function user(){ return $this->belongsTo(User::class); } pub...
true
108cc1724eba73a55f6affa87b8054553f72d084
PHP
jfern01/klaus
/src/Objects/Account.php
UTF-8
2,591
2.84375
3
[ "MIT" ]
permissive
<?php namespace Ci\Klaus\Objects; use Ci\Klaus\Object; use JMS\Serializer\Annotation\AccessType; use JMS\Serializer\Annotation\SerializedName; use JMS\Serializer\Annotation\Type; use JMS\Serializer\Annotation\XmlElement; use JMS\Serializer\Annotation\XmlRoot; /** * @XmlRoot("Account") * @AccessType("public_method"...
true
155c3830a706aa843728b35970a2930e9579dbf7
PHP
mcbraga72/agradecaaqui
/app/Http/Controllers/UserAdminController.php
UTF-8
4,827
2.75
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use App\Models\User; use App\Http\Requests\CompleteUserRegisterRequest; use Illuminate\Http\Request; use URL; class UserAdminController extends Controller { /** * User's list page * * @return Response */ public function listAll() { $count...
true
884167cd2231d43f1832ba6a5e4e6a3f6786599b
PHP
flavius95/Licenta
/app/Topic.php
UTF-8
589
2.78125
3
[]
no_license
<?php namespace App; use Illuminate\Database\Eloquent\Model; class Topic extends Model { protected $fillable = ['topic', 'word']; public $timestamps = false; public static function arrangeTopics(array $data) : array { $result = []; if (count($data)) { foreach ($data as $ite...
true
ab0d0dc1a2fdc8bc994d10cc8c7c2f41abddb9c7
PHP
rootlocal/yii2-crud
/src/components/ActionInterface.php
UTF-8
372
2.59375
3
[ "BSD-3-Clause" ]
permissive
<?php namespace rootlocal\crud\components; /** * Interface ActionInterface * Base Action Interface * * @author Alexander Zakharov <sys@eml.ru> * @package rootlocal\crud\components */ interface ActionInterface { /** * @return string */ public function getViewName(); /** * @param stri...
true
d2d5eab9c5232cbb20eb0b85ebf892d864bd54eb
PHP
Sha-dow/ShadowStore
/users.php
UTF-8
1,736
2.921875
3
[]
no_license
<?php session_start(); include 'functions.php'; print_head("Users"); $role = ''; if (isset($_SESSION['username'])) { $firstname = $_SESSION['firstname']; $lastname = $_SESSION['lastname']; $role = $_SESSION['role']; } if ($role != 'A') { header('Location: index.php'); die(); } unset($_SESSION['so...
true
9743055733ccf5ce90f4bb6744767863a6d74ab8
PHP
hschulz/php-data-structures
/src/Queue/PriorityQueue.php
UTF-8
2,221
3.265625
3
[ "BSD-3-Clause" ]
permissive
<?php declare(strict_types=1); namespace Hschulz\DataStructures\Queue; use Serializable; use function serialize; use SplPriorityQueue; use function unserialize; /** * */ class PriorityQueue extends SplPriorityQueue implements Serializable { /** * The default priority value used when no priority is given....
true
b6b635cde0fef25b63fef651949cec035d727990
PHP
galadie/Caranille-RPG
/Design/support/Templates/Right.php
UTF-8
958
2.5625
3
[ "CC-BY-4.0" ]
permissive
<?php if(!function_exists('html_menu')) { function html_menu($title="Menu",$links = array(), $infos ="" ) { ?> <div> <span><a href="#" class="selected"><?php echo $title ?></a></span> </div> <ul> <li> <?php if(!empty($links)) { ?> <?php foreach($links as $link) {...
true
bfc1466af54aa3c8d728694295eb58b4e3e9d16d
PHP
dvsa/olcs-backend
/module/Api/src/Service/Document/Bookmark/CompanyStatus.php
UTF-8
1,112
2.53125
3
[ "MIT" ]
permissive
<?php namespace Dvsa\Olcs\Api\Service\Document\Bookmark; use Dvsa\Olcs\Api\Domain\Query\Bookmark\CompaniesHouseCompanyBundle as Qry; use Dvsa\Olcs\Api\Service\Document\Bookmark\Base\DynamicBookmark; use Dvsa\Olcs\Transfer\Query\QueryInterface; class CompanyStatus extends DynamicBookmark { /** * Get the data...
true
02e24b242dc21d5aad693e5e0ec24fdb48228e50
PHP
Trietptm-on-Coding-Algorithms/euler-4
/index.php
UTF-8
288
2.5625
3
[ "MIT" ]
permissive
<?php include("defines.php"); $problem=1; $problem = $_GET['prob']; $ausf_beginn = microtime(true); include("$problem.php"); $ausf_ende = microtime(true); ?> <hr> Execution time: <?php echo $ausf_ende - $ausf_beginn; ?> <hr> <?php highlight_file("$problem.php"); ?>
true
2ed6dfe69a07218e654f7e0fecdd67fc98343758
PHP
capirucho/Image-Gallery
/admin/includes/database.php
UTF-8
1,914
3.25
3
[]
no_license
<?php require_once("config.php"); class Database { public $connection; // use __construct() here to automatically call the open_db_connection // function once the class gets instantiated. // otherwise after instantiation you would have to call like this // $database->...
true
fdd486a524a3ac9e081d9ebaf507a8fa509c7bdb
PHP
MikeUpjohn/Mikeofmacc-Weather
/includes/printMLSFestivals.php
UTF-8
1,228
2.5625
3
[]
no_license
<?php $query = "SELECT * FROM specialevents_mlsfestivals"; $result = mysql_query($query); $currentNumberOfForecasts = mysql_num_rows($result); if(!$result) { echo "Error with forecast, please contact an administration,"; } else { if($currentNumberOfForecasts == 0) { echo "<h4><strong>Festivals of Music, Light an...
true
a3b447061721c754de2913982145f9d50475727d
PHP
eduardoborges/projeto-BD-pt2
/api/app/migrations/index.php
UTF-8
277
2.515625
3
[ "MIT" ]
permissive
<?php use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Message\ResponseInterface; $app->get('/', function(ServerRequestInterface $request, ResponseInterface $response){ $data = array('name' => 'Bob', 'age' => 40); return $response->withJson($data, 200); });
true
7611026f21c5e9ce81ba7ff5fa2cd3f85a98bf60
PHP
mmwny/xml-support-system
/models/Users.php
UTF-8
2,493
2.796875
3
[]
no_license
<?php class User { public function userAddTicket($catInput, $msgInput) { $doc = new DOMDocument; $doc->preserveWhiteSpace = false; $doc->formatOutput = true; $doc->load('xml/tickets.xml'); //get root tickets element $root = $doc->getElementsByTagName('tickets')->ite...
true
f22bcc5ae2a4877b685f1076b5c7c4dcfc5157a4
PHP
SaaSVenture/saas-resizer
/src/Saas/Resizer/helpers/File.php
UTF-8
613
3.171875
3
[]
no_license
<?php namespace Saas\Resizer\Helpers; class File { /** * Get a file MIME type by extension. * * @param string $extension * @return string */ public static function mime($ext) { $mime = ''; switch ($ext) { case 'jpg' : $mime = 'image/jpeg'; break; case 'gif' : $mime = 'image/gif'; break; c...
true
b484e8ddc33204b9ccec11665efb1a68be03244d
PHP
rafaelrosalessanch/ModuloInventario
/controladores/controladorAdicionarAtributosComputadora.php
UTF-8
6,156
2.640625
3
[]
no_license
<?php include_once '../modelo/ModeloLog.php'; $nombretipocpu =htmlspecialchars($_POST['nombretipocpu']); $nombrevelocidadcpu = htmlspecialchars($_POST['nombrevelocidadcpu']); $nombremarcahdd = htmlspecialchars($_POST['nombremarcahdd']); $nombrecapacidadhdd =htmlspecialchars($_POST['nombrecapacidadhdd']); $nombretipor...
true
1e63f136247e62c4d6c29e31270cfa7829cc1aeb
PHP
devAsadNur/wedevs-assignment-wp-plugins
/assignment-01/posts-view/includes/Frontend/View.php
UTF-8
1,771
2.90625
3
[]
no_license
<?php namespace PostsView\Frontend; /** * Frontend view handler class */ class View { /** * Initializes the class */ public function __construct() { $this->pvc_counter_mechanism(); } /** * Post view counter mechanism * * @return void */ public function pvc...
true
187754543a335785d5e939cdcf3d513b6a2b8172
PHP
theallengroup/IntelNeo
/core/include/db/any.php
UTF-8
10,990
2.9375
3
[]
no_license
<?php global $is_connected_to_db,$global_link,$database_queries,$database_sql_queries,$database_query_count; /** * This is a wrapper for generic DB functionality, it allows us to use any database, as long as what's called is SQL92 * all database access whould be done trough here * */ class any_db extends common...
true
9a36a7d17a37b6dbae9352b763f864af8703e653
PHP
sbeng/luncher
/basic/models/Cart.php
UTF-8
762
2.65625
3
[ "BSD-3-Clause" ]
permissive
<?php namespace app\models; use Yii; use yii\base\Model; use app\models\Item; /** * This is the model for shopping cart page * */ class Cart extends Model { public function rules() { return []; } public static function addItem($item) { \Yii::$app->cart->put($item, 1); ...
true
93bb64d220f888a1a1d9d5784c02e5cb5220ac61
PHP
sonhai1088/Module2
/student-manager/student/update.php
UTF-8
2,053
2.859375
3
[]
no_license
<?php include_once '../DBconnect.php'; include_once '../Student.php'; include_once '../DBstudent.php'; if ($_SERVER["REQUEST_METHOD"] == "POST") { if (!empty($_POST['name']) && !empty($_POST['email'])) { if (!empty($_GET['id'])) { $id = $_GET['id']; $name = $_POST['name']; ...
true
87e67ce1e47c34f929dc1e07e6b1a4740200777a
PHP
motojouya/exam-wikipedia-tree-sugiyama
/app/Console/Commands/Search.php
UTF-8
1,865
3.171875
3
[ "MIT" ]
permissive
<?php namespace App\Console\Commands; use Illuminate\Console\Command; use App\Services\WikipediaAccess; use App\Services\Tree\Tree; class Search extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'command:search {keyword}'; /** * The...
true
8104984b291aebab9ba770c70284b501cfb0de10
PHP
SayenkoDesign/erickson
/wp-content/themes/sayenko-erickson/blocks/testimonials.php
UTF-8
4,564
2.703125
3
[]
no_license
<?php /* Block - Testimonials */ if( ! class_exists( 'Testimonials_Block' ) ) { class Testimonials_Block extends Element_Block { public function __construct( $data ) { parent::__construct( $data ); $fields['testimonials'] = get_field( 'testimonials'...
true
c12b69ba964f52496b3985d81266aca40093a795
PHP
Yogranov/BetterLife-Web
/app/BetterLife/MailBox/Conversation.php
UTF-8
3,470
2.890625
3
[]
no_license
<?php namespace BetterLife\MailBox; use BetterLife\BetterLife; use BetterLife\Enum\Enum; use BetterLife\User\User; use BetterLife\MailBox\Message; use BetterLife\System\SystemConstant; use BetterLife\System\Encryption; class Conversation { const TABLE_NAME = "conversations"; const TABLE_KEY_COLUMN = "Id"; ...
true
12e6ff5766a8caf7460e61576cbbe5d320235a2d
PHP
0902matsumoto/Camp-Challenge
/challenge_2/2_9challenge.php
UTF-8
406
2.65625
3
[]
no_license
<!DOCTYPE HTML PUBLIC"-//WSC//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>PHP基礎</title> </head> <boby> <?php //9.以下の順で、連想配列を作成してください。 //    1に'AAA', 'hello'に'world', 'soeda'に33, 20に20 $x=array(1=>'AAA','hello'=>'world','soeda'=>'33',20=>20,...
true
215637f6f5b6cb36669fda9ef6e71e281f2d21bc
PHP
Jeffersonss/TCC
/classes/usuario/Usuario.php
UTF-8
1,001
3.09375
3
[]
no_license
<?php class Usuario { public $idUsuario; public $nome; public $rg; public $cpf; public $perfil; function Usuario ($idUsuario=null, $nome=null, $rg=null,$cpf=null, $perfil=null) { $this->idUsuario = $idUsuario; $this->nome = $nome; $this->rg = $r...
true
6afa7a59cc70965df8a22400d6fe053add2a7202
PHP
DMon777/barbellfans
/App/Models/Comments_Model.php
UTF-8
5,603
2.578125
3
[]
no_license
<?php namespace App\Models; class Comments_Model extends Abstract_Model { protected static $instance; public static function instance(){ if(self::$instance instanceof self) { return self::$instance; } return self::$instance = new self; } public function insert_c...
true
89ba99df9389cc66acf3ce5a09b97d2cb17e47c6
PHP
guidomachado/testeFPF
/models/SimularModel.php
UTF-8
756
2.6875
3
[]
no_license
<?php namespace app\models; use yii\base\Model; /** * This is the model class for table "projetos". * * @property int $Id Indice da tabela */ class SimularModel extends Model { /** * {@inheritdoc} */ public $Id; public $investimento; public $valor_de_retorno; /** * {@inheritdo...
true
af1c2fedab26db59c77afe59debd173774367525
PHP
jenskno/webprog-textsort
/textsort/test_input_from_console.php
UTF-8
389
2.59375
3
[]
no_license
<?php error_reporting(E_ALL); include_once 'processing_file.php'; if ($argv[1]){ $datei = trim($argv[1]);// ." ..."; } if (file_exists($datei)) { //echo $argv[1] . " gefunden"; $arr = mirror_content(file_get_contents($datei)); foreach ($arr as $key => $value) { echo "Wort: $key kommt $value...
true
32d7f8b3794bbea28d0afcee0ac9d4232a8cba2f
PHP
yiisoft/yii2-redis
/tests/RedisSessionTest.php
UTF-8
2,676
2.640625
3
[]
permissive
<?php namespace yiiunit\extensions\redis; use yii\redis\Session; use yii\web\DbSession; /** * Class for testing redis session backend * @group redis * @group session */ class RedisSessionTest extends TestCase { public function testReadWrite() { $session = new Session(); $session->writeSe...
true
5aee41ca7f13103acabf1235011fb1cb8473e916
PHP
OpenMageModuleFostering/ipg_pagseguro_transparente
/lib/Ipagare/PagSeguroDireto/Domain/Billing.php
UTF-8
638
2.875
3
[]
no_license
<?php /** * Shipping information */ class Ipagare_PagSeguroDireto_Domain_Billing { /** * Shipping address * @see Ipagare_PagSeguroDireto_Domain_Address */ private $address; /** * Sets the shipping address * @see Ipagare_PagSeguroDireto_Domain_Address * @param Ipagare_PagSeguroDireto_Domain_...
true
fd44940b59fec06268209c33d85bae36d4233ecb
PHP
Mdhesari/design-patterns
/app/NullObject/Person/Manager.php
UTF-8
401
3.21875
3
[]
no_license
<?php namespace App\NullObject\Person; class Manager extends Person { protected $employees = []; public function employ(Person ...$persons) { foreach ($persons as $person) { echo $person->getData(); $this->employees[] = $person; } } public function get...
true
3f99daeb9614f65a54b229fbdb8184caa78b740b
PHP
loveorigami/shop_prototype
/tests/finders/SubcategorySeocodeFinderTests.php
UTF-8
2,947
2.5625
3
[]
no_license
<?php namespace app\tests\finders; use PHPUnit\Framework\TestCase; use app\finders\SubcategorySeocodeFinder; use app\tests\DbManager; use app\tests\sources\fixtures\SubcategoryFixture; use app\models\SubcategoryModel; /** * Тестирует класс SubcategorySeocodeFinder */ class SubcategorySeocodeFinderTests extends Tes...
true
3edaf13d4230332b9190dade9fd294ad16d53edf
PHP
cuongvv/koel
/tests/Integration/Models/SongTest.php
UTF-8
2,444
2.6875
3
[ "MIT" ]
permissive
<?php namespace Tests\Integration\Models; use App\Models\Song; use Aws\AwsClient; use Cache; use Mockery as m; use Tests\TestCase; class SongTest extends TestCase { protected function tearDown() { parent::tearDown(); m::close(); } /** @test */ public function it_returns_object_st...
true
e68e7353a0b67824b2454797b917444d5f1a2d61
PHP
carlosruesta/php-io
/aula05 - uso de contexto para acessar APIs ou ZIP com senha.php
UTF-8
1,026
2.734375
3
[]
no_license
<?php /** * Acessar uma API via stream definindo os metodos, headers e outros parametros da request * Sera utilizado os contexto de cada wrapper ou pelo protocolo */ $contexto = stream_context_create([ 'http' => [ 'method' => 'POST', 'header' => [ "X-From: PHP", "Content-Type: tex...
true
a0441b2f6e1dc0e7e149a49ab3fce8be20237a9b
PHP
sviga/kattilera
/include/frontoffice_manager.class.php
UTF-8
26,267
2.625
3
[]
no_license
<?php /** * Основной класс, управляющий сайтом при просмотре его пользователями * * Решает следующие задачи: * <ul> * <li>Определение запрашиваемой страницы</li> * <li>Формирование страницы и вызов соответствующих модулей и их методов</li> * </ul> * * @name frontoffice_manager * @package Kernel * @copyright ...
true
5a8c6606d288ccef5b0049ae9cded19d9e7a767f
PHP
guymorin/football-predictions
/include/criterion.php
UTF-8
10,478
2.5625
3
[]
no_license
<?php function criterion($type,$data,$pdo){ $v=0; switch($type){ case "motivC1": if($data->motivation1!="") $v=intval($data->motivation1); else $v=1; // default is for home team break; case "motivC2": if($data->motivation2!="") $v=intval($data->...
true
acacbaa8cc49a9246d0bbbc12344dddd88c20064
PHP
linhongyou/uu
/protected/model/user.class.php
UTF-8
387
2.9375
3
[]
no_license
<?php class User extends Model{ private $id; private $username; private $password; function __construct(){ parent::__construct(); } private function __get($property_name) { if (isset ( $this->$property_name )) { return ($this->$property_name); } else { return (NULL); } } private function __set($pr...
true
53845f4e04fb9a27ba7b3f7ca62a56c1c8f34067
PHP
tangping624/ql-laravel
/app/Repositories/Image.php
UTF-8
2,270
2.765625
3
[]
no_license
<?php namespace App\Repositories; use App\Models\Image as Model; use Illuminate\Http\UploadedFile; use Illuminate\Support\Str; use Auth; use Storage; class Image { /** * 上传图片 * * @param Illuminate\Http\UploadedFile $file 上传文件 * @return App\Models\Image */ public static function uplo...
true
488753d99d62ed7ab4060d7d6bc76412a634af55
PHP
josephldaigle/pl-project
/tests/Unit/Core/Data/Query/FindByGuidHandlerTest.php
UTF-8
1,615
2.5625
3
[]
no_license
<?php /** * Created by PhpStorm. * User: joe * Date: 10/22/18 * Time: 4:01 PM */ namespace Test\Unit\Core\Data\Query; use PapaLocal\Core\Data\Query\FindByGuid; use PapaLocal\Core\Data\Query\FindByGuidHandler; use PapaLocal\Core\Data\RecordInterface; use PapaLocal\Core\Data\TableGatewayInterface; use PHPUnit\Fra...
true
c633e4d1ee699fd4ba5eb94b04f187427bcd3eb8
PHP
Yennhi2k/CONG_NGHE_WEB
/edit-education.php
UTF-8
3,364
2.671875
3
[]
no_license
<?php // kiểm tra id có tồn tại trên url hay k? if(!isset($_GET['id'])) { header("Location:education.php"); } //b1: kết nối với database require("config-csdl.php"); // lấy dữ liệu với id đã có trên csdl $id = $_GET['id']; $sql="select * from education where id_...
true
79f0abe39fba4ddd8a4a5ca4b4d425a3dcebfc30
PHP
jaromic/pansim
/src/Statistics.php
UTF-8
302
3.171875
3
[ "MIT" ]
permissive
<?php namespace Jarosoft; class Statistics { public static function randomIntNormalDistribution(float $mean, float $sd): float { $x = mt_rand() / mt_getrandmax(); $y = mt_rand() / mt_getrandmax(); return sqrt(-2 * log($x)) * cos(2 * pi() * $y) * $sd + $mean; } }
true
58e3aaa4bfb175560cb0543ef41473aa6799691e
PHP
bairwell/emojicalc
/src/Bairwell/Emojicalc/Container.php
UTF-8
2,683
3.34375
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Bairwell\Emojicalc; /** * Simple PSR-11 inspired container. * @package Bairwell\Emojicalc */ class Container implements ContainerInterface { /** * The actual store. * @var array */ protected $store = []; /** * Container constructor. */...
true
114f9291845ed591bda695f7a4a744c0bdd7596e
PHP
NicolasGlassey/I133_calendar_teacher_kit
/calendarStep02/calendarStep02.php
UTF-8
1,187
2.640625
3
[]
no_license
<?php /** * Author : nicolas.glassey@cpnv.ch * Project : 133 - Calendar - Step 01 * Created : 09.12.2018 - 19h:30 * * Last update : [01.12.2018 author] * [add $logName in function setFullPath] * Git source : [link] */ //region global variables $title = "Calendar"; ...
true
7d7182cee7d87943166cd8b37af50da6fd9950ce
PHP
LawrenceuSRprog/webPoweredPHP-PortraitTree
/C2_classBrickTester.php
UTF-8
3,887
2.96875
3
[]
no_license
<?php include 'autoload.php'; # This is a Test-Driver for BlockFind formerly:ToolBox class BrickTester { /* # #### #### #### #### #### #### #### ###### #### #### #### #### # # This BlockFind Holder assumes the CLASS BlockFind exists # see line 48 ========...
true
3a5eafe77f952881f3d97efefec58f4d495650bb
PHP
Fincallorca/HitchHikerApi
/src/Wsdl/v3_1_388_1/EnumType/TicketingTypeEnum.php
UTF-8
1,562
2.734375
3
[ "MIT" ]
permissive
<?php namespace Fincallorca\HitchHikerApi\Wsdl\v3_1_388_1\EnumType; /** * This class stands for TicketingTypeEnum EnumType * Meta informations extracted from the WSDL * - nillable: true * - type: tns:TicketingTypeEnum * @subpackage Enumerations */ class TicketingTypeEnum { /** * Constant for value 'Non...
true
982627fab716ffaa4bc8fdb55c9732d67a24233a
PHP
gilberg-vrn/php-lucene-analyzer
/src/analyses/FilteringTokenFilter.php
UTF-8
1,192
2.96875
3
[]
no_license
<?php namespace ftIndex\analyses; /** * Class FilteringTokenFilter * * @package ftIndex\analyses * @author Dmitrii Emelyanov <gilberg.vrn@gmail.com> * @date 9/9/19 1:47 PM */ abstract class FilteringTokenFilter extends TokenStream { private $skippedPositions; /** * Create a new {@link Fil...
true
f26b2aa5a055da89f9e979b11ede6ed671ae630c
PHP
mabrursatori/CI-toko-batik
/app/Models/GambarModel.php
UTF-8
701
2.65625
3
[ "MIT" ]
permissive
<?php namespace App\Models; use CodeIgniter\Model; class GambarModel extends Model { protected $table = 'gambar'; protected $useTimestamps = true; protected $allowedFields = ['id', 'url', 'slug', 'ordinal']; protected $gambar; public function __construct() { $this->gambar = \Config\Da...
true
cb698c11853c3265ae9b8824797581ff546edb64
PHP
trint/flarum-s
/src/daemon/Service/StartCommand.php
UTF-8
876
2.609375
3
[ "MIT" ]
permissive
<?php namespace Flarum\Daemon\Service; use Flarum\Console\Flag; use Flarum\Console\Color; /** * Class StartComand * @package Flarum\Daemon\Service * @author <trint.dev@gmail.com> */ class StartCommand extends BaseCommand { /** * @var bool */ public $update; /** * @var bool */ ...
true
ded0dd34c10c29f4a1ab0b69880ae1712a425a3e
PHP
borisovmi/laravel-shop
/app/Order.php
UTF-8
1,758
2.75
3
[]
no_license
<?php namespace App; use Illuminate\Database\Eloquent\Model; use Session; use Cart; use Illuminate\Support\Facades\DB; class Order extends Model { /* save an order in DB after clicking on checkout button */ static public function SaveOrder() { $order = new self(); $order->uid = Session:...
true
4895c12f894c19d4745353bf9419cb442d372928
PHP
fhp/unicorn
/src/Unicorn/UI/HTML/Attributes/SourceString.php
UTF-8
364
2.765625
3
[]
no_license
<?php namespace Unicorn\UI\HTML\Attributes; trait SourceString { use AttributeTrait; public function sourceString(): string { return $this->property("srcdoc"); } public function hasSourceString(): bool { return $this->hasProperty("srcdoc"); } public function setSourceString(string $value): void { ...
true
090307f4e38b0ff77c7efd2d3e8224e856ebc751
PHP
WeLeetCoder/swoole
/App/Validate/RequestValidate.php
UTF-8
2,754
2.71875
3
[]
no_license
<?php namespace App\Validate; use App\Utils\Code; use EasySwoole\EasySwoole\Config; class RequestValidate extends BaseValidate { /** * 参数校验,需要哪些参数,哪些参数是必须的,可以列出。 */ /** * 通过 Access key 找到对应的 Secret key,然后再经过排序请求字段,签名即可 */ static function validate(): \Closure { /** ...
true
3d993d290d8154ae4712ccf9d9bdaa880339fd2c
PHP
CatherineCbl/WF3
/PHP/post/formulaire2.php
UTF-8
1,195
3.046875
3
[]
no_license
<?php if($_POST) { echo "ville : " . $_POST['ville'] . '<br>'; echo "cp : " . $_POST['cp'] . '<br>'; echo "adresse : " . $_POST['adresse'] . '<br>'; echo '<hr>'; //récupération des saisies via une boucle foreach ($_POST as $indice => $valeur) { echo $indice . ' : ' . $valeur . '<br>'; } } echo '<pre>'; print_r($_P...
true
6e6a6f8349fbb73cfe522e870105c0a3eb233500
PHP
a-abdi/shop
/app/Repositories/Eloquent/ExampleRepository.php
UTF-8
328
2.59375
3
[ "MIT" ]
permissive
<?php namespace App\Repositories\Eloquent; use App\Models\Example; use App\Contracts\Repositories\ExampleRepositoryInterface; class ExampleRepository extends BaseRepository implements ExampleRepositoryInterface { public function __construct(private Example $example) { parent::__construct($example); ...
true
8b0e0a56eaa095e867211c69730d2864c1997ad0
PHP
adrianomartino/CRUDo
/application/library/Data.php
UTF-8
1,185
2.828125
3
[]
no_license
<?php class Data{ private $to_save_in_cookies='user_email,site_lang,user_lang'; //list static function addToSession($data_name,$data_value){ $_SESSION[$data_name]=$data_value; } static function destroy($data){ if(isset($_COOKIE[$data])) setcookie($data...
true
83cb3094d3f8d2eacf8e5e43ab4db5f1aaf9cd7c
PHP
Lucatim/Domisep
/model/passerelle.php
UTF-8
3,179
2.890625
3
[]
no_license
<?php /** * Created by PhpStorm. * User: franck.meyer * Date: 11/06/2018 * Time: 11:08 */ class passerelle { public static function recupererDonnees(){ $ch = curl_init(); curl_setopt( $ch, CURLOPT_URL, "http://projets-tomcat.isep.fr:8080/appService?ACTION=GE...
true
cfadffcac90a0f63316a59b71d95b337c45f8d42
PHP
kirangun/1108
/load.php
UTF-8
1,086
2.921875
3
[]
no_license
<!DOCTYPE html> <html> <head> <style> table, th, td { border: 1px solid black; } </style> </head> <body> <?php $servername = "localhost"; $username = "root"; $password = ""; $dbname = "test"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection i...
true
e7dbd99076d987b8c1e2edf54a6e525ed277214d
PHP
hermesto/DB
/insert.php
UTF-8
613
2.765625
3
[]
no_license
<?php require_once('settings.config.php'); // Define db configuration arrays here require_once('DBConnection.php'); // Include this file $test3 = $_POST["nombre"]; echo $test3; $database = new DBConnection($localhost); // Create new connection by passing in your configuration array /...
true
5ce3d496c148bee849d479791acb1b4bc2cb84c8
PHP
thierrysutter/siteClub
/ManagerEntrainement.class.php
ISO-8859-1
4,789
3.203125
3
[]
no_license
<?php class ManagerEntrainement { private $_db; public function __construct($db) { $this->setDb($db); } public function add($id, $libelle, $anneeDebut, $anneeFin, $login) { //echo "Ajout d'un nouveau article<br>"; // Prparation de la requte d'insertion. $q = $this->_db->query("I...
true
df93bbe6b84838ae76d39349d2f93ed251c49c6e
PHP
maedca/cursoPHPav
/colaboracion_objetos.php
UTF-8
2,113
2.875
3
[]
no_license
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <?php class Cabecera{ private $titulo; public function __construct($tit){ $this->titulo=$tit; } public function graficar(){ echo '<h1 style="text-align:center">'.$this->titulo.'</h1>'; } ...
true
037ae092be17eedadc0cf7948d61a0be0e73dc93
PHP
satthi/pawapuro-league
/src/Model/Entity/BasePlayer.php
UTF-8
3,575
2.609375
3
[]
no_license
<?php namespace App\Model\Entity; use Cake\ORM\Entity; /** * BasePlayer Entity * * @property int $id * @property string $name * @property string $name_short * @property bool $deleted * @property \Cake\I18n\Time $deleted_date * @property \Cake\I18n\Time $created * @property \Cake\I18n\Time $modified * * @pr...
true
a715573075f094cb84a85f7efed9f09b6ef827ac
PHP
enamba/janamesa
/application/models/Company.php
UTF-8
19,211
2.78125
3
[]
no_license
<?php /** * @author mlaug */ class Yourdelivery_Model_Company extends Default_Model_Base { /** * get all departments of company * @var SplObjectStorage */ protected $_departments = null; /** * store all employees as objects * @var SplObjectStorage */ protected $_e...
true
333158ead8f48246eabd5d919e0a6625dab0079b
PHP
askovorodka/hotels
/src/AppBundle/Services/Geocoder/YandexGeocoder.php
UTF-8
7,208
2.765625
3
[ "MIT" ]
permissive
<?php namespace AppBundle\Services\Geocoder; use AppBundle\Services\Geocoder\Dto\AddressDto; use AppBundle\Services\Geocoder\Dto\MetroDto; use AppBundle\Services\Geocoder\ValueObjects\CoordinatesPoint; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\GuzzleException; use Psr\Log\LoggerInterface; class Yandex...
true
11a13ecfbad87e1cd67cf3bdbbc1b53f4a707e1f
PHP
Born-in-moldova/school.loc
/app/core/mysql_driver.php
UTF-8
7,119
3.125
3
[]
no_license
<? class MYSQL_Driver{ private $connection; private $query; private $error = false; private $debug = false; private $columns; private $values; protected $table; protected $result; public function __construct(){ $this->debug = DEBUG; $this->connection = new...
true
cc1853192ba3712414d9acaa4088e5784db47fe8
PHP
decole/planka-php-sdk
/src/Actions/Attachment/AttachmentCreateAction.php
UTF-8
1,472
2.625
3
[]
no_license
<?php declare(strict_types=1); namespace Planka\Bridge\Actions\Attachment; use Planka\Bridge\Contracts\Actions\ResponseResultInterface; use Planka\Bridge\Contracts\Actions\AuthenticateInterface; use Symfony\Component\Mime\Part\Multipart\FormDataPart; use Planka\Bridge\Contracts\Actions\ActionInterface; use Planka\Br...
true
709eaa4f926e2e9176bde0db202f32cd9c600367
PHP
bev-designs/ldl-http-router
/src/LDL/Http/Router/Handler/Exception/ExceptionHandlerInterface.php
UTF-8
649
2.578125
3
[]
no_license
<?php declare(strict_types=1); namespace LDL\Http\Router\Handler\Exception; use LDL\Framework\Base\Contracts\NameableInterface; use LDL\Http\Router\Router; use LDL\Type\Collection\Types\Classes\ClassCollection; interface ExceptionHandlerInterface extends NameableInterface { /** * @param string $exceptionCla...
true
f6883243b4950fb68b172dc21cab382f208ccdb9
PHP
dnirmalasari18/simkp-mamet
/app/Http/Controllers/UserController.php
UTF-8
5,872
2.578125
3
[]
no_license
<?php namespace App\Http\Controllers; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use App\User; use RealRashid\SweetAlert\Facades\Alert; class UserController extends Controller { /** * Display user list. * * @return Response */ public function index(){ $users = User:...
true
f1e28b5a0e7d50018621ec1b666734dc9f32e47e
PHP
honewatson/config_test
/api/router_page.php
UTF-8
3,968
2.625
3
[]
no_license
<?php namespace api; /* class */ class router_page { public $page_folder; public $route_bits; public $factory; public $request; public $class_name; public $request_type = null; public $route_bits_size = null; public $routes = null; public $routes_location = null; public $params ...
true
b251f8078cf781e0c9636ac6df94edb267c79d96
PHP
sschepis-zuul/xchain
/app/Handlers/XChain/Network/Bitcoin/BitcoinBlockEventBuilder.php
UTF-8
1,327
2.53125
3
[]
no_license
<?php namespace App\Handlers\XChain\Network\Bitcoin; use Nbobtc\Bitcoind\Bitcoind; use Tokenly\LaravelEventLog\Facade\EventLog; use \Exception; /* * BitcoinBlockEventBuilder */ class BitcoinBlockEventBuilder { public function __construct(Bitcoind $bitcoind) { $this->bitcoind = $bitcoind; } ...
true
ab6452b8768cae7d96a3b0a276daca845a40c0b0
PHP
renandoring/aula5-conceito-heranca
/Pessoa.class.php
UTF-8
410
3.5625
4
[]
no_license
<?php class Pessoa{ public $nome; public $idade; public $telefone; public $endereco; function __construct($nome,$idade,$telefone,$endereco){ $this->nome = $nome; $this->idade = $idade; $this->telefone = $telefone; $this->endereco = $endereco; } public function andar(){ $this->nome; $this->idade; ...
true
08d532e89bc594d899bc158cff66b4f815bfb14e
PHP
elyasnoui/PC_Potion_Project
/PC Potion Project/contact.php
UTF-8
14,962
2.53125
3
[]
no_license
<?php // Start the session session_start(); $_SESSION['fnameErr'] = $_SESSION['lnameErr'] = $_SESSION['phoneErr'] = $_SESSION['emailErr'] = $_SESSION['rUsernameErr'] = $_SESSION['rPasswordErr'] = $_SESSION['lUsernameErr'] = $_SESSION['lPasswordErr'] = $_SESSION['dateErr'] = $_SESSION['timeErr'] = ""; ?> <!DOCT...
true
7ebc00dd22dc701462612a403771b016ed0e0706
PHP
cornejong/blackdoor-util
/src/Traits/MagicObjectAccessWithGettersAndSetters.php
UTF-8
2,993
3.296875
3
[]
no_license
<?php /* * File: MagicObjectAccess.php * Project: Blackdoor\Util\Traits * File Created: Tuesday, 24th March 2020 8:55:52 pm * Author: Corné de Jong (corne@tearo.eu) * ------------------------------------------------------------ * Copyright 2019 - 2020 SouthCoast */ namespace Blackdoor\Util\Traits; /** * Trai...
true
51e2f69221acf0c27212ac741807da389771ecfa
PHP
l396635210/study
/htdocs/src/AppBundle/Entity/Category.php
UTF-8
590
2.53125
3
[]
no_license
<?php namespace AppBundle\Entity; use DBAL\ORM\Entity; class Category extends Entity{ protected $title = ['type'=>'char', 'length'=>40, 'comment'=>'标题']; protected $status = ['type'=>'bool', 'comment'=>'状态']; protected $descr = ['type'=>'varchar', 'comment'=>'描述']; protected $createTime = ['type'=>...
true
3aed7c1c70cc47896009767cab00f381303b393f
PHP
ciampa-davide/php-snacks-blocco-1
/PHP-snack-1.php
UTF-8
2,058
2.890625
3
[]
no_license
<!-- PHP Snack 1: Creiamo un array 'matches' contenente altri array i quali rappresentano delle partite di basket di un’ipotetica tappa del calendario. Ogni array della partita avrà una squadra di casa e una squadra ospite, punti fatti dalla squadra di casa e punti fatti dalla squadra ospite. Stampiamo a schermo...
true
687dc37c9855409bd927894b8f4b7ba7e32cda79
PHP
Saadique/AOMS_Oasis_back_end
/app/Services/Service.php
UTF-8
1,200
2.609375
3
[ "MIT" ]
permissive
<?php namespace App\Services; use App\Mail\PasswordIssuer; use App\Traits\ApiResponser; use DateTime; use Illuminate\Support\Facades\Mail; class Service { use ApiResponser; // protected $serviceGateway; /** * Service constructor. */ // public function __construct(ServiceGateway $serviceGa...
true
7686b4468a231fcd265e931cd11ad1be9edf1460
PHP
AlchemicA/MateriaArchive
/Data/Collection.php
UTF-8
491
3
3
[]
no_license
<?php namespace Materia\Data; /** * Collection interface * * @package Materia.Data * @author Filippo "Pirosauro" Bovo * @link http://lab.alchemica.it/materia/ **/ interface Collection extends \Iterator, \Countable { /** * Returns collection's type * * @return string class name or ...
true
556c72577ed3321f09fe40f0c96a291ec971c610
PHP
camachogfelipe/imaginamos
/incolacteos/business/model/Dbform_news.db.php
UTF-8
1,080
2.578125
3
[]
no_license
<?php /* * @file : Dbform_news.db.php * @brief : Clase para la interaccion con la tabla form_news * @version : 3.3 * @ultima_modificacion: 2013-07-11 * @author : Ruben Dario Cifuentes Torres * @generated : Generador DAO vercion 1.1 * * @class: Dbform_ne...
true
508cba5021eb5ef922b89fa92a483bd6ffde4bc9
PHP
rollerworks-graveyard/datagrid
/src/Column/CompoundColumn.php
UTF-8
1,505
2.578125
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); /* * This file is part of the RollerworksDatagrid package. * * (c) Sebastiaan Stok <s.stok@rollerscapes.net> * * This source file is subject to the MIT license that is bundled * with this source code in the file LICENSE. */ namespace Rollerworks\Component\Datagrid\Column; use R...
true
0bd7890d5df4acf96e6a86ffccd26d9d0c4e44bc
PHP
netphonetech/WeeklyReport
/user_activation.php
UTF-8
1,001
2.546875
3
[]
no_license
<?php require_once('dbconnection.php'); print_r($user); $message = ''; $type = ''; if (isset($_POST['id']) && $_POST['id']!='') { $id = $_POST['id']; if ($id == $user['Id']) { $message = 'You can\'t disable your account!'; $type = 'fail'; } else{ if (isset($_POST['activate'])) { $sql = "UPDATE user SET sta...
true
bcb6c19b47ea33a9241f1db3ea40677750097661
PHP
milyass/Camagru
/www/app/models/User.php
UTF-8
8,090
2.9375
3
[ "MIT" ]
permissive
<?php class User { private $db; public function __construct(){ $this->db = new Database; } // Regsiter user public function register($data){ $hash = md5(rand(0,1000)); $this->db->query('INSERT INTO users (name, email, password, token) VALUES(:name, :email, :password, :token)'); ...
true
ac143d102cc86cc94815ae642e6346183bee4833
PHP
syzngroup/json-api
/src/Contracts/Repositories/ErrorsRepositoryInterface.php
UTF-8
327
2.546875
3
[]
no_license
<?php namespace Syzn\JsonApi\Contracts\Repositories; use Syzn\JsonApi\Contracts\EncodableJsonApiStructureInterface; use Syzn\JsonApi\Contracts\ErrorInterface; interface ErrorsRepositoryInterface extends EncodableJsonApiStructureInterface { public function all(): array; public function add(ErrorInterface $err...
true
169f4aa2ad789c4f61c34762e535a615a2567b62
PHP
devBPI/WebService-InterfaceTest
/utils/xmlUtils.php
UTF-8
1,074
2.875
3
[]
no_license
<?php function xmlEscape($string) { return str_replace(array('&', '<', '>', '\'', '"'), array('&amp;', '&lt;', '&gt;', '&apos;', '&quot;'), $string); } function array_to_xml($data, &$xml_data) { foreach($data as $key => $value) { if(is_numeric($key)) { $key = 'item'.$key; //dealing with <0/>..<n/> issues }...
true
cdb2f0cea1d550f89ddd3a74a61795a0910f9f15
PHP
phpmathan/zampphp
/plugins/Zamp/Request.php
UTF-8
28,146
2.8125
3
[ "MIT" ]
permissive
<?php namespace Zamp; class Request extends Base { const CONTENT_TYPE_URL = 1; const CONTENT_TYPE_STRING = 2; const CONTENT_TYPE_IMAGE = 3; // Character set public $charset = 'UTF-8'; // Random Hash for protecting URLs protected $_xss_hash; // Generates the XSS hash if n...
true