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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
b0a850ad01152243acfd441a9bd202136da1b75b | PHP | Project-Team-J/main-repository | /server/widgets/todo_list/TODO_LIST.php | UTF-8 | 2,394 | 2.890625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: user
* Date: 07/05/2017
* Time: 16:02
*/
class TODO_LIST
{
private $conn;
private $user;
public function __construct($uname)
{
$database = new Database();
$db = $database->dbConnection();
$this->conn = $db;
$this->user = &$un... | true |
6edbd9e6b555fd62a7f51c3508f54a17c948e494 | PHP | peigong/php-model-engine | /dist/demo/inc/core/httpcontext.class.php | UTF-8 | 1,579 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
/**
* HTTP上下文对象。
*/
class HttpContext
{
private static $current = null;
private $context = null;
private $principal = null;
/**
* 构造函数。
*/
function __construct($context = null){
$this->context = $context;
}
/**
* 构造函数。
*/
... | true |
ffab38a95f98b3a259e743a908d3464d1bef3086 | PHP | samuellevy/ccrj-cake3 | /src/Model/Entity/Datasheet.php | UTF-8 | 1,079 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Model\Entity;
use Cake\ORM\Entity;
/**
* Datasheet Entity
*
* @property int $id
* @property string $advertiser
* @property string $project_title
* @property string $agency_network
* @property string $creative_director
* @property string $art_director
* @property string $writer
* @propert... | true |
acbba29d8b2488114e392108d15bcedb1d0736b2 | PHP | hariririski/ta_sekolah | /application/views/cetak_per_kelas.php | UTF-8 | 4,112 | 2.59375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
include("mpdf60/mpdf.php");
//$mpdf=new mPDF ('utf-8','Legal');
$mpdf = new mPDF('', // mode - default ''
'Legal-L', // format - A4, for example, default ''
0, // font size - default 0
'', // default font family
20, // margin_left
20, // margin right
16, // margin top
16, // margin bott... | true |
fbb9d7c3733f2dacf0eeb3dfa6141dae78b9ff29 | PHP | Answer-Leaf/wwwroot | /PHP_work/add.php | UTF-8 | 699 | 3.1875 | 3 | [] | no_license | <?php
$post=$_POST;
echo "<pre>";
print_r($post);
echo "</pre>";
//将获取到的字符数组 以逗号分隔 转为字符串
$post=join(',',$post);
//将字符串放入文本中
$new_text=file_put_contents("add",'!'.$post,FILE_APPEND);
//echo file_get_contents('add');
//将文本中的值提取 并转为数组
$text_arr=explode("!",file_get_conten... | true |
4167da13eb91ef990532481ce8929350e25263de | PHP | hughgrigg/bank-account | /tests/Unit/Domain/Account/CreditAccountTest.php | UTF-8 | 2,503 | 2.828125 | 3 | [] | no_license | <?php
namespace Test\Unit\Domain\Account;
use Bank\Domain\Account\CreditAccount;
use Bank\Domain\Money\Money;
use PHPUnit\Framework\TestCase;
class CreditAccountTest extends TestCase
{
/**
* Should be able to go into credit.
*/
public function testCredit()
{
$account = new CreditAccount... | true |
69a3c716e26e30b5306eae3aaa0b84dc875de729 | PHP | ganggang888/myselft | /application/Common/Model/WchatModel.class.php | UTF-8 | 1,776 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
//公众号文章model
namespace Common\Model;
use Common\Model\CommonModel;
class WchatModel extends CommonModel
{
protected $_validate = array(
array('title', 'require', '名称不能为空', 1, 'regex', 3),
array('term_id', 'require', '请选择分类', 1, 'regex', 3),
array('img', 'require', '请务必上传缩略图', 1, 'regex', 3),
);
//操作一... | true |
903b36040d6e98ea54d22817cb38d6b976665aca | PHP | markpbaggett/bootstraptypeahead | /connect.php | UTF-8 | 474 | 2.796875 | 3 | [] | no_license | <?php
if (isset($_POST['query'])) {
//Connect to our database
mysql_connect("localhost", "username" , "pw");
mysql_select_db("Bootstrap");
// Retrieve the query
$query = $_POST['query'];
//Search the database for all similar items
$sql = mysql_query("SELECT * FROM typeahead WHERE name LIKE '%{$query}%... | true |
b79e6beb5c74165f7bfb9c699ebd72ca35656fe4 | PHP | Makers-Im-Zigerschlitz/maker-access-system-web-php | /htdocs/useractions/delete_booking.php | UTF-8 | 988 | 2.546875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
include "../includes/logincheck.inc.php";
include "../config/config.inc.php";
foreach ($_POST as $key => $value) {
echo $key." ".$value."<br>";
}
$uid = $_SESSION["uid"];
$evtID = $_GET["evtid"];
$sqlconn = mysqli_connect($mysqlhost, $mysqluser, $mysqlpass, $mysqldb);
$query = "SELECT * FROM `tblBookings` WHE... | true |
5eb5510f426b79b1671604c3574f4fa3d8fdb990 | PHP | benNek/CityWasp | /src/Entity/Marke.php | UTF-8 | 1,021 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\MarkeRepository")
*/
class Marke
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
... | true |
ef2868a34dce243a80fc4f2147a6e8c70e0ad87b | PHP | nacin/wp-cli | /php/commands/shell.php | UTF-8 | 1,873 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace WP_CLI\Commands;
class Shell_Command extends \WP_CLI_Command {
/**
* Interactive PHP console.
*/
public function __invoke() {
\WP_CLI::line( 'Type "exit" to close session.' );
while ( true ) {
$line = self::prompt();
if ( '' === $line )
continue;
$line = rtrim( $line, ';' ) ... | true |
014ffa589c0b24216e33df1f6d838fb7726d2ea8 | PHP | wangxiaodong1226/Web-Bases | /5.AJAX/04.Ajaxjson/01-ajaxjson.php | UTF-8 | 217 | 2.640625 | 3 | [] | no_license | <?php
header('Content-Type:text/html;charset=utf-8');
echo file_get_contents("data/data.json");
/*$str = '[1,2,3]';
print_r(json_decode($str));
$arr = array(6,7,8);
echo json_encode($arr);*/
?> | true |
76492d906b4230cdb52781e6472793e380d54563 | PHP | jhannn/xmeaning | /app/Cls.php | UTF-8 | 697 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Support\Facades\DB;
use Vinelab\NeoEloquent\Eloquent\Model as NeoEloquent;
class Cls extends NeoEloquent
{
private static $classes = null;
protected $label = 'Class';
protected $fillable = [
'name'
];
private static function get($className)
{
if (self::$classes == nul... | true |
4e9712352669926a71a019731baf704c997f51c6 | PHP | aherne/php-sql-data-objects-api | /examples/generic/GenericMySQLTable.php | UTF-8 | 379 | 2.953125 | 3 | [] | no_license | <?php
/**
* Implementation of a single class for all MySQL tables
*/
class GenericMySQLTable extends MySQLTable {
public function __construct($strServerName, $strSchemaName, $strTableName) {
$this->strSchemaName = $strSchemaName;
$this->strTableName = $strTableName;
$this->objDatabaseConnection = Datab... | true |
aad1f96889de9a5d31cbf9c47056cddc2a6a08ad | PHP | Shopeca/class-finder | /src/ClassFinder.php | UTF-8 | 7,791 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
////////////////////////////////////////////////////////////////////////////////
// __________ __ ________ __________
// \______ \ |__ ______ / _____/ ____ _____ ______\______ \ _______ ___
// | ___/ | \\____ \/ \ ____/ __ \\__ \\_ __ \ ... | true |
1b564128e8efb60b19c5b1caa67147fccc930b0a | PHP | Open-Wide/connectezsugar | /classes/owlogger.php | UTF-8 | 2,728 | 2.921875 | 3 | [] | no_license | <?php
class owLogger
{
function owLogger( $fileName, $mode )
{
$this->file = fopen( $fileName, $mode );
$this->fileName = $fileName;
}
static function CreateNew($fileName)
{
return new owLogger( $fileName, "wb" );
}
static function CreateForAdd($fileName)
{
... | true |
c065003e3523652a5e1acceb827a3ad258caa13b | PHP | CUBETIQ/litegen | /cubetiq/litegen/src/Base/BaseCommand.php | UTF-8 | 1,242 | 2.765625 | 3 | [] | no_license | <?php
namespace Cubetiq\Litegen\Base;
use Illuminate\Console\Command;
use Symfony\Component\Process\Process;
class BaseCommand extends Command
{
/**
* Use to run Shell command
*
* @param $command
* @return Process
*/
public function processCommand($command){
$this->info("... | true |
fd61255a5a10e6f0a4273b3a1227c6f014bcedfd | PHP | Tranphuc1/Nhom64_1451062135_1451062208 | /Source/login/register.php | UTF-8 | 2,372 | 2.8125 | 3 | [] | no_license | <html>
<head>
<title> Form đăng ký thành viên</title>
</head>
<body>
<?php
require_once("ketnoi.php");
if (isset($_POST["btn_submit"])) {
//lấy thông tin từ các form bằng phương thức POST
$username = $_POST["username"];
$password = $_POST["pass"];
$fullname = $_POST["fullname"];
$gio... | true |
a782c303a5a2ba6fa077191c3b4dbafb497417f9 | PHP | JUN-work/SES-Joint-Development-for-deploy- | /login.php | UTF-8 | 4,378 | 2.671875 | 3 | [] | no_license | <?php
session_start();
require_once 'function.php';
// 確認フォームから来た場合、入力されたemail表示
// 違う場合はクッキーの値表示
if ($_SESSION['email'] !== '') {
$email = $_SESSION['email'];
} elseif ($_COOKIE['email'] !== '') {
$email = $_COOKIE['email'];
}
if (empty($email)) {
$email = $_COOKIE['email'];
}
if (!empty($_POST)) {
... | true |
c2fe691e18fa3eeef9517ea62c0dfed33818b80e | PHP | decanus/Ganked | /GankedFrontend/src/Routers/StaticPageRouter.php | UTF-8 | 2,408 | 2.59375 | 3 | [] | no_license | <?php
/**
* Copyright (c) Dean Eigenmann 2015
* All rights reserved.
*/
namespace Ganked\Frontend\Routers
{
use Ganked\Frontend\ParameterObjects\ControllerParameterObject;
use Ganked\Frontend\ParameterObjects\RedirectControllerParameterObject;
use Ganked\Library\DataObjects\Accounts\RegisteredAccount... | true |
4cd6fcced08c3fa20e8d161e8b6fa530feef1df7 | PHP | mowen0303/ProjectsPortfolio | /Backend-projects/CMS-php/admin/courseCode/courseCodeController.php | UTF-8 | 7,747 | 2.59375 | 3 | [] | no_license | <?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/commonClass/config.php";
$courseCodeModel = new admin\courseCode\CourseCodeModel();
$currentUser = new \admin\user\UserModel();
call_user_func(BasicTool::get('action'));
//============ Function with JSON ===============//
/**
* JSON - 添加Course Code
* @param course_code... | true |
fbe93f74925283db4c54350fd5cacc5d86bcfc84 | PHP | sapnayadav431/DhwaniRis | /application/controllers/Master.php | UTF-8 | 12,418 | 2.578125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Master extends CI_Controller {
public $datalayer, $modelInstance;
function __construct()
{
//The Call Parent constructor
parent::__construct();
$this->load->model('Master_Model');
}
/* ----------------------sta... | true |
ec621ed2843b1a8fcc2cf051516eab347dde8539 | PHP | polonaiz/scratch-pad | /src/ScratchPad/Logger/FileLogger.php | UTF-8 | 639 | 2.828125 | 3 | [] | no_license | <?php
namespace ScratchPad\Logger;
class FileLogger implements LoggerInterface
{
use LoggerImpl;
private $config;
public function __construct($config = [])
{
$config += [
'truncate' => false,
];
$this->config = $config;
if($config['truncate'])
{
... | true |
9e75079d1877e1ade874053a097bfbfad35d4338 | PHP | larafenix007/eagle-1 | /src/Api/RecordApi.php | UTF-8 | 3,335 | 2.671875 | 3 | [] | no_license | <?php
namespace Siqwell\Eagle\Api;
use Siqwell\Eagle\HttpClient\Request;
use Siqwell\Eagle\Mappers\RecordMapper;
use Siqwell\Eagle\Mappers\SimpleMapper;
use Siqwell\Eagle\Mappers\StatisticsMapper;
use Siqwell\Eagle\Methods;
use Siqwell\Eagle\Models\Record;
/**
* Class RecordApi
* @package Siqwell\Eagle\Api
*/
cla... | true |
019dae77ded7415ea5bd265a672acb2e0867400e | PHP | sergiosalomao/worktask | /app/controller/UsuarioController.php | UTF-8 | 2,982 | 2.734375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Sergio
* Date: 28/05/2018
* Time: 21:29
*/
require_once 'Conexao.php';
Class UsuarioController
{
protected $_table = 'worktask.usuarios';
protected $_alias = 'usuarios';
public function __construct()
{
$this->conexao = Conexao::conexao();
}
... | true |
2f849b68f0e6868bb301a3a1a3d421569d25bcab | PHP | cesarcharaco/Milos | /app/Http/Requests/CamionesUpdateRequest.php | UTF-8 | 1,191 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class CamionesUpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
*... | true |
2f9727ef26a2d1dff2d62f261842aa1853a33a62 | PHP | MArmstrong95/cs297 | /hw05/addTimesProcess.php | UTF-8 | 1,618 | 3.390625 | 3 | [] | no_license | <!--
Morgan Armstrong
10/9/17
Homework 5: process form
-->
<!DOCTYPE html>
<html>
<head>
<title>Times Added</title>
<link rel="stylesheet" href="https://unpkg.com/sakura.css/css/sakura.css" type="text/css">
</head>
<h2 align="center">Advising Times Added:</h2>
<hr>
<body>
<center>
<?php
// Open file for writing ... | true |
090e173cb4f87638608fe45373ae881bf25104e0 | PHP | fabiopotame/surecorp | /app/webroot/teste_php/app/Controller/UsersController.php | UTF-8 | 2,096 | 2.734375 | 3 | [] | no_license | <?php
App::uses('Controller', 'Controller');
class UsersController extends AppController {
public $token = 'aj4ud62jruc8nd73nfu348dn3'; // código que valida a autenticação ao webservice, este codigo será gerado a cada sessão de login criada, caso não coincida com o token recebido mata a operação na mesma hora e reto... | true |
fdf6664c0aa007e66f6252422f250bc740e4fd7e | PHP | touchy1/project_illuminate | /Desktop/Helal/views/register.php | UTF-8 | 3,226 | 2.75 | 3 | [] | no_license | <?php
$oldvalues=[
'name'=>'',
'email'=>'',
'password'=>''
];
$errors=[];
$message='';
if(isset($_POST['name'])&&
isset($_POST['email'])){
$name=$_POST['name'];
$email=$_POST['emil'];
$password=$_POST['password'];
$oldvalues=[
'name'=>$name,
'email'=>$emil,
'password... | true |
09388a788d56c757ef65fc55cf77ca9ad61b8e9e | PHP | meseren/compilador | /class/Token.class.php | UTF-8 | 282 | 3.3125 | 3 | [] | no_license |
<?php
class Token{
public $tipo;
public $simbolo;
public function __construct($tipo, $simbolo)
{
$this->tipo = $tipo;
$this->simbolo = $simbolo;
}
public function getTipo()
{
return $this->tipo;
}
public function getSimbolo()
{
return $this->simbolo;
}
}
?> | true |
3e6c76a8f73d4934a8824220ab5f9ac3637ca935 | PHP | shehabalqudiry/TasksForTeam | /task1/index.php | UTF-8 | 863 | 3.375 | 3 | [] | no_license | <?php
$text1 = "<h1> I Love PHP";
$text2 = "<h1> My Team is The best </h1>";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<title><?php echo "Team BackEnd"; ?></tit... | true |
2a216d7ee023fe4fd3cde4e82cf8791a334bf862 | PHP | bhsjacket/coronavirus-data | /tables/california.php | UTF-8 | 1,764 | 2.625 | 3 | [] | no_license | <?php
require_once('../database.php');
$endpoint = 'https://data.ca.gov/api/3/action/datastore_search_sql?sql=';
$latestData = $database->query("SELECT `date` FROM `california` ORDER BY `date` DESC LIMIT 1");
$latestData = $latestData->fetch_assoc();
$latestData = $latestData['date'];
$latestData = new DateTime($lat... | true |
b6190ca24ec2707ce65b0fec38c2f16cf69cddfa | PHP | shokohsc/TwitchApiBundle | /Repository/AbstractRepository.php | UTF-8 | 2,333 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Shoko\TwitchApiBundle\Repository;
use Shoko\TwitchApiBundle\Lib\Client;
use Shoko\TwitchApiBundle\Factory\FactoryInterface;
use Shoko\TwitchApiBundle\Util\TransformerInterface;
use GuzzleHttp\Psr7\Response;
/**
* Class AbstractRepository.
*/
class AbstractRepository
{
/**
* Client $client.... | true |
24dd191018c52483c8aca6f3039408f1e3f49363 | PHP | sarahman/My-Tiny-Todo-List | /app/controllers/BaseController.php | UTF-8 | 2,793 | 2.6875 | 3 | [] | no_license | <?php (defined('BASEPATH')) OR exit('No direct script access allowed');
/**
* Base Controller
*
* Common tasks of all controllers are done here. Only inherit, no direct use please.
*
* @package Base
* @category Controller
*/
abstract class BaseController extends CI_Controller
{
protected $data = arra... | true |
e8b4457c247421a4f2d767b9e7ceb1bd812f7005 | PHP | lispa/project_printers | /blocks/card.php | UTF-8 | 637 | 2.578125 | 3 | [] | no_license | <!-- <?php
$arFileName = scandir("./img");
$arFileList = array();
foreach($arFileName as $FileName):
if(strpos($FileName,".jpg")!== false):
$arFileList[] = $FileName;
endif;
endforeach; ?> -->
<? foreach($arFileList as $index => $file):?>
<div class="card mb-4 shadow-sm">
<div class="card-h... | true |
35f24d1da028d00c4a272ce056ef8ac27931b66b | PHP | devperez/webinar.bmv.tv | /app/Http/Controllers/ImportController.php | UTF-8 | 2,400 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\User;
use App\Models\CsvData;
use Illuminate\Http\Request;
class ImportController extends Controller
{
public function index()
{
return view('admin_csv');
}
public function parse(Request $request)
{
//dd($request);
//on... | true |
759c3729645328fd0230105588736d41cd5bdda3 | PHP | Magical2018/Mongodb | /Mongo.Connect.php | UTF-8 | 1,333 | 2.78125 | 3 | [] | no_license | <?php
/*
* Mongodb 数据库连接 适配器
*/
namespace MongoDBserver;
include "Mongo.interface.php";
include "Mongo.PHP7down.php";
include "Mongo.PHP7up.php";
class Mongo implements DBface {
private $dbPort = "mongodb://localhost:27017";
protected $child_mongo;
private $php_versions;
... | true |
fd3b973d699d5868523ea273d6d6a1f5db036041 | PHP | LoickHommet/Asterix | /class/form1.class.php | UTF-8 | 894 | 2.875 | 3 | [] | no_license | <?php
class form{
private $data;
private $name;
private $value;
public function __construct($data)
{
$this->data=$data;
}
private function getvalue($index){
return isset($this->data[$index])?$this->data[$index]:null;
}
public function texte($name){
echo $name.' : <input type="text" name="'.$name.... | true |
a4a39a3dde146926eb0f17014548f0b438109048 | PHP | vanpano/xhe | /src/Xhe/Classes/XheTelegram.php | UTF-8 | 1,163 | 2.609375 | 3 | [] | no_license | <?php
namespace Xhe;
class XheTelegram extends XheBaseObject
{
function __construct($server,$password="")
{
$this->server = $server;
$this->password = $password;
$this->prefix = "Telegram";
}
function connect($api_id,$api_hash)
{
$params = array( "api_id" => $api_id , "api_hash" => $api_has... | true |
fb982a956030085bcc8a6e7186d0d555d1e2e9ba | PHP | nikola166/cart | /versus/cart/src/Collection.php | UTF-8 | 1,449 | 2.9375 | 3 | [] | no_license | <?php
namespace Versus\Cart;
use Illuminate\Support\Collection as IlluminateCollection;
use Exception;
class Collection extends IlluminateCollection
{
// Все элементы в корзине
protected $items;
// Необходимые поля
protected $fields = [
'id',
'title',
'price',
'count'... | true |
b85047b7de5b9a1a7f19e9377949a52f1a2667b6 | PHP | shamylife/dz2 | /dz2-8.php | UTF-8 | 2,763 | 3.765625 | 4 | [] | no_license | <?php
/**
* 1. Создать 3 функции, принимающие по 1 строковому параметру и выводящие на
* экран разные фразы с переданным параметром.
* 2. Создать 4ю функцию, которая будет принимать 2 параметра:
* a. целое число
* b. строку и в зависимости от переданного числа функция должна вызвать
* одну из трёх фун... | true |
0e9ad88383f612851d813c6497ee30372f2c6fcd | PHP | huangyanrui/php-test | /Lib/Register.php | UTF-8 | 545 | 2.609375 | 3 | [] | no_license | <?php
namespace Lib;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
class Register{
protected static $objects = [];
static function set($alias,$object){
... | true |
a8ab628e21ec2c8e6523db3914f1e65347632c29 | PHP | alice-njoroge/trello | /app/Http/Controllers/TaskController.php | UTF-8 | 1,055 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Project;
use App\Task;
use Illuminate\Http\Request;
class TaskController extends Controller
{
public function index($project_id)
{
$project = Project::findOrFail($project_id);
$tasks = $project->tasks;
return view('Projects.tasks.index', [... | true |
11834dde5fe2d8c57ae4697fb269419fbe9ca259 | PHP | berkb/PHP-Dersleri | /RegularExpressions/^ belirleyicisi.php | UTF-8 | 401 | 2.578125 | 3 | [] | no_license | <?php
/**
* ^ : Duzenli ifade dahilinde kontrol edilecek olan icerigin karakter diziliminin baslangici ile duzenli ifade arasinda eslesme aramak icin kullanilir.
*/
$Icerik = "A'dan Z'ye PHP7 Gorsel Egtim Seti";
$Desen = "/^PHP7/";
$Sonuc = preg_match($Desen, $Icerik);
echo $Icerik . "<br>";
echo $Desen . "<br... | true |
afe1c02c82c65ad4969d4e08a3aeb31a58f808a5 | PHP | LaimonasMas/restaurant | /app/Http/Controllers/MenuController.php | UTF-8 | 4,178 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Menu;
use Illuminate\Http\Request;
use Validator;
class MenuController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$menus = Menu::orderBy(... | true |
5032c6ad327d65a3d4f9a55bfb0afaa8ad56b8ab | PHP | derekgoodwin55/Webpage1-9 | /goodw171-Homework8/login.php | UTF-8 | 2,016 | 2.96875 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ini_set( 'display_errors','1');
session_start();
include("database_HW8F16.php");
$error = "";
// Check that there are values entered for both username and password. Then check validity
if(isset($_POST["submit"])){
if(empty($_POST["username"]) && empty($_POST["password"])){
$error ... | true |
b28855de2070884ef7385f806d11c5c864884212 | PHP | jsoby/mediawiki-trunk-extensions | /PollNY/SpecialCreatePoll.php | UTF-8 | 5,082 | 2.609375 | 3 | [] | no_license | <?php
/**
* A special page for creating new polls.
* @file
* @ingroup Extensions
*/
class CreatePoll extends SpecialPage {
/**
* Constructor -- set up the new special page
*/
public function __construct() {
parent::__construct( 'CreatePoll' );
}
/**
* Show the special page
*
* @param $par Mixed: p... | true |
f2cc1b1f340b4ce465c037523a1ceaf00cf0fb79 | PHP | danielsan80/jobboy | /src/JobBoy/Process/Application/Service/PauseWork.php | UTF-8 | 406 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace JobBoy\Process\Application\Service;
use JobBoy\Process\Domain\PauseControl\PauseControl;
class PauseWork
{
/** @var PauseControl */
protected $pauseControl;
public function __construct(
PauseControl $pauseControl
)
{
$this->pauseControl = $pauseControl;
}
... | true |
0daa8bd0a451807d5c0caa80000c44a054f02504 | PHP | rafiepaculaba/inventory | /includes/TimeDate.php | UTF-8 | 24,322 | 2.921875 | 3 | [] | no_license | <?php
require_once('timezone.php');
class TimeDate {
var $dbDayFormat = 'Y-m-d';
var $dbTimeFormat = 'H:i:s';
var $supported_strings = array('a'=>'[ap]m', 'A'=>'[AP]M', 'd'=>'[0-9]{1,2}', 'h'=>'[0-9]{1,2}', 'H'=>'[0-9]{1,2}', 'i'=>'[0-9]{1,2}', 'm'=>'[0-9]{1,2}', 'Y'=>'[0-9]{4}', 's'=>'[0-9]{1,2}');
/**
* f... | true |
1e1f1239ab2be37266dd4a6c87fb473715e54f50 | PHP | gabrieledarrigo/movie-catalog | /tests/unit/Domain/Model/MovieTest.php | UTF-8 | 3,016 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Tests\Darrigo\MovieCatalog\Domain\Model;
use Darrigo\MovieCatalog\Domain\Model\Genre;
use Darrigo\MovieCatalog\Domain\Model\Movie;
use Doctrine\Common\Collections\ArrayCollection;
use PHPUnit\Framework\TestCase;
/**
* Class MovieTest
* @package Tests\Darrigo\MovieCatalog\Do... | true |
b36e7c448d72e0c9b5aed511a51e43d53985422f | PHP | clt19970122/168 | /Dexis/Backet/Model/GoodsModel.class.php | UTF-8 | 3,928 | 2.53125 | 3 | [] | no_license | <?php
namespace Backet\Model;
use Think\Model;
class GoodsModel extends Model {
protected $_validate = array(
array('gsn', 'require', '系统错误,请重新进入此页'),
array('catid', 'require', '请选择分类'),
array('name', 'require', '请填写商品名称'),
array('price', 'require', '请填写体验价格'),
array('pri... | true |
d5c917b6e49f79729d1323b60b4e8748f372d594 | PHP | leftdevel/farma | /src/Farma/UserBundle/Api/UserApi.php | UTF-8 | 5,089 | 2.5625 | 3 | [] | no_license | <?php
namespace Farma\UserBundle\Api;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface,
Symfony\Component\Security\Core\User\UserInterface,
Symfony\Component\Validator\Validator\LegacyValidator;
use Farma\BaseBundle\Event\Event,
Farma\BaseBundle\Event\EventProcessor,
Farma\Use... | true |
0dfed98374bfbfb3ff17ca265e8a84f78744ae2b | PHP | eso777/taxes | /database/migrations/2016_09_20_140458_create_news_table.php | UTF-8 | 832 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateNewsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('news', function(Blueprint $table)
{
$table->increments('id');
$table->strin... | true |
e24115a458c99f206900b9d2a67a58cd18bd5ae9 | PHP | chronick/swagger-mock | /tests/Unit/Mock/Generation/Value/Primitive/FakerStringGeneratorTest.php | UTF-8 | 6,404 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Swagger Mock.
*
* (c) Igor Lazarev <strider2038@yandex.ru>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace App\Tests\Unit\Mock\Generation\Value\Primitive;
use App\Mock\Generation\Value\Pr... | true |
abe32f19c4331c98e18bfcecd5cb2114630e117e | PHP | s00129359/RepairSystem | /src/Controller/ReportsController.php | UTF-8 | 4,184 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Controller\AppController;
/**
* Reports Controller
*
* @property \App\Model\Table\ReportsTable $Reports
*/
class ReportsController extends AppController
{
/**
* Index method
*
* @return void
*/
public function index()
{
$this->pagina... | true |
2686493e7c111f908a9870d920062e415c615075 | PHP | CodeLingoBot/design-patterns | /Behavioral/ChainOfResponsibilities/LogLevel.php | UTF-8 | 534 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace DesignPatterns\Behavioral\ChainOfResponsibilities;
abstract class LogLevel
{
const NONE = 0; // File Logger
const INFO = 1; // File Logger
const DEBUG = 2; // DB Logger
const WARNING = 4; // DB Logger
const ERROR = 8; ... | true |
5b815b4bc349ea32f520018037a17c2d869106b4 | PHP | iamsaint/attribute-loader | /loader/Loader.php | UTF-8 | 2,608 | 2.796875 | 3 | [] | no_license | <?php
namespace Loader;
use Loader\Setters\SimpleSetter;
use Yiisoft\Arrays\ArrayHelper;
class Loader implements LoaderInterface
{
private $source;
private Object $target;
private array $setters = [];
private array $protected = [];
public string $undefinedSetter = 'Undefined setter class';
p... | true |
cc43d79fe85ca87bdd5d6db2ba837c79660dedfd | PHP | phpdy/mgt | /app/models/mgt/member_model.php | UTF-8 | 297 | 2.515625 | 3 | [] | no_license | <?php
//会员类型
class member_model extends BaseModel {
protected $dbIndex = 'admin';
protected $dbtable = "member" ;
protected $items = array('id','name','state') ;
/**
* 按ID查询
* @param int $id
*/
public function queryById($id){
return $this->getOneById( $id) ;
}
}
| true |
280873558199f95d005ec2f96870dcc2e3f29e08 | PHP | hafeez3000/platform | /src/Oro/Bundle/TestFrameworkBundle/Pages/Page.php | UTF-8 | 4,419 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Oro\Bundle\TestFrameworkBundle\Pages;
use PHPUnit_Framework_Assert;
class Page
{
protected $redirectUrl = null;
/** @var \PHPUnit_Extensions_Selenium2TestCase */
protected $test;
/**
* @param $testCase
* @param bool $redirect
*/
public function __construct($testCa... | true |
5aead031064b8153482a5f4b6722bf7a490ba7be | PHP | maxmichels/kivitendo-crm | /jquery-plugins/elFinder/files/mklokale.php | UTF-8 | 820 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
if ($argc>0) {
echo $argv[1]."\n";
$templates = glob($argv[1]);
} else {
echo "tpl/*.tpl\n";
$templates = glob("tpl/*.tpl");
}
if ($templates) foreach ($templates as $file) {
echo "$file: ";
$text = file_get_contents($file);
preg_match_all("... | true |
ebe65f533321fc8a23e13c062f3294e0c1b30a0d | PHP | dara82/passengerbench | /classes/PropertyMapper.php | UTF-8 | 2,353 | 3.421875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: NIKITA
* Date: 28.09.2017
* Time: 11:55
*/
class PropertyMapper
{
/** @var DBConnection */
public $db;
public function __construct()
{
$this->db = DBConnection::getInstance();
}
/**
* Simple representation of an ORM (Object Relation Mapp... | true |
b0fe380dfea4fb3e6de1095048a611c5bca3a5f0 | PHP | Robin-git/MyPhpMyAdmin | /app/Object/Database.php | UTF-8 | 2,500 | 3.5 | 4 | [] | no_license | <?php
namespace ARG\Object;
use \PDO;
/**
* Class Database
* Class qui permet une connection à MySQL afin de manipuler les bases de données.
*/
class Database
{
/**
* @var PDO $pdo | Variable contenant l'objet PDO pour ce connecter à MySQL.
*/
private $pdo;
/**
* @return PDO
*/
... | true |
590ed879451fe6a2db95d8056f6837dfc05d622f | PHP | szonov/sql-splitter | /src/Parser.php | UTF-8 | 4,964 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace SZonov\SQL\Splitter;
use SZonov\Text\Parser\ParserInterface;
use SZonov\Text\Parser\ParserIterator;
use SZonov\Text\Source\SourceInterface as Input;
use SZonov\Text\Source\File as FileInput;
use SZonov\Text\Source\Text as TextInput;
abstract class Parser implements ParserInterface
{
protected str... | true |
c58505db5f11edbb2ce931f02460251289a26d03 | PHP | nestor-cms/vce-application | /components/access/access.php | UTF-8 | 5,808 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
class Access extends Component {
/**
* basic info about the component
*/
public function component_info() {
return array(
'name' => 'Access',
'description' => 'Access and creation restriction by user role for sub-components',
'category' => 'site'
);
}
/**
* check if get_sub_components... | true |
fb602e1519f8e9ff87d5644f1f644ecb86185fa6 | PHP | williamforster/SmartVac | /messagehandler.php | UTF-8 | 6,087 | 2.59375 | 3 | [] | no_license | <?php
// Message format: "sc/g/0190420060606153.012345,-27.012345,8.5,0.32,-101,-27,4,1.015\n"
// smartcampus/glutton/sequence_no yymmddhhMMss longtitude,latitude,
// altitude(m above sea),fill%,signal str, signal noise ratio , satellites, hdop \n
//
// Sequence number is a char starting at '0' sp... | true |
905271e0bf4e548e42b4d1d1470684216f32eaa9 | PHP | HimanshuM/Agility-old | /vendor/Agility/HTTP/Routing/RouteBuilder.php | UTF-8 | 10,084 | 2.90625 | 3 | [] | no_license | <?php
namespace Agility\HTTP\Routing;
use Closure;
use Exception;
use Agility\Extensions\String\Inflect;
class RouteBuilder {
public $routes = [];
private $_baseResource;
public $_baseNamespace;
function __construct($baseResource = "", $baseNamespace = "") {
if ($baseResource == "") ... | true |
0912c90971418b4c85458e4992f10f8592aace47 | PHP | tomaszkrysinski/P_WIAI | /SZYP/obiekty/cz2/konstruktory.php | UTF-8 | 695 | 3.546875 | 4 | [] | no_license | <?php
class Person{
// public $name;
// public $surname;
private $name;
private $surname;
private $city;
function __construct($name,$surname){
$this->name = $name;
$this->surname = $surname;
}
public function getName(){
return $this->name;
}
public function setCity($city){
$this ->ci... | true |
fd5277e4c2a5b7c9cee2ece9aaa553f6259a8b45 | PHP | juanramoncarceles/el-rebost-astra-child-theme | /woocommerce/cart/cart-shipping.php | UTF-8 | 8,280 | 2.765625 | 3 | [] | no_license | <?php
/**
* Shipping Methods Display
*
* In 2.1 we show methods per package. This allows for multiple methods per order if so desired.
*
* This template can be overridden by copying it to yourtheme/woocommerce/cart/cart-shipping.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you... | true |
f1f37a98fcc5bdb0277213b50de0034360142266 | PHP | GrigoryanNarek/yii2-test-project | /models/Transactions.php | UTF-8 | 2,005 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "transactions".
*
* @property integer $id
* @property integer $send_from
* @property integer $send_to
* @property double $sum
* @property integer $created_at
*
* @property User $sendFrom
*/
class Transactions extends \yii\db\Activ... | true |
6ae9085c19d0c3155248d7e3dc3311377b35e66a | PHP | eric1foard/CPSC_304 | /scrawl/src/AppBundle/Controller/SearchController.php | UTF-8 | 5,514 | 2.6875 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace AppBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Config\Definition\Exception\Exception;
use AppBundle\Entity\Photo;
/**
* Search controller
* Logic for ... | true |
504298d0d78982f4261440a4838a3397a12108d5 | PHP | mikezangirolami/CorsoMagentoNews | /project/app/code/local/Zangirolami/News/Model/Category.php | UTF-8 | 1,365 | 2.609375 | 3 | [] | no_license | <?php
/**
* Zangirolami News
*/
/**
* Zangirolami News Model Data
*
* Category Model.
*
* @method Zangirolami_News_Model_Category getCode()
* @method setCode(string $code)
* @method Zangirolami_News_Model_Category getName()
* @method setName(string $name)
* @method Zangirolami_News_Model_Category getStatus(... | true |
96480157d4df6e6ea8250f74639502fb8b8f8d94 | PHP | IlijaAngelov/cms | /admin/functions.php | UTF-8 | 3,431 | 2.8125 | 3 | [] | no_license | <?php
function isLoggedIn()
{
if (isset($_SESSION['username']) AND $_SESSION['username'] !== '') {
return true;
echo $_SESSION['username'];
} else {
return false;
}
}
function okQuery($result){
global $conn;
if(!$result) {
die("Query Failed! " . mysqli_error($conn, ... | true |
eab69892d1dcf1999485564f1ca3e0827005f05b | PHP | tusharvikky/vectors-13 | /application/seeds/fifa.php | UTF-8 | 1,032 | 2.578125 | 3 | [
"MIT",
"LicenseRef-scancode-dco-1.1"
] | permissive | <?php
class Seed_fifa extends \S2\Seed {
public function grow()
{
$event = new Techfest();
$event->permalink = 'fifa';
$event->name = 'FIFA';
$event->objective = '<p></p>';
$event->tagline = '<p></p>';
$event->fee = 'RS. 35/-';
$event->time = '10.00 AM ... | true |
a9ecbcbd7f8416b8ba1c59b9db1be081d968f32b | PHP | kamil17289/forms | /src/Inputs/Select.php | UTF-8 | 2,397 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace Nethead\Forms\Inputs;
use Nethead\Forms\Abstracts\Input as FormInput;
use Nethead\Markup\Html\Optgroup;
use Nethead\Markup\Html\Option;
use Nethead\Markup\Html\Select as HtmlSelect;
/**
* Class Select
* @package Nethead\Forms\Inputs
*/
class Select extends FormInput {
/**
* @var array
... | true |
1a67a01fa5d94cc84e96edbe6ab5180624f6b144 | PHP | ahmedeid46/IS-project | /function/termAndYear.php | UTF-8 | 510 | 3.046875 | 3 | [] | no_license | <?php
function term(){
if(date('m')==9|10|11|12|1){
$term="1st";
}elseif(date('m')==2|3|4|5){
$term="2nd";
}elseif (date('m')==6|7|8){
$term="summer";
}
return $term;
}
function year(){
if(date('m')==9|10|11|12){
$year=date("yy")+1;
}else{
$year=date("... | true |
146d2b44f43a456e15ba8a83030fa64f3e1aa202 | PHP | ChoiSukwoo/University_PHP | /Final_work/movie_list.php | UTF-8 | 2,961 | 2.578125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>PHP 프로그래밍 입문</title>
<!-- 랜덤이미지 링크 -->
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:200" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="./css/randomImg.css?2">
<link rel="stylesheet" type="text/css" href="./css/viewsty... | true |
6a8e9030bb0b3d03ccfe2316fe74d437abf3fe5a | PHP | tradesouthwest/Gallery-Image-Upload | /do_insert.php | UTF-8 | 3,858 | 2.625 | 3 | [] | no_license | <?php
/**
* GIU
* do_insert.php - inserts new image into database and file into folder
*/
session_start();
if( !isset( $_SESSION['user'] ) )
{
header( "Location: login.php" );
}
if( isset( $_SESSION['user'] ) )
{
include( 'include/config.php' );
if (isset($_POST['do_submit'])) {
$fileTypeArray = array('.jpg', ... | true |
284335d102cc7cd65e73f3276d5a372a96250f0d | PHP | m4rw3r/php-graphql-ast-extender | /src/Rules/UniqueUnionTypes.php | UTF-8 | 1,868 | 2.625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace GraphQLASTExtender\Rules;
use GraphQL\Error\Error;
use GraphQL\Language\AST\Node;
use GraphQL\Language\AST\NodeKind;
use GraphQL\Language\AST\UnionTypeDefinitionNode;
use GraphQL\Language\Visitor;
use GraphQL\Language\VisitorOperation;
use GraphQL\Validator\ASTValidationConte... | true |
d900d99349b39afe4c94940bdb0754aa8792627f | PHP | pixelsnob/pet | /application/models/Mapper/Products.php | UTF-8 | 13,072 | 2.828125 | 3 | [] | no_license | <?php
/**
* @package Model_Mapper_Products
*
*/
class Model_Mapper_Products extends Pet_Model_Mapper_Abstract {
/**
* @return void
*
*/
public function __construct() {
$this->_products = new Model_DbTable_Products;
}
/**
* @return array
*
*/
public ... | true |
e6d584fb1c42c765ce8a4f4a04c65f785df66d26 | PHP | robintroyer/calendar_grid | /models/Classes/iCalendar.php | UTF-8 | 3,873 | 2.75 | 3 | [] | no_license | <?php
class ICalendar
{
private $filename;
private $data;
public function createFile($entry, $last_id)
{
$this->generateFileName($last_id);
$id = $entry->getID();
$title = $entry->getTitle();
$desc = $entry->getDesc();
$location = $entry->getLocation();
$s... | true |
b796a2ab4b6d5cb4f50f6a20aefc950d2c840b2f | PHP | live-admin/business | /czy_www/colourlife/common/models/PropertyFees.php | UTF-8 | 4,006 | 2.640625 | 3 | [] | no_license | <?php
/**
* This is the model class for table "property_fees".
*
* The followings are the available columns in table 'property_fees':
* @property integer $id
* @property integer $community_id
* @property string $build
* @property string $room
* @property string $customer_name
* @property string $colorcloud_bu... | true |
5fa96538fbb3497a2787842449ee7684e1daa413 | PHP | wadiemh/sireneApi | /src/Controller/SireneController.php | UTF-8 | 3,805 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use League\Csv\Reader;
use Symfony\Contracts\HttpClient\HttpClientInterface;
use Symfony\Contracts\HttpClient\Exception\Trans... | true |
df50a5219f26c2294d29734290f8bfc1f681841c | PHP | Bernix01/leccion-php | /admin/programa/crearprograma.php | UTF-8 | 1,114 | 2.828125 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION['login'])){
header("Location: https://leccion-php.herokuapp.com/login/");
exit();
}
require 'colectorprograma.php';
if(isset($_POST["nombre"])){
$vCollector = new ProgramaCollector();
$programa = new programa();
$programa->setId(123);
$programa->setNombre($_POST[... | true |
557fc29fb144311b674c22151b012a65f2dca31c | PHP | jazahn/yii | /tests/framework/web/helpers/CHtmlTest.php | UTF-8 | 7,091 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class CHtmlTest extends CTestCase
{
/* HTML characters encode/decode tests */
public static function providerEncodeArray()
{
return array(
array( array('lessThanExpression'=>'4 < 9'), array('lessThanExpression'=>'4 < 9') ),
array( array(array('lessThanE... | true |
49fd22a02245afe1f37c070e9a077915100b4240 | PHP | kevinaraujo/clean-architecture | /src/Application/Student/EnrollStudent/EnrollStudentDTO.php | UTF-8 | 315 | 2.75 | 3 | [] | no_license | <?php
namespace Kevin\Architecture\Application\Student\EnrollStudent;
class EnrollStudentDTO {
public string $cpf;
public string $name;
public string $email;
public function __construct(string $cpf, string $name, $email)
{
$this->cpf = $cpf;
$this->name = $name;
$this->email = $email;
}
} | true |
d80a700f3b7bbb893668b49a4a95f59bb10f9167 | PHP | php/presentations | /slides/advphp/simple_sock_server.php | UTF-8 | 929 | 2.84375 | 3 | [] | no_license | <?php
set_time_limit (0);
ob_implicit_flush ();
$address = '127.0.0.1';
$port = 1053;
$sock = socket_create (AF_INET, SOCK_STREAM, 0);
if ($sock < 0) {
die ('Cannot create a socket');
}
if (socket_bind ($sock, $address, $port) < 0) {
die ("Cannot bind to address $address on port $port\n");
}
socket_listen ($sock... | true |
593fb503670fd542cdebfc28eb1114feacdc1d5c | PHP | HerrX2000/FireWebDev | /inc/functions/fw_users.php | UTF-8 | 10,301 | 2.53125 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
$path=(dirname(dirname(dirname(__FILE__))));
include_once ($path."/global.php");
///LOGIN
class user{
function login() {
global $db_my;
$db = $db_my;
if (!empty($_POST) ) {
$username = $_POST["username"];
$password = $_POST["password"];
$spam_protection = $_POST["email2"]... | true |
cead90f6230de963dc88333558915ab017c9d8ba | PHP | Huihuiyule-www/koel | /app/Http/Controllers/PlayController.php | UTF-8 | 1,646 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Factories\StreamerFactory;
use App\Http\Requests\SongPlayRequest;
use App\Models\Song;
use App\Services\TokenManager;
use Illuminate\Http\RedirectResponse;
use Illuminate\Routing\Redirector;
class PlayController extends Controller
{
private $tokenManager;
private... | true |
b530a71fe4c55fbefc2f8d001475b75d53d38cb5 | PHP | tentacode-classroom/twitter-mais-chickenevents | /src/Controller/LikeController.php | UTF-8 | 1,285 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\Post;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Security\Core\User\UserInterface;
... | true |
eee40b510fc16911029a934943755a9d00499e8e | PHP | RSAsir/IAW | /Temario primera evaluacion/02-variables.php | UTF-8 | 916 | 3.546875 | 4 | [] | no_license | <?php
// Las variables son case-sensitive
// Las variables empiezan con A-z o _, nunca numeros, aunque si pueden contenerlos.
$primera = 2;
$Primera = 3;
$PRIMERA = "Hola mundo"; # Cuando una variable lleva cadena de texto se emplean comillas.
// Comillas dobles muestran el valor de las variables.
e... | true |
0ad93287429cddd1f7a025fea95d5082ee8bc3d1 | PHP | CNAWebDevCP2420/labs-CurtisB11 | /Lab2/chapter4/Paycheck.php | UTF-8 | 3,472 | 2.78125 | 3 | [] | no_license | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Pay Check Details</title>
</head>
<body>
<?php
define("REGULAR_PAY_HO... | true |
4946cd257f20dd47f1e628869bfcbf6d61efeaee | PHP | rimantepomeckyte/php_airTicket | /inc/functions.php | UTF-8 | 2,114 | 2.890625 | 3 | [] | no_license | <?php
$validation = [];
function validate($data)
{
global $validation;
if (!preg_match('/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/', $_POST['email'])) {
$validation[] = "El. paštas turi atitikti el. pašto formatą";
}
if (!preg_match('/^(\+3706)?\(?([0-9]{2})\)?([ .-]?)([0-9]{5})/', $_POS... | true |
75e219f210cb865f313541f640b407cf8b2468b1 | PHP | LizHagey/CS313php | /web/cs313/memory/memory_manager/view/photo_list.php | UTF-8 | 2,630 | 2.546875 | 3 | [] | no_license | <?php include '../view/header.php'; ?>
<main>
<h1>Memories</h1>
<aside>
<!-- display a list of categories -->
<h2>Memories</h2>
<nav>
<ul>
<?php foreach ($peoples as $people) : ?>
<li>
<a href="?people_id=<?php echo $people['peopleID']; ?>">
... | true |
52a03f38443063daa5cdfb2afe9832e3d0292a8e | PHP | apuc/fon-parse-php | /parser/FonbetParser.php | UTF-8 | 1,842 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Parser;
use Facebook\WebDriver\Exception\NoSuchElementException;
use Facebook\WebDriver\JavaScriptExecutor;
use Facebook\WebDriver\Remote\DesiredCapabilities;
use Facebook\WebDriver\Remote\RemoteWebDriver;
use Facebook\WebDriver\WebDriverBy;
use Facebook\WebDriver\WebDriverExpectedCondition;
/** @prop... | true |
b85719ebc20251b84f9af341289ff4ef5abc1140 | PHP | mailgun/mailgun-php | /src/Hydrator/NoopHydrator.php | UTF-8 | 662 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* Copyright (C) 2013 Mailgun
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace Mailgun\Hydrator;
use Psr\Http\Message\ResponseInterface;
/**
* Do not serialize at all. Just return a PSR-7 re... | true |
8854e0ab08dc9f63e9c159c23017405ee6287fd0 | PHP | lonson/laravel-gamify | /src/Traits/HasPoints.php | UTF-8 | 1,568 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Ansezz\Gamify\Traits;
use Ansezz\Gamify\Events\PointsChanged;
use Ansezz\Gamify\Point;
trait HasPoints
{
/**
* @return \Illuminate\Database\Eloquent\Relations\morphMany
*/
public function points()
{
return $this->morphToMany(Point::class, 'pointable')->withPivot(['achiev... | true |
b16e69130cfb6f69f836200b4319af530fd35532 | PHP | uncle-ben-s/yii1_doctrine_test | /services/Dispatchers/CardEventDispatcher.php | UTF-8 | 542 | 2.59375 | 3 | [] | no_license | <?php
namespace services\Dispatchers;
use shop\Dispatchers\EventDispatcher;
use shop\Services\History\History;
class CardEventDispatcher implements EventDispatcher
{
public function dispatch(array $events)
{
foreach ($events as $event) {
\Yii::app()->DI->container->get(History::class)->... | true |
46f8f3e8c4af89b91290244c7f546288f51fcb50 | PHP | Vakuloff/BFGMUZ | /main/views/vsyakoe-vsyakoe/profileEdit.php | UTF-8 | 12,229 | 2.9375 | 3 | [] | no_license | <?
include 'header.php';
if(isset($_GET['user_id'])){
$dbcon = Database::getDb();
$user_id = $_SESSION['id'];
if($user_id == $_GET['user_id']){
// Define the variables we will use and intialize them to empty strings
$username = $email = $first_name = $last_name = $password = $confirm_password = $img = "";
$u... | true |
4811e734092dbc7373738daa4d8e1db2480648a0 | PHP | shane1027/UniChat | /unichat.php | UTF-8 | 2,826 | 2.640625 | 3 | [] | no_license | <?php
require_once("./SC-API/src/snapchat.php");
//////////// CONFIG ////////////
$username = " "; // Your snapchat username
$password = " "; // Your snapchat password
$gEmail = " "; // Gmail account
$gPasswd = " "; // Gmail account password
$casperKey = " "; // Casper API Key
$casperS... | true |
7ece8a78ce0cae9ae6a29046ff2d789b6f505ba8 | PHP | fernandoval/Springy | /app/classes/User.php | UTF-8 | 5,672 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Classe model for users table.
*
* This is a sample class for users table. You can delete it from your project and write your own.
*/
use Springy\Model;
use Springy\Security\AclUserInterface;
use Springy\Security\IdentityInterface;
class User extends Model implements IdentityInterface, AclUserInterface
... | true |