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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
63428f126a06942672e6dbc9fc25828c3ae8a543 | PHP | ammannbe/php-tmpfile | /src/TmpFile/File.php | UTF-8 | 2,056 | 3.296875 | 3 | [
"MIT"
] | permissive | <?php
namespace TmpFile;
use TmpFile\Contracts\FileContract;
/**
* Create Temporary Files
*/
class File extends FS implements FileContract
{
/**
* Create new instance
*
* @param string|null $name Folder name
* @param string|null $path Temporary path
* @return void
*/
pub... | true |
4b20c8d26b59084da75da211cd9459f183f2c149 | PHP | mvodanovic/WebFW | /cms/dblayer/tables/usertype.class.php | UTF-8 | 873 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace WebFW\CMS\DBLayer\Tables;
use WebFW\Database\Table;
use WebFW\Database\TableColumns\IntegerColumn;
use WebFW\Database\TableColumns\VarcharColumn;
use WebFW\Database\TableColumns\BooleanColumn;
use WebFW\Database\TableConstraints\PrimaryKey;
use WebFW\Database\TableConstraints\Unique;
class UserType e... | true |
56e85c54e60689e74823f41fbd743d5e810c519a | PHP | ammarshaikh9613/AkashSirInternship | /Internship_day2/switch.php | UTF-8 | 556 | 3.328125 | 3 | [] | no_license | <?php
$var='e';
switch($var)
{
case 'A':
echo "$var is Vowel";
break;
case 'E':
echo "$var is Vowel";
break;
case 'I':
echo "$var is Vowel";
break;
case 'O':
e... | true |
b58e02fe8047f58855cc0e6a4ded80bf6c356dc3 | PHP | aleksru/emart | /app/Models/Traits/HasSavesRelations.php | UTF-8 | 5,969 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models\Traits;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
/**
* Trait HasSavesRelations
* Автоматическое сохранение всех отношений для модели.
*
* @package App\Models\Traits
*/
trait HasSavesRelations
{
/**
* Возвращает отношения, которые следует авт... | true |
38f9b16c87a5cfe6df713144c49b28ace902113a | PHP | abouba1997/Blog | /pages/connexion.php | UTF-8 | 3,633 | 2.578125 | 3 | [] | no_license | <?php
require '../db/connexion_db.php';
$checked = false;
$errors = array();
if(isset($_POST['pseudo']) AND isset($_POST['password'])) {
if(!empty($_POST['pseudo']) && !empty($_POST['password'])) {
if(preg_match("/^[a-zA-Z-]*$/", strip_tags(html_entity_decode($_POST['pseudo'])))) ... | true |
7621bc4410cb78293c4daf28ec6f76830e0509ca | PHP | fourotthomas/webflix | /scripts/insert-actor.php | UTF-8 | 1,743 | 2.890625 | 3 | [] | no_license | <?php
// J'inclus la connexion à la base de données
require __DIR__.'/../config/database.php';
$actors = [
['Pacino', 'Al', '1940-04-25'],
['Brando', 'Marlon', '1924-04-03'],
['de Niro', 'Robert', '1943-08-17'],
['Willis', 'Bruce', '1955-03-19'],
['Liotta', 'Ray', '1954-12-18'],
['Snipes', 'We... | true |
106cf700f45b5a294c8081a37daa7195b24911e1 | PHP | nathan78370/Login | /login.php | UTF-8 | 903 | 2.828125 | 3 | [] | no_license | <?php
if (isset($_POST['submit']))
{
$username = $_POST['username'];
$pass = $_POST['pass'];
$db = new PDO('mysql:host=localhost;dbname=loginsystem','root','');
foreach($db->query('SELECT * from user') as $row) {
print_r($row);
}
$dbh = null;
} catch (PDOException $e) {
print "E... | true |
e941c21fb59fc2999b8f0c9bbe906e0390efe631 | PHP | PetyaKatsarova/softuni_php_sql | /15.Encapsulation_inheritance/ShoppingSpree/Person.php | UTF-8 | 2,750 | 3.6875 | 4 | [] | no_license | <?php
class Person{
/** @var string */
private $name;
/** @var float*/
private $money;
/** @var Product[] | array*/
private $products;
public function __construct(string $name, float $money)
{
$this->setName($name);
$this->setMoney($money);
$this->products = []... | true |
16ff447038765f9a1fcf437a19edd9b3491a20aa | PHP | KaijiS/EC_exercise_Phalcon | /api/app/library/CheckImage.php | UTF-8 | 882 | 2.84375 | 3 | [] | no_license | <?php
use Phalcon\Mvc\User\Component;
class CheckImage extends Component
{
function getMimeType($raw_data){
/*
データのMIME情報を返す
*/
$finfo = finfo_open(FILEINFO_MIME_TYPE);
$mime = finfo_buffer($finfo, $raw_data);
finfo_close($finfo);
return $mime;
}
function checkM... | true |
006f47e5bf840a80de9e2d968c41557d2abb14be | PHP | pedromazala/docer-holding-challenge | /src/Logger/StdoutLogger.php | UTF-8 | 150 | 2.9375 | 3 | [] | no_license | <?php
namespace Language\Logger;
class StdoutLogger implements Logger
{
public function print(string $line)
{
echo $line;
}
}
| true |
9cbd5e7140538a265d015d0d696cad09f294ac6b | PHP | gurkiratThind/Asian-Swords | /exercises/exe6-6/tools.php | UTF-8 | 1,555 | 3.234375 | 3 | [] | no_license | <?php
/**
* prevent loading of tools.php directly
* must go through index.php first.
*/
if (!isset($index_loaded)) {
die('Direct acces to this file is forbidden');
}
/**
* this file contain utility functions.
*/
/**
* Display any one dimensional array.
*/
function array_display($array_name)
{
$r = '';
... | true |
9e5a8c3561764cec6dced5ba75f88f277fdeb33c | PHP | thdan109/admin-webshop | /thongke.php | UTF-8 | 3,370 | 2.640625 | 3 | [] | no_license | <?php
include("../home/moduls/connection.php");
if (isset($_GET['month'])){
$month=$_GET['month'];
}else{
$month= date('m');
}
$sel = "SELECT * FROM `thongke` WHERE MONTH(ngaydat) =$month ";
$rs = $connect->query($sel);
$chart = "SELECT sanphamdadat , sum(`soluong`)... | true |
eee361286e3d0cbf7674b2514606c71064ef0c8b | PHP | egaraev/PHP | /Service_PHP_script/www/admin/lib/other.inc | WINDOWS-1252 | 7,471 | 2.859375 | 3 | [] | no_license | <?php
function d($var)
{
print '<pre style="background: #000; color: #0f0; border: 1px solid #0f0; font: 12px Courier-New;">';
$ret = print_r($var, true);
$ret = str_replace('=>', '<font color="#ffffff">=></font>', $ret);
#$ret = preg_replace('#Array\n\((.*)\n\)#ms', '<div style="border: 1px solid #0f0;">\\0</div>... | true |
c405ad81fbcce0611e6da5318cf488a3aa46c801 | PHP | oxkhar/payslips | /src/Application/ModifyTaxRateAction.php | UTF-8 | 724 | 2.859375 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Payslip\Application;
use Payslip\Domain\PayslipRepository;
class ModifyTaxRateAction
{
/**
* @var PayslipRepository
*/
private $payslipRepository;
public function __construct(PayslipRepository $payslipRepository)
{
$this->payslipRepository =... | true |
7373b91788ac2e47850b2e7604fb1848c6b1c5a1 | PHP | robbenmu/csscaffold | /system/core/Exception.php | UTF-8 | 798 | 3.140625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Creates a generic exception.
*/
class Scaffold_Exception extends Exception
{
# Header
protected $header = FALSE;
# Scaffold error code
protected $code = 42;
/**
* Set exception message.
*
* @param string i18n language key for the message
* @param array addition line parameters
*/
... | true |
d1eb55f83776ac007b11140f6f222dfb18bee3b7 | PHP | concretecms/community_badges | /src/PortlandLabs/CommunityBadges/API/V1/CommunityBadges.php | UTF-8 | 3,953 | 2.609375 | 3 | [] | no_license | <?php
/**
* @project: Community Badges
*
* @copyright (C) 2021 Portland Labs (https://www.portlandlabs.com)
* @author Fabian Bitter (fabian@bitter.de)
*/
namespace PortlandLabs\CommunityBadges\API\V1;
use Concrete\Core\Application\EditResponse;
use Concrete\Core\Error\ErrorList\ErrorList;
use Concrete\Co... | true |
1dd976b12ba2deb09dc4ab702eac98d45eec5b26 | PHP | wifidu/LeetCode | /回朔/组合总和.php | UTF-8 | 1,111 | 3.4375 | 3 | [] | no_license | <?php
Class Solution{
public function combinationSum(array $candidates, int $target)
{
$res = [];
$len = count($candidates);
sort($candidates);
$this->dfs($candidates, $len, $target, 0, [], $res);
return $res;
}
/**
* @param candidates 数组输入
* @param ... | true |
ea238d27380a86e1a716d443e15cd5af86fd657b | PHP | R11baka/Omdb | /src/Api/ApiFactory.php | UTF-8 | 372 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Omdb\Api;
use Omdb\Api\HttpClient\CurlClient;
class ApiFactory
{
private string $apiKey;
public function __construct(string $apiKey)
{
$this->apiKey = $apiKey;
}
public function make(): ApiInterface
{
$client = new CurlClient();
... | true |
494cbe96f68bf46a7234552ed19fe38e2a978278 | PHP | rendyss/sstestimonials_v2 | /sstestimonials-v2/includes/class-sstestimonials-v2-widget.php | UTF-8 | 2,055 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ASUS
* Date: 2/11/2019
* Time: 2:52 AM
*/
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
if ( ! class_exists( 'SSTestimonialsV2_Widget' ) ) {
class SSTestimonialsV2_Widget extends WP_Widget {
protected $pluginName;
protected $widgetName;
public function __construct( $pl... | true |
078d1d4dec7a01e0da3ba658423d23b146e4bcf6 | PHP | Boutanche/MCMP_Tests | /Poubelle/post_log.php | UTF-8 | 2,260 | 2.546875 | 3 | [] | no_license | <?php
/*
if(!empty($_POST)) {
if (isset($_POST['formulaire'])) {
if ($_POST['formulaire'] == 'log') {
if(isset($_POST['login']) AND isset($_POST['password'])) {
if (!empty($_POST['login']) and !empty($_POST['password'])) {
//TODO: Securité :
... | true |
9939a1b341f8a70aebbc9813c987338e2cb7aeb5 | PHP | lipemascarenhas/PHP_practices | /PHP/Aulas_PHP/Basic_PHP/aula19/01manuseando_array.php | UTF-8 | 561 | 3.890625 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vetores e Matrizes</title>
</head>
<body>
<pre>
<?php
$v = array("A", "J", "M", "X", "K");
print "<p>-print_r: </p>";
print_r($v);
print "<p>-var_dump: </p>";
var_dump($v);
print "<p>-coun... | true |
f726ade1dcf8ec8b7aedd3651b203a89996a4d17 | PHP | justmiles94/Phase5_TeamAnger | /PHP/login.php | UTF-8 | 352 | 2.515625 | 3 | [] | no_license | <?php
/*
CONNECT-DB.PHP
Allows PHP to connect to your database
*/
include('connectStarTrekDB.php');
$username = $_POST['username'];
$password = $_POST['password'];
$sql = "select * from users where username='".$username."' and password='".$password."'";
if ($connection->query($sql)->num_rows > 0) {
echo "true";... | true |
8f30684f9a86cdf0c3b2087d4a63feffb413d4a7 | PHP | bracey-coder/Codeigniter-shop-cms | /application/helpers/youtube_video_helper.php | UTF-8 | 1,275 | 2.8125 | 3 | [] | no_license | <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
// Create youtube video link for representing a video
function show_youtube($video_link)
{
if (!empty($video_link)) {
return 'http://www.youtube.com/v/' . _get_youtube_id_from_url($video_link);
}
}
... | true |
154a63a84a64736d559f4352b1568e23df32394b | PHP | rectorphp/rector | /rules/TypeDeclaration/NodeAnalyzer/CallTypesResolver.php | UTF-8 | 4,815 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare (strict_types=1);
namespace Rector\TypeDeclaration\NodeAnalyzer;
use PhpParser\Node\Arg;
use PhpParser\Node\Expr\MethodCall;
use PhpParser\Node\Expr\StaticCall;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\MixedType;
use PHPStan\Type\NullType;
use PHPStan\Type\ObjectType;
use PHPStan\Type... | true |
af778fb467211fa4a7324d877f8bd0c373dc4242 | PHP | mcred/phpred | /src/cli/CLI.php | UTF-8 | 696 | 3.46875 | 3 | [] | no_license | <?php
namespace PHPRed\CLI;
abstract class CLI
{
private $stdout;
private $stderr;
private $stdin;
public function __construct($stdout = STDOUT, $stderr = STDERR, $stdin = STDIN)
{
$this->stdout = $stdout;
$this->stderr = $stderr;
$this->stdin = $stdin;
}
protected... | true |
6dcd4114cc3522719e95b36c8a9343d4abd1e8b5 | PHP | NHK-13/ProjetBlog | /src/Entity/MotsCles.php | UTF-8 | 1,851 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\MotsClesRepository")
*/
class MotsCles
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Colu... | true |
6fa81496592f122b5b91341eabffb1f39a2d6510 | PHP | qfz9527/ulog | /src/Formatter/DefaultFormatter.php | UTF-8 | 2,013 | 2.671875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: nicholas
* Date: 16-4-20
* Time: 下午8:15
*/
namespace AGarage\ULog\Formatter;
use AGarage\ULog\LogEntity;
use AGarage\ULog\ULog;
class DefaultFormatter implements FormatterInterface
{
public function format(LogEntity $log)
{
$level = strtoupper($log->get... | true |
cd13e555d781e0bef4ae866106575b3982984174 | PHP | caonUlisses/Sicoob | /src/Retorno/CNAB240/LineAbstract.php | UTF-8 | 1,250 | 2.875 | 3 | [] | no_license | <?php
namespace Sicoob\Retorno\CNAB240;
use Sicoob\Helpers\Helper;
use Sicoob\Retorno\Fields\Field;
abstract class LineAbstract
{
public $line;
public $fields = [];
public $configs = [];
public function __construct($line = null)
{
if ($line)
$this->fill($line);
}
p... | true |
11c75e1b0dc8a847b13d013e709d2e56299dcc3e | PHP | ilovepdf/ilovepdf-php | /src/Sign/Receivers/ReceiverAbstract.php | UTF-8 | 1,901 | 3.09375 | 3 | [] | no_license | <?php
namespace Ilovepdf\Sign\Receivers;
abstract class ReceiverAbstract
{
public $name;
public $email;
protected $type;
public $access_code;
public function __construct(string $name, string $email)
{
$this->setName($name);
$this->setEmail($email);
}
... | true |
645feb5020a7fa96ca6664d3e58a553dfaf5b54b | PHP | BITVoxy/CryptoMegaPot | /lotto.php | UTF-8 | 319 | 3.515625 | 4 | [] | no_license | <?php
class Lotto {
static public function draw($min, $max, $limit) {
$balls = range($min, $max);
shuffle($balls);
array_splice($balls, $limit);
return $balls;
}
}
// Lotto
//print_r( Lotto::draw(1,49,6) );
// Euro
//print_r( Lotto::draw(1,50,5) );
//print_r( Lotto::draw(1,11,2) );
?>
| true |
4327da52a0f4843c8c3f77cb4bbb218c680b71f4 | PHP | yheisonlanza2002/secion-entrada | /perfil.php | UTF-8 | 1,517 | 2.75 | 3 | [] | no_license | <?php
include 'conect.php';
session_start();
if (isset($_SESSION['nombre'])) {
$nombre=$_SESSION['nombre'];
}else{
$nombre="";
}
if ($nombre=="") {
echo "<script>window.location='index.php'</script>";
}else{
echo "usuario : $nombre";
}
try {
... | true |
4d9e9c55ce63f23eb4fd2c6c346f92f588396966 | PHP | fl3xice/tuscam | /src/Bot/Types/Chat.php | UTF-8 | 1,657 | 2.90625 | 3 | [] | no_license | <?php
namespace bot\Types;
class Chat
{
public $id;
public $type;
public $title;
public $username;
public $first_name;
public $last_name;
public $photo;
public $bio;
public $description;
public $invite_link;
private $pinned_message;
private $permissions;
public $s... | true |
644e7aa5c1726653a5ed5ceacff6e12a2dc8acb7 | PHP | luiheid/OSS_Final_Project | /todo.php | UTF-8 | 1,706 | 2.640625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>todo</title>
</head>
<body>
<h1>TODO</h1>
<?php
$conn=mysqli_connect("localhost","2ill","cuby1103","... | true |
9f5bf53da094705cad9a1c1300cddd46b239519e | PHP | basuregami/Design-pattern | /2. Repository/src/app/Repository/Implementation/BaseRepository.php | UTF-8 | 2,458 | 2.84375 | 3 | [] | no_license | <?php
namespace App\Repository\Implementation;
use App\Database\Connection;
use App\Repository\Contracts\BaseRepositoryInterface;
abstract class BaseRepository
{
/**
* @Author: Basu Regami
* @Date: 2020-05-19 22:28:07
* @Desc: connection object
* @var object
*/
protected $conne... | true |
ebe96044eb3343d9b25cbd504b7031e195830717 | PHP | vettich/vettich.sp3 | /lib/db/ormbase.php | UTF-8 | 895 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace vettich\sp3\db;
use Bitrix\Main\Entity;
class OrmBase extends Entity\DataManager
{
public static function createTable()
{
try {
$entity = self::getEntity();
$connection = $entity->getConnection();
if (!$connection->isTableExists($entity->getDBTableName())) {
$sql = $entity->compileDbT... | true |
a676fcf9ad7bc053c1348b590292eb1c7d55eb16 | PHP | hungneox/ramen-messenger | /src/Console/AbstractCommand.php | UTF-8 | 497 | 2.578125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Neox\Ramen\Messenger\Console;
use GuzzleHttp\ClientInterface;
use Illuminate\Console\Command;
use GuzzleHttp\Client;
abstract class AbstractCommand extends Command
{
/**
* @var Client
*/
protected $httpClient;
/**
* AbstractCommand constructor.
*
* @param Client... | true |
4c2ce65ca74d7d00dff8322e381b05d07b906e0b | PHP | kordero/worklist | /db/migrations/20171113094255_create_journal_files_table.php | UTF-8 | 609 | 2.546875 | 3 | [] | no_license | <?php
use Phinx\Migration\AbstractMigration;
use Phinx\Db\Adapter\MysqlAdapter;
class CreateJournalFilesTable extends AbstractMigration
{
public function up() {
$this->table('journal_files', ['engine' => "InnoDB"])
->addColumn('ext', 'string', ['null' => false, 'limit' => 8])
->addColumn('uploaded_t... | true |
fe788a4e442b2a4f0da720cf15bf68ddd8a60e83 | PHP | Rpalaces/cst366final | /DBConnection.php | UTF-8 | 308 | 2.53125 | 3 | [] | no_license | <?php
function getDataBaseconnection($opt){
$host='localhost';
$dbname=$opt;
$username='rpalaces';
$password='';
$dbConn = new PDO("mysql:host=$host;dbname=$dbname",$username,$password);
$dbConn -> setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
return $dbConn;
}
?> | true |
e6274e961431ef0027b815a76888ae3b2375a92f | PHP | TonyBostonTB/icingaweb2-module-director | /application/forms/IcingaTimePeriodForm.php | UTF-8 | 1,876 | 2.546875 | 3 | [] | no_license | <?php
namespace Icinga\Module\Director\Forms;
use Icinga\Module\Director\Web\Form\DirectorObjectForm;
class IcingaTimePeriodForm extends DirectorObjectForm
{
public function setup()
{
$isTemplate = isset($_POST['object_type']) && $_POST['object_type'] === 'template';
$this->addElement('select... | true |
62c4467088b73e51e4f13f2df83ea3a1c7be20fb | PHP | yasmineYE/PHP-Honey-Pot | /creation.php | UTF-8 | 1,003 | 2.71875 | 3 | [] | no_license | <?php
session_start();
if(empty($_POST['login']) || empty($_POST['password']) || empty($_POST['sd_password'])){
echo 'Empty fields';
}else{
$login = strip_tags(trim($_POST['login']));
$password = filter_var($_POST['password'],FILTER_SANITIZE_STRING);
$sd_password = filter_var($_POST['sd_password'],FILTER_SANI... | true |
308e8ddcda225302aa45f70222fad27af29ce8f3 | PHP | 1of0/php-serializer | /test/RecursionTest.php | UTF-8 | 4,290 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright (c) 2016 Bernardo van der Wal
* MIT License
*
* Refer to the LICENSE file for the full copyright notice.
*/
namespace OneOfZero\Json\Test;
use OneOfZero\Json\Configuration;
use OneOfZero\Json\Enums\OnMaxDepth;
use OneOfZero\Json\Enums\OnRecursion;
use OneOfZero\Json\Exceptions\NotSupportedE... | true |
95817a50c76a2d82a99eba7fcd8e9cecfe68c980 | PHP | marcofiset/fun-lang | /spec/Fun/TokenDefinitionTest.php | UTF-8 | 884 | 2.5625 | 3 | [] | no_license | <?php
use Fun\Lexing\Tokens\TokenDefinition;
use Fun\Lexing\Tokens\TokenType;
class TokenDefinitionTest extends PHPUnit_Framework_TestCase
{
private $tokenDefinition;
public function setUp()
{
$this->tokenDefinition = new TokenDefinition('/\d+/', TokenType::Number);
}
public function tes... | true |
8d92a7631648aeee80e6a657711ebebc3e5c895c | PHP | vasilyevd/socio | /protected/commands/MmfileGeneratePreviewCommand.php | UTF-8 | 1,189 | 2.765625 | 3 | [] | no_license | <?php
/**
* Finish uploaded files previews manipulations.
*/
class MmfileGeneratePreviewCommand extends CConsoleCommand
{
public function run($args)
{
$models = Mmfile::model()->findAllByAttributes(array('preview' => false));
foreach ($models as $m) {
// Create previews by file e... | true |
91f0b96a01490aaee7eec0109419fb99eaf2feb3 | PHP | ChouaibMONCEF/SkyFly | /Controller/userscontroller.php | UTF-8 | 1,787 | 2.5625 | 3 | [] | no_license | <?php
class UsersController {
public function auth(){
if(isset($_POST['submit'])){
$data['email'] = $_POST['email'];
$result = user::login($data);
if($result->email === $_POST['email'] && password_verify($_POST['pswrd'], $result->pswrd) ){
$_SESSION... | true |
50f284a85c586a22623cc70c9c32f18b575a2def | PHP | FlyingMagikarp/sbbplus | /View/View_RouteOverview.php | UTF-8 | 2,748 | 2.625 | 3 | [] | no_license | <?php
require '../Controller.php';
include '../res/head.php';
include 'Nav.php';
class View_RouteOverview
{
public $controller;
public function __construct(){
$this->controller = new Controller();
}
public function getRoutes(){
return $this->controller->getRoutes();
}
public... | true |
425afadb6562d402eacfbcd04cb1ee40efd5be3a | PHP | semishin/ariol | /modules/ariol/classes/CM/Form/Plugin/ORM/Multiselect.php | UTF-8 | 1,755 | 2.53125 | 3 | [] | no_license | <?php defined('SYSPATH') or die('No direct script access.');
/**
* @version SVN: $Id:$
*/
class CM_Form_Plugin_ORM_Multiselect extends CM_Form_Plugin_ORM_Abstract
{
private $_field_name = NULL;
private $_value_model = NULL;
private $_parent_field = NULL;
public function __construct($field_name, ORM $value_mode... | true |
33371e5c80edee9c752f9cb1e9f8faf2803c7a88 | PHP | hd4y2t/sipaten-kecamatansimpangkatis | /website/application/models/Mberita.php | UTF-8 | 3,451 | 2.53125 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Mberita extends CI_Model {
public function __construct()
{
parent::__construct();
//Do your magic here
$this->slug_kat = '';
}
public function get_all($limit = 20, $offset = 0, $type = 'result')
{
if($this->input->get('kategori... | true |
f2b7ec0c513a028f1644fb6d8d0bf30c8540ceb6 | PHP | Huisch/Huisch | /src/TelegramCommands/StartCommand.php | UTF-8 | 2,085 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\TelegramCommands;
use App\Entity\House;
use App\Entity\Resident;
use App\Exception\InternalHuischException;
use Doctrine\ORM\EntityManagerInterface;
use Longman\TelegramBot\Commands\SystemCommand;
use Longman\TelegramBot\Entities\ServerResponse;
use Longman\TelegramBot\Entities\Update;
use Longman... | true |
19cb842c2a4f17da1ee300567173a677694ed666 | PHP | RyanCadby/normalbear | /wp-content/themes/normalbear/classes/widgets.php | UTF-8 | 11,539 | 2.625 | 3 | [] | no_license | <?php
/** WIDGETS.PHP
* // ----- Version: 1.0
* // ----- Released: 4.5.2020
* // ----- Description: declare theme sidebar and widget areas
**/
function sbc_widgets_init() {
register_sidebar( array(
'name' => 'Left Column',
'id' => 'left-col',
'before_widget' => '<d... | true |
fdba4381f33d32f4ee6814411b4eef4478751a3d | PHP | furqansiddiqui/e2e-encrypted-relay-client-php | /src/Server/E2ERelayNode.php | UTF-8 | 4,570 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace FurqanSiddiqui\E2ESecureRelay\Server;
use FurqanSiddiqui\E2ESecureRelay\AbstractE2ERelayNode;
use FurqanSiddiqui\E2ESecureRelay\Exception\CipherException;
use FurqanSiddiqui\E2ESecureRelay\Exception\RelayCurlException;
use FurqanSiddiqui\E2ESecureRelay\RelayCurlRequest;
use Fu... | true |
b1c81786e8571b9182262dde0909c0375d6cd0cb | PHP | RC2K7/CSE405 | /Assignments/Login/index.php | UTF-8 | 496 | 2.609375 | 3 | [] | no_license | <?php
session_start();
if(isset($_SESSION['username'])) {
header("Location: ./clickme.php");
exit();
}
?>
<!DOCTYPE html>
<html>
<body>
<form action="login.php" method="post">
Username: <input type="text" value="alice" name="username" size="36" />
Pa... | true |
bd2b2214e574fb7bfdef83282d83c0a1d77ea975 | PHP | cash2one/WorkCode_Bakup | /newbee_api/protected/commands/PrepareCommand.php | UTF-8 | 1,917 | 2.75 | 3 | [] | no_license | <?php
/**
* 预处理相关
* @author zhoujianjun
*
*/
class PrepareCommand extends CConsoleCommand
{
public function init()
{
set_time_limit(0);
}
/**
* php yiic.php prepare filterlife
* 首先清除表里container_filterlife_today中的数据
* 然后将cleaner_status表里净化器滤芯寿命小于15%的净化器的id记录在表container_filterlife_today中
* 凌晨执行
*... | true |
9244030a9668279ce7484d11c271f4ac23db3416 | PHP | atiqteamwork/restaurant | /database/seeds/CategoryDataSeeder.php | UTF-8 | 750 | 2.609375 | 3 | [] | no_license | <?php
use App\MenuCategory;
use Illuminate\Database\Seeder;
class CategoryDataSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$category1 = new MenuCategory();
$category2 = new MenuCategory();
$category3 = new Me... | true |
f7e104a51508d59dcfc7d246fbc9d0df9b845d9c | PHP | yaroslavlutz/corporate.laravel.loc | /database/migrations/2018_02_05_203344_create_table_menus.php | UTF-8 | 1,728 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTableMenus extends Migration
{
/** Run the migrations.
* @return void
*/
public function up()
{
Schema::create('menus', function (Blueprint $tabl... | true |
7be429bd36e6b05321843361b25a8390a3117701 | PHP | CristianLavao/planetmusicv2.0 | /phplogin.php | ISO-8859-2 | 2,716 | 2.734375 | 3 | [] | no_license | <!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" charset="utf-8" />
<title>Documento sin título</title>
</head>
<bod... | true |
47e154ba866560a3ab04fa5ebbd026d72853c321 | PHP | rdeanar/SCSync | /get.php | UTF-8 | 12,618 | 2.640625 | 3 | [] | no_license | <?php
/**
* get.php path_to_save
*
*/
date_default_timezone_set('Europe/Moscow');
ini_set('memory_limit', '256M');
include "config.php";
include "db.php";
include "php-soundcloud/Services/Soundcloud.php";
class scsync
{
public $save_path = '/store/';
public $save_local = true;
const db_links = DB_... | true |
7ed1a341abe3f0c682c00757eb94f9154f05e15f | PHP | Bruno17/MIGX | /core/components/migx/model/migx/migx.class.php | UTF-8 | 128,401 | 2.59375 | 3 | [] | no_license | <?php
/**
* migx
*
* @author Bruno Perner
*
*
* @package migx
*/
/**
* @package migx
* @subpackage migx
*/
class Migx {
/**
* @access public
* @var modX A reference to the modX object.
*/
public $modx = null;
/**
* @access public
* @var array A collection of properties to... | true |
14cd0efb591c78ffc9d9b191796e1a16ff703c4e | PHP | josegranado/BlogProgramacionll | /models/Categorie.php | UTF-8 | 2,040 | 3.078125 | 3 | [] | no_license | <?php
require_once(dirname(dirname(__FILE__)).'/database.php');
class Categorie
{
public static function all($conn)
{
try
{
$categories = $conn->prepare("SELECT * FROM categorias");
$categories->execute();
$results = $categories->fetchAll();
return $results;
}
catch( PDOException $... | true |
a27f4abc80845f1f26cf6b9ca269777eaca8ede3 | PHP | samroy92/CST336-Final | /week2/assignment2.php | UTF-8 | 3,040 | 3.484375 | 3 | [] | no_license | <!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" href="assignment2.css" type="text/css">
<title>Week 2 - Assignment</title>
</head>
<body>
<div id="mainwrapper">
<h1>Week 2 - Assignment</h1>
<h3><center>Prime numbers pattern recognition</center></h3>
<div id="subdiv-main">
<h5>Try to find a pattern as to w... | true |
6fbc89a7d93a556293633fa335d1aa045f02199c | PHP | demaciageelun/weqin | /后端/models/OrderCommentsTemplates.php | UTF-8 | 1,577 | 2.625 | 3 | [] | no_license | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "{{%order_comments_templates}}".
*
* @property int $id
* @property int $mall_id
* @property int $mch_id
* @property int $type 模板类型:1.好评|2.中评|3.差评
* @property string $title 标题
* @property string $content 内容
* @property string $creat... | true |
e30a29005adef48d0aa0af25bea018d881101c9f | PHP | udamuri/lado | /frontend/models/NodeForm.php | UTF-8 | 3,039 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace frontend\models;
use Yii;
use yii\base\Model;
use yii\data\Pagination;
use frontend\models\TablePost;
use frontend\models\TableCategory;
use app\components\Constants;
/**
* Page form
*/
class NodeForm extends Model
{
public $slug = '';
public function checkSlug()
{
$arrPage = [];
... | true |
2becb1b889af52b739ec3a405793b750ce9d0be9 | PHP | deljdlx/phi-html | /source/class/Element/Select.php | UTF-8 | 495 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Phi\HTML\Element;
use Phi\HTML\Element;
class Select extends Element
{
/**
* @var Option[]
*/
private $options = array();
public function __construct()
{
parent::__construct('select', false);
}
public function addOption(Option $option)
{
$th... | true |
5161772f671ebb1af949dcb6768b87d8c0e56d13 | PHP | PurpleBooth/git-lint-validators | /src/PurpleBooth/GitLintValidators/ValidatorFactoryImplementation.php | UTF-8 | 1,603 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* Copyright (C) 2016 Billie Thompson
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace PurpleBooth\GitLintValidators;
use PurpleBooth\GitLintValidators\Validator\CapitalizeTheSubjectLineValid... | true |
064dc0cabbc0efd4e61a5842e39e49b78769c98a | PHP | jose199827/CursoPDO | /Leccion_Abstracion/classPersona.php | UTF-8 | 410 | 3.390625 | 3 | [] | no_license | <?php
abstract class Persona
{
public $intDpi;
public $strNombre;
public $intEdad;
function __construct(int $dpi, string $nombre, int $edad)
{
$this->intDpi = $dpi;
$this->strNombre = $nombre;
$this->intEdad = $edad;
}
//Metodos
abstract public function getDatosPersonale();
abstract public... | true |
7088704ecf3157d70e7539db52f03d735f30f2c4 | PHP | BramBleys/MMC | /application/models/Rit_model.php | UTF-8 | 8,867 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @class Rit_model
* @brief Model-klasse voor de ritten van de vrijwilliger
*
* Model-klasse die alle methodes bevat om te interageren met de database-tabel rit
*/
class Rit_model extends CI_Model {
/**
* Constructor
*/
function __construct(... | true |
66f1d4f4086c8252a304a14a9d256f3dc9823ee6 | PHP | hlohaus/production | /.gitlab-ci/tools/src/Service/TaggingService.php | UTF-8 | 6,909 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Shopware\CI\Service;
use GuzzleHttp\Client;
use GuzzleHttp\RequestOptions;
use Shopware\CI\Service\Exception\TaggingException;
use Shopware\CI\Service\ProcessBuilder as Builder;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Process\Exception\Proce... | true |
b5fcead09ab2146384620756dba5f6a72213696e | PHP | stagerightlabs/Laravel-Migration-Wrangler | /src/Commands/MigrationsExporter.php | UTF-8 | 2,873 | 3.09375 | 3 | [] | no_license | <?php
namespace SRLabs\MigrationWrangler\Commands;
use Illuminate\Support\Carbon;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
use Illuminate\Console\ConfirmableTrait;
class MigrationsExporter extends Command
{
/**
* Prompt the user to confirm thi... | true |
314cc1293181e446f590366a544b2bd115c57f03 | PHP | Catfeeds/CLW | /app/Repositories/BuildingFeaturesRepository.php | UTF-8 | 1,326 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Models\BuildingFeature;
use Illuminate\Database\Eloquent\Model;
class BuildingFeaturesRepository extends Model
{
/**
* 说明: 获取楼盘特色列表
*
* @return \Illuminate\Database\Eloquent\Collection|static[]
* @author 刘坤涛
*/
public function buildingFeature... | true |
22754617ee0edc2d696cbaa4e6c2dbc7855100e1 | PHP | alimansoori/base-api | /app/Lib/Editors/Adapter/Editor.php | UTF-8 | 2,996 | 2.546875 | 3 | [] | no_license | <?php
namespace Lib\Editors\Adapter;
use Lib\Assets\Inline;
use Lib\Assets\Resource;
use Lib\Editors\Adapter;
use Lib\Editors\Ajax\AjaxCreate;
use Lib\Editors\Ajax\AjaxEdit;
use Lib\Editors\Ajax\AjaxRemove;
abstract class Editor extends Adapter
{
public function __construct(string $name, $hierarchy = false)
... | true |
05cc4e9b55adfb1398471ccdc7302103e8f644f5 | PHP | varshiniyadavalli/PESTICIDE-PROMULGATOR | /pest/star.php | UTF-8 | 6,540 | 2.734375 | 3 | [] | no_license | <html>
<head>
<link rel="stylesheet" type="text/css" href="rating_style.css">
<script type="text/javascript">
function change(id)
{
var cname=document.getElementById(id).className;
var ab=document.getElementById(id+"_hidden").value;
document.getElementById(cname+"rating").innerHT... | true |
20d4261bd87e6b324a68c1f5827c0e89722e6e87 | PHP | 1-8192/resume_registry_php | /view.php | UTF-8 | 2,831 | 3.03125 | 3 | [] | no_license | <?php
session_start();
require_once "pdo.php";
//logging logic
if (!isset($_SESSION["name"])) {
die("ACCESS DENIED");
}
//Getting data for user to edit from db
$stmt = $pdo->prepare("SELECT * FROM Profile WHERE profile_id = :id");
$stmt->execute(array(":id" => $_GET['profi... | true |
fe1d353bc114626350b1cf1964391d3388fe8002 | PHP | sellerlabs/nucleus | /src/SellerLabs/Nucleus/View/Composite/IconButton.php | UTF-8 | 1,813 | 2.921875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* Copyright 2015, Eduardo Trujillo
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* This file is part of the Nucleus package
*/
namespace SellerLabs\Nucleus\View\Composite;
use SellerLabs\Nucleus\Support\Html;
use Sell... | true |
9966539f98d161187da03e1ed9e26972fbfeaba5 | PHP | Christophe1/php-project | /list_contacts.php | UTF-8 | 1,386 | 2.75 | 3 | [] | no_license |
<?php
require('dbConnect.php');
//use the variables we created in volleyLogin.php
session_start();
$username = $_SESSION['username'] . "<br>";
$user_id = $_SESSION['user_id'];
echo $username;
echo $user_id;
//-we want to show contact_ids in the contacts table that have the $user_id above.
... | true |
1c35274355cdf8dcac301110e4fe81bd02ee54d0 | PHP | twin1080/payment.loc | /commands/HelloController.php | UTF-8 | 2,157 | 2.90625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @link http://www.yiiframework.com/
* @copyright Copyright (c) 2008 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
namespace app\commands;
use Yii;
use yii\console\Controller;
/**
* This command echoes the first argument that you have entered.
*
* This command is provided as an... | true |
82ccef685a19b01d67519c097e2782d4f8527a00 | PHP | Webdien123/RFID_Release | /resources/views/To_Mau_Ket_Qua.php | UTF-8 | 1,483 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
function stripUnicode($str){
$ThaiThe = $str;
if(!$ThaiThe) return null;
$unicode = array(
'a'=>'á|à|ả|ã|ạ|ă|ắ|ặ|ằ|ẳ|ẵ|â|ấ|ầ|ẩ|ẫ|ậ',
'd'=>'đ',
'e'=>'é|è|ẻ|ẽ|ẹ|ê|ế|ề|ể|ễ|ệ',
'i'=>'í|ì|ỉ|ĩ|ị',
'o'=>'ó|ò|ỏ|õ|ọ|ô|ố|ồ|ổ|ỗ|ộ|ơ|ớ|ờ|ở|ỡ|ợ',
'u'=>'ú|ù|ủ|ũ|ụ|ư|ứ|ừ|ử|... | true |
36a7ee036d9240d4a4e7d2248d5d1e03e3221de8 | PHP | Abdallah-SE/Electronic_store_app | /app/controllers/supplierscontroller.php | UTF-8 | 3,898 | 2.578125 | 3 | [] | no_license | <?php
namespace PHPMVC\Controllers;
use PHPMVC\Models\SupplierModel;
use PHPMVC\LIB\InputFilter;
use PHPMVC\LIB\Helper;
use PHPMVC\lib\Messenger;
class SuppliersController extends AbstractController {
private $_createRules = [
'Name' => 'req|alphanum|between(5,40)',
'PhoneNumber' => 're... | true |
c5f0480c7ad21799967ea0511114584a4afa68e4 | PHP | mega6382/skeleton | /tests/unit/Template/BaseTest.php | UTF-8 | 1,026 | 2.734375 | 3 | [] | no_license | <?php
class Template extends A_Template_Base {
public function getForTesting($name)
{
return $this->$name;
}
public function render()
{
}
}
class TemplateTest extends UnitTestCase {
function setUp() {
}
function TearDown() {
}
function testTemplateNoConstructArgs() {
... | true |
99cc7865098d490b145e2dd4c3f0e44ad8abcb41 | PHP | massira/SymfonyFormation-DIP | /src/Services/NewsletterManager.php | UTF-8 | 718 | 3.078125 | 3 | [] | no_license | <?php
namespace DIP\Formation\Services;
/**
* Class NewsletterManager
*
* @package DIP\Formation\Services
*/
class NewsletterManager
{
/** @var Mailer */
private $mailer;
/** @var string */
private $name;
/**
* @param Mailer $mailer
*/
public function __construct(Mailer $mail... | true |
6b2efc7c6c22ebd327134f38770b0a7e0db8249d | PHP | isabella232/SimpleApiBundle | /Response/ItemResponse.php | UTF-8 | 510 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Betsol\Bundle\SimpleApiBundle\Response;
class ItemResponse extends Response
{
/** @var array */
protected $item;
/**
* @param array $item
*/
public function __construct(array $item = [])
{
$this->item = $item;
}
/**
* @return array
*/
pu... | true |
6d5572152ca22f6a040e51a2d2e4133966b58dfd | PHP | openstate/HNS.dev | /bo/formgen/formgen/trunk/elements/datetimeElement.class.php | UTF-8 | 5,969 | 2.75 | 3 | [] | no_license | <?php
class datetimeElement extends InputElement {
protected $name = '';
protected $value = array(
'Day' => null, 'Month' => null, 'Year' => null,
'Hour' => null, 'Minute' => null, 'Second' => null
);
protected $opts = array(
'start_year' => '+0',
'end_year' => '+4',
'reverse_y... | true |
219d913b5d0479c7d596323a4ac239e807c999d7 | PHP | p4lv/diag | /src/Controller/Api.php | UTF-8 | 1,506 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Diag\Controller;
use Diag\DataMapper;
use Diag\DiagResponse;
use Diag\LogReader;
use Diag\Record;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
class Api
{
private $logReader;
private $dataMapper;
public function __construct(DataMapper ... | true |
ca8e76a2d9efd3eb0db83c86a10a66bc3914ae36 | PHP | wpillar/fourum | /fourum/controllers/admin/ForumsController.php | UTF-8 | 2,231 | 2.53125 | 3 | [] | no_license | <?php
namespace Fourum\Controllers\Admin;
use Fourum\Controllers\AdminController;
use Fourum\Models\Forum\Type;
use Fourum\Models\Forum;
use Fourum\Tree\Node;
use Fourum\Tree\NodeRepositoryInterface;
use Fourum\Storage\Forum\ForumRepositoryInterface;
use Fourum\Storage\Setting\Manager;
use Illuminate\Support\Facades\... | true |
00d312a00182440c0f007e27f332aec01152818d | PHP | kenichiromiya/webwritecms | /template.php | UTF-8 | 551 | 2.578125 | 3 | [] | no_license | <?php
class Template
{
function getcontents($template,$data = array())
{
global $_LANG;
extract($data);
$cwd = getcwd();
chdir("views");
ob_start();
//include_once("functions.php");
include($template);
$contents = ob_get_contents();
ob_end_clean();
chdir(... | true |
af8b8e431e49928823822891c8d0a4d3677e6690 | PHP | sanaeefar-saeed/blackJack | /src/Britejack/Card.php | UTF-8 | 477 | 3.1875 | 3 | [] | no_license | <?php namespace Briteskies\Britejack;
class Card
{
public $key;
public $value;
public $suite;
/**
* Card constructor.
*
* This method initialize the cards and assign them to properties
*
* @param $key
* @param $value
* @param $suite
*
* @return void
*/... | true |
db7e7cd6aff918f1bb8f873925d14d567f85d380 | PHP | tzabcd/yiiSpace | /protected/modules/oauth/vendors/oauth2-server-php/src/OAuth2/Response/Error.php | UTF-8 | 1,315 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
*
*/
class OAuth2_Response_Error extends OAuth2_Response
{
public function __construct($statusCode, $error, $errorDescription, $errorUri = null)
{
$parameters = array(
'error' => $error,
'error_description' => $errorDescription,
);
if (!i... | true |
73ae8cb3054bb1771ae44c4b9fea334f72892d6f | PHP | keviinmiichael/notefix | /public/clases/validadorUsuario.php | UTF-8 | 1,313 | 2.90625 | 3 | [] | no_license | <?php
require_once("validador.php");
require_once("repositorio.php");
class ValidadorUsuario extends Validador {
public function validar(Array $datos, Repositorio $repo) {
$repoUsuarios = $repo->getRepositorioUsuarios();
$erroresRegister = [];
if (empty(trim($datos["name"]))){
$erroresRegister["... | true |
3509d0c74fc0659099e39c27c1d0025ba5919e5c | PHP | OkayCMS/Okay_Lite | /view/View.php | UTF-8 | 23,073 | 2.640625 | 3 | [] | no_license | <?php
require_once('api/Okay.php');
class View extends Okay {
/* Смысл класса в доступности следующих переменных в любом View */
public $currency;
public $currencies;
public $user;
public $group;
public $page;
public $language;
public $lang_link;
public $js_version;
public... | true |
49ea7fb37fc15c1b0571094fcacce98165b3b0dc | PHP | d3besel1s/TicTacToe | /classes/Database.php | UTF-8 | 1,468 | 3.234375 | 3 | [
"MIT"
] | permissive | <?php
require('../config.php');
class Database
{
/**
* Query to create the table
*/
const DB_TABLE_INFO = [
'turns' => 'CREATE TABLE Turns
(
id INT NOT NULL AUTO_INCREMENT,
GameId varchar(255),
BoardStatus varchar(255),
... | true |
8569eafa372517e24e42ea565110a9851dfb4f18 | PHP | CodeOp/elobbyist_distribution | /modules/elobbyist/views/handlers/elobbyist_views_handler_linked_name.inc | UTF-8 | 3,238 | 2.8125 | 3 | [] | no_license | <?php
/**
* @file
* Contains the linked name field handler.
*/
/**
* Field handler to provide simple renderer that allows linking to a record.
* Definition terms:
* - link_to_record default: Should this field have the checkbox "link to record" enabled by default.
* - url: url with '%' as the view->base_field p... | true |
5f9bd88fe1239b8158e5e809d203d36b5f537d9f | PHP | GLOCTARRR/Practicum | /php/1_3/function.php | UTF-8 | 895 | 3.25 | 3 | [] | no_license | <?php
$elements = Array();
$elements_number = 0;
function createArray(){
global $elements_number, $elements;
$elements_number = $_POST['number'];
if($elements_number > 0){
for($i = 0; $i < $elements_number; $i++){
$elements[$i] = mt_rand(1, 100);
}
}
}
function displayElements(){
g... | true |
42062e35f28ebafbd6f79b3e3c10158d7cf8ec81 | PHP | Jhon12M/SoftContaPlus | /admon/auditoriaDetalles.php | UTF-8 | 1,436 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
DETALLES DE LA BITACORA DE AUDITORIA
Presenta las acciones que se han realizado durante una sesión de un usuario en el sistema de información.
Viene de auditoria.php y recibe como parámetros:
$sesion: numero de la sesión en la variable $sesion pasada por get.
Autor: Galo Fabián Muñoz Espín
Fecha de cre... | true |
15c6979851a88c4e53d56cf391e59e8be33be732 | PHP | hulume/joydong | /app/Stario/Wesite/WeMenu.php | UTF-8 | 624 | 2.546875 | 3 | [] | no_license | <?php
namespace Star\Wesite;
use Illuminate\Database\Eloquent\Model;
class WeMenu extends Model {
protected $table = 'wesite';
protected $guarded = ['id'];
protected $casts = ['link' => 'array'];
// 获取所有的图文消息集合
// public function pages() {
// return $this->hasMany('Star\Wechat\WePage', 'wx_menu_id');
// }
... | true |
d3dd947a78d2232983814ddbfb23ad46fb886760 | PHP | mariusolariu/Dynamic-Web-Apps | /week_3/section_8/e1.php | UTF-8 | 1,044 | 3.765625 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset = “utf-8”>
<title> Dynamic Web Apps </title>
<script>
</script>
</head>
<body>
<?php
class Calculator{
private static $total = 0;
public function add($x){
Calculator::$total += $x;
return Calculator::$total;
}
public f... | true |
dd642abd86afbf2945eef026aa3aa9f5e0d191be | PHP | wangle201210/laravel | /app/User.php | UTF-8 | 1,937 | 2.71875 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Laratrust\Traits\LaratrustUserTrait;
use Tymon\JWTAuth\Contracts\JWTSubject as AuthenticatableUserContract;
class User extends Authenticatable implements AuthenticatableUserContract {
use Lar... | true |
69d5ce1082d51ca745caf840a3c031d81bc8c804 | PHP | silvamfilipe/video-player | /src/Domain/VideoPlayer.php | UTF-8 | 242 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Domain;
interface VideoPlayer
{
/**
* Creates the necessary HTML to render the provided video
*
* @param Video $video
* @return string
*/
public function render(Video $video): string;
}
| true |
5ddb1f8836c1bacb998bab37950c32b1b20f5aae | PHP | rufhausen/bands | /database/seeds/GenresTableSeeder.php | UTF-8 | 545 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class GenresTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$csv = \File::get(resource_path('assets/genres.csv'));
$genresArray = explode(PHP_EOL, $csv);
asort($... | true |
488d1fabfb0214ca6373fdb38cfe85c90b75d860 | PHP | t2421/backend | /php/dao/migrations/20181124155023_AddUser.php | UTF-8 | 670 | 2.734375 | 3 | [] | no_license | <?php
use Phpmig\Migration\Migration;
class AddUser extends Migration
{
/**
* Do the migration
*/
public function up()
{
$now =
$sql = 'CREATE TABLE user_list (
id INTEGER PRIMARY KEY AUTOINCREMENT,
name VARCHAR(255) NOT NULL,
created_at TIMES... | true |
c545e8adfa98ca3299aeb0a37c0ac36998e5a39b | PHP | FlavioHualpa/MySQL-PHP | /query_detalle.php | UTF-8 | 598 | 2.65625 | 3 | [] | no_license | <?php
require 'connect.php';
if ($db) {
$cons = $db->prepare('SELECT
(SELECT title
FROM series
WHERE id = :id
) AS nombre,
(SELECT COUNT(id)
FROM seasons
WHERE serie_id = :id
) AS temporadas,
(SELECT COUNT(epis... | true |
488df4c13b8c4c5090497c96af242c4b6bec234e | PHP | thecrazybob/laravel-whmcs | /src/WHMCS.php | UTF-8 | 459 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace WHMCS;
class WHMCS extends WhmcsCore {
/**
* Instantiate a new instance
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Generic function to call WHMCS API
*
* @param string $action
* @param ar... | true |
d185970ed7a0864c8f1f5b4b20b1dfa6502487ec | PHP | raman10101/buzzerout_server | /Utils/UtilsQuery.php | UTF-8 | 2,207 | 3.109375 | 3 | [] | no_license | <?php
class UtilsQuery
{
private $conn;
function __construct()
{
require_once './../Config/Connect.php';
$db = new Connect();
$this->conn = $db->connect();
}
public function lowerCase($text)
{
$response = array();
$response['error'] = false;
$response['old_username'] = $text;
$response['new_use... | true |