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
9adc68c6e454ec32926d917bd9f5301e87e3051f
PHP
mehdikbj/chatApp
/controller/UserController.php
UTF-8
1,996
2.546875
3
[]
no_license
<?php /** * Created by IntelliJ IDEA. * User: I.T * Date: 30/06/2018 * Time: 19:56 */ namespace Controller; use Core\Controller; use Core\Dispatcher; class UserController extends Controller { public function login() { if (isset($_POST["password"]) && isset($_POST["username"])) { $...
true
0c7ac59536daaf67e297cb4c1a0c5852cfd0bcd1
PHP
paullewallencom/amazon-simpledb-978-1-8471-9734-4
/_/encodedecodenums.php
UTF-8
1,500
2.65625
3
[ "BSD-2-Clause", "Apache-2.0" ]
permissive
<?php require_once('config.inc.php'); ?> <html> <body> <h1>Encode/Decode Numbers</h1> <a href=index.php>Return to Menu</a><p> <?php if (!class_exists('SimpleDB')) require_once('sdb.php'); echo("<b>Basic Conversion</b> (Use defined config)<br>"); echo("<table border=1>"); echo("<tr><th>Original</th...
true
2bcd517ef3f2c53f5ea77bdb24e47a7c320135a9
PHP
ThanakitKongKang/CodeIgProj_Recommender_system
/application/models/Bookmark_model.php
UTF-8
8,188
2.625
3
[ "MIT" ]
permissive
<?php require_once APPPATH . '/models/BaseModel.php'; class Bookmark_model extends BaseModel { protected $table = 'saved_book'; public function __construct() { parent::__construct(); } public function get_if_user_bookmarked($book_id, $username) { $this->db->select('*'); ...
true
06cac8c2ac7b34a29dec0ae7d434b3501e4d22e6
PHP
Gueststream-Inc/iqware
/src/API/CondoOwner.php
UTF-8
2,143
2.84375
3
[ "MIT" ]
permissive
<?php namespace Gueststream\PMS\IQWare\API; class CondoOwner { /** * @var int $AccountNo */ protected $AccountNo = null; /** * @var int $ID_Member */ protected $ID_Member = null; /** * @var int $ID_Address */ protected $ID_Address = null; /** * @var s...
true
3d74071878c1de3bf2a44a621cf5d65bceeebb88
PHP
michal-hynek/nextbus-php
/application/models/location_model.php
UTF-8
1,190
2.84375
3
[]
no_license
<?php require_once APPPATH . 'exceptions/LocationNotFoundException.php'; class Location_model extends CI_model { public function findStopsNearLocation($searchInput, $radius) { $stops = array(); $locations = $this->getByName($searchInput, true); foreach ($locations as $location) { $longitude = $location->...
true
1b4def835561a970a90758a9fe63aad46007d79e
PHP
nnnabil/APWTFall21-22
/app/Models/Course.php
UTF-8
475
2.625
3
[ "MIT" ]
permissive
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; use App\Models\Teacher; class Course extends Model { use HasFactory; //using belongsto verb one to one public function teacher(){ return $this->belongsTo(Teacher::class, 'te...
true
7e0058cdf03b73b6c8915c722be763032a441334
PHP
DSIS-promo1/EntrenamientoPMBook_BACKEND
/SPMBOK_API/database/seeds/EvaluacionSeeder.php
UTF-8
549
2.515625
3
[ "MIT" ]
permissive
<?php use Illuminate\Database\Seeder; use App\Evaluacion; use Carbon\Carbon; use App\User; class EvaluacionSeeder extends Seeder { public function run() { $cantidad = User::all()->count(); for ($i=1;$i<$cantidad;$i++){ for ($j=5;$j<=20;$j++){ Evaluacion::create([...
true
bf1c10ec1ee41aa724df65cfe89cf662bf662278
PHP
Samarth-R/Music-Management-System
/music2/util.php
UTF-8
1,698
3.109375
3
[]
no_license
<!DOCTYPE html> <html lang="en" dir="ltr"> <head> <meta charset="utf-8"> <title></title> </head> <body> <?php function validateSong() { for ($i=1; $i <= 20; $i++) { if(!isset($_POST['song'.$i])) continue; if(!isset($_POST['link'.$i])) continue; ...
true
bfd013b58c3af2ae2a4dbbc75ca3e5ce303b4131
PHP
Heriberto-Juarez/JQuery-File-Uploader
/php/upload.php
UTF-8
378
2.53125
3
[ "MIT" ]
permissive
<?php /* * Create upload directory if it does not exist **/ if (!file_exists('../upload')) { mkdir('../upload', 0777, true); //0777 is the octal representation of the rwx Read Write Execute file's permissions } $images = $_FILES['img']; for($i = 0; $i<count($images['name']); $i++){ move_uploaded_file($imag...
true
c9115c8592d60a78afa7bb59ff94e77072ab7219
PHP
rahulviswanath/jimbruttan
/api/database/migrations/employee/2018_11_14_102149_create_employees_identity_table.php
UTF-8
1,219
2.515625
3
[]
no_license
<?php use Illuminate\Support\Facades\Schema; use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Migrations\Migration; class CreateEmployeesIdentityTable extends Migration { /** * Run the migrations. * * @return void */ public function up() { Schema::create('emplo...
true
6f1431765db691a55ed3c455a731014af154b52f
PHP
ekyna/Colissimo
/src/Base/Model/ModelInterface.php
UTF-8
754
2.671875
3
[ "MIT" ]
permissive
<?php declare (strict_types=1); namespace Ekyna\Component\Colissimo\Base\Model; use Ekyna\Component\Colissimo\Base\Definition\Definition; /** * Interface ModelInterface * @package Ekyna\Component\Colissimo\Model * @author Etienne Dauvergne <contact@ekyna.com> */ interface ModelInterface { /** * Returns...
true
d8dbcefa8ee9c4c12b58a4589f8b70181838ec79
PHP
rdjsmith/Test
/trials/getcmkg.php
UTF-8
708
2.828125
3
[ "MIT" ]
permissive
<?php $q = intval($_GET['q']); $con = mysqli_connect("localhost","root"); if (!$con) { die('Could not connect: ' . mysqli_error($con)); } mysqli_select_db($con, "yolomen"); $sql='SELECT * FROM ym_sizes where Unit IN "Cm-Kg"'; $result = mysqli_query($con,$sql); echo "<table border='1'> <tr> <th>Size</th> <th>Length...
true
54d0150617e7635f3eb07fea2edd202e4f687efb
PHP
ja-kant/we-all-love-pastas
/app/Snippet.php
UTF-8
1,343
2.578125
3
[]
no_license
<?php namespace App; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\DB; class Snippet extends Model { protected $attributes = []; public function __construct(array $attributes = array()) { $this->attributes['uid'] = $this->getNewUid(); parent::__construct($attributes...
true
b0aa63c3d5f1f978dd6cc661c7180c31ea7af6a2
PHP
phalapi/Web-Tools
/colortran/index.php
UTF-8
4,915
2.71875
3
[]
no_license
<?php /** * 在线颜色转换 * * @author: dogstar 2014-11-04 */ ?> <?php /** ---------------------------------- PHP Handle -------------------------------**/ ?> <?php require_once dirname(__FILE__) . '/../common.php'; ?> <?php $hex = '#666666'; $rbg = hex2rgb($hex); function hex2rgb($hex) { if (substr($hex, 0, 1) != '#...
true
0e688fa9f2eecf78df74e10bf9fd1c8111dca248
PHP
ademalidurmus/telegram-bots
/src/Helper/Language.php
UTF-8
1,280
2.984375
3
[]
no_license
<?php namespace AAD\TelegramBots\Helper; class Language { protected static $languages; public static function get($info) { $exp = explode("::", $info, 3); $language = str_replace(" ", "_", (string) $exp[0]); $identifier = str_replace(" ", "_", (string) $exp[1]); $default = ...
true
d406fb2386a30ead33063659a2d95eea8a0d3bf7
PHP
lazyjsonmapper/lazyjsonmapper
/examples/unpredictable_data.php
UTF-8
24,904
3.125
3
[ "Apache-2.0" ]
permissive
<?php require __DIR__.'/../vendor/autoload.php'; use LazyJsonMapper\Exception\LazyJsonMapperException; use LazyJsonMapper\LazyJsonMapper; /* * This is a VERY ADVANCED example which demonstrates various strategies for * handling JSON data that contains unpredictable keys. Almost all data you'll * ever encounter wi...
true
c60c6533903f9aaf494ab1d138640254a18b4660
PHP
KRahmon/rest-crudapi
/app/Http/Controllers/User/User.php
UTF-8
3,831
2.625
3
[ "MIT" ]
permissive
<?php /** * @OA\Info(title="API Test", version="1.0") */ namespace App\Http\Controllers\User; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use App\Models\UserModel; use Validator; class User extends Controller { /** * Display a listing of the resource. * * @return \Illumin...
true
b8528946db89759caaff52ae1bd666ede71c055a
PHP
yashwantp48/technical-test
/example.php
UTF-8
2,152
3.171875
3
[]
no_license
<?php const SPACING_X = 1; const SPACING_Y = 0; const JOINT_CHAR = '+'; const LINE_X_CHAR = '-'; const LINE_Y_CHAR = '|'; $table = array( array( 'Name' => 'Trixie', 'Color' => 'Green', 'Element' => 'Earth', 'Likes' => 'Flowers' ), array( 'Name' => 'Tinkerbell', 'Element' => 'Air', ...
true
1a050c9289e7e8ff71332cb087c00c08baeb6b32
PHP
EmanueleMinotto/schemer
/src/Utils.php
UTF-8
1,804
2.875
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php namespace EmanueleMinotto\Schemer; use Exception; use GuzzleHttp\Client; use JsonSchema\Validator; use Symfony\Component\Console\Helper\Table; use Symfony\Component\Console\Helper\TableStyle; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; /** * Scheme...
true
fd88b403585a3fe9d12c7540515604d4bc1ef806
PHP
Wafell/web-development
/lw3/task4.php
UTF-8
418
2.640625
3
[]
no_license
<?php if ($_GET['email'] <> null) { $anketa = fopen('data/'.$_GET['email'].'.txt', 'w'); fwrite($anketa, 'First name: '.$_GET['first_name']."\n"); fwrite($anketa, 'Last name: '.$_GET['last_name']."\n"); fwrite($anketa, 'Email: '.$_GET['email']."\n"); fwrite($anketa, 'Age: '.$_GET['age']."...
true
db6e1b7bc99604a3829aeb2e432fdb3e93e16987
PHP
Zoulama/laravel
/app/Scale.php
UTF-8
3,791
2.71875
3
[]
no_license
<?php namespace App; use Illuminate\Database\Eloquent\Model; use App\User; use App\Traits\HelpfulTrait; use Kyslik\ColumnSortable\Sortable; // tri de tables et pagination class Scale extends Model { use HelpfulTrait, Sortable; public $timestamps = false; // Pouvoir trier public $sortable = [ 'id', ...
true
028881e5ca2d479b7b77d407b1dc9f2f3c57a1ac
PHP
MatheusMatiasLima/TMD-Engenharia
/src/Controller/autenticar.php
UTF-8
2,837
2.984375
3
[]
no_license
<?php include_once "../Persistence/connection.php"; function autenticar($cpf, $senha, $tipo) { $connection = new Connection(); $conn = $connection->getConnection(); return selecionarAutenticacao($cpf, $senha, $tipo, $conn); } function selecionarAutenticacao($cpf, $senha, $tipo...
true
6db6bb7513c813c6fc2586227af998db4aa9d055
PHP
shuvojittechpro/ealarm911
/application/helpers/user_defined_helper.php
UTF-8
710
3
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); if (!function_exists('distance_by_latlong')) { function distance_by_latlong($lat1, $lon1, $lat2, $lon2, $unit) { $theta = $lon1 - $lon2; $dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad($lat1)) * cos(deg2rad($lat2...
true
e09e9e1aa06bab7d8c0c231d4d8d390b721bac87
PHP
BackFront/CursoPHP
/.orientacao_objetos/src/Cursophp/Pessoa.php
UTF-8
1,086
2.90625
3
[]
no_license
<?php namespace Cursophp { class Pessoa implements IPessoa { private $Nome; private $Email; private $tipo; private $Endereco; public function getNome() { return $this->Nome; } public function getTipo() { return $this->tipo; ...
true
cbf0c49039d254cdd873bdcca8872932b2f90ec3
PHP
luowense/i-sccoter-ecommerce-website
/src/Controller/CheckoutController.php
UTF-8
1,351
2.640625
3
[]
no_license
<?php namespace App\Controller; use App\Model\CartManager; class CheckoutController extends AbstractController { public function index() { if (empty($_SESSION)) { header("location:/Login/index"); } $message = "Empty cart"; if (isset($_COOKIE["shoppingCart"])) { ...
true
5bcbb70c547c46a80cfa54be6c26a5ba9f1544fc
PHP
raphael-papazikas/paydirekt-php
/src/Paydirekt/Client/Rest/EndpointConfiguration.php
UTF-8
1,632
2.53125
3
[ "MIT" ]
permissive
<?php namespace Paydirekt\Client\Rest; /** * Rest Endpoints. */ final class EndpointConfiguration { const API_KEY = "e81d298b-60dd-4f46-9ec9-1dbc72f5b5df"; const API_SECRET = "GJlN718sQxN1unxbLWHVlcf0FgXw2kMyfRwD0mgTRME="; const ENDPOINT_SWITCH = "sandbox"; const SANDBOX_CHECKOUT_ENDPOINT = "http...
true
3535092accf975332fd4fbbe76cb34d5f078f494
PHP
jpajk/ewus-php
/src/Requests/LoginRequest.php
UTF-8
2,867
2.90625
3
[ "MIT" ]
permissive
<?php declare(strict_types=1); namespace NGT\Ewus\Requests; use InvalidArgumentException; use NGT\Ewus\Contracts\Parser as ParserContract; use NGT\Ewus\Contracts\Request as RequestContract; use NGT\Ewus\Contracts\Service as ServiceContract; use NGT\Ewus\Parsers\LoginParser; use NGT\Ewus\Services\AuthService; use NGT\...
true
62b7a10a5acc835314dd6a4175a247a39bdd06ef
PHP
linyujian111/newjob1
/src/api/list.php
UTF-8
685
2.734375
3
[]
no_license
<?php //引入数据库文件 include "connet.php"; //sql语句 // $sql = "select * from goods ORDER BY nowprice asc "; $sql = "select * from goods"; //执行sql语句 $result = $conn->query($sql); //使用查询结果集 //得到数组 $row = $result->fetch_all(MYSQLI_ASSOC); echo json_encode($row,JSON_UNESCAPE...
true
3bfc05e796aa990f1feaf2179ad89058305e7af8
PHP
morsaken/webim
/Webim/Database/Driver/Postgres/Processor.php
UTF-8
990
2.796875
3
[ "MIT" ]
permissive
<?php /** * @author Orhan POLAT */ namespace Webim\Database\Driver\Postgres; use Webim\Database\Query\Builder; use Webim\Database\Query\Processor as BaseProcessor; class Processor extends BaseProcessor { /** * Process an "insert get ID" query. * * @param Webim\Database\Query\Builder $query * @param ...
true
240d395fd9ea6976177e5688a0363334b2e87743
PHP
HenryBenaye/In-een-band-38750af4
/band.php
UTF-8
458
3.171875
3
[]
no_license
<?php $som = 0; $filmOverzicht = array( "Citizen of Glass" => 4.5, "Night" => 9, "New Eyes" => 5, "Strange Trails" => 10 ); echo ("Het albumoverzicht:") . PHP_EOL; foreach ($filmOverzicht as $films => $prijs) { $som = $som + $prijs; echo ("$films kost €$prijs") . PHP_EOL; } $gem = $som / count(...
true
049fc35e4d3ee2b8fe044674271e0f34c9af1c9a
PHP
theguice/wearable-health
/api/get_places.php
UTF-8
3,121
2.984375
3
[]
no_license
<?php /* Expected Parameters user_id: <int> start_time: <epoc> end_time: <epoc> localhost:8888/api/get_places.php?user_id=1&start_time=1403395200&end_time=1403481600 Query: SELECT * FROM `wh_d_moves_places` WHERE `u_id`=1 AND (time_start > 1403395200 AND time_start < 1403481600) OR (time_end > 1403395200 AND tim...
true
c520a5acff3173d57dc061715ebfe2bb87c2040d
PHP
LOCKD2016/tcm
/app/OAuth/LbbniuTokenResponse.php
UTF-8
5,071
2.53125
3
[]
no_license
<?php /** * Created by PhpStorm. * User: lbbniu * Date: 16/10/28 * Time: 下午3:10 */ namespace App\OAuth; use App\Models\Doctor; use Illuminate\Support\Facades\DB; use League\OAuth2\Server\Entities\AccessTokenEntityInterface; use League\OAuth2\Server\Entities\RefreshTokenEntityInterface; use Psr\Http\Message\Respo...
true
a2842c1851535dbde5ad68ea66cdfe6f19e91e4f
PHP
rolwi/koala
/extensions/.todo/weblog/weblog_blogroll.php
UTF-8
4,498
2.625
3
[]
no_license
<?php require_once( PATH_LIB . "format_handling.inc.php" ); $user = lms_steam::get_current_user(); if ( $_SERVER[ "REQUEST_METHOD" ] == "POST" ) { $values = $_POST[ "values" ]; $problem = ""; $hint = ""; if ( $values[ "save" ] ) { if ( empty( $values[ "url" ] ) ) { $problem = gettext( "The URL is miss...
true
ca8a9c122404736c7628fc0b28efc559b5d7b3e8
PHP
wbollock/openbiblio
/openbiblio/classes/UsmarcTagDmQuery.php
UTF-8
4,178
2.734375
3
[ "LicenseRef-scancode-other-copyleft", "GPL-1.0-or-later", "GPL-2.0-only", "MIT" ]
permissive
<?php /* This file is part of a copyrighted work; it is distributed with NO WARRANTY. * See the file COPYRIGHT.html for more details. */ require_once("../shared/global_constants.php"); require_once("../classes/Query.php"); require_once("../classes/Localize.php"); /**************************************************...
true
3a3f39cfb47465363af1ba3843d122f5cb92030e
PHP
aaronmsimon/song-playlist-request
/application/models/Playlist_model.php
UTF-8
1,689
2.578125
3
[ "LicenseRef-scancode-unknown-license-reference", "MIT" ]
permissive
<?php class Playlist_model extends CI_Model { public function __construct() { parent::__construct(); $this->load->database(); } public function insertSong($name,$artist,$uri,$img_url,$userid) { date_default_timezone_set('UTC'); $insertdatetime = date('Y-m-d H:i:s'); $data...
true
0c8a84789c2cdff74c4d7e59b723a4db0a64f80c
PHP
Piyoshi/Programming
/PHPProgramming/Practice/foreach.php
UTF-8
331
3.9375
4
[]
no_license
<?php $nums = array(5, 120, 134, 46); foreach($nums as $n){ echo "$n "; } ?> <table border="1"> <tr><th>アイテム名</th><th>売値</th></tr> <?php $items = array( "棍棒" => 50, "銅の短剣" => 150, "炎の剣" => 1000 ); foreach($items as $k => $v){ echo "<tr><td>$k</td><td>$v</td></tr>\n"; } ?> </table>
true
67c98679506180e77f4c2659f20e1890ac611983
PHP
BenJetson/CPSC462-term-project
/src/includes/db/help-ticket.php
UTF-8
5,733
2.59375
3
[]
no_license
<?php require_once __DIR__ . '/../types/HelpTicket.php'; require_once 'comment.php'; // // TODO like all of these help ticket drivers // define("GET_HELP_TICKET_QUERY", " SELECT ht.help_ticket_id, ht.submitter AS submitter_id, build_full_name(us.first_name, us.last_name) AS submitter_name...
true
4cb198434f53ec410952d18d5de9ddddd02aa725
PHP
symfony/symfony
/src/Symfony/Component/PasswordHasher/Tests/Hasher/SodiumPasswordHasherTest.php
UTF-8
3,927
2.546875
3
[ "MIT" ]
permissive
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\PasswordHasher\Tests\Hasher; use PHPUnit\Framework\Te...
true
89dcc90f7921f3c2257d8fcabb01fe7e41c329cc
PHP
tobiassilva20/repositorio-php
/Curso-PHP-Basico/05-aspas-concatenacao.php
UTF-8
122
2.71875
3
[]
no_license
<?php $nome = 'Tobias Silva'; echo 'Meu nome é '.$nome.' e minha idade é 36'; echo "<hr>"; echo "Meu \"nome\" é $nome"; ?>
true
279dc36c98940bfdab378d5269e6427dfdd5f27b
PHP
PawanGhewande/Exam-IN
/common/my_profile.php
UTF-8
3,671
2.53125
3
[]
no_license
<?php include '../db/database.php'; session_start(); if ($_SESSION['logged_in'] == false) { $_SESSION['message'] = "You are not Signed In.! <br> Please Sign in."; die(header('Location: ../error.php')); } ?> <!DOCTYPE html> <html> <head> <?php include '../include/meta_include.php' ?> ...
true
5f4bd6f233e2271286168a5f793db596ec7164f7
PHP
jasondavis/Framework
/lib/Framework/ErrorHandler/Logger/File.php
UTF-8
3,533
2.921875
3
[ "MIT" ]
permissive
<?php /** * @package Framework\ErrorHandler\Logger * @version 0.1.0 * @author Tim Oram (mitmaro@mitmaro.ca) * @copyright Copyright 2010 Tim Oram (<a href="http://www.mitmaro.ca">www.mitmaro.ca</a>) * @license <a href="http://www.opensource.org/licenses/mit-license.php">The MIT License</a> */ namespace Framew...
true
3f8378928df504a2616e9fb8fb19b073661f9f4b
PHP
goulenn/api
/src/Entity/Issue.php
UTF-8
1,734
2.640625
3
[]
no_license
<?php namespace App\Entity; use App\Entity\Common\CreatedAt; use App\Entity\Common\Id; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass="App\Repository\IssueRepository") * @ORM\HasLifecycleCallbacks */ class Issue { use Id; use CreatedAt; /** * @var User * * @ORM\Many...
true
f751c14cfcefbea9541f9585bd70ba886dab7d86
PHP
Skippy565/GlobalUse
/GETPOSTKeys.php
UTF-8
1,509
2.6875
3
[]
no_license
<?php include_once('dbConnect.php'); $db = connectToDb(); include_once('getFiles/is_date.php'); include_once('getFiles/is_datetime.php'); foreach ($_REQUEST as $key=>$value) { $tempKey = strtolower($key); $key = strToLower($key); if (is_date($value)) { $$key = date('Y-m-d', strToTime($value)); if (strstr($k...
true
fab6e971d93c6f25b131bd8f45b6987e4330edc5
PHP
jardelferreira/sglt
/app/Http/Livewire/Roles/RolesLivewire.php
UTF-8
1,348
2.609375
3
[ "MIT" ]
permissive
<?php namespace App\Http\Livewire\Roles; use Livewire\Component; use Spatie\Permission\Models\Role; class RolesLivewire extends Component { public $roles,$name,$description, $role_id, $role; public function render() { $this->emit('dataTable'); $this->roles = Role::all(); return ...
true
4fb0e96d9a673c88ae932939093a6bab6b0a4098
PHP
MaxxGT/PBMart
/cmanage/mobile/general_notifications.php
UTF-8
4,935
2.609375
3
[]
no_license
<?php session_start(); $device_counter=0; $mssg = $_POST['ge_message']; $dbhost = 'localhost'; $dbuser = 'pbmartdb'; $dbpass = 'swin12345'; $db = 'pbmart'; //Face Book Auto Post Implementation // require Facebook PHP SDK // see: https://developers.facebook.com/docs/php/gettingstart...
true
8ffa509afeb47e45cf9ea919dcc2f142e3f0d67e
PHP
hvs-fasya/lining
/app/controllers/UsersController.php
UTF-8
1,657
2.5625
3
[]
no_license
<?php class UsersController extends BaseController { public function signin($message=null){ $msg = $message; return View::make('admin',array('message'=>$msg)); } public function regUser(){ $rules = User::$validation; $validator = Validator::make(Input::all(), $rules); ...
true
e30b287e77250ee7aa8235f82343b70db85dbd24
PHP
calderacc/staticmaplite
/src/Query/Parser/MapCenterParser.php
UTF-8
523
2.734375
3
[]
no_license
<?php declare(strict_types=1); namespace StaticMapLite\Query\Parser; class MapCenterParser extends AbstractParser { public function accepts(string $key): bool { return 'center' === $key; } public function parse(): ParserInterface { if (isset($_GET['center'])) { list($...
true
198b4c1a94ae2624dabe8060309b392d7b82e560
PHP
sofie/smartscan-app
/PHP-files/post_sessieproducten.php
UTF-8
2,389
2.5625
3
[ "Apache-2.0" ]
permissive
<?php require_once ('connection.php'); $conn = @new mysqli($dbserver, $dbuser, $dbpass, $dbase); if (!$conn -> connect_error) { $barcode = $_POST['barcode']; $session_id = $_POST['session_id']; $qryId = "SELECT id,price FROM products WHERE barcode = '" . $barcode . "'"; $queryId = $conn -> query($qryId); if ($...
true
ada0022cc32fb2131fcc70f0740c70da198bc83d
PHP
siqueiragn/smartinv
/core/view/menu/MenuItem.class.php
UTF-8
763
3.171875
3
[]
no_license
<?php /** * Description of MenuItem * * @author Marcio Bigolin <marcio.bigolinn@gmail.com> * @version 1.0 * @package */ class MenuItem { private $label; private $action; private $type = 'html'; private $function; public function __construct($label, $action) { ...
true
01b437025772eaa4437f4a3f4b85b192cc249c9c
PHP
kaushikjena/outbox
/outbox/outbox/testchart.php
UTF-8
1,228
2.546875
3
[]
no_license
<?php //Default Timezone date_default_timezone_set("Asia/Calcutta"); include_once 'includes/class.Main.php'; //Object initialization $dbf = new User(); echo date("d-m-YY H:i:s").'<br>'; echo date('d-m-YY H:i:s','1416574242').'<br/>'; $ctime =time()-360; echo $sql="Select * from mychat_messages where `to_user`='Administ...
true
0c71c918efe8fa9bef155c8cb0d01ec022515614
PHP
Shilkov/slave-market
/src/Lease/Factory/ContractDaysDtoFactory.php
UTF-8
3,246
2.984375
3
[]
no_license
<?php namespace SlaveMarket\Lease\Factory; use DateTime; use SlaveMarket\Lease\Dto\ContractDayDto; use SlaveMarket\Lease\LeaseContract; use SlaveMarket\Lease\LeaseRequest; class ContractDaysDtoFactory { const FIRST_WORK_HOUR = 0; const LAST_WORK_HOUR = 23; /** * @param LeaseRequest $leaseRequest...
true
ce8b7254f99782fec9a47682f87f62b7178b1a14
PHP
Harvey321/sy-invoice-pro
/app/Model/CollectionNotice.php
UTF-8
573
2.53125
3
[ "MIT" ]
permissive
<?php namespace App\Model; use Illuminate\Database\Eloquent\Model; class CollectionNotice extends Model { /** * 与模型关联的数据表 */ protected $table = 'collection_notice'; /** * 主键 */ public $primaryKey = 'id'; /** * 该模型是否被自动维护时间戳 */ public $timestamps = true; //...
true
5b6601244d610b4029ac3f13cfcbc8e29d06b645
PHP
SamilaChanu95/CardioCare_Mobile_PHP-v1.0
/cardiocare_mobile/nurse/addnurse.php
UTF-8
1,219
2.890625
3
[]
no_license
<?php include_once './db_functions.php'; //Create Object for DB_Functions clas $db = new DB_Functions(); //Get JSON posted by Android Application $json = $_POST["usersJSON"]; //Remove Slashes if (get_magic_quotes_gpc()){ $json = stripslashes($json); } //Decode JSON into an Array $data = json_deco...
true
9bce94303f27a60c3b8718a84322e59935e7bb98
PHP
LukyHugh/ludo-framework
/src/Ludo/Process/Process.php
UTF-8
1,569
2.84375
3
[]
no_license
<?php namespace Ludo\Process; use Swoole\Process as SwooleProcess; use Swoole\Event; /** * Class Process * * @package Ludo\Process */ abstract class Process implements ProcessInterface { /** * @var array $workers worker process */ private array $workers = []; /** * 运行程序 * ...
true
b14e56209c1ac07c5052898d069c3c886615c3c6
PHP
ggirelli/tema
/server_side/action/add_attr_index.php
UTF-8
869
2.65625
3
[ "MIT" ]
permissive
<?php /** * Add a node index attribute to the network visualization. * @author Gabriele Girelli <gabriele@filopoe.it> * @since 0.2.0 */ // Requirements require_once(dirname(dirname(__FILE__)) . '/include/tema.session.class.php'); // Connect to database $s = new TEMAsession(HOST, USER, PWD, DB_NAME); if ( $s->ex...
true
77f47ca9fb871f1d3b8bfab5e87c1fd73981a12b
PHP
positiondev/offset
/wp/wp-content/plugins/rest-api/lib/endpoints/class-wp-rest-settings-controller.php
UTF-8
5,077
2.859375
3
[ "GPL-2.0-or-later", "GPL-1.0-or-later", "GPL-2.0-only" ]
permissive
<?php /** * Manage a WordPress site's settings. */ class WP_REST_Settings_Controller extends WP_REST_Controller { protected $rest_base = 'settings'; protected $namespace = 'wp/v2'; /** * Register the routes for the objects of the controller. */ public function register_routes() { register_rest_route( $t...
true
c4ed35ff25ea6d6e99690b3e46b44c470298f072
PHP
s9y/Serendipity
/bundled-libs/voku/simple-cache/src/voku/cache/Exception/ChmodException.php
UTF-8
383
2.8125
3
[ "BSD-3-Clause", "LicenseRef-scancode-free-unknown", "MIT" ]
permissive
<?php declare(strict_types=1); namespace voku\cache\Exception; final class ChmodException extends \RuntimeException implements FileErrorExceptionInterface { /** * @param string $file * * @return self */ public static function unableToChangeChmod($file) { return new self(\sprin...
true
11df9d47664cb1b52f21c4c1cbcfe5de43c8941a
PHP
samakunchan/Ecrivain
/Modele/Entity/Biographie.php
UTF-8
1,960
3.484375
3
[]
no_license
<?php /** * Created by PhpStorm. * User: Samakunchan * Date: 23/10/2017 * Time: 20:42 */ namespace Modele\Entity; /** * Class Article utilisé pour la création des articles */ class Biographie { private $id; private $titre; private $contenu; private $date_creation; /** * Insertion du ...
true
857fb6119164cfea1b47fc8a87da63ac4c41c193
PHP
vaci101/go-local-coauthors-plus
/components/class-go-local-coauthors-plus-query.php
UTF-8
3,559
2.578125
3
[]
no_license
<?php /** * query-related co-authors functionalities */ class GO_Local_Coauthors_Plus_Query { public function __construct() { // we want our init to run after co-author-plus has added its filters add_action( 'init', array( $this, 'init' ), 199 ); // parse_query needs to be run before co-author-plus' posts_*...
true
e31bfc1c3261b57b09c01d77c7319cc023936329
PHP
harryac07/php_cms
/includes/functions.php
UTF-8
1,944
2.71875
3
[]
no_license
<?php function confirm_query($result_set){ if(!result_set){ die("database query failed"); } } function find_all_subjects(){ global $connection; //Perform the database query $query="SELECT * FROM subjects"; $subject_result = mysqli_query($connection, $query); confirm_query($subject_result); return $subject_...
true
a767cb2febdf3c1e44efbdfae012f9906d89796b
PHP
Qleoz12/snorsoft
/fetch_pages.php
UTF-8
5,193
2.75
3
[]
no_license
<?php /* Title : Ajax Pagination with jQuery & PHP Example URL : http://www.sanwebe.com/2013/03/ajax-pagination-with-jquery-php */ /// definicion de variables session_start(); //continue only if $_POST is set and it is a Ajax request if(isset($_POST) && isset($_SERVER['HTTP_X_REQUESTED_WITH']) && strtolower($_SER...
true
05e23c9f5ca656a4d3a14a6509a942e3c373ea9b
PHP
gennei/learning-design-pattern-with-php
/interpreter/src/main.php
UTF-8
612
2.90625
3
[]
no_license
<?php require_once "Node.php"; require_once "Context.php"; require_once "CommandListNode.php"; require_once "CommandNode.php"; require_once "PrimitiveCommandNode.php"; require_once "ProgramNode.php"; require_once "RepeatCommandNode.php"; $path = dirname(__FILE__) . "/data/program.txt"; $data = file_get_contents($path...
true
e899885efc1ba9676f77d12f6833065d7dd306b6
PHP
nucknine/PHP-Projects
/4-1_Patterns/Decorator.php
UTF-8
1,512
3.515625
4
[]
no_license
<?php /***interface Shape***/ interface Shape{ function draw(); } /***Rectangle***/ class Rectangle implements Shape { function draw() { echo __METHOD__."\n"; } } /***Circle***/ class Circle implements Shape { function draw() { echo __METHOD__."\n"; } } /***Square***/ class Square implements Shape { functi...
true
b2ba01568f18ec7d4e293f173460b3926782c34a
PHP
infiniteshroom/BugTracker
/libraries_bk/Desmond/Database/DBAL/Database.php
UTF-8
967
2.921875
3
[ "MIT" ]
permissive
<?php Application::Import('Desmond::Database::DBAL::*'); Application::Import('Desmond::Database::DBAL::Query::*'); Application::Import('Desmond::Database::DBAL::Drivers::MySQL::*'); Class DesmondDatabase { private $datastores = array(); private $active = 'default'; public function __construct() { $datast...
true
e21e66738986eab3948008939dcd510c65c83faa
PHP
mvenkat777/custom-framework
/src/Customer/Controller/CustomerController.php
UTF-8
3,499
2.75
3
[]
no_license
<?php namespace CustomApp\Customer\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\JsonResponse; use CustomApp\Customer\Model\Customer; use CustomApp\Customer\Model\CustomerRepository; use Ramsey\Uuid\Uuid; class CustomerCon...
true
8d2acc306c6fd80a9103adee3be21b5b113e26e6
PHP
markvdv/broodjeszaak
/src/VDAB/MijnProject/Data/BestellingDAO.class.php
UTF-8
3,555
2.859375
3
[]
no_license
<?php namespace VDAB\MijnProject\Data; use VDAB\MijnProject\Entities\Bestelling; use VDAB\MijnProject\Entities\Bestelregel; /* * DAO class die de crud operaties voor bestellingen behandelt * maakt gebruik van entiteit Bestelling; */ class BestellingDAO extends DAO { public stat...
true
c9bc42ee747a50c27f58e0607a76a938e687cffc
PHP
nhostad/noelhostad.co.uk
/builds/development/application/controllers/Contact.php
UTF-8
6,394
2.65625
3
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); class Contact extends CI_Controller { public function index() { // Captcha parameters: $captchaConfig = array( 'CaptchaId' => 'FormCaptcha', // a unique Id for the Captcha instance 'UserInputId' => 'CaptchaCode' // Id of the Captc...
true
1fd6bef01ebececbeb447f729cae5abc7b3d0803
PHP
GabrieleVir/Rush00
/login.php
UTF-8
1,162
2.703125
3
[]
no_license
<?php require_once('auth_user.php'); require_once('is_in_csv.php'); if ($_SESSION['logged_on_user'] != "") { header ("Location: index.php"); } if ($_POST['login'] && $_POST['passwd']) { if (auth_user($_POST['login'], $_POST['passwd'])) { $_SESSION['logged_on_user'] = $_POST['login']; if (is_in_csv('....
true
d86c0446e61f71c467bfca29c477d82ff488c484
PHP
karson/mpesa-php-sdk
/src/Mpesa.php
UTF-8
7,330
2.671875
3
[ "MIT" ]
permissive
<?php namespace Karson\MpesaPhpSdk; use GuzzleHttp\Client; class Mpesa { private $base_uri = 'https://api.sandbox.vm.co.mz'; private $public_key; private $api_key; private $service_provider_code; public function __construct($config = null) { if (is_array($config)) { $this...
true
3ea1270b855ad2b36ee2d80b384ef1b3384ebcd6
PHP
floorford/football-team-app
/teams-api/app/Http/Requests/PlayerRequest.php
UTF-8
756
2.609375
3
[]
no_license
<?php namespace App\Http\Requests; use Illuminate\Foundation\Http\FormRequest; class PlayerRequest extends FormRequest { /** * Determine if the user is authorized to make this request. * * @return bool */ public function authorize() { return true; // I do not know how to create authorisation fo...
true
1decc89606d1a50ebca4010be75e064f95d5eb47
PHP
henrikhenriksson/PostgreSql_PHP_Year2
/dt161g/test.php
UTF-8
374
2.625
3
[]
no_license
<?php $myFile = "../writeable/testFile.txt"; $fh = fopen($myFile, 'a') or die("can't open file"); $stringData = "Lite data att skriva till filen för att se att det fungerar\n"; fwrite($fh, $stringData); fclose($fh); $fh = fopen($myFile, 'r'); $theData = fread($fh, filesize($myFile)); fclose($fh); header("Content-Ty...
true
2069770e8f3d918a2c1b6ccdbd0d68b3c6667194
PHP
ElvenSpellmaker/AdventOfCode2016
/tests/unit/ToiletCodeTest.php
UTF-8
1,285
2.984375
3
[]
no_license
<?php namespace ElevnSpellmaker\AdventOfCode; use ElvenSpellmaker\AdventOfCode\ToiletCode; use PHPUnit\Framework\TestCase; class ToiletCodeTest extends TestCase { /** * @dataProvider getToiletCode */ public function testFindingCode($instructions, $code) { $numberpad = [ [ '1', '4', '7', ],...
true
9bec31ab7ed513b5cd0608da5b61b4afea9e2370
PHP
DidiCh-vi/PHP_Myproject
/uploadPHP.php
UTF-8
2,827
3.046875
3
[]
no_license
<?php require_once "config.php"; $price = $info = ""; $price_err = $info_err = ""; // Validate Information about house if(empty(($_POST["info"]))){ $info_err = "Please enter the Information."; } else{ // Prepare a select statement $sql = "SELECT id FROM images WHERE info = ?"; ...
true
b72a1bc1425f3b9bcc8755c341ff8d812bdde44f
PHP
jaenster/VPN
/Lib/RawSocket/Builder/ARPBuilder.php
UTF-8
3,151
3.25
3
[]
no_license
<?php namespace Rawsocket\Builder; /* * Class that builds a ARP packet */ use Rawsocket\Model\IPv4Address; use Rawsocket\Model\MacAddress; use Rawsocket\Model\Protocol\Type\EtherType; use Rawsocket\Model\Protocol\ARP as ARPModel; class ARPBuilder extends EthernetBuilder { protected $otherMac,...
true
fe308e73abd75d74d16c7d58ab2a5a29195b8c69
PHP
downsider/log-toolbox
/src/HttpMiddleware/LoggingMiddleware.php
UTF-8
707
2.796875
3
[]
no_license
<?php /** * @package log-toolbox * @copyright Copyright © 2015 Danny Smart */ namespace Downsider\LogToolbox\HttpMiddleware; use Psr\Http\Message\ResponseInterface; use Psr\Log\LoggerInterface; use Psr\Log\LogLevel; class LoggingMiddleware { protected $logger; public function __construct(LoggerInterface...
true
44ca1c5d74ec4c5a8ede353749fd8abed342367b
PHP
Gustavus/Utility
/Test/Serializer/PHPSerializerTest.php
UTF-8
1,744
2.71875
3
[]
no_license
<?php /** * PHPSerializerTest.php * * @package Utility * @subpackage Test * * @author Chris Rog <crog@gustavus.edu> */ namespace Gustavus\Utility\Test\Serializer; use Gustavus\Test\Test, Gustavus\Utility\Serializer\PHPSerializer, StdClass; /** * Test suite for the PHPSerializer class. * * @packag...
true
9847610c3911854acb410e770f762fc315e2b751
PHP
taisuke-j/laravel-boilerplate-5-3
/app/Http/ViewComposers/BodyClassComposer.php
UTF-8
820
2.78125
3
[]
no_license
<?php namespace App\Http\ViewComposers; use Illuminate\View\View; use Auth; use Gate; class BodyClassComposer { /** * Create a body class composer. * * @return void */ public function __construct() { $body_classes = []; if (Auth::check()) { $body_classes...
true
e0ddbcba76067b2d2db1ee76e526fe58fd79b49d
PHP
nukipratama/TicketApp-phpnative
/page_news.php
UTF-8
2,177
2.546875
3
[]
no_license
<?php require 'script/db/db.php'; include 'page_header.php'; ?> <div class="container mt-5"> <?php if (isset($_GET['id'])) { $id = $_GET['id']; $stmt = $dbConn->prepare("SELECT * FROM `news` WHERE id = ?"); $stmt->bind_param("s", $id); $stmt->execute(); $result = $stmt->get_result(); if ($...
true
d6ab34a9a03b8ff3af94ead328f39556520f0e7b
PHP
cinling/php-ext-lib
/src/traits/BaseVoTrait.php
UTF-8
10,926
2.53125
3
[ "MIT" ]
permissive
<?php namespace cin\extLib\traits; use cin\extLib\aos\RuleAo; use cin\extLib\interfaces\Arrayable; use cin\extLib\services\ValidFactoryService; use cin\extLib\utils\ArrayUtil; use cin\extLib\utils\ExcelUtil; use cin\extLib\utils\JsonUtil; use cin\extLib\utils\StringUtil; use cin\extLib\utils\XmlUtil; use cin\extLib...
true
d19dd901d6b62a8baee5d0d923fab495f260d8f0
PHP
SmithWebster/bad_domain_clicks
/app/models/BadDomains.php
UTF-8
1,116
2.8125
3
[]
no_license
<?php class BadDomains extends \Phalcon\Mvc\Model { /** * * @var integer */ public $id; /** * * @var string */ public $name; /** * Returns table name mapped in the model. * * @return string */ public function getSource() { return '...
true
0d289ceab8e15f1e198fefe7a92b7eae0e8fb010
PHP
aczietlow/carr-properties
/Site/cms/getInfo.php
UTF-8
1,688
2.890625
3
[]
no_license
<?php //$filename="../properties.xml";// moved up one lvl $dom = simplexml_load_file($filename); //var_dump($dom); $uid=$_REQUEST["uid"]; $spot=0; foreach ($dom as $p) { //echo $spot."<br />\n"; $temp=$p->attributes()->uid; if($temp==$uid) { echo "Title of listing: ".$dom->property[$spot]->title."<br />\n...
true
f4b53277363573ee4f6dd72f6fc9f4bca186fc13
PHP
PandaWzg/imking-ecology
/common/helpers/WechatHelper.php
UTF-8
3,569
2.734375
3
[ "Apache-2.0" ]
permissive
<?php namespace common\helpers; use Yii; /** * Class WechatHelper * @package common\helpers * @author jianyan74 <751393839@qq.com> */ class WechatHelper { /** * 验证token是否一致 * * @param string $signature 微信加密签名,signature结合了开发者填写的token参数和请求中的timestamp参数、nonce参数 * @param integer $timestamp 时间...
true
58de20d1168c77983830ea6b0dce5eaf9382fb14
PHP
farazjaved/OOP
/abstraction/classes/CallService.php
UTF-8
331
3.328125
3
[]
no_license
<?php /** * Abstract Class having an abstract call method */ abstract class CallService { protected $totalCoins; public function setTotalCoins($_totalCoins) { $this->totalCoins = $_totalCoins; } public function getRemainingCoins() { return $this->totalCoins; } abstract public function ca...
true
aaefa68f4c86349a45c9887dfa527ee076c8dd31
PHP
Diamaa12/mywebsite
/PHP/addSujet.php
UTF-8
2,355
2.515625
3
[]
no_license
<?php session_start(); include_once 'function/function.php'; include_once 'function/addSujet_class.php'; include_once 'function/compteur.php'; $bdd = bdd(); if(isset($_POST['sujetName']) and isset($_POST['sujet'])){ $addSujet = new addSujet($_POST['sujetName'], $_POST['sujet'], $_POST['categorie']) ; $toVerify ...
true
0f9d536f6102702c5c0c82b843df07679ea15f02
PHP
bobur1/bobur1.github.io
/user.php
UTF-8
4,488
2.578125
3
[]
no_license
<?php session_start(); include_once "calendar/calendar.php"; if ((isset($_GET['user'])) and (isset($_GET['status']))){ //clode it require_once("config.php"); $conn = new mysqli($hn, $un, $pw, $db); if ($conn->connect_error) die($conn->connect_error); $status = $_GET["status"]; $username = $_GET['user']; if ($status !...
true
1052274d13d85bada836f6575d1af3488f213acf
PHP
dsias/symfony5-app-boilerplate
/src/Exceptions/ApiValidationException.php
UTF-8
466
2.796875
3
[ "MIT" ]
permissive
<?php namespace App\Exceptions; use Throwable; class ApiValidationException extends DomainException { private array $validationErrors = []; public function __construct($message = '', $code = 0, Throwable $previous = null, array $errors = []) { parent::__construct($message, $code, $previous); ...
true
86e169dd760cfb1bf8f42885c505e6b8f9fee738
PHP
Crismehol/proyecto
/app/Employee.php
UTF-8
1,653
2.625
3
[ "MIT" ]
permissive
<?php namespace App; use App\Http\Requests\CreateEmployeesFormRequest; use App\Http\Requests\UpdateEmployeesFormRequest; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Hash; class Employee extends Model { protected $table = 'employees'; public $time...
true
6c3e47d069a4fc69828a61ed61dbc649efce5c07
PHP
welbert/ufba-convida
/EngUfbaConvida/controller/indexController.php
UTF-8
6,994
2.609375
3
[]
no_license
<?php Class indexController Extends baseController { public function index() { $departamentos = new Departamento; $campus = new Campus; $instalacao = new Instalacao; $eventos = new Evento; $atividade = new Atividade; ######################################################### $query ...
true
a9e4addb055d7e4c6560000b5dc28426d89cf1d2
PHP
greeny/LearnNette
/app/security/Authenticator.php
UTF-8
849
2.90625
3
[]
no_license
<?php /** * @author Tomáš Blatný */ namespace App\Security; use Nette\Database\Context; use Nette\Security\AuthenticationException; use Nette\Security\IAuthenticator; use Nette\Security\Identity; use Nette\Security\Passwords; class Authenticator implements IAuthenticator { /** @var Context */ private $context;...
true
4d79c310ce4d73911db0a4026458f8da832cfcc5
PHP
adamlink-nl/dataconverters
/php/src/SimpleLogger.php
UTF-8
621
3
3
[]
no_license
<?php declare(strict_types=1); namespace Leones\AdamLinkR; class SimpleLogger { /** @var string */ private $logFile; public function __construct(string $logFile) { $this->logFile = $logFile; } public function logToCsv(array $data) { $fp = fopen($this->logFile, 'a'); ...
true
ecf4056a519e8e8a354a1e4cca4aae87c46567df
PHP
pinguinato/corso-phpunit
/tests/ProductTest.php
UTF-8
457
2.671875
3
[]
no_license
<?php require "src/Product.php"; class ProductTest extends \PHPUnit\Framework\TestCase { public function testIdIsAnInteger() { $product = new Product(); $reflector = new ReflectionClass(Product::class); $property = $reflector->getProperty('productId'); $propert...
true
de460d111bec27fa8d88273d95247346b598ce7a
PHP
CCAtAlvis/HyperLocal
/include.php
UTF-8
2,918
2.875
3
[]
no_license
<?php // set some defining functions session_start(); date_default_timezone_set("Asia/Kolkata"); // check whether the user is already logged in // set global define() for login and user_id $login = $_SESSION["login"] ?? $_COOKIE["login"] ?? false; $user_id = $_SESSION["user_id"] ?? $_COOKIE["user_id"] ?? false; if (...
true
1e51dd9d3db9aa477bc856b169dee5100668d4ff
PHP
eduardoaraya/giftcard-app-monorepo
/src/backend/app/Repositories/CardRepository.php
UTF-8
686
2.640625
3
[ "MIT" ]
permissive
<?php namespace App\Repositories; use App\Contracts\Card\CardRepositoryInterface; use App\Contracts\Card\CardEntityInterface; use App\Models\Card; class CardRepository implements CardRepositoryInterface { public function __construct( private Card $model ) { } public function getByCardNumber(...
true
60c9b9096d8fd7015f6a2d3fa48045be17caea43
PHP
ledinhhuutai/php2
/app/Models/BaseModel.php
UTF-8
673
2.828125
3
[]
no_license
<?php namespace App\Models; use PDO; class BaseModel { public function __construct () { $this->conn = new PDO("mysql:host=localhost; dbname=php2; charset=utf8", "root", "123456"); } public static function all () { $model = new static; $query = "select * from " . $model->table ; $stmt = $model->conn->pre...
true
49c44a90e7eedd568b93a74d5ec8a4a4e6038ac6
PHP
Uktam19980416/Kinder1
/app/Repositories/ParentsRepository.php
UTF-8
693
2.671875
3
[ "MIT" ]
permissive
<?php namespace App\Repositories; use App\Models\Parents; use App\Repositories\BaseRepository; /** * Class ParentsRepository * @package App\Repositories * @version July 4, 2020, 7:30 am UTC */ class ParentsRepository extends BaseRepository { /** * @var array */ protected $fieldSearchable = [ ...
true
f3b8f33a8bcb1c7612d8f6c1bfc75419341a3a89
PHP
lakkaru/MIS-at-Piduruthalagala
/controllers/exchange.php
UTF-8
2,898
2.515625
3
[]
no_license
<?php class Exchange extends Controller { public function __construct() { parent::__construct(); Auth::handleLogin(); $this->view->js = array('exchange/js/default.js'); $this->view->css = array('exchange/css/default.css'); } public function index() { $this->vie...
true
b20712b5129f057896eb5bb3326b9cf86a31ad19
PHP
Nidhal-Boussora/Pi-symfony
/src/Entity/Events.php
UTF-8
3,644
2.5625
3
[]
no_license
<?php namespace App\Entity; use ApiPlatform\Core\Annotation\ApiResource; use App\Repository\EventsRepository; use Doctrine\ORM\Mapping as ORM; use ApiPlatform\Core\Annotation\ApiFilter; use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter; /** * @ApiResource(formats={"json"}, attributes={"pagination_maximum_...
true
a45ea7e194858326197c02c69bfe0bd6761be575
PHP
menamegaly/MR
/vendor/munkireport/wifi/wifi_model.php
UTF-8
5,285
2.578125
3
[ "MIT" ]
permissive
<?php use CFPropertyList\CFPropertyList; class Wifi_model extends \Model { public function __construct($serial = '') { parent::__construct('id', 'wifi'); //primary key, tablename $this->rs['id'] = 0; $this->rs['serial_number'] = $serial; $this->rs['agrctlrssi'] = 0; $th...
true
27d704f47fd4beea4d5a3caaa06c46f1d8f37f6a
PHP
CITS3200-TeamH/CITS3200-Wellness-Project
/ediary_culled/visualisations/ind_daily_met_line.php
UTF-8
3,191
2.53125
3
[]
no_license
<?php include '../config.php'; include '../connect.php'; include '../layout.php'; include("../pChart/pData.class"); include("../pChart/pChart.class"); include("../pChart/pCache.class"); check_student(); $class = $_SESSION['group_name']; $id = $_SESSION['username']; //GET RELEVANT DATES $res2 = mysql_quer...
true
0ce867569bed83d7566bf16173e4e92f486c9462
PHP
antu12/Interfacing_project
/360/update.php
UTF-8
723
2.625
3
[ "MIT" ]
permissive
<?php if(isset($_POST['state'])){ //connect to the db $servername = "52.165.29.136"; $username = "root"; $password = "Nopassword01"; $dbname = "autohome"; // Create connection $conn = new mysqli($servername, $username, $password, $dbname); // Check connection if ($conn->connect_error) { die("Connect...
true