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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
4ae4b23ae1748b1c37a80429ad426907f501bda5 | PHP | VSVverkeerskunde/gvq-api | /src/Contest/Repositories/Entities/AddressEmbeddable.php | UTF-8 | 2,047 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | <?php declare(strict_types=1);
namespace VSV\GVQ_API\Contest\Repositories\Entities;
use Doctrine\ORM\Mapping as ORM;
use VSV\GVQ_API\Common\ValueObjects\NotEmptyString;
use VSV\GVQ_API\Contest\ValueObjects\Address;
/**
* @ORM\Embeddable()
*/
class AddressEmbeddable
{
/**
* @var string
* @ORM\Column(t... | true |
7210a407b83d3b98d1f004c66b9407f87d8c9ecb | PHP | maimake/largen | /src/helpers.php | UTF-8 | 12,656 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
//use Coduo\PHPHumanizer\StringHumanizer;
use function GuzzleHttp\Psr7\build_query;
use function GuzzleHttp\Psr7\parse_query;
use Illuminate\Encryption\Encrypter;
use Maimake\Largen\Support\Log\LogManager;
use Psr\Http\Message\UriInterface;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Illum... | true |
7859c7178e5dc880456af669e63b0dc4bb84aebc | PHP | sebastien-fauvel/CM | /library/CM/FormAction/Abstract.php | UTF-8 | 2,069 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
abstract class CM_FormAction_Abstract {
/** @var string */
private $_name;
/** @var CM_Form_Abstract */
private $_form;
/**
* @param CM_Form_Abstract $form
* @throws CM_Exception
*/
public function __construct(CM_Form_Abstract $form) {
$this->_form = $form;
... | true |
2b6e6bdcac9b9f4c1cdaef5a984d4dcca8a95ae1 | PHP | JorgePiaggio/Exercises | /Php/drawingBook.php | UTF-8 | 1,711 | 3.875 | 4 | [] | no_license | <?php
function pageCount($n, $p) {
$turns = 0;
//last page, first page, second to last page -p being pair and n odd-
if($n == $p || $p == 1 || ($n % 2 != 0 && $p % 2 == 0 && $p == $n - 1)){
return 0;
}
if( $p <= floor($n/2) ){ //if page is closer to the beginni... | true |
ea42a98dc0ab378418bcad6f611c1b7b7af71f00 | PHP | oscar810429/codeigniter-c | /application/core/MY_Model.php | UTF-8 | 13,930 | 2.9375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Base model
* @author Dave Xie <hhxsv5@sina.com>
*/
class MY_Model extends CI_Model
{
public function __construct()
{
$this->load->database();
parent::__construct();
}
/**
* Get the table name
*/
public function getTableName()
{
show_er... | true |
aa84790e7d2dd6214be1394421815334aeead6ba | PHP | wahyunurrosyid/backend_pampsi | /app/Traits/FriendConnection.php | UTF-8 | 13,794 | 2.734375 | 3 | [] | no_license | <?php
/*
* friendship sistem
* 2003dendy@gmail.com
*/
namespace App\Traits;
use App\Models\Friendship;
use App\Models\User;
use App\Notifications\ConnectionAccepted;
use App\Notifications\RequestConnectionFriend;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Request;
trait FriendConnection
{
... | true |
865e7498a8a90716ad6f32976cb7e628064d270a | PHP | GabrielMoli/sape-modulo-web | /application/models/Gerador_model.php | UTF-8 | 1,290 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
class Gerador_model extends CI_Model{
function __construct()
{
parent::__construct();
}
function get_aluno_disciplina($checked, $input){
$i=0;
while($i<count($checked)){
$resultadoArrayFiltrado = ($this->db->
select($checked)->fro... | true |
8c2a9cb9bb4192b29df086011764ce9e436ec3a4 | PHP | macferreira/LoopAnime-Website | /src/LoopAnime/AdminBundle/Resources/views/admin/force_populate.php | UTF-8 | 3,876 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
set_time_limit(0);
function logCLass($message, $level = 0, $color = "black") {
$spaces = "";
for($i = 0; $i <= $level; $i++)
$spaces .= " ";
$message = "<font style='color:$color'>" .$spaces . $message . "</font>";
echo $message . "<br>"; ob_flush(); flush(); usleep(30000);
}
... | true |
f40631caad98a69b3864938a318745ad7e5ef28a | PHP | peter279k/std | /tests/Curl/CurlTest.php | UTF-8 | 2,584 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Brick\Std\Tests\Curl;
use Brick\Std\Curl\Curl;
use PHPUnit\Framework\TestCase;
class CurlTest extends TestCase
{
public function testGetInfoWithSpecificOption()
{
$curl = new Curl();
$this->assertSame(0, $curl->getInfo(CURLINFO_HTTP_CODE));
}
... | true |
60891573389ca5ced864c5d8725ef3a987f4c6a0 | PHP | imper86/allegro-new-desc-html-transformer | /src/Imper86/AllegroNewDescHtmlTransformer/JsonTransformerInterface.php | UTF-8 | 386 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright: IMPER.INFO Adrian Szuszkiewicz
* Date: 07.08.17
* Time: 11:38
*/
namespace Imper86\AllegroNewDescHtmlTransformer;
interface JsonTransformerInterface
{
/**
* This method transforms all HTML fields and returns JSON struct
*
* @param string $jsonString
* @return string... | true |
9731841d0a87104f36bda2fcf51608cb953ae3a5 | PHP | saulalvarado9777/p_venta | /controlador/categoria_controller.php | UTF-8 | 1,301 | 2.890625 | 3 | [] | no_license | <?php
include_once '../modelo/categoria.php';//incluimos la clase laboratorio
$categoria= new categoria(); //instanciamos un objeto de la clase laboratorio
if($_POST['funcion']=='crear')
{
$nombre = $_POST['nombre_categoria'];/*estos debes de ser igualal documento js */
$categoria->crear($nombre);
}
if(... | true |
1086c833545649ed4b39cdb4963d30105e3b106b | PHP | Davidbosio6/tesis | /src/AppBundle/Entity/Shift.php | UTF-8 | 4,793 | 2.59375 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace AppBundle\Entity;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Class Shift.
*
* @ORM\HasLifecycleCallbacks
*
* @ORM\Table(name="shift")
* @ORM\Entity(repositoryClass="AppBundle\Reposi... | true |
5099477a45cdb78a7ab2f125ffa1fc7d49ba1710 | PHP | DaniinXorchenabo/Technologies_for_developing_Internet-resources | /laba_6/login.php | UTF-8 | 1,656 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
include_once "data/save_users.php";
session_start();
$login_error = false;
$password_error = false;
$other_error = false;
if (isset($_SESSION['is_login']) && $_SESSION['is_login'] == "yes") {
header('Location: /account.php');
}
if (isset($_POST["login"]) && isset($_POST["password"])) {
// обработка фор... | true |
bc2a9ab68c0bfa7799606609a5e290cf719440b5 | PHP | MohamedHamdy11/Plugins-App | /includes/orders.php | UTF-8 | 1,393 | 3.265625 | 3 | [] | no_license | <?php
class orders
{
public $connection;
public function __construct()
{
$this->connection = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME);
}
/**
* add new order
* @param $name
* @param $address
* @param $phone
* @param $productId
* @param $quantity
* @re... | true |
9fbb9406597eadc6c092c21dd8f9b6f6e824a839 | PHP | iloveyii/mobilz | /root/frontend/components/ImageResizer.php | UTF-8 | 1,777 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | <?php
class ImageResizer extends CApplicationComponent {
protected $image;
protected $width;
protected $height;
protected $newWidth;
protected $newHeight;
public function resize($width = false, $height = false){
if($width!==false) $this->newWidth = $width;
if($height!==false) $this->new... | true |
773b4a73541dcf34ab7c9b396aeb1a8d5679ff26 | PHP | oliviagarrett/minerva | /php/files_listAll.php | UTF-8 | 1,389 | 3.0625 | 3 | [] | no_license | <?php
// File: files_listAll.php
// echos a JSON array with all logo images
//
$directory= "datas";
if(isset($_POST['directory'])){
$directory = filter_input(INPUT_POST, 'directory');
}
if(isset($_GET['directory'])){
$directory = basename(filter_input(INPUT_GET, "directory"));
// echo "$... | true |
e16b19d9846455cde8fb4ae7d05d5b4e2f031508 | PHP | rhalp10/BMIS | /Health_and_Sanitation/death.php | UTF-8 | 2,779 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | <?php
session_start();
require('db.php');
?>
<!DOCTYPE html>
<html>
<head>
<title>death</title>
</head>
<link href="css/design.css" rel="stylesheet" type="text/css">
<body>
<div class="label"> Health and Sanitation
<div class="nav">
<?php
if ($_SESSION['position']=='Barangay Secretary' OR $_SESSION['position'... | true |
685391672a67e4d49136f6aae9e141d4ec399c63 | PHP | wp-plugins/annonces | /includes/lib/admin_attributs_group.class.php | UTF-8 | 8,690 | 2.59375 | 3 | [] | no_license | <?php
/*********************************************************
*Date: 01/10/2009 File:admin_attributs_group.class.php *
*Author: Eoxia *
*Comment: *
* GENERATE UTILITIES FOR ATTRIBUTES *
**************************... | true |
bf550bf11b02cedb3d1b0c74edfc4c863fe00578 | PHP | backbone87/php-filesystem | /src/Filicious/Internals/AbstractAdapter.php | UTF-8 | 2,804 | 2.953125 | 3 | [] | no_license | <?php
/**
* High level object oriented filesystem abstraction.
*
* @package filicious-core
* @author Tristan Lins <tristan.lins@bit3.de>
* @author Christian Schiffler <c.schiffler@cyberspectrum.de>
* @author Oliver Hoff <oliver@hofff.com>
* @link http://filicious.org
* @license http://www.gnu.org/license... | true |
438223f7507c613cd878d449fb43b2d08b91d8bf | PHP | cokewenya/coke_im | /vendor/SooCoke/routes/route.php | UTF-8 | 201 | 2.53125 | 3 | [] | no_license | <?php
namespace SooCoke\routes;
class route{
protected $m,$v,$c;
public static function make($query_string){
return [$query_string['m'],$query_string['v'],$query_string['c']];
}
}
| true |
1b9e3693e57b342fbafe330e31cc459f13621ee1 | PHP | TiercelinQ/Nadalenca | /Controleur/controlSuppressionMorceauAudio.php | UTF-8 | 1,306 | 2.546875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Suppression d'une Piste audio</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="../style.css" />
<link rel="icon" type="image/png" href="../Images/favicon.png" />
</head>
<?php
//On inclue le menu
include("./menu.php");
//On inclue le modele
include("../Mode... | true |
0b9d2a2b89c587022a44497f453c7e736b0aa2fb | PHP | MakerbakerYT/CrowdMC | /Core/src/kenygamer/Core/command/ClearChatCommand.php | UTF-8 | 490 | 2.828125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace kenygamer\Core\command;
class ClearChatCommand extends BaseCommand{
public function __construct(){
parent::__construct(
"clearchat",
"Clear your chat",
"/clearchat",
[],
BaseCommand::EXECUTOR_PLAYER,
"true"
);
}
protected function onExecute($sende... | true |
bc52c2efa6251697cbbfc3b4233029bb8a724816 | PHP | Thorrdu/stargate | /laravel/app/Trade.php | UTF-8 | 2,017 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Trade extends Model
{
public function playerSource()
{
return $this->belongsTo('App\Player','player_id_source','id');
}
public function playerDest()
{
return $this->belongsTo('App\Player','player_id_dest','id');
... | true |
b00be2e592f7b32e73501dc0fc61bdd5cb6e3d40 | PHP | datainmo/aliexpress-crawler | /tests/Item/SkuTest.php | UTF-8 | 1,090 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Chougron\AliexpressCrawler\Item;
final class SkuTest extends \PHPUnit\Framework\TestCase
{
const TEST_ID = "14";
const TEST_PRICE = "10.43";
const TEST_QTY = "30";
const TEST_MODEL = "14:10#3124B";
public function testConstructor()
{
$object = $this->prepareObject();
... | true |
c3faa5668bc270b77b0b741a5997d23c04b7cd7e | PHP | hasanganteng/semester1 | /destruct.php | UTF-8 | 281 | 3.53125 | 4 | [] | no_license | <?php
class manusia{
function __destruct(){
echo "ini adalah Method DESTRUCT";
}
function nama(){
echo"<br>Nama Saya Adalah Alid Taher<br>";
}
function __construct(){
echo"ini adalah Method CONSTRUCT";
}
}
$cetak = new manusia();
echo $cetak->nama(); | true |
71986c7be78e717737755b32d8a9a5f15e01d4e7 | PHP | DavidValdezLopez/laravel | /proyecto/database/seeds/UsersTableSeeder.php | UTF-8 | 614 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use proyecto\MyUser;
use Illuminate\Database\Seeder;
use Faker\Factory as Faker;
class UsersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$users = new MyUser;
$faker = Faker::create();
foreach (range(1... | true |
6c91071be790c424aceb533f7cb44ced4e2015a2 | PHP | jonw316/XenForo2-AlertImprovements | /upload/src/addons/SV/AlertImprovements/ISummarizeAlert.php | UTF-8 | 763 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace SV\AlertImprovements;
use SV\AlertImprovements\XF\Entity\UserAlert;
interface ISummarizeAlert
{
/**
* @param array $optOuts
* @return bool
*/
function canSummarizeForUser(array $optOuts);
/**
* @param array $alert
* @return mixed
*/
function canSummari... | true |
75d6ea6b542127e58f5d99bd268ddafec1f4cf64 | PHP | Sbounds/ARLwebsite | /ARLwebsite.php | UTF-8 | 3,210 | 2.71875 | 3 | [] | no_license | <?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
if(!isset($_SESSION))
{
session_start();
}
// Connect to database
require_once("DatabaseConnection.php");
// Add animals
if (isset($_POST['add'])) {
// Variables
$NAME = $_POST['name'];
$BREED = $_POST['breed'];... | true |
8ff5a7d096276e555cf823108d37e0d4cf638c6f | PHP | fumelolz/perseo1 | /controladores/Alertas.controlador.php | UTF-8 | 1,898 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
// static public function alertaBasica($mensaje){
// $data='<script></script>';
// echo $data;
// }
class AlertasPersonalizadas{
static public function alertaExito($titulo, $descripcion,$redireccion){
$data='<script>
Swal.fire(
"'.$titulo.'",
"'.$descripcion.'",
"success"
)... | true |
059ae4fcea5f1088d9352666ebc5a8404bee80eb | PHP | kapetn/DMS | /classes/class.captcha.php | UTF-8 | 1,770 | 3.203125 | 3 | [] | no_license | <?php
/*
$captcha = new captchacreate();
$randchar = new randchar();
$random_char = $randchar->rand_char();
$captcha->create_image($random_char);
exit();
*/
class captchacreate{
//Send a generated image to the browser
function create_image($pass)
{
//Set the image width and height
$width = 200;
$heig... | true |
5ef0d56fa924a221e79cce2779973d2af1f0afc1 | PHP | netzmacht/tapatalk-client-api | /src/Netzmacht/Tapatalk/Api/Posts/BreadcrumbNode.php | UTF-8 | 1,269 | 2.78125 | 3 | [] | no_license | <?php
/**
* @package tapatalk-client-api
* @author David Molineus <david.molineus@netzmacht.de>
* @copyright 2014 netzmacht creative David Molineus
* @license LGPL 3.0
* @filesource
*
*/
namespace Netzmacht\Tapatalk\Api\Posts;
use Netzmacht\Tapatalk\Transport\MethodCallResponse;
/**
* Class Brea... | true |
58081f3dfae948483f6d87c4e03beb84272c58d0 | PHP | yamagen612/PHP | /index.php | UTF-8 | 322 | 2.90625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meat charset='utf-8'>
<title>HTML内でのPHPスクリプト </title>
</head>
<body>
<h1><?php echo "PHPから表示";?></h1>
<?php
$str_hello = "HTML内で"
echo "<p> $str_hello PHPスクリプトを表示してみたよ</p>";
?>
</body>
</html>
| true |
fdc301c5752ae1c389f9dd5bfdad7808c5b7035b | PHP | subahanumanth/training | /code/final.php | UTF-8 | 294 | 3.46875 | 3 | [] | no_license | <?php
class BaseClass {
public function test() {
echo "This is test";
}
final public function other() {
echo "This is other function";
}
}
class ChildClass extends BaseClass {
public function other() {
echo "This is child other";
}
}
$obj = new BaseClass();
$obj->test();
| true |
691c0d770ac2041555868b0c96a0f3ba45a41ed5 | PHP | Niptune25/TASK2 | /webpage.php | UTF-8 | 807 | 2.640625 | 3 | [] | no_license | <?php
$footerFile = '/home/user/index.html';
include($footerFile);
?>
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<?php
if(array_key_exists('button1', $_POST)) {
button1();
}
else if(array_key_exists('button2', $_POST)) {
button2();
}
function button1() {
... | true |
2d6563c66a56f3901ae04b313f9aadc0523ad408 | PHP | Kanyashiu/Laboratory | /PHP/Exercices/Correction/Debutant/Exercice25.php | UTF-8 | 295 | 3.96875 | 4 | [] | no_license | <?php
// Exercice 25, Créez une fonction qui prend en argument un string et qui inverse cette chaîne de caractères;
function reverse($string) {
return strrev($string);
};
echo reverse('Bienvenue au laboratoire !') . PHP_EOL;
echo reverse('Welcome to the laboratory !') . PHP_EOL; | true |
d2e3c728ed033cbb314e0be588d708fcbb9e995c | PHP | spaze/michalspacek.cz | /site/vendor/nette/php-generator/src/PhpGenerator/Dumper.php | UTF-8 | 8,255 | 3.0625 | 3 | [
"MIT",
"GPL-3.0-only",
"GPL-2.0-only",
"BSD-3-Clause",
"GPL-1.0-or-later"
] | permissive | <?php
/**
* This file is part of the Nette Framework (https://nette.org)
* Copyright (c) 2004 David Grudl (https://davidgrudl.com)
*/
declare(strict_types=1);
namespace Nette\PhpGenerator;
use Nette;
/**
* PHP code generator utils.
*/
final class Dumper
{
private const IndentLength = 4;
public int $maxDep... | true |
b7c62003a02ecf7afc9bbd6dbac464eb8288d767 | PHP | ananya310/PHPbasics | /loops.php | UTF-8 | 614 | 3.5625 | 4 | [] | no_license | <?php
/*
* Loops.
*/
//for loop - general purpose
for ($fi=0; $fi<5; $fi++) {
if ( $fi == 3 )
break;
print 'Running for loop - ' . ($fi+1);
print '<br />';
}
print '<hr />';
//while loop - database resultset looping
$wi=0;
while ( $wi<5 ) {
prin... | true |
9c9652c0b324a0b0cf08cdf165b8bf45e1843ffc | PHP | afsaa/BackToPHP | /app/Models/Project.php | UTF-8 | 395 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Project extends Model
{
protected $table = 'projects';
/*function __construct($title, $description, $projectRole)
{
parent::__construct($title, $description);
$this->projectRole = $projectRole;
}
public fu... | true |
c4efdd9b530a2b762d1b55dff9608e432947f36b | PHP | laylaalsaede/IBM-watson-assistant | /file.php | UTF-8 | 1,106 | 2.65625 | 3 | [] | no_license | <?php
$db = mysqli_connect('localhost', 'root', '', 'robotarm');
if (isset($_POST['save'])){
$v1 = $_POST['volume1'];
$v2 = $_POST['volume2'];
$v3 = $_POST['volume3'];
$v4 = $_POST['volume4'];
$v5 = $_POST['volume5'];
$v6 = $_POST['volume6'];
$my_query = "";
$my_query =... | true |
01d0e1827c92ea37fea6bb4ea11d3170ed13253c | PHP | ishmam22/COMP353 | /api/controllers/employees/employee.php | UTF-8 | 9,955 | 2.84375 | 3 | [] | no_license | <?php
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
use Slim\Container;
class EmployeeController
{
private $employee_table_name = "employees";
private $prefs_table_name = "desired_contracts";
protected $container;
// constructor receives... | true |
494e2230ebce035bad9a9d68a8294c2f07f0ab49 | PHP | dikopiinaja/crudlaravel7vuejs | /app/Http/Controllers/ProfileController.php | UTF-8 | 1,107 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Auth;
class ProfileController extends Controller
{
public function __construct()
{
$this->middleware('auth:api', ['except' => ['auth', 'register']]);;
}
public function profile(Request $request)
{
$credentials... | true |
f7762dd009e04239a27b4a451fef6dbc90a5246a | PHP | ramirezpineda-rd/Tecnologia_y_Aplicaciones_Web | /Recuperacion/app/Http/Controllers/MesasController.php | UTF-8 | 2,495 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Mesa;
use Illuminate\Http\Request;
class MesasController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
// Listado de mesas
$mesas = M... | true |
f558eb4836b24cc639d8743388ae9a843dd3bb54 | PHP | montashir92/OOP-Login-Register | /changepassword.php | UTF-8 | 2,695 | 2.5625 | 3 | [] | no_license | <?php
session_start();
require_once "functions.php";
$user = new LoginRegistration();
$uid = $_SESSION['uid'];
if (!$user->getSession()) {
header('location: login.php');
exit();
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Change Password</title>
<link rel="stylesheet" type=... | true |
41dc952f3b842353f68ceae4f1cb7f6b9eae2c13 | PHP | IbrahimKhalil/semiorbit-framework-console | /src/lib/GlobalVars.php | UTF-8 | 1,396 | 2.859375 | 3 | [] | no_license | <?php
namespace SemiorbitFwkLibrary;
use Semiorbit\Cache\FrameworkCache;
use Semiorbit\Support\RegistryManagerInterface;
class GlobalVars implements RegistryManagerInterface
{
private static $_Globals = [];
const CACHE_KEY = 'fwk-console';
public static function Destroy()
{
self::$_Glob... | true |
c3ce466fb1d368429f1fb8ce1276380157f1b329 | PHP | Tuscann/PHP-Fundamentals---2017 | /HomeWork-1/5.LazySundays.php | UTF-8 | 299 | 3.078125 | 3 | [] | no_license | <?php
$month = cal_days_in_month(CAL_GREGORIAN, date('m'), date('y'));
$mo = date('m');
for ($i=1; $i<=$month; $i++) {
$dayOfWeek = mktime(0, 0, 0, $mo, $i, date('y'));
if (strftime("%A", $dayOfWeek) == "Sunday") {
echo $i . date("S F, Y") . '<br>';
}
}
?> | true |
9a51d513f816681cc25dbfb8cfe16afbea2b43d9 | PHP | Detlefff/Detlefff-Weather | /weather.php | UTF-8 | 1,244 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
use Cmfcmf\OpenWeatherMap;
use Cmfcmf\OpenWeatherMap\Exception as OWMException;
// Must point to composer's autoload file.
require('vendor/autoload.php');
class weather extends Script
{
private $apiKey = '';
protected $helpMessage = "'weather LOCATION'\n";
protected $description = 'Returns the weather at th... | true |
ca8bc05f5cf5dad60db2629bfd55594f4addde76 | PHP | ivanlanin/aglutinasi | /samples/patterns.php | UTF-8 | 747 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
/**
*
*/
// Ambil data
$patternFile = __DIR__ . '/../pattern-summary.txt';
$fileContent = file_get_contents($patternFile);
preg_match_all("/(.+) > (.+)/m", $fileContent, $matches);
// Atur dalam array
$patternCount = count($matches[0]);
for ($i = 0; $i < $patternCount; $i++) {
$patterns[] = array($matches... | true |
0d5348dac6b74f8aae4113dcf67678d4426e4c55 | PHP | gast499/IS218_project3 | /classes/validator.php | UTF-8 | 1,620 | 3.015625 | 3 | [] | no_license | <?php
class Validator{
public function validate($db){
$sanitizedusername = filter_var($_POST['username'],FILTER_SANITIZE_STRING);
if(strlen($sanitizedusername) < 3){
$error[] = 'Username is too short.';
} else {
$stmt = $db->prepare('SELECT username FROM members WHERE use... | true |
8342ef36ab65853d7eb8eb8d1f4e4fd152dde3df | PHP | Tanmoy08/html | /11.php | UTF-8 | 1,167 | 2.71875 | 3 | [] | no_license | <html>
<head><title>Details of student</title></head>
<body>
<?php
$con=mysqli_connect("localhost","root","") or die("mysql error");
mysqli_select_db($con,"Tanmoy") or die("database not found");
$n=$_POST['name'];
$add1=$_POST['addr1'];
$add2=$_POST['addr2'];
$email=$_POST['email'];
$rs=null;
if(isset($_POST['submit'])... | true |
acbddea67d741f7c30055b66cd3787df6057cf79 | PHP | Rotikhord/cs313-php | /web/cit261/saveGlobalScores.php | UTF-8 | 209 | 2.5625 | 3 | [] | no_license | <?php
if (isset($_GET['scores'])){
$jsonFile = fopen("highScores.json", "w") or die("Unable to open file!");
$scores = $_GET['scores'];
fwrite($jsonFile, $scores);
fclose($jsonFile);
} else {
die;
}
?> | true |
fca947960713937b7acd4d3b6e013fc967ef3dae | PHP | Baxti7414/books | /models/Books.php | UTF-8 | 3,805 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "books".
*
* @property int $id
* @property string $name
* @property string $description
* @property string $text
* @property string $image
* @property string $file
* @property int $cost
* @property int $status
* @property string ... | true |
3e0a88e2a159ef4ccfd6969413a3ca08fef32d46 | PHP | rb59/shop | /Models/User.php | UTF-8 | 5,291 | 2.828125 | 3 | [] | no_license | <?php
class User extends Model
{
private $name;
private $email;
private $password;
private $balance = 100;
public function __construct()
{
parent::__construct();
$this->setTable('users');
}
public function save()
{
$query = $this->db->prepare("INSERT INT... | true |
f7aee5098981c620aff8e592c25a5f08fda2eed6 | PHP | RealSlakey/OneCircle_Plugin | /widget/Abstract/Credits.php | UTF-8 | 3,155 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
if (!defined('__TYPECHO_ROOT_DIR__')) exit;
// +----------------------------------------------------------------------
// | 积分基类
// +----------------------------------------------------------------------
class Widget_Abstract_Credits extends Widget_Abstract{
/**
* 积分的种类
* @var unknown
*/
... | true |
7065b400a8bbbb58dae434c15838f24ff178408e | PHP | yokkun/study-at-hal-programming-school | /JavaScriptHonkaku/Chapter3/tel_regexp.php | UTF-8 | 910 | 2.953125 | 3 | [] | no_license | <script>
//サブマッチパターンに合致する電話番号の正規表現
var p = /^(\d{2,5})-(\d{2,5})-(\d{4})$/;
var tel = "092-999-9876";
var result = tel.match(p);
if(result){
console.log("電話番号:" + result[0]); //全体は配列の0番目に格納
console.log("市外局番:" + result[1]);
console.log("市内局番:" + result[2]);
console.log("加入者番号:" + result[3]);
}
var p1 = /\d{3}-\d{4... | true |
9887a6b1637f12aeb9e05f0d0d999efd4e781022 | PHP | ainiaa/simplyMVC | /core/RequestContext.class.php | UTF-8 | 827 | 2.6875 | 3 | [] | no_license | <?php
/**
*
* request context
*
* Class Context
*/
class RequestContext extends Context
{
/**
* 当面请求跳转
* @author Jeff Liu<jeff.liu.guo@gmail.com>
*
* @param $url
* @param $param
*/
public function forward($url, $param)
{
}
/**
* 页面跳转
* @author Jeff L... | true |
fca368365c4bc253e64d63d3a440d7f6757172c1 | PHP | Clavel0088/app-covi-info | /app/Models/VaccinModel.php | UTF-8 | 616 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Models;
use CodeIgniter\Model;
class VaccinModel extends Model
{
protected $table = 'vaccin';
protected $primaryKey = 'id';
protected $returnType = 'array';
protected $allowedFields = ['date', 'titre'
, 'description'];
public function getAll()
{
return $this->findAll();
}
... | true |
f5d4a1a26850af39637ca73cc7e5c43f4fbd32d5 | PHP | HvorostenkoNV/ServiceSystem | /core/ServiceSystem/Client/ClientInterface.php | UTF-8 | 1,464 | 2.828125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace ServiceSystem\Client;
use RuntimeException;
use ServiceSystem\DataBase\DataBase;
/** ***********************************************************************************************
* Client interface.
*
* @package ServiceSystem
* @author Hvorostenko
*********************... | true |
2691451dfd50a2c47d8a82d1b1faa38cf5fc2847 | PHP | petko-dimitrov/SoftUni | /PHP Web 09.2018/PHP Basics/07.FunctionsObjectAndClasses-Exc/13.SpeedRacing.php | UTF-8 | 2,762 | 3.5625 | 4 | [] | no_license | <?php
class Car {
private $model;
private $fuelAmount;
private $fuelCostPerKm;
private $distanceTraveled;
public function __construct(string $model, float $fuelAmount, float $fuelCostPerKm)
{
$this->setModel($model);
$this->setFuelAmount($fuelAmount);
$this->setFuelCostP... | true |
8c8d032dd8116ad714e60432335cedaf9b0c0ce1 | PHP | rashidhamid139/PlguinsWoocommerce | /includes/class-bulk-edit-log.php | UTF-8 | 926 | 2.609375 | 3 | [] | no_license | <?php
/**
*
* Main File for loading classes.
*
* @package ELEX Bulk Edit Products, Prices & Attributes for Woocommerce
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/** Address Validation Log */
class Bulk_Edit_Log {
/** Log Heading */
public static function init_log() {
$content = "<------------------- Addre... | true |
e61ff6f3d54cfcda90e6e02ccf4a844127e41a93 | PHP | rjgoetz/cherish | /controllers/photos_controller.php | UTF-8 | 2,551 | 2.5625 | 3 | [] | no_license | <?php
class PhotosController extends BaseController {
public function index() {
// check if logged in
if (isset($_SESSION['userid']) || isset($_COOKIE['userid'])) {
// get adminid
$adminid = Permissions::get_adminid($_SESSION['userid']);
// form was not submitted
if ... | true |
71123028918e0079f3d5352372f54bcd77218ff3 | PHP | saytock/langchange | /php/loginfacebook.php | UTF-8 | 2,362 | 2.640625 | 3 | [] | no_license | <?php
//facebookSDKを読み込み
require_once("facebook.php");
include("connectDB.php");
session_start();
//アプリの情報を$configに格納
$config = array(
'appId' => "1513109692251737",
'secret' => "05e6ab831200a816a07eb4df3ae03513"
);
$facebook = new Facebook($config);
$user = $facebook->getUser();
//もしユーザがフェイスブックにログインしていたら
... | true |
9aa55d3e6c883a6e004c25a513cde41e5d5e7e20 | PHP | ghilsam/POOChallenge-3 | /ResidentielWay.php | UTF-8 | 277 | 2.890625 | 3 | [] | no_license | <?php
require_once 'HighWay.php';
final class ResidentialWay extends HighWay
{
protected $nbLane = 2;
protected $maxSpeed = 50;
public function addVehicle(Vehicle $vehicle): void
{
{
$this->currentVehicles[] = $vehicle;
}
}
}
| true |
ed103fce55074b5efc05906e015ad220871dfce7 | PHP | hellboy2007/form-builder | /src/helper.php | UTF-8 | 1,268 | 2.921875 | 3 | [
"Apache-2.0"
] | permissive | <?php
if (!function_exists('form')) {
/**
* 初始化form类
*
* @return \think\form\Form
*/
function form()
{
$form = \think\form\Form::form();
return $form;
}
}
if (! function_exists('array_get')) {
/**
* Get an item from an array using "dot" notation.
*
... | true |
de659e56aaa976e8eb3a406be4506f668d0c3b18 | PHP | snenko/snenko | /library/Summers/Snenko.php | UTF-8 | 13,551 | 2.625 | 3 | [] | no_license | <?php
/**
* User: Adolis
* Date: 07.04.15
* Time: 11:16
* my personal library for functions
*/
class Summers_Snenko
{
public static function getMeta_description($use=null, $use1=null){
$page = Zend_Controller_Front::getInstance()->getRequest()->getControllerName();
$all = require(APPLICATION_... | true |
155ca19e0feeb118c381ca520fd0a55cab4f34cf | PHP | linabounsy/siteimmo | /controller/HomePage.php | UTF-8 | 1,561 | 2.546875 | 3 | [] | no_license | <?php
namespace Controller;
use model\RealEstateAdvert;
use model\Admin;
use services\Validator\Connexion;
class HomePage
{
public function index()
{
$realEstateAdvert = new RealEstateAdvert;
$lastEstates = $realEstateAdvert->getLastestEstates();
$pageTitle = "Ori Immo Accueil";
... | true |
390a26a4ac7465983e95a7c2a8928f15401e4a8e | PHP | Richard-Armstrong/aapokerclub.com | /application/controllers/Auth.php | UTF-8 | 23,045 | 2.5625 | 3 | [] | no_license | <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
ini_set('display_errors',1);
error_reporting(E_ALL|E_STRICT);
class Auth extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->database();
$this->load->library('ion_auth');
$this->load->help... | true |
22b03abd9eb1efa59264a18e507c2247b40cdd46 | PHP | fengxp/WPIS | /wpis-server/Api/function/function.php | UTF-8 | 2,632 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* 函数
*
*/
//生成随机字符串 1:数字,0:字母,2:混合
function verifRand($what,$number)
{
$string='';
for($i = 1; $i <= $number; $i++)
{
//混合
$panduan=1;
if($what == 3){
if(rand(1,2)==1){
$what=1;
}else{
$what=2;
}
$panduan=2;
}
//数字
if($what==... | true |
0a8c2fe28b090414c999a39af7fbccef3b0e6c8f | PHP | AbbaouiAmine/PHP | /tp3_4_v2.php | UTF-8 | 753 | 2.71875 | 3 | [] | no_license | <?php
$loisirs=array("sport","musique","jeu","voyage","tkharbi9a");
?>
<form method="post">
<?php
foreach($loisirs as $c=>$v)
{
if($v!="jeu")
echo('<input type="radio" value="'.$v.'" name="lo[]">'.$v.'<br>');
else
echo('<input type="radio" value="'.$v.'" name="lo[]" checked>'.$v.'<br>');
}
?>
... | true |
0198f941392aba6cc05137acf20e9b333c6067f4 | PHP | HiTa-life/worlds-of-game-api-1 | /src/Controller/Api/LoginController.php | UTF-8 | 2,037 | 2.78125 | 3 | [] | no_license | <?php
namespace Wog\Controller\Api;
use Wog\Controller\Controller;
use Wog\Http\RequestInterface;
use Wog\Http\ResponseInterface;
use Wog\Repository\UserRepository;
class LoginController extends Controller implements ApiControllerInterface
{
/**
* @inheritDoc
*/
public function __construct(
... | true |
8c26186766b2c9137bec318137681bbdbedaf949 | PHP | Kangoula/Platystener | /app/controller/ControllerPlaylist.php | UTF-8 | 5,841 | 2.59375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
include_once '../model/Playlist.php';
/**
* Controleur d'une playlist
* Appelle les fonctions liées à Playlist
*/
class ControllerPlaylist {
/**
* Recherche une playlist par son ID
* Renvoit le contenu du modal pour la suppresion de la playlist
* @param int $id
*/
... | true |
290f1177fb43e5fca47185214e8dbb2a608884cd | PHP | IPMotors/IPMotors | /classes/mailManager.php | UTF-8 | 858 | 3.484375 | 3 | [] | no_license | <?php
Class MailManager
{
public function readContentMail()
{
$t = "";
/*Ouverture du fichier en lecture seule*/
$handle = fopen('contentMail.txt', 'r+');
/*Si on a réussi à ouvrir le fichier*/
if ($handle)
{
/*Tant que l'on est pas à la fin du fichier*/
while (!feof($handle))
{
/*On lit la... | true |
9e226cf8d2885806e4ce26deb6bbb506ccc2c89a | PHP | lzlianzheng/edudata | /1.php | UTF-8 | 114 | 2.75 | 3 | [] | no_license | <?php
$timenew = time();
echo $timenew ."<br>";
$timenow = date('Y:m:d:H:i:s',$timenew);
echo $timenow."<br>";
?>
| true |
ae607b0efc6c8c2ed5bcc438c68c140a5e7efd73 | PHP | dahabit/zce | /oop/reflection.php | UTF-8 | 364 | 3.09375 | 3 | [] | no_license | <?php
class Wallet
{
private $slots = array();
public function selectCard($card)
{
foreach ($this->slots as $item)
{
if ($item === $card)
{
return $item;
}
}
return false;
}
}
$wallet = new ReflectionCla... | true |
35d8ad7ab357fc5cad8bfbd18b6ea164e8261b30 | PHP | fangcanqin/yigouv2 | /blog/app/Http/Controllers/Admin/admin_usersController.php | UTF-8 | 5,937 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
//导入管理员添加验证类
use App\Http\Requests\admin_usersStoreBlogPost;
use App\Http\Requests\Admin_users_editStoreBlogPost;
//导入管理员模型表
use App\Models\admin_users;
use Illuminate\Support\Facades\Hash;
//导入DB类
use DB;
/... | true |
533a420482f7835dda505d7fb04617c4bc5c5956 | PHP | rahimahiohi123/jell | /app/Http/Controllers/HomeController.php | UTF-8 | 931 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Sample;
class HomeController extends Controller
{
public function register(){
return view('register');
}
public function store(Request $req){
$validatedData = $req->validate([
'name' => 'required',
'username' => '... | true |
72cbeb93c049ef91264ad113c72ee1807d7d8896 | PHP | aviortm/mega-data-bundle | /src/MegaDataBundle/Dto/Location.php | UTF-8 | 961 | 2.609375 | 3 | [] | no_license | <?php
namespace MegaDataBundle\Dto;
use JMS\Serializer\Annotation as JMS;
final class Location
{
/**
* @var string
*
* @JMS\Type("string")
*/
private $name;
/**
* @var Coordinates
*
* @JMS\Type(Coordinates::class)
*/
private $coordinates;
/**
* @retu... | true |
18bc47feafdde15d60e6df80c931f1cf3a12d7d2 | PHP | TheSoundAndFury/Simple-Weather | /application/models/weather.php | UTF-8 | 1,786 | 2.859375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class weather extends CI_Model {
//Get the weather information from the api
public function __construct() {
log_message("INFO", __CLASS__ . "::" . __FUNCTION__);
}
/**
* Get the weather data from the api
*
* @return json
*
*/
public function getWeather() {
$city = $this->weather->getCity()... | true |
7485f67fe8bc248127cf43fe34e92cfe971ad4cb | PHP | phacility/phabricator | /src/applications/calendar/herald/PhabricatorCalendarEventHeraldAdapter.php | UTF-8 | 1,279 | 2.734375 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
final class PhabricatorCalendarEventHeraldAdapter extends HeraldAdapter {
private $object;
public function getAdapterApplicationClass() {
return 'PhabricatorCalendarApplication';
}
public function getAdapterContentDescription() {
return pht('React to events being created or updated.');
}
... | true |
26adcff9e8a7f606c8c15f011f564033b3bf9e66 | PHP | st-universe/core | /src/Module/Database/View/Category/Category.php | UTF-8 | 2,199 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Stu\Module\Database\View\Category;
use Stu\Module\Control\GameControllerInterface;
use Stu\Module\Control\ViewControllerInterface;
use Stu\Module\Database\View\Category\Tal\DatabaseCategoryTalFactoryInterface;
use Stu\Orm\Entity\DatabaseCategoryInterface;
use Stu\Orm\Reposito... | true |
6416f969cd329586759b85dcc1ce6ef1f8f05d06 | PHP | kmwhelan93/CS4720 | /hw3/register.php | UTF-8 | 1,011 | 2.5625 | 3 | [] | no_license | <?php
if (!isset($_SESSION)) {
// only start the session if it isn't already started
session_start();
}
include_once('dblogin.php');
$username = $_GET['username'];
$password = hash("md5", $_GET['password']);
$taken = false;
$success = false;
/*
if ($stmt->prepare("SELECT * FROM `users2` WHERE username=?"... | true |
f7ea0a959619a6e6facf478fc0859a1aa450324f | PHP | LetheSec/VulnCMS | /src(fixed)/application/member/model/Member.php | UTF-8 | 9,514 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
// +----------------------------------------------------------------------
// +----------------------------------------------------------------------
// +----------------------------------------------------------------------
// | 会员模型
// +----------------------------------------------------------------------
na... | true |
a2c6e75695fe8c7e5648e3d17050890249bce5de | PHP | onlyonehas/php_oo_game | /Bot.php | UTF-8 | 168 | 2.765625 | 3 | [] | no_license | <?php
class Bot extends Abstact_Character {
public function __construct(Game $g, $name)
{
$this->_name = $name;
echo "Bot {$this->_name} was created \n";
}
} | true |
f5cc7d122bf9cc60e2c0b6007a2594342b7f387b | PHP | stoneguardian/openGalleri | /upload/save.php | UTF-8 | 6,185 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
include_once '../sql/db.php';
//Hent variabler
$year = $_GET['year'];
$name = $_GET['name'];
$mail = $_GET['mail'];
$albumID = $_GET['aid'];
$destFolder = "../album/$mail/$year-$name/";
$prefix = "IMG_";
//Sjekker for ajax
if(isset($_GET['ajax']) and $_GET['ajax'] == 'on'){
//henter ekstra ajax-va... | true |
8285dfa0414213364c67e42189c26e5415615d27 | PHP | yasir-albardawil/DVD-store-site | /dbconnect.php | UTF-8 | 1,036 | 2.640625 | 3 | [] | no_license | <?php
error_reporting( E_ALL & ~E_DEPRECATED & ~E_NOTICE );
if(!mysql_connect("localhost","root","")){
die('Oops connection problem ! --> '.mysql_error());
}
if(!mysql_select_db("dvd_store")){
die('Oops database selection problem ! --> '.mysql_error());
}
function logfile($msg){
if(isset($_SESSION['user'])) {
$re... | true |
ff342f043e7906efd42304dd21e2f8e2e65cb915 | PHP | fedorovanton/design-patterns-php | /Composite/index.php | UTF-8 | 1,755 | 2.640625 | 3 | [] | no_license | <?php
/**
* Компоновщик — структурный шаблон проектирования, объединяющий объекты в древовидную структуру для представления
* иерархии от частного к целому. Компоновщик позволяет клиентам обращаться к отдельным объектам и к группам объектов
* одинаково. Паттерн определяет иерархию классов, которые одновременно могут... | true |
2bd12b523e857998a97513c810efbcb66dfa506c | PHP | DD4You/laravel-dpanel | /src/View/Components/Chart/Pyramid.php | UTF-8 | 552 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace DD4You\Dpanel\View\Components\Chart;
use Illuminate\View\Component;
class Pyramid extends Component
{
public $chartId;
public $chartName;
public $chartData;
public $chartTitle;
public function __construct($chartId, $chartData, $chartName, $chartTitle)
{
$this->chartId... | true |
d80448dc8c9c73d29b4e7d8ec74ee692378cf985 | PHP | flamyoad/comicmart | /models/Chapter.php | UTF-8 | 6,547 | 3.03125 | 3 | [] | no_license | <?php
require_once "Database.php";
class Chapter implements JsonSerializable {
private $id;
private $mangaId;
private $title;
private $dateUploaded;
private $totalPageNumber;
private $price;
private $chapterNumber;
const INSUFFICIENT_BALANCE = "insufficient_balance";
const PURCHASE... | true |
cfb501fc177eb13f397143aad52752b7a8dd7070 | PHP | plumpboy/email-validate | /src/Net/DNS/RR/AAAA.php | UTF-8 | 3,239 | 3.015625 | 3 | [
"CC-BY-2.0"
] | permissive | <?php
/**
* A representation of a resource record of type <AAAA>
*
*/
namespace Plumpboy\EmailValidate\Net\DNS\RR;
use Plumpboy\EmailValidate\Net\DNS\RR;
class AAAA extends RR
{
protected $name;
protected $type;
protected $class;
protected $ttl;
protected $rdlength;
protected $rdata;
... | true |
416f3a00e96b37ee7bda9d8d3e712d6a419d70d5 | PHP | marcospont/php2go | /php2go/auth/adapter/AuthenticatorAdapterDb.php | UTF-8 | 2,550 | 2.8125 | 3 | [] | no_license | <?php
class AuthenticatorAdapterDb extends AuthenticatorAdapter
{
protected $db;
protected $tableName;
protected $usernameColumn;
protected $passwordColumn;
protected $passwordFunction = 'md5';
protected $extraCondition;
protected $extraParams = array();
public function __construct() {
$this->db = Db::insta... | true |
c5d0f0f4417a8f9f45170cc5ec7e95f6a989161b | PHP | continuoustraining/php7.1 | /tests/test14.php | UTF-8 | 170 | 3.21875 | 3 | [] | no_license | <?php
function hello()
{
for ($i = 0; $i < 12344; ++$i) {
yield $i;
}
}
var_dump(hello());
/**
* A. null
* B. error
* C. Object(Generator) ....
*/ | true |
b59be04fce167c074d38615e9a5d20b7a0fd9bed | PHP | trind09/yamahagp | /news_detail.php | UTF-8 | 2,007 | 2.65625 | 3 | [] | no_license | <?php include 'inc/config.php'; ?>
<?php include 'inc/functions.php'; ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
<?php
if (isset($_GET['id'])) {
$id = strip_tags($_GET['id... | true |
015d70c0574a83c48cdaee22b864eeb976674a0f | PHP | aws/aws-sdk-php | /build/docs/classes/Service.php | UTF-8 | 2,760 | 2.578125 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
namespace Aws\Build\Docs;
use Aws\Api\Service as Api;
use Aws\Api\DocModel;
use Aws\Sdk;
/**
* Serves as a DTO for information about a service required to build various
* aspects of the docs.
*
* @internal
*/
class Service
{
/** @var Api */
public $api;
/** @var string */
public $client;
... | true |
6ecf8600b282b5058f3ed8acdff599927867fadd | PHP | simkimsia/phpwebp | /lesson5/circle1/validations/circleformresult.php | UTF-8 | 949 | 2.96875 | 3 | [] | no_license | <?php
/**
*
* this file contains validation logic
*
* we want to check for radius
*
**/
// store !empty($_POST) into a more readable variable
$userArriveBySubmittingAForm = !empty($_POST);
// check if user arrives here via a POSTBACK
if ($userArriveBySubmittingAForm) {
/**
*
* Part 1 validati... | true |
4b6a0f51e282ca36471a57afe3bd57657d97b6d4 | PHP | adumitru68/HtmlBuilder | /src/Abstracts/AbstractView.php | UTF-8 | 2,814 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Adi
* Date: 1/12/2019
* Time: 3:49 AM
*/
namespace Qpdb\HtmlBuilder\Abstracts;
use Qpdb\Common\Prototypes\Traits\AsStoredSettings;
use Qpdb\HtmlBuilder\Exceptions\HtmlBuilderException;
use Qpdb\HtmlBuilder\Interfaces\HtmlViewInterface;
abstract class AbstractView implem... | true |
46a610f1104a914622a65ee4cc1027543097b7c7 | PHP | hieutrieu/hiva1 | /protected/modules/SimpleMailer/components/SimpleMailer.php | UTF-8 | 7,581 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by JetBrains PhpStorm.
* User: bigchirv
* Date: 5/4/12
* Time: 10:35 PM
* To change this template use File | Settings | File Templates.
*/
class SimpleMailer extends CComponent
{
/**
* Heavily based on http://stackoverflow.com/questions/1606588/how-to-attach-and-show-image-in-mail-using-php... | true |
94c816e13dd46abda3544912f24a80ecd94fedce | PHP | vindafadilla/PPL | /infoadmin.php | UTF-8 | 7,143 | 2.734375 | 3 | [] | no_license | <?php
$sql = new mysqli("localhost","root","","db_sma");
//buat nentuin paging perhalaman, dicontoh ini limit 2, data yg ditampilin maksimal 2 ga usah paling atas dimana aja
$start=0;
$limit=3;
//buat ngambil id pas pagingnya biar pindah halaman, sama kaya switch case
$id= isset($_GET['id']) ? $_GET['id']... | true |
f2db09ff555da8297c5562408ff9086a00a0ca25 | PHP | assegaiphp/orm | /src/DataSource/DBFactory.php | UTF-8 | 5,754 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace Assegai\Orm\DataSource;
use Assegai\Core\Config;
use Assegai\Orm\Enumerations\DataSourceType;
use Assegai\Orm\Enumerations\SQLDialect;
use Assegai\Orm\Exceptions\DataSourceConnectionException;
use PDO;
use PDOException;
/**
* The `DBFactory` class houses static methods for creating **Database
* con... | true |
1218c0a3647bd15b1d57541d7bbd54b04b42f070 | PHP | alxngyn/CS290 | /final/deleteAccount.php | UTF-8 | 2,157 | 2.8125 | 3 | [] | no_license | <?php include("static/header.php"); ?>
<?php
require_once('dbConVars.php');
// Connect to the database
$dbc = mysqli_connect($DB_HOST, $DB_USER, $DB_PASSWORD, $DB_NAME);
echo "PRE Post message: " . $_POST['submit'];
if (isset($_POST['submit'])) {
echo "POST Post message: " . $_POST['submit'];
// Gr... | true |
17b48a6882f7155712f9786f6d4ccc26346854ef | PHP | mariomax/anchor-tag | /about/index.php | UTF-8 | 454 | 2.65625 | 3 | [] | no_license | <?php
include '../includes/db.inc.php';
try
{
$sql = 'SELECT fa_icon, title, content FROM about_section';
$result = $pdo->query($sql);
}
catch (PDOException $e)
{
$error = 'Error fetching details: ' . $e->getMessage();
include '404error.php';
exit();
}
foreach ($result as $row)
{
$about[] = array(
... | true |
816dee0786bddd9f2852f06ec5a9bbe0836040f0 | PHP | wang608203043/fengmi | /application/common/service/CouponService.php | UTF-8 | 2,248 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: mayn
* Author: wang
* Date: 2018/11/14
* Time: 16:42
*/
namespace app\common\service;
use app\common\model\Coupon;
class CouponService extends BaseService
{
protected $model;
public function __construct()
{
$this->model = new Coupon();
}
/*... | true |