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
7e1fc39eb6845428ce3afe8127536db6e39ec28f
PHP
mattkoch614/medidata-rws-php-lib
/src/Schema/MdsolQueryType.php
UTF-8
6,864
2.609375
3
[ "MIT" ]
permissive
<?php namespace Medidata\RwsPhp\Schema\ODM\mdsol; /** * Class representing MdsolQueryType * * * XSD Type: mdsol-Query */ class MdsolQueryType { /** * @property string $recipient */ private $recipient = null; /** * @property string $value */ private $value = null; /** ...
true
09d476efc96af65ed870ef31bd6e92e9a84c8105
PHP
alexfurr/quiz-tool-lite
/classes/class-draw.php
UTF-8
22,804
2.875
3
[]
no_license
<?php class ekQuizDraw { static function drawUserResults($quizID, $CSV=false) { $html=''; $csvArray = array(); //dataTables js //qtl_utils::loadDataTables(); $ekQuiz_queries = new ekQuiz_queries(); // Get an array of results with username as key // Get the results $quizResults = $ekQuiz_...
true
4e45839c3fe57f976ac282a83ad3c80d31636c36
PHP
NathaliePillen/fundamentalScripts
/carddraw.php
UTF-8
1,175
3.65625
4
[]
no_license
<?php $suits =["Spades", "Hearts", "Clubs", "Diamonds"]; $faces = ["Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine", "Ten", "Jack", "Queen", "King", "Ace"]; $deck = []; foreach ($suits as $suit){ foreach ($faces as $face) { $deck[] = ["face"=>$face, "suit"=>$suit]; } } shuffle($deck); //print_r...
true
bbfa022651f28baeb6e296e05cade3087ae47ed0
PHP
isoon5/US-Accidents-Smart-Visualizer
/models/State.php
UTF-8
575
2.609375
3
[]
no_license
<?php header('Acces-Control-Allow-Origin: *'); include_once $_SERVER['DOCUMENT_ROOT'].'/tw/config/Database.php'; class State { private $conn; private $table = 'state_cases'; public $count; public function __construct($db){ $this->conn = $db; } public function getStateAccidentFreq($stat...
true
d9042c2b80274bd04fdc43bc18e3a4cb958ceb9f
PHP
iyottasoft/inagist_ui
/rss_gen/Utils.php
UTF-8
4,185
2.953125
3
[]
no_license
<?php class Utils{ public static function timeAgo($date,$gran=2) { $date = strtotime($date); $difference = time() - $date; $periods = array( 'month' => 2628000, 'day' => 86400, 'hour' => 3600, 'min' => 60 ); $ago = array(); if($difference < 60) ...
true
1197d9ce00d6b8cabd687405a2cb2482196957bb
PHP
vs0uz4/cr_laravel_com_android
/api/app/Transformers/BillPayTransformer.php
UTF-8
986
2.515625
3
[]
no_license
<?php namespace Backend\Transformers; use League\Fractal\TransformerAbstract; use Backend\Models\BillPay; /** * Class BillPayTransformer * @package namespace Backend\Transformers; */ class BillPayTransformer extends TransformerAbstract { protected $defaultIncludes = ['category']; /** * Transform the...
true
fa4befc480811cd3ecaf2cc87ca9d24a1bd4c6d7
PHP
anokbakn/StudyHall
/studyhall/app/kite_models/index.php
UTF-8
13,162
2.984375
3
[]
no_license
<!DOCTYPE html> use DocumentsManager; use ForumManager; <!-- 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. --> <html> <head> <meta charset="UTF-8"> <title></title> </head> ...
true
66436a8140928bd4e809293f06f19bcc1ff3c609
PHP
ingspadavecchia/Prefab
/http/fab/Prefab5/SearchCriteria/Filter/Map/Factory/AwareTrait.php
UTF-8
1,855
2.5625
3
[]
permissive
<?php declare(strict_types=1); namespace Neighborhoods\ReplaceThisWithTheNameOfYourProduct\Prefab5\SearchCriteria\Filter\Map\Factory; use Neighborhoods\ReplaceThisWithTheNameOfYourProduct\Prefab5\SearchCriteria\Filter\Map\FactoryInterface; /** @codeCoverageIgnore */ trait AwareTrait { protected $NeighborhoodsRep...
true
db56fbc817ce1d084015efd36600e2f190c21b19
PHP
eadsimone/Algo
/PHP/odesk/fantastic3.php
UTF-8
452
3.21875
3
[]
no_license
<?php /** * Created by PhpStorm. * User: edesimone * Date: 9/1/14 * Time: 2:45 PM */ $series = array(0,1,1,1); for($i=3 ; $i<=$n ; $i++){ $a = (isset($series[ (int)$i-3 ]))?$series[ (int)$i-3 ]:0; $b = (isset($series[ (int)$i-2 ]))?$series[ (int)$i-2 ]:0; $c = (isset($series[ (int)$i-1 ]))?$series[...
true
441d5acc8767e6613904f214c0ce1ff2be18915b
PHP
my2ter/Silex-SymfonyLive-2012
/Silex-Backbone-Todolist/src/Todo/Controller/Api.php
UTF-8
1,874
2.859375
3
[]
no_license
<?php namespace Todo\Controller; use Todo\Controller; use Todo\Model\Todo; use Symfony\Component\HttpFoundation\Request; class Api extends Controller { public function initialize() { $this->app->get('/api/todo', array($this, 'listTodos')); $this->app->post('/api/todo', array($this, 'add')); ...
true
fb459411b7300ffcad9ae141c3f4a064c200474d
PHP
JarrydLeePatel/ITEC321-MIM
/ecom/resources/functions.php
UTF-8
6,820
3.015625
3
[]
no_license
<?php /* FUNCTIONS THE E-COMMERCE PLATFORM Jarryd Patel: 14 May 2020 https://github.com/JarrydLeePatel */ /******************************************************/ //TEST CODE TO CHECK IF DB IS CONNECTED// /* if($connection){ echo "Database is connected"; } echo "from functions"; */ //*******HELPER FUNCTIONS...
true
058cd36ac6e51c0bb94d02191ff34edf36d6d9e8
PHP
ValentinMerlet/slub
/src/Slub/Infrastructure/Chat/Slack/MessageIdentifierHelper.php
UTF-8
590
2.75
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Slub\Infrastructure\Chat\Slack; /** * @author Samir Boulil <samir.boulil@gmail.com> */ class MessageIdentifierHelper { private const SEPARATOR = '@'; public static function from(string $channel, string $ts): string { return sprintf('%s%s%s', $channel...
true
cbb85c8f5a9acb4674b58282b417c3d3d7fd9f62
PHP
philum/cms
/plug/sci/pi.php
UTF-8
625
2.671875
3
[]
no_license
<?php //phi //http://www.piday.org/million/ class pi{ static $conn=1; //$pi4=1-1/3+1/5-1/7+1/9-1/11... static function pi1($n){ static $pi4; if(!$pi4)$pi4=1; static $i; $i+=2; static $o; $o=$o?0:1; //$current=1/(1+$i); $current=bcdiv(1,1+$i,99); if($o)$pi4-=$current; else $pi4+=$current; //if($o)echo $pi4.'+'.$current....
true
0ba1e71bb6af0624ea9d9df0b502c8b7cdf05c79
PHP
akpe2003/php
/floats.php
UTF-8
361
3.609375
4
[]
no_license
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>PHP Series3, Floating points/Decimals</title> </head> <body> <?php $var1=3.14; echo "<br />"; echo 4/3; echo "<br />"; $myfloat=3.14; echo "<br />"; echo round($myfloat,1); echo "<br />"; echo ceil($myfloat); echo "<br />"; ec...
true
63b4b79cc3e9ccdf9576676c11fa5f7eda248185
PHP
Skydt90/Master_laravel_2019
/app/Traits/Taggable.php
UTF-8
1,038
2.8125
3
[ "MIT" ]
permissive
<?php namespace App\Traits; use App\Tag; trait Taggable { //assigning events to all models using trait protected static function bootTaggable() { //calling tags on model, adding new manytomany with sync having all the tags returned by function static::updating(function ($model) { ...
true
fd9c35b98525b1ead8fd0072a37f1a78f3819317
PHP
CarltonSoftware/tabs-api-client
/src/tabs/api/booking/Booking.php
UTF-8
38,624
2.65625
3
[]
no_license
<?php /** * Tabs Rest API Booking object. * * PHP Version 5.3 * * @category API_Client * @package Tabs * @author Alex Wyett <alex@wyett.co.uk> * @copyright 2013 Carlton Software * @license http://www.php.net/license/3_01.txt PHP License 3.01 * @link http://www.carltonsoftware.co.uk */ namespa...
true
ac4b209ec3f3edd9148a60eaba79974bf2c6cc65
PHP
Mariana-Molnar/Bachelor
/themes/carpathianfood/Entity/PostType.php
UTF-8
10,805
3.015625
3
[]
no_license
<?php /** * User: Timon * Date: 26.10.2017 * Time: 14:06 */ namespace Entity; use Service\Helpers; use Service\PostTypeCreator; use Service\TaxonomyCreator; class PostType { public $id; public $title; public $content; public $excerpt; public $status; public $slug; public $create_date; public static $M...
true
734be6e448031b90cb467f8d11b02cd850d248a4
PHP
bjubes/Library
/input-form-loop.php
UTF-8
1,331
2.671875
3
[]
no_license
<?php $labels = array("Copies", "Title", "Author", "ISBN", "Dewey Decimal", "Edition Information", "Summary"); $dbname = array("amt", "title", "author", "isbn", "dewey", "info", "summary"); $errors = array(); $defaults = array("Number of Copies", "Title", "Author", "ISBN", "Dewey Decimal", "ex. Hardcover", "A brie...
true
9819db37a96570d42a9876ebfc554515f817dbd9
PHP
bitweaver/tidbits
/bookmark_lib.php
UTF-8
6,239
2.625
3
[]
no_license
<?php /** * $Header$ * * Lib for user administration, groups and permissions * This lib uses pear so the constructor requieres * a pear DB object * Copyright (c) 2004 bitweaver.org * Copyright (c) 2003 tikwiki.org * Copyright (c) 2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al. * All Rights...
true
012cb6e867fdf912425e5d5d38ef54ba3aa98bb3
PHP
mzal/php-mvc-gallery
/views/PostView.php
UTF-8
276
2.875
3
[]
no_license
<?php class PostView { private $post; public function __construct($post) { $this->post = $post; } public function render() { if ($this->post->title){ include '../templates/post.php'; } else { include '../templates/notfound.php'; } } }
true
fee2079cb07c0f7af1f31c4d109620735d81e9f5
PHP
anaComercia/tpPracticaSupervisada
/appClientes/api/models/modificarCuenta.php
UTF-8
2,370
2.515625
3
[]
no_license
<?php require_once("connection.php"); class ModificarCuenta { private $connection; public function __construct(){ $this->connection = Connection::getInstance(); } public function update($data){ // var_dump($data); $nombre= $this->connection->real_escape...
true
42e2112764e9226233f0263edd51125a6d089d6d
PHP
wangrunxinyes/wechat
/frontend/unit/WeixinProductUnit.php
UTF-8
2,495
2.609375
3
[]
no_license
<?php /** * image unit */ class WeixinProductUnit extends BasicUnit { function __construct($postStr = null) { $this->basic_attributes = array( 'original_price', 'off_price', 'name', 'photo', 'key', 'interduction', 'createtime', 'attributes',...
true
70241b6e096a73402f0632c119679deb255c8b62
PHP
tilongevo/rede-simples
/src/Project/Core/Helper/LoadKeyHelper.php
UTF-8
2,069
2.9375
3
[]
no_license
<?php namespace Project\Core\Helper; /** * Class LoadKeyHelper * Commands executed * * openssl pkcs12 -in confederacao.pfx -nocerts -out confederacao_key.pem -nodes * openssl pkcs12 -in confederacao.pfx -nokeys -out confederacao.pem * openssl rsa -in confederacao_key.pem -out confederacao.key */ class LoadKeyH...
true
c64161525e3fe0d7d93266bc0d6399401f33eb5d
PHP
embracingelement/bahai-community-site
/app/Calendar/RegisteredCalendars.php
UTF-8
4,988
2.5625
3
[]
no_license
<?php namespace Calendar; use ActivityType\ActivityType; class RegisteredCalendars { /** * @var Tab[] */ private $tabs; /** * @var ActivityType[] */ private $activityTypes; /** * @var CalendarService */ private $calendarService; function __construct(Calend...
true
442c7f223724f3de17a826b1a17aefde82ac5262
PHP
chadyred/demandeTravaux
/src/MairieVoreppe/DemandeTravauxBundle/Entity/Periode.php
UTF-8
6,110
2.65625
3
[ "BSD-3-Clause", "MIT" ]
permissive
<?php namespace MairieVoreppe\DemandeTravauxBundle\Entity; use Doctrine\ORM\Mapping as ORM; //On va mettre le namespace de notre méthode Classe interface Constraints de notre validator use Symfony\Component\Validator\Constraints as Assert; //Permet de récupérer les valeur des objets en cours de vie dans notre classe ...
true
e547eff686c626a04d114ddb0745411f4546e3f3
PHP
CarrierChristopher21/LifeOfProgramming
/Web_Programming/Web Design/PHP/Chapter 4/Paycheck.php
UTF-8
2,511
3.15625
3
[]
no_license
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Pay Check PHP</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> </head> <body> <?php functi...
true
81c99ab1f94815416664a8e62a775133381ab999
PHP
intoxication/goMed
/php/diseaseDetail.php
UTF-8
1,080
2.640625
3
[]
no_license
<?php include("../config/conn.php"); if ($_SERVER["REQUEST_METHOD"] == "POST") { $diseaseId = $_POST["DiseaseId"]; $dataToSend = array(); try { $sql = "SELECT d.Name, d.Description, d.Duration, d.Precaution, d.Image, GROUP_CONCAT(s.Name separator ', ') as Symptom FROM disease d INNER JOI...
true
42d1f98759627047a0ab9b24271a909c8fea063b
PHP
assences/test
/application/views/user_view.php
UTF-8
1,424
2.578125
3
[]
no_license
<h3>Добавление и редактирование юзеров</h3> <table> <tr><td>Id</td><td>Name</td><td>Level</td><td>Age</td><td>Operation</td></tr> <?php foreach($data as $key) { echo "<tr><td>".$key['id']. "</td><td>".$key['name']. "</td><td>".$key['level']. "</td><td>".$key['age']. "</td><td><a href='/user/delete/"...
true
1b88c9267a39d9f9deb6080c64bbde3f383a2eec
PHP
davecarlson/kohana-imagefly
/classes/Image/GD.php
UTF-8
1,182
2.65625
3
[]
no_license
<?php defined('SYSPATH') OR die('No direct script access.'); class Image_GD extends Kohana_Image_GD { protected function _do_frame($width, $height, $offset_x, $offset_y, $bg_color) { // Prepare the color if ($bg_color[0] === '#') { // Remove the pound $bg_color = substr($bg_color, 1); } if (strlen...
true
5edbddd8114fa1c70a8ddcc2c9b42e3203932197
PHP
christianezeani/mailchimp
/src/MailChimp/Models/Lists/Segment.php
UTF-8
4,490
2.5625
3
[ "MIT" ]
permissive
<?php namespace MailChimp\Models\Lists; use MailChimp\Core\Model; use MailChimp\Data\Link; use MailChimp\Data\SegmentOptions; use MailChimp\Response\SegmentListResponse; use MailChimp\Response\SegmentBatchResponse; use MailChimp\Response\SegmentMemberListResponse; /** * Manage segments and tags for a specific Mailc...
true
9799de67e476fdb00a686d8873a05bd8dd243cec
PHP
TartieTerezi/projet_ppe_festival
/vue/etablissements/VueSupprimerEtablissement.class.php
UTF-8
1,088
2.765625
3
[]
no_license
<?php namespace vue\etablissements; use vue\VueGenerique; use modele\metier\Etablissement; /** * Page de suppression d'un établissement donné * @author prof * @version 2018 */ class VueSupprimerEtablissement extends VueGenerique { /** @var Etablissement identificateur de l'établissement à afficher */ pr...
true
403ab8d9099a007152d2eb21a5f3a0d7da89b4e7
PHP
bokarev/cb
/wp-content/plugins/premiumbox/moduls/x19/classed/wmxilogin.class.php
UTF-8
3,777
2.546875
3
[]
no_license
<?php if(!class_exists('WMXILogin')){ class WMXILogin { private $urlId = ''; private $siteHolder = ''; private $LastAuth = array(); private $cainfo = ''; public function __construct($urlId, $siteHolder, $cainfo = '') { $this->urlId = $urlId; $this->siteHolder = $siteHolde...
true
8cb654ac5096c001e4eef031b4183c1eca3e1364
PHP
ciniki/products
/web/searchProducts.php
UTF-8
10,854
2.578125
3
[ "MIT" ]
permissive
<?php // // Description // ----------- // This function will search the product database for items // that can be added to the cart of the customer. // // Arguments // --------- // ciniki: // settings: The web settings structure. // tnid: The ID of the tenant to get images for. // limit: The maximu...
true
97fac2a1786faae1eaac5cb189e0d275b052f865
PHP
Micky-N/mkycore
/core/Console/ApplicationCommands/Tmp/Link.php
UTF-8
1,713
2.828125
3
[ "MIT" ]
permissive
<?php namespace MkyCore\Console\ApplicationCommands\Tmp; use MkyCommand\AbstractCommand; use MkyCommand\Input; use MkyCommand\Output; use MkyCore\Application; use MkyCore\Config; use MkyCore\Exceptions\Container\FailedToResolveContainerException; use MkyCore\Exceptions\Container\NotInstantiableContainerException; use...
true
fe09215773577dbe07e92c4c0fcc208f4a1aca9a
PHP
evd1ser/loftscool_learn_php
/App/Models/UserModel.php
UTF-8
2,829
2.65625
3
[]
no_license
<?php namespace App\Models; use Base\Context; use Base\Models\BaseModel; use Base\Models\ModelGetByIds; use Base\Models\ModelGetByIdTrait; use Base\Models\ModelGetList; use Base\Session; use const Base\CONNECTION_DEFAULT; class UserModel extends BaseModel { use ModelGetByIdTrait; use ModelGetList; use M...
true
3fbe5e3fac6d9e214956a0a449e81a038e091e17
PHP
josuegr0487/gesionInventrario
/ajax/productos/nuevo_producto.php
UTF-8
3,371
2.734375
3
[]
no_license
<?php /*------------------------- Autor: Josue Garcia Proyecto: Gestion de Inventario ---------------------------*/ include('../is_logged.php'); //verifica que el usuario que intenta acceder a la URL esta logueado if (empty($_POST['codigo'])) { $errors[] = "Código vacío"; } else if (empty($_POST['nombre'])) { $erro...
true
972745f5636df31c0d36a0e3e9817a53a7098a14
PHP
LittleGeorgeWatchingStar/Rialto2020
/src/Rialto/Stock/Cost/ItemValuation.php
UTF-8
3,458
2.859375
3
[]
no_license
<?php namespace Rialto\Stock\Cost; use DateTime; use Rialto\Database\Orm\DbManager; use Rialto\Purchasing\Order\Orm\PurchaseOrderItemRepository; use Rialto\Purchasing\Order\PurchaseOrderItem; use Rialto\Stock\Cost\Orm\StandardCostRepository; use Rialto\Stock\Item; /** * Stores the quantity and value of a stock item...
true
f140f5baa6c9d6dfa74aedab7828ec286d874486
PHP
mramirez112/codeGenerator
/src/CrudGenerator/Context/CliContext.php
UTF-8
3,032
2.546875
3
[ "MIT" ]
permissive
<?php /** * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS ...
true
9dec5980d6edca148791fdf6f3d33eb8c716f646
PHP
NuneSargsyan/2708
/views/admin/back2.php
UTF-8
2,238
2.859375
3
[]
no_license
<?php $servername = "localhost"; $username = "root"; $password = ""; $db = "shop"; try { $conn = new PDO("mysql:host=$servername;dbname=$db", $username, $password); // set the PDO error mode to exception $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); echo "Connected successfully"; } catch(PDOEx...
true
1c7809332b4d7c34a98b2492530a985413fbfe12
PHP
petrenslavik/WebMessenger
/src/backend/Controllers/ConversationController.php
UTF-8
5,631
2.59375
3
[]
no_license
<?php namespace Messenger\Controllers; use Messenger\Database\Repositories\ConversationRepository; use Messenger\Database\Repositories\FileMessageRepository; use Messenger\Database\Repositories\MessageRepository; use Messenger\Database\Repositories\TextMessageRepository; use Messenger\Database\Repositories\UserRepo...
true
2f0000c8b68ceafd1395b1a31c5fb3484a72af8c
PHP
CatLabInteractive/central-storage-client
/tests/SignatureTest.php
UTF-8
890
2.671875
3
[ "MIT" ]
permissive
<?php namespace Tests; use CatLab\CentralStorage\Client\CentralStorageClient; use Illuminate\Http\Request; use PHPUnit\Framework\TestCase; /** * Class SignatureTest * @package Tests */ class SignatureTest extends TestCase { private $key = 'abcdef'; private $secret = 'bcdefhijklmn'; public function te...
true
33f437cd49add03173acf77ba541f7786ec5d3c9
PHP
Trip09/wp-console
/src/Annotations/WPCommandAnnotationReader.php
UTF-8
863
2.640625
3
[]
no_license
<?php namespace WP\Console\Annotations; use Doctrine\Common\Annotations\AnnotationReader; /** * Class WPCommandReader * * @package WP\Console\Annotations */ class WPCommandAnnotationReader { /** * @param $class * @return array */ public function readAnnotation($class) { $annota...
true
3b9f911f9e792ea607a0e2cdfbb5db0f4fdcc7ac
PHP
danielcmm/DUtils
/src/DUtils/HttpUtils.php
UTF-8
1,878
2.59375
3
[]
no_license
<?php namespace DUtils; class HttpUtils{ /** * @param $url * @param array $options * @return string */ public static function get($url,$options = []){ $headers = [ "Accept:text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8", "Cache...
true
463a4f4330b4e9608527e3af85d02c5a1f96eb64
PHP
ProklUng/symfony.guzzle.bundle
/Middlewares/Cache/MockMiddleware.php
UTF-8
1,726
2.515625
3
[]
no_license
<?php namespace Prokl\GuzzleBundle\Middlewares\Cache; use Closure; use Prokl\GuzzleBundle\Middlewares\Cache\Adapter\StorageAdapterInterface; use GuzzleHttp\Promise\FulfilledPromise; use GuzzleHttp\Promise\RejectedPromise; use Psr\Http\Message\RequestInterface; /** * Mock Middleware. */ class MockMiddleware extend...
true
74d085c1a59bb47ebb114598dd6ffbe93c5a9875
PHP
Ewelina92/proj-mvc
/app/Http/Controllers/TaskController.php
UTF-8
5,191
2.703125
3
[ "MIT" ]
permissive
<?php namespace App\Http\Controllers; use App\Models\Task; use Illuminate\Http\Request; class TaskController extends Controller { /** * Function checking if a user is currently logged in. * * @return void */ private function checkIfLoggedIn() { if (!session()->has('user')) { ...
true
ce6872caa146d249110c56b78888fb497cf7c5cc
PHP
hardcoreTest/v2_hack
/src/backend/Model/AbstractDbModel.php
UTF-8
20,120
2.828125
3
[]
no_license
<?php namespace schedule\Model { use Doctrine\DBAL\Connection; use Pimple\Container; abstract class AbstractDbModel { /** * @var Container */ protected $container; /** * Префикс * * @var string */ protected $prefi...
true
3a630dfe90bc7b0c56022a3fded84e70ab6bfb76
PHP
michaeljennings/carpenter
/src/Pagination/Illuminate.php
UTF-8
1,482
2.75
3
[ "MIT" ]
permissive
<?php namespace Michaeljennings\Carpenter\Pagination; use Illuminate\Pagination\LengthAwarePaginator; use Illuminate\Pagination\BootstrapThreePresenter; use Michaeljennings\Carpenter\Contracts\Paginator as PaginatorContract; class Illuminate extends AbstractPaginator implements PaginatorContract { /** * An ...
true
f3aca7fb20fe92cbc26ddab549bc9ec5d11880f4
PHP
zamanehsani/CourseManagement
/loging.php
UTF-8
2,158
2.796875
3
[]
no_license
<?php /* user login process, checks if user exist and password matches */ // escape email to protect againts SQL injection session_start(); if(isset($_POST['email'])){ $email = $_POST['email']; $password = $_POST['password']; include("db.php"); $sqlQ = "select * from users w...
true
79b781c2bf01f7ec7ff46cc3bbf0567cdfcccc88
PHP
mtouhidchowdhury/CS-3083-Database-Project
/PriCoSha Project/login.php
UTF-8
1,823
2.75
3
[]
no_license
<html> <body> <?php require_once('common.php'); session_start(); if(isset($_SESSION["username"]) && isset($_SESSION["nonce"])) { echo "You are already logged in. \n" . $_SESSION["username"]; header("refresh: 1; index.php"); return; } else { if(isset($_POST["username"]) && isset($_POST["password"])) { $userna...
true
3e088c9bf4ad457d42f352681b07052f8b0e7c98
PHP
RyoDeminliPurba/PMK_UNIVERSITAS_IBBI
/src/database/migrations/2020_12_04_064122_create_tblkegiatan_table.php
UTF-8
955
2.59375
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; class CreateTblkegiatanTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('tblkegiatan...
true
75472aa9f15a9ccb0f2b5db0a620741d4b157fe4
PHP
torgman241995/tasklist
/config/db.php
UTF-8
322
2.734375
3
[]
no_license
<?php $host = "localhost"; $username = "root"; $password = "root"; $db_name = "beejee"; $mysqli = new mysqli($host,$username,$password,$db_name); if ($mysqli -> connect_errno) { echo "Ошибка соединения с MySQL: " . $mysqli -> connect_error; exit(); } ?>
true
c78f63e89e43a9c8212707b2ff430806405e70c1
PHP
Jing-hahahaha/MyProject
/MyBBS/article_page.php
UTF-8
1,835
2.53125
3
[]
no_license
<?php /** * Created by PhpStorm. * User: Jing * Date: 2016-7-4 * Time: 21:38 */ //定义个常量,用来授权调用include里面的文件 define('IN_BBS',true); require 'include/MyDB.php'; $arr=array(); $sql="SELECT * FROM bbs_send ORDER BY bbs_send_time DESC"; $result=$con->query($sql); if(!!$num=$result->num_rows){ array_push($arr,$num)...
true
53df9a2fd1c135393856932a14e5383e47a02fc5
PHP
ChallengeTheGods/platform-racing-2-server
/http_server/queries/ratings/ratings_delete_old.php
UTF-8
309
2.546875
3
[]
no_license
<?php function ratings_delete_old($pdo) { $result = $pdo->exec(' DELETE FROM pr2_ratings WHERE time < UNIX_TIMESTAMP(NOW() - INTERVAL 7 DAY) '); if ($result === false) { throw new Exception('Could not delete rating logs older than a week.'); } return $result; }
true
f52c4d441327aeaa8696c89a9b47992aa0eb5bde
PHP
hungnbph/laravel21
/database/factories/ProductFactory.php
UTF-8
876
2.625
3
[ "MIT" ]
permissive
<?php namespace Database\Factories; use App\Models\Product; use Illuminate\Database\Eloquent\Factories\Factory; class ProductFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = Product::class; /** * Define the mode...
true
f0b3b745277e235903ecd51c907909ec5974ca61
PHP
grubitz/Payment-Dates
/src/PaymentDatesCSV.php
UTF-8
1,000
3.203125
3
[]
no_license
<?php namespace App; use Iterator; class PaymentDatesCSV implements Iterator { private $array; private $position = 0; public function __construct(array $array) { $this->array = $array; } public function rewind() { $this->position = 0; } public function current()...
true
c663fd2fa9b97c35c6e5e75ee3fdd7353a2f22ae
PHP
noah-goodrich/kacela-sample
/application/classes/controller/inheritance/single.php
UTF-8
1,095
2.515625
3
[]
no_license
<?php /** * @author Noah Goodrich * @date 7/8/11 * @brief * */ class Controller_Inheritance_Single extends Controller_Site { public function action_index() { $this->title = 'Single Table Inheritance Example'; $teachers = \kacela::find_all('teacher'); $this->template->content = View::factory('inheritance...
true
e7d31ad56ea27854a1d77eec98114739bf49fb92
PHP
samiksengupta/laravel-admin
/database/seeders/SettingSeeder.php
UTF-8
1,451
2.640625
3
[ "MIT" ]
permissive
<?php namespace Database\Seeders; use Illuminate\Database\Seeder; use Samik\LaravelAdmin\Models\Setting; class SettingSeeder extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { $this->createSettings($this->settings()); } pri...
true
62de3bec663d94ce8e4ee5255c329b416fafc179
PHP
dustinleblanc/postcss
/test/tests/MapTest.php
UTF-8
19,665
2.515625
3
[ "MIT" ]
permissive
<?php namespace PostCSS\Tests; use PostCSS\PreviousMap; use PostCSS\SourceMap\Consumer\Consumer; use PostCSS\SourceMap\Generator; use PostCSS\Processor; use PostCSS\Path\NodeJS as Path; use PostCSS\Parser; use PostCSS\Root; use PostCSS\Plugin\ClosurePlugin; class MapTest extends Helpers\DeletableDirectoryTest { ...
true
ea864db7d4cb2e9cc9c1f26457bd2f33bbf3a1c1
PHP
hammadallauddin/basicPhpCodes
/associative_arrays.php
UTF-8
817
4.09375
4
[]
no_license
<!doctype html> <html lang="en"> <head> <title>associative array</title> </head> <body> <?php $arrays_a = array("hammad"=>"han","allauddin"=>"g"); //$arrays_a = ["hammad"=>"han","allauddin"=>"g"]; it can also be used echo $arrays_a["hammad"]; ech...
true
a733e3e143595b7681a0a4a72975e8dbbdb19596
PHP
midnite81/core
/src/Contracts/Services/StringableInterface.php
UTF-8
353
3.03125
3
[]
no_license
<?php declare(strict_types=1); namespace Midnite81\Core\Contracts\Services; interface StringableInterface { /** * Convert the given value to a string. * * @param mixed $value The value to be converted to a string. * @return string The converted value as a string. */ public function t...
true
66bb5932dd4bb5324b39a615865897793ff7b3c4
PHP
yunerkis/apprevenir-back
/database/seeds/AnswesTableSeedercopy.php
UTF-8
377,530
2.515625
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Seeder; class AnswesTableSeederCopy extends Seeder { /** * Run the database seeds. * * @return void */ public function run() { DB::table('answers')->insert([ [ 'question_id' => 1, 'answer_id' => NULL, ...
true
2db96fe7bb085618c506db144148077779128139
PHP
lucivanio-silva/Titan
/model/Produto.php
UTF-8
694
2.8125
3
[]
no_license
<?php class Produto { public $IDPROD; public $NOME; public $COR; public $PRECOPROD; function __construct(){ } function getIDPROD() { return $this->IDPROD; } function getNOME() { return $this->NOME; } function getCOR() { return $this->COR; ...
true
ab230195e14126a082892940bc4ea427b839f09d
PHP
rique223/Site-Triniti
/Site/class/functions.php
UTF-8
2,203
2.703125
3
[]
no_license
<?php function SearchFilter($query) { if ($query->is_search) { $query->set('post_type', 'post'); } return $query; } //add_filter('pre_get_posts','SearchFilter'); //sidebar if ( function_exists('register_sidebar') ) { register_sidebar(array( 'name' => __( 'Barra lateral'), 'id' ...
true
1e934fd33177aa6e809de8ba4a4a9bd76e04c034
PHP
jawozele/Mike-Dane---PHP
/site.php
UTF-8
1,443
3.1875
3
[]
no_license
<!DOCTYPE html> <html> <head> <title>Input</title> </head> <body> <?php ?> <!-- <form action="site.php" method="get"> Name: <input type="text" name="username" placeholder="username"> Age: <input type="number" name="age" placeholder="age"> <input type="Submit"> </form> <br> Your ...
true
ef566781cd1024b969fc41b798d606061e3a122b
PHP
yazaki-ryo/line_api_test
/domain/Contracts/File/ParsableContract.php
UTF-8
197
2.640625
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Domain\Contracts\File; interface ParsableContract { /** * @param \SplFileObject $file */ public function parse(\SplFileObject $file); }
true
85e377e7a2618c11e838167504bc62c2f8b7181b
PHP
bonny/WordPress-Simple-History
/inc/class-helpers.php
UTF-8
18,890
3.1875
3
[]
no_license
<?php namespace Simple_History; use Simple_History\Simple_History; class Helpers { /** * Pretty much same as wp_text_diff() but with this you can set leading and trailing context lines * * @since 2.0.29 * * Original description from wp_text_diff(): * * Displays a human readable HTML representation of ...
true
1a8af37ccd82755b38a967a7243ec58885db9771
PHP
dylandeceulaer/ZwijndrechtURM
/database/seeds/GebruikerTableSeeder.php
UTF-8
1,742
2.8125
3
[]
no_license
<?php use Illuminate\Database\Seeder; use App\Gebruiker; use App\Gebruikersprofiel; use App\Team; use App\Role; class GebruikerTableSeeder extends Seeder { private $gebruikercsv; private $delimiter; public function __construct() { //Testdata, kan gebruikt worden voor (alle) gebruikers te impor...
true
3cb5cb31b96e7c3454c0a04e4a9e5b7606f9c0ff
PHP
coderkk/arraySortUtility
/class.ArraySortUtil.php
UTF-8
4,284
3.109375
3
[]
no_license
<?php /** * ArraySortUtil is a array sort utility, you can extends the sorting engine. * * @version 0.1 * @author coderkk Cudnik <coderkk@gmail.com> * @license http://www.opensource.org/licenses/mit-license.php MIT License * @package utility.sort */ class ArraySortUtil { static function uasort($unsort, $fi...
true
358ef394bb0dce4968ccd398ee84e6cd43697ec9
PHP
HUNTERS1984/PON
/application/src/CoreBundle/Notification/OneSignal/Push.php
UTF-8
1,290
2.921875
3
[]
no_license
<?php namespace CoreBundle\Notification\OneSignal; use CoreBundle\Notification\AbstractPush; use CoreBundle\Notification\OneSignal\Request\PushRequest; use GuzzleHttp\Client; class Push extends AbstractPush { /** * @var PushRequest */ protected $request; /** * Construct * * @par...
true
18406552ddd11e8609795ad3a2a4cf3063b8d4ae
PHP
steven-houren/umdb
/MovieDB/ActorProfile.php
UTF-8
4,328
2.65625
3
[]
no_license
<?php //Database connection $servername = "localhost"; $username = "root"; $password = ""; $dbase = "MovieDB"; try{ $db = new PDO("mysql:host=$servername;port=8080;dbname=$dbase", $username, $password); } catch(PDOException $e){ echo $e->getMessage()."<br>"; die(); } //Actor id passed through from imag...
true
d2dbe880609eac067245b7db8fdd322dc2febacd
PHP
reithbot/main
/php/src/Reith/ToyRobot/Domain/Space/AbstractSymmetricSpace.php
UTF-8
3,828
2.984375
3
[ "Apache-2.0" ]
permissive
<?php /** * (c) 2018 Douglas Reith. * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ declare(strict_types=1); namespace Reith\ToyRobot\Domain\Space; use MathPHP\LinearAlgebra\Vector; use Reith\ToyRobot\Domain\Space\Exception\PlaceD...
true
f10bfd78febe7924131e82101325fba9339c4938
PHP
ducrocq/WebArena
/app/Model/Event.php
UTF-8
8,589
2.546875
3
[]
no_license
<?php App::uses('AppModel', 'Model'); class Event extends AppModel { public $uses = array('Fighter'); function doAttackEvent($def, $fighter){ $name = $fighter['Fighter']['name'] . " attacked " . $def['Fighter']['name'] . " and touched him"; $new = $this...
true
8cbe29aca0a0e38d54eabc062af971e345ddbc9e
PHP
bugreportuser/phive
/tests/unit/commands/purge/PurgeCommandTest.php
UTF-8
2,127
2.578125
3
[ "BSD-3-Clause" ]
permissive
<?php namespace PharIo\Phive; use PharIo\FileSystem\File; use PharIo\Phive\Cli; use PharIo\Version\Version; use PHPUnit\Framework\TestCase; /** * @covers \PharIo\Phive\PurgeCommand */ class PurgeCommandTest extends TestCase { public function testInvokesRepository() { $repository = $this->getPharRegistr...
true
93d0e941022e8978bc0f93aa4c15685fbe532ced
PHP
ConeHead07/bedarf_backend
/app/app/Utils/Hash.php
UTF-8
1,148
2.734375
3
[]
no_license
<?php /** * Created by PhpStorm. * User: f.barthold * Date: 01.04.2020 * Time: 17:13 */ namespace App\Utils; class Hash { public static $aDebug = []; public static function fromTupel(array $aRow, bool $onlyFilledFields = true, array $aExcept = []): string { $tmp = $aRow; $str = ''; ...
true
c3b2501c987667e7d6b0336332b7bb6ea17ee629
PHP
xianhuazhou/burndown_chart
/lib/DB.php
UTF-8
199
2.8125
3
[]
no_license
<?php class DB { private static $pdo = null; public static function getPDO() { if (self::$pdo) { return self::$pdo; } return self::$pdo = new PDO(DB_DSN, DB_USERNAME, DB_PASSWORD); } }
true
81dccf3f401a17861e4362ad66f913d1a4d224df
PHP
pradeepbajra/Learnforlife
/v1/editstudent.php
UTF-8
2,330
2.78125
3
[]
no_license
<?php require_once 'core.inc.php'; require_once '../includes/DBHandler.php'; $db = new DBHandler(); $user_type = $_SESSION['user_type']; $user_email = $_SESSION['user_email']; $arr = $db->getUserInfo($user_type, $user_email); // print_r($arr); $id = $arr['id']; $name = $arr['name']; $address = $arr['address']; $skill...
true
810b2aab298fa07e454bf803fc41a58fdd5739f4
PHP
Jack-Barradell/Alliance-management-console-Old
/tests/RankTest.php
UTF-8
10,619
2.90625
3
[]
no_license
<?php namespace AMC\Tests; require '../classes/DataObject.php'; require '../classes/Getable.php'; require '../classes/Storable.php'; require '../classes/Database.php'; require '../classes/Rank.php'; require '../classes/exceptions/BlankObjectException.php'; use AMC\Classes\Rank; use AMC\Classes\Database; use AMC\Excep...
true
b13760f2a1d9e48e6675b851a069f56c1ac943b2
PHP
thepeels/juliet-corley
/app/controllers/CreateFishController.php
UTF-8
599
2.59375
3
[ "MIT" ]
permissive
<?php class CreateFishController extends BaseController { public function getIndex() { try { $builder = new FishBuilder(); $builder->build('Some name'); } catch (DuplicateUniqueKeyException $e) { # Redirect the user with some error message } ...
true
01001ab9d041b552aa4c75d3e5e8febbf7770e98
PHP
open-sausages/silverstripe-s3
/src/Adapter/CacheAdapter.php
UTF-8
11,038
2.65625
3
[]
no_license
<?php namespace SilverStripe\S3\Adapter; use finfo; use League\Flysystem\AdapterInterface; use League\Flysystem\Config; use SilverStripe\S3\Cache\ContentCache; use Psr\SimpleCache\CacheInterface; use SplFileInfo; /** * Wrapper adapter over a backend */ class CacheAdapter implements AdapterInterface { /** ...
true
d1b0ef50732e2bbc7c3130938e90b4749dd71e31
PHP
Shadowsun52/DubInfo_Gestion_immobilier
/business/MetierCRUD.php
UTF-8
657
2.734375
3
[]
no_license
<?php namespace DubInfo_gestion_immobilier\business; use DubInfo_gestion_immobilier\data\DAOMetier; use DubInfo_gestion_immobilier\model\Metier; /** * Description of MetierCRUD * * @author Jenicot Alexandre */ class MetierCRUD extends AbstractBusiness{ public function __construct() { ...
true
d18420688cd075648826689437db9f815ed60b21
PHP
prajjwalgupta40/Online-Restraurant
/burgers.php
UTF-8
5,592
2.53125
3
[]
no_license
<?php session_start(); if(isset($_POST['submit'])){ if(!empty($_SESSION["id"])) { $qty1=$_POST['qty1']; $qty2=$_POST['qty2']; $qty3=$_POST['qty3']; $qty4=$_POST['qty4']; $qty5=$_POST['qty5']; $qty6=$_POST['qty6']; $qty7=$_POST['qty7']; $qty8=$_POST['qty8']; $qty9=$_POST[...
true
1d6134ae455711f298622ef3380fd84b373dc984
PHP
Fawk/Git
/index.php
UTF-8
2,646
2.703125
3
[]
no_license
<?php require_once("view/Login.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="sv-se"> <head> <link rel="Stylesheet" href="../css/style.css" /> <title>Laboration 1 Login</title> ...
true
b56b3ddb04cfac7bfdf7c56f59c8ab6451a86a66
PHP
BGCX261/zibo-svn-to-git
/tags/0_9_4/zibo_modules/zibo.cron/src/zibo/cron/model/SuperCronJob.php
UTF-8
8,643
3.09375
3
[]
no_license
<?php namespace zibo\cron\model; use zibo\library\DateTime; /** * CronJob extended to have a second precision instead of a minute precision */ class SuperCronJob extends GenericCronJob { /** * Array with the second values or ASTERIX for all values * @var string|array */ protected $second; ...
true
6dc1435f4790c3276a80ccc5bcb7680b584b4dc8
PHP
Nahapa/Teste-Mawapost
/Back/app/Http/Controllers/Api/UserControllerApi.php
UTF-8
984
2.59375
3
[]
no_license
<?php namespace App\Http\Controllers\Api; use App\Http\Controllers\Controller; use App\Http\Requests\UserRequest; use App\Http\Resources\UserResource; use App\Services\UserService; class UserControllerApi extends Controller { private $userService; public function __construct() { $this->userServ...
true
ddc07b4a6417ed64b1a6d98c0fb5576374faf1b9
PHP
liaomars/swoole-clip
/src/Thumb/Commander/DefaultCommander/Start.php
UTF-8
326
2.578125
3
[]
no_license
<?php namespace Thumb\Thumb\Commander\DefaultCommander; use Thumb\Thumb\Commander\CommanderInterface; class Start implements CommanderInterface { public function commandName() { return 'start'; } public function exec(array $args) { } public function help(array $args) { ...
true
915d4482ad9659d519fa420ffc24e19dcc92cce8
PHP
lops93/viviam.github.io
/teste.php
UTF-8
515
2.828125
3
[]
no_license
<!DOCTYPE HTML> <html> <head> <title>Calculadora</title> <!-- <link rel="stylesheet" href="css/bootstrap.min.css">--> <link rel="stylesheet" href="css/style.css"> <!-- <script src="js/bootstrap.min.js"></script>--> <!-- <script src="js/bootstrap.bundle.min.js"></script>--> <!-- <script src="...
true
df34886708f8a9e8953d5031f67701ce2e9d0353
PHP
donna6355/phpstudy
/phpStudy/php03/03-switch.php
UTF-8
328
2.609375
3
[]
no_license
<?php header('content-type:text/html;charset=utf-8;'); $grade = 'B'; switch($grade){ case "A" : echo('90~100점 사이입니다.'); break; case "B" : echo('80~90점 사이입니다.'); break; case "C" : echo('70~80점 사이입니다.'); break; default : echo('80점 이하 입니다.'); } ?>
true
48574c07a20039297319b63dcb38f8f03ae5e974
PHP
ravivora1323/LRFA
/admin/script/editProfile.php
UTF-8
1,248
2.609375
3
[]
no_license
<?php include('../../connection.php'); function findexts ($filename) { $filename = strtolower($filename); $exts = explode(".", $filename); $n = count($exts)-1; $exts = $exts[$n]; return $exts; } if(isset($_POST['submit'])): // $img = basename($_FILES['image']['name']); //Get here extension from...
true
d29c11789a136c69512918bbe376be798012758d
PHP
1421883116/spider
/src/Utility/CacheQueue.php
UTF-8
729
2.640625
3
[ "Apache-2.0" ]
permissive
<?php /** * Created by PhpStorm. * User: yf * Date: 2018/2/12 * Time: 上午11:01 */ namespace EasySwoole\Spider\Utility; use EasySwoole\Core\Component\Cache\Cache; use EasySwoole\Spider\AbstractInterface\QueueInterface; use EasySwoole\Spider\Task\TaskObj; class CacheQueue implements QueueInterface { public f...
true
f79eff88f0096005515a391ed099da4d7c43116d
PHP
DeaVulTan/paradigma-print
/lib/shortcode-class.php
UTF-8
4,418
2.625
3
[]
no_license
<?php defined('PF_VERSION') OR header('Location:404.html'); class Pf_Shortcode { private $tags = array (); private $exec_tag = true; private $scanned_tags = array(); /** * * @param unknown $tag * @param unknown $func */ public function add($tag, $func, $ns = 'pf') { if (is_callable ( $func )){ $th...
true
90e7bc9df21c7f10be778bf7e4d893f1be79d767
PHP
yovatar/E-LAN
/SRC/model/events.php
UTF-8
3,112
3.015625
3
[]
no_license
<?php /** * Fetch every event with a give name * @param string $name * @return array|null */ function selectEventsWithName($name) { require_once("model/database.php"); $query = "SELECT * FROM events WHERE events.name LIKE :name ;"; return executeQuerySelect($query, createBinds([[":name", $name]])); } ...
true
0d36d53f1871035f375774f57883679561de2bb3
PHP
Design-Develop-Realize/ddr
/gravity/contact/contact.php
UTF-8
3,055
2.546875
3
[]
no_license
<?php error_reporting(E_ALL); ini_set('display_errors','On'); $body = "You have just recieved an email from a site user, their details are below\n"; $subject = ''; $name = ''; $company = ''; $message = ''; $address = ''; if(array_key_exists('submit', $_POST)) { if(!$_POST['digits'] == '14') { die("FAIL AT MATHZ");...
true
bc836aeaaa35eeedfce5a7f2f6111733177d6259
PHP
testingallthethings/019-unittest-isolation-php
/src/Time/TimeProvider.php
UTF-8
133
2.546875
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace Braddle\Time; interface TimeProvider { public function getCurrentTime() : \DateTime; }
true
4688642aad0901361e131f472fab37680a1362ed
PHP
alfo93/Progetto-Biblioteca
/connessioneBiblioteca.php
UTF-8
410
2.640625
3
[]
no_license
<?php $link = mysqli_connect("127.0.0.1", "alfonso", "password", "Biblioteca"); // $link = mysqli_connect("127.0.0.1", "francescopenna", "berrofronzo", "Biblioteca"); if (!$link) { echo "Errore di connesione" . PHP_EOL; echo "codice errore: " . mysqli_connect_errno() . PHP_EOL; e...
true
f46485e23f0ce08bf187541567e169f82ea8eb51
PHP
adroit2012/adroitcwc
/includes/EventRepository.php
UTF-8
5,063
2.75
3
[]
no_license
<?php class EventRepository { /** * @var Sparrow */ protected $db; public function __construct(Sparrow $db) { $this->db = $db; } public function getActiveEvents($order = 'ASC') { $this->db->from('events'); $this->db->where('is_active = ', 1); $order ? $t...
true
8496793808a4a2b7b306a7aa410fed3c4fe582c6
PHP
guoyu07/rudolf
/src/component/Helpers/Navigation/MenuItemCollection.php
UTF-8
1,308
3.140625
3
[ "MIT" ]
permissive
<?php namespace Rudolf\Component\Helpers\Navigation; class MenuItemCollection { /** * @var MenuItem[] */ private $collection; /** * @param MenuItem $item * @return int|null */ public function add(MenuItem $item) { if (null === $item->getId()) { $item->...
true
5ab18d291b76800f13ba379931de1e67a1c8466e
PHP
Fraz0r/P3
/lib/P3/ActiveRecord/Association/BelongsToAssociation.php
UTF-8
1,135
2.71875
3
[]
no_license
<?php namespace P3\ActiveRecord\Association; use P3\Database\Query\Builder as QueryBuilder; /** * Returns Collection (with SINGLE flag set) for the parent model of $model (passed in __construct()) * * Options: * class: Class to instantiate * fk: Foreign Key Collumn (self side) * * @package P3\Ac...
true
5f1d206c6f1dc4195d93195e149946c69a971806
PHP
javiermart18/QuizSaMar
/insertquiz.php
UTF-8
1,883
2.625
3
[]
no_license
<?php session_start(); $url = array_pop(explode('/', $_SERVER['PHP_SELF'])); $urls = explode('.', $url); $name = $urls[0]; $id = $_SESSION['id']; $q = "INSERT INTO quiz (id_quiz, id_user, name, score, date) VALUES ('0','$id', '$name', $totalCorrect, NOW())"; $r ...
true
12aebdc59b299d71ee25852d806082c627cf54be
PHP
Marcmolinam/EjercicioClases
/lib/recepcion.php
UTF-8
1,443
3.03125
3
[]
no_license
<?php class Recepcion{ private $name; private $email; private $sourceRegion; private $lenguage; private $dateCheckIn; private $dateCheckout; function __construct($name, $email, $sourceRegion, $lenguague, $dateCheckIn, $dateCheckout) { $this->name = $name; $this->email = ...
true
db896f7d9bafe0cf30f1bfef3e23822fc04dd0f4
PHP
dez-php/dez-forms
/src/Form/Form.php
UTF-8
4,618
2.921875
3
[ "MIT" ]
permissive
<?php namespace Dez\Form; use Dez\Form\Decorator\DefaultForm; use Dez\Form\Element\InputEmail; use Dez\Form\Element\InputPassword; use Dez\Form\Element\InputText; use Dez\Form\Element\Select; use Dez\Form\Element\Submit; /** * Class Form * @package Dez\Form */ class Form { /** * @var Decorator */ prote...
true