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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
a9ee8885c7e6be26ce18a4707d93a373d9228099 | PHP | takuyatakamori/prog | /php04/sol.php | UTF-8 | 664 | 2.578125 | 3 | [] | no_license | <?php
session_start();
include("funcs.php");
loginCheck();
// もしPOST送信されていたら
if(!empty($_POST)){
$sol = $_POST['sol'];
//DB接続
$pdo = db_connect();
$sql = 'UPDATE tkn_question_table SET sol=1 WHERE id=:sol';
$stmt = $pdo->prepare($sql);
$stmt->bindValue(':sol', $sol, PDO::PARAM_INT);
$status = $stmt->e... | true |
dd178e322081fba4e51c77a725ef5d6526a5e86c | PHP | richtestani/FeedTheFox | /src/Processors/JSON/Taxes.php | UTF-8 | 735 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace RichTestani\FeedTheFox\Processors\JSON;
use Illuminate\Support\Collection;
class Taxes {
protected $taxes;
protected $properties = [
'amount',
'apply_to_handling',
'apply_to_shipping',
'date_created',
'date_modified',
'is_future_tax',
'name' => 'Global ... | true |
9b7f912fb338f988459f82ceafbea30d571eba82 | PHP | gabriel403/AutonomicRESTMonitor | /application/modules/rest/models/User.php | UTF-8 | 8,258 | 2.859375 | 3 | [] | no_license | <?php
class Rest_Model_User {
public function __construct() {
$this->db = new Access_Model_DbTable_User();
}
/**
*
* valid query elements
* limit, the limited range of elements returned
* offset, The number of elements to skip before we find values to return
* addedBy... | true |
4d0303386f9ea75c9229f7a38d37a4fb83ca5276 | PHP | IIM-Creative-Technology/devops-pacski | /app/Service/StoreImage.php | UTF-8 | 511 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Toolbox\ResponseManagement;
class StoreImage extends ResponseManagement
{
public function store($request, $folder)
{
$extension = $request->getClientOriginalExtension();
$imageName = implode('',explode(' ',request('name')));
$file = $request;
... | true |
8b4d9eeb79032721127910d55ff1de96d061094b | PHP | dreaddy/SkylordsReplayParserLibrary | /slreplayparser/replaymodels/replaydeckplayer.inc.php | ISO-8859-9 | 8,151 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/** Skylords Reborn PHP Replay Parser
*
* Copyright 2021: Torsten Lders Website:http://torsten-lueders.de Mail:info@torsten-lueders.de SkylordsReborn: dreaddy
* Thanks to Dennis Gravel for his help back in 2009 figuring out the Fileformat / providing me the Source of his Java parser and to the Skylords Reb... | true |
1470b6efe988be8b012d0af9be278ec976a270ac | PHP | P79N6A/php | /ptshare/ptshare/admin/src/application/models/Role.php | UTF-8 | 1,071 | 2.78125 | 3 | [] | no_license | <?php
class Role extends Table
{
public function __construct()
{
$this->setDBConf("MYSQL_CONF_ADMIN");
$this->setTableName("role");
$this->setPrimary("roleid");
}
public function addRole($name)
{
$info = array(
"name"=>$name,
"addtime"=>date("Y-m-d H:i:s"),
"modtime"=>date("Y-m-... | true |
8be9f5fb649818b920229aa0c600da08a3fb791e | PHP | dykyi-roman/service-oriented-architecture | /adminpanel/code/src/Domain/Auth/Service/SignUp.php | UTF-8 | 3,486 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Domain\Auth\Service;
use App\Domain\Auth\Response\ApiResponse;
use App\Domain\Auth\Response\ApiResponseInterface;
use App\Domain\Auth\ValueObject\Email;
use App\Domain\Auth\ValueObject\FullName;
use App\Domain\Auth\ValueObject\Password;
use App\Infrastructure\HttpClient\R... | true |
7cb9b674210dce92f084f65cd8f2d332c2311ffb | PHP | openva/rs-video-processor | /bin/save_chyrons.php | UTF-8 | 7,242 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
require_once __DIR__ . '/../includes/settings.inc.php';
require_once __DIR__ . '/../includes/functions.inc.php';
$video_dir = (__DIR__ . '/../video');
# Connect to the database.
$database = new Database;
$db = $database->connect();
# Convert a count of seconds to HH:MM:SS format.
function format_time($secs)
{... | true |
0adf0ea7e8ff2e43e6aeaab6fd9bdee27a5db60d | PHP | zilveer/rsadak_betting | /viewLeagues.php | UTF-8 | 697 | 2.546875 | 3 | [] | no_license | <?php
require_once 'basePage.php';
require_once 'utils/functions.php';
function leaguesTable($leagues){
echo '<table id="leaguesTable" border=1>';
echo '<tr>';
echo '<th>Name</th>';
echo '<th>Creator</th>';
echo '<th>Created</th>';
echo '<th>Last Updated</th>';
echo '</tr>';
foreach ($leagues as $league){
e... | true |
5db001215b40a72ae27241b9f44dba592296703e | PHP | sergeantproudly/proudly_root | /library/common.lib.php | UTF-8 | 16,564 | 2.640625 | 3 | [] | no_license | <?php
function LoadFile ($filename){
if (file_exists ($filename)){
$fp = fopen($filename, "r");
$content = fread ($fp, filesize ($filename));
fclose ($fp);
return $content;
} else return false;
}
function LoadTemplate ($name,$dir=''){... | true |
7ad6063f6d6a44e8ed28e9118d453208b6d4295c | PHP | sapila/Brainer-backend | /app/BrainTest.php | UTF-8 | 439 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Brainer;
use Illuminate\Database\Eloquent\Model;
class BrainTest extends Model
{
public $timestamps = false;
/**
* Get the questions for BrainTest.
*/
public function questions()
{
return $this->hasMany('App\BrainQuestions');
}
/**
* Get the high scores fo... | true |
d9e0737f7b8e09967414351e47dbc932e6c8c80c | PHP | MariuszJu/Bleidd-Core | /src/core/Router/Router.php | UTF-8 | 7,572 | 2.65625 | 3 | [] | no_license | <?php
namespace Bleidd\Router;
use Bleidd\Util\ArrayUtil;
use Bleidd\Util\Inflector;
use Bleidd\Application\Runtime;
use Bleidd\Router\Exception\RouterException;
class Router
{
/** @var array */
private $routes = [];
/** @var Route */
private $route;
/**
* Router constructor
... | true |
e0dc56770373f34c9dab1ae5437bc7038e27e9f1 | PHP | Nolwennig/QcmCoreBundle | /Security/UserProvider.php | UTF-8 | 1,935 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Qcm\Bundle\CoreBundle\Security;
use Qcm\Bundle\CoreBundle\Model\User;
use Qcm\Component\User\Model\UserManagerInterface;
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
use Symfony\Component\Security\Core\... | true |
5d7f0571a107f1408ed47be0fb16be5afa9f8f83 | PHP | gdiazpromeba/produccion | /oad/impl/AtributosValorOadImpl.php | UTF-8 | 5,531 | 2.5625 | 3 | [] | no_license | <?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/produccion/oad/AOD.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/produccion/oad/AtributosValorOad.php';
require_once $_SERVER['DOCUMENT_ROOT'] . '/produccion/beans/AtributoValor.php';
//require_once('FirePHPCore/fb.php');
class AtributosValorOadImpl exten... | true |
6699def98d4dd6011e1ab5a9c2269d33b8516679 | PHP | Ditwo/badnet | /src/kpage/kiframe.php | UTF-8 | 1,573 | 2.90625 | 3 | [] | no_license | <?php
/*****************************************************************************
! Module : kPage
! File : $Source: /cvsroot/aotb/badnet/src/kpage/kobject.php,v $
! Version : $Name: HEAD $
! Revision : $Revision: 1.1 $
! Revised by : $Author: cage $
**********************************... | true |
f3a8cf2d9193c4f57ca20aab7f27d412d0b6cbc1 | PHP | RevolutionWL/INFS3208-Nginx-Deployment-Project | /application/controllers/Profile.php | UTF-8 | 1,261 | 2.53125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Profile extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->library('form_validation');
$this->load->model('register_model');
}
public function index() {
... | true |
1171c3b19687d480c31785075f1b96dd787a6a08 | PHP | dimonx3/symfony-shopify-bundle | /src/Api/Response/HtmlResponse.php | UTF-8 | 900 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace CodeCloud\Bundle\ShopifyBundle\Api\Response;
use Psr\Http\Message\ResponseInterface as PsrResponse;
class HtmlResponse implements ResponseInterface
{
/**
* @var PsrResponse
*/
private $response;
/**
* @param PsrResponse $response
*/
public function __construct(PsrR... | true |
4b1e1c39d86714787984762e283b093683e83227 | PHP | dkbakrecha/kalyani | /app/Model/Message.php | UTF-8 | 1,295 | 2.671875 | 3 | [] | no_license | <?php
class Message extends AppModel {
public $validate = array(
'name' => array(
'required' => array(
'rule' => array('notEmpty'),
'message' => 'please enter a valid name'
),
'between' => array(
'rule' => array... | true |
19b378f12bce8eba4b0480db2f28bb3271065b96 | PHP | fliglio/rest-gs | /src/main/Demo/Weather/Client/WeatherClient.php | UTF-8 | 805 | 2.875 | 3 | [] | no_license | <?php
namespace Demo\Weather\Client;
use Demo\Weather\Api\Weather;
use Fliglio\Logging\FLog;
use GuzzleHttp\Client;
class WeatherClient {
use FLog;
const URI = '/data/2.5/weather?units=imperial&q=';
private $client;
private $baseUrl;
private $api;
public function __construct(Client $client, $baseUrl, $api)... | true |
9bf734b23ed47b4fc554e1fd4e414390bb3f35f5 | PHP | ryanorsinger/codeup_exercises | /php/rough_drafts/internal-functions.php | UTF-8 | 584 | 3.859375 | 4 | [] | no_license | <?php
$nothing = NULL;
$something = '';
$array = array(1,2,3);
$things = $array($nothing, $something, $array);
// Create a function that checks if a variable is set or empty,
// and then display "$variable_name is SET|EMPTY"
foreach($nothing is $key => $value) {
}
isempty($)
// TEST: If var $nothing is set, d... | true |
70b5aa9aba9bfbc32b5a13df7e5396bf11ddc320 | PHP | alexelev/php_courses | /php005/3/classes/user.php | UTF-8 | 940 | 3 | 3 | [] | no_license | <?php
include_once 'base.php';
class User extends Base {
protected static $filename = 'users';
protected static $vars = ['login', 'password', 'email'];
protected static $items = [];
public function login() {
$_SESSION['user'] = $this->num;
}
public function logout() {
if (iss... | true |
25ba2fea0834cc912d9fc82283b8266fb61bc42f | PHP | Parabot/BDN-V3 | /src/Parabot/BDN/BotBundle/Entity/Types/Type.php | UTF-8 | 4,310 | 2.53125 | 3 | [] | no_license | <?php
/**
* @author JKetelaar
*/
namespace Parabot\BDN\BotBundle\Entity\Types;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\MappedSuperclass
*/
abstract class Type {
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id... | true |
a62abc5a9b44ecc01e0329582b11f7d45abe9bd4 | PHP | Myopengrid/mwi | /bundles/navigation/migrations/2012_08_18_014109_create_links_table.php | UTF-8 | 1,029 | 2.640625 | 3 | [
"MIT",
"LicenseRef-scancode-dco-1.1"
] | permissive | <?php
class Navigation_Create_Links_Table {
/**
* Make changes to the database.
*
* @return void
*/
public function up()
{
Schema::create('navigation_links', function($table)
{
$table->increments('id');
$table->string('title', 100)->default('');
$table->integer('module_id')->default('0')... | true |
588bf9f7ed81dd0466aebe7a803d1d1c571053c6 | PHP | corentin-begne/phalconTool | /src/Tools/Cli.php | UTF-8 | 3,840 | 3.65625 | 4 | [] | no_license | <?
namespace Phalcon\Tools;
/**
* Tool coloring cli text and background, using green (success), red (error), orange (warning) and black
*/
class Cli{
/**
* Red background color
* @var int
*/
const ERROR = 41;
/**
* Orange background color
* @var int
*/
const WARNING = 43... | true |
962a37e2c0c80e29fd05c9589b36f9a640d39369 | PHP | zhouweiit/myblog | /app/models/common/FileExtension.php | UTF-8 | 274 | 2.609375 | 3 | [] | no_license | <?php
namespace models\common;
class FileExtension {
private static $fileExtension = array(
'png','jpg','jpeg','gif','zip','rar','gz','txt','pdf','exe'
);
public static function getFileExtension(){
return self::$fileExtension;
}
} | true |
a7baf3f6b80b3402b326a62c328283aed98008fc | PHP | contactodohgerald/centadesk_project | /app/Model/Like.php | UTF-8 | 577 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Like extends Model
{
//
use SoftDeletes;
protected $primaryKey = 'unique_id';
public $incrementing = false;
protected $keyType = 'string';
function getAllLikes($condition, $... | true |
c871ad25b5a6e8c3913844c56772d3664803affe | PHP | angieRi/challengeDev | /wordsearch/WordSearch.php | UTF-8 | 6,881 | 3.453125 | 3 | [] | no_license | <?php
/*
TIP: La funcion getPosInBoard retorna la posición de una letra en el tablero
La podés usar en la implementacion de searchWord. Recorda que una matriz en PHP se accede como $board[$fila][$columna]
Ej.
$board = [
['a', 'b', 'c', 'd'],
['n', 'k', 'l', 'm'],
['o', 'f', 'z', 's']
];
getPosInBoard('l',... | true |
b45a31f9a68652f5ed2522124d601a28cd26b43a | PHP | TimLorent/Webprogrammeren-en-databases-agenda--webdb13IKC2- | /act_toegevoegd.php | UTF-8 | 2,628 | 2.796875 | 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" xml:lang="en" lang="en">
<head>
<title>Registratie</title>
</head>
<body>
<?php
// Variabelen aanmaken waar de gegevens in worden opgeslagen.
$titel = $_POS... | true |
992b13376cacdc40ff0037d2ef6d845dd83816ce | PHP | Islandhitman/newznab-tmux | /bin/safer_backfill_parts.php | UTF-8 | 3,176 | 2.796875 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
/*
This scripts backfills 100k parts, on ONE group from your active groups, reverse alphabetically, to a maximum of 2012-06-24. When that group is at 2012-06-24 it will move on to the next group.
*/
require(dirname(__FILE__)."/config.php");
require_once(WWW_DIR."/lib/backfill.php");
require_once(WWW_DIR."/lib/fra... | true |
01072479b6e42a48a4909bd135499d2f00bd4abb | PHP | rongself/simple-mvc | /library/Simple/Http/Response.php | UTF-8 | 2,011 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: rongself
* Date: 2015/4/6
* Time: 0:51
*/
namespace Simple\Http;
class Response {
protected $statusCode;
protected $headers = array();
protected $body;
public function __construct()
{
}
public function getHeader($key)
{
return $... | true |
7a226aaa5d000d9fda4e145f2fb2d3a7d83ce8ce | PHP | Pico-Development-JP/Pico | /update/update_run.php | UTF-8 | 1,541 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
require_once "update_util.php";
class Update_Run extends Update_Util{
public function run($file = null){
chdir(ROOT_DIR);
$this->loadConfig();
if(file_exists($file)){
include_once($file);
$module_name = preg_replace("/\\.[^.\\s]{3}$/", '', basename($file));
$obj = new $module_na... | true |
09e7b7f2c0113b946d624f70533606abb9bce250 | PHP | regorodrijl/DesarrolloWebServidor | /task3_2-ArraysAndStrings/task3-2.php | UTF-8 | 866 | 3.765625 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Task 3.2.- Arrays and Strings</title>
</head>
<body>
<?php
$array1 = array();
$information = "Tokyo,Japan,Asia;Mexico City,Mexico,North America;New York City,USA,North America;Mumbai,India,Asia;Seoul,Korea,Asia;Shanghai,China,Asia;Lagos,Nigeria,... | true |
418e804ee5e156d65e26f443ad02ffca4d8867aa | PHP | ElHombreSinNombre/laravel-vue | /laravelVue/app/Http/Requests/CarRequest.php | UTF-8 | 1,128 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Auth;
class CarRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return Auth::check();
}
/... | true |
7a8495472e70fe3758e6e7d331a75c20c9e85044 | PHP | kasim444/Yaz-Kamp-Linux-2018 | /Day-6/superglobals.php | UTF-8 | 1,257 | 2.609375 | 3 | [] | no_license | <?php
session_start();
$_SESSION['isim']="Kasim";
/*Http talebi ile gelen ve PHP tarafından belirli işlemer için belirli verileri saklayan ve PHP yorumlayıcısının dokunduğu her yerden erişilebilen süper değişkenlerdir.SÜPER
Dizi tipinde dönerler, ilgili alana ilişkin veri barındırırlar.
*GLOBALS
$_SERVERS
$_GET
$_... | true |
cc7800719e7212bb61853a9b8a9d12d4cb75572a | PHP | SunriseDigitalStudy/board_matsukawa | /common/models/Bd/Orm/Main/Base/Form/Genre.php | UTF-8 | 3,177 | 2.5625 | 3 | [] | no_license | <?php
abstract class Bd_Orm_Main_Base_Form_Genre extends Sdx_Form
{
private $_except_list = array();
private $_record = null;
public function __construct($name = "", array $attributes = array(), array $except_list = array(), Sdx_Db_Record $record = null)
{
$this->_except_list = $except_list;... | true |
5dc2bcc770d034cdcd37b91f3c500ed27f7f8fda | PHP | pitchounvivi/worlds-of-game-api | /src/Controller/DocumentationController.php | UTF-8 | 1,546 | 2.75 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
namespace Wog\Controller;
use Wog\Http\RequestInterface;
use Wog\Http\ResponseInterface;
class DocumentationController extends Controller
{
/**
* DocumentationController constructor.
* @param RequestInterface $request
* @param ResponseInterface $response
*/
public function __constr... | true |
5859ca79c2fd51aee8414ef467fa5b63f74d5976 | PHP | levabd/legacy-inposted | /source/shared/extensions/base/ErrorController.php | UTF-8 | 2,540 | 2.640625 | 3 | [] | no_license | <?php
/**
* @author: Yurko Fedoriv <yurko.fedoriv@gmail.com>
*/
namespace base;
use Yii, CHttpException, CHtml;
/**
* Controller to handle external exceptions.
*
* @author yurko
*/
class ErrorController extends \CController
{
public $defaultAction = 'error';
public function actionError() {
$err... | true |
c8674aa2acd4628fa95724dbb590591aea0580a3 | PHP | juanmrodri/template-schedule | /inc/modelos/modelo-contactos.php | UTF-8 | 4,248 | 3 | 3 | [] | no_license | <?php
// aca va lo de crear un elemento
if($_POST['accion'] == 'crear'){ // tomamos el id 'accion' del hidden input y nos basamos en su value 'crear'
// creará un nuevo registro en la base de datos
//requerimos la conexion a la bd
require_once('../funciones/bd.php');
//validar las entradas, para que ... | true |
248dbd275d37b8bb5af5e76b242b09dac861c4f7 | PHP | ronaldomb98/php | /cursoSENA/crudamigable/app/Http/Controllers/StudentController.php | UTF-8 | 1,350 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Student;
use App\Hobbie;
class StudentController extends Controller
{
//
public function index()
{
// Metodo para hobbies
$students = Hobbie::where('id', '<', 15)
->orWher... | true |
82af064f3b47f6c57f89e3f70471f828feb1c91e | PHP | Tyzito/mall | /app/admin/validate/AdminUser.php | UTF-8 | 607 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\admin\validate;
use think\Validate;
class AdminUser extends Validate
{
protected $rule = [
'username' => 'require',
'password' => 'require',
'captcha' => 'require|checkCaptcha',
];
protected $message = [
'username.require' => '用户名不能为空',
'pass... | true |
d3b7989f6e3bd2f88bc543f6f62e5fb8b3cbcac7 | PHP | rmstibbard/week-6--php-basics--02 | /13-largest.php | UTF-8 | 558 | 4.09375 | 4 | [] | no_license | <?php
/* Create a function, largest, that takes an array of numbers. Return the largest number. */
declare(strict_types=1);
function largest(array $values): int
{
$largestNumber = $values[0];
for ($i = 0; $i < count($values); $i += 1) {
if ($values[$i] > $largestNumber) {
$la... | true |
22564b8b5088ecd74b61542e9ca3c77e22ec8ba1 | PHP | yyang31/Projects | /SrvyProjFinal/adminLogin.php | UTF-8 | 2,062 | 2.71875 | 3 | [] | no_license | <!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
//Coonec... | true |
d8c4339df1df28e0f5a1074a1f9f97f19620c105 | PHP | zhangjianr/data | /xinghuo/include/helper/tools20150715.php | UTF-8 | 17,670 | 2.59375 | 3 | [] | no_license | <?php
/**
*去除字符串中的emoji表情
*/
function removeEmoji($text) {
$clean_text = "";
// Match Emoticons
$regexEmoticons = '/[\x{1F600}-\x{1F64F}]/u';
$clean_text = preg_replace($regexEmoticons, '', $text);
// Match Miscellaneous Symbols and Pictographs
$regexSymbols = '/[\x{1F300}-\x{1F5FF}]/u';
... | true |
b9ecda382ed98d4b2631962b7715a65224e91ad0 | PHP | iamarbabhussain/my-portfolio-v2 | /backend.php | UTF-8 | 402 | 2.515625 | 3 | [] | no_license | <?php
$name = $_POST['from_name'];
$from = $_POST['from_email'];
$message = $_POST['from_message'];
$to='arbabhussain168@gmail.com';
$subject = 'From arbabhussain.me';
$full_message = 'Name: '. $name . ' Email/Whatsapp: ' . $from . ' Message: ' . $message;
$from = 'From: info_arbabhussain.me@ya... | true |
a8be3b540352da9d5d64d70f796c8eb8c213d3a0 | PHP | tianmai2019/myproject | /database/migrations/2019_11_22_182240_create_yonghumap_table.php | UTF-8 | 1,028 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateYonghumapTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('yonghumap', f... | true |
15f7ba8610db1d748df81756875a7e8b0172c69f | PHP | physje/intranet | /openkerk/showRooster.php | UTF-8 | 2,962 | 2.5625 | 3 | [] | no_license | <?php
include_once('config.php');
include_once('../include/functions.php');
include_once('../include/config.php');
include_once('../include/HTML_TopBottom.php');
include_once('../include/pdf/config.php');
include_once('../include/pdf/3gk_table.php');
$db = connect_db();
$cfgProgDir = '../auth/';
$requiredUserGroups = ... | true |
99021d9348beaadf2b93458dc45e09343e34c066 | PHP | yoyosan/swarrot | /src/Swarrot/Broker/Message.php | UTF-8 | 1,685 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace Swarrot\Broker;
class Message
{
/**
* @var string
*/
protected $body;
/**
* Properties are similar to headers when using an \AMQPEnvelope object.
*
* @var array
*/
protected $properties;
/**
* @var int
*/
protected $id;
/**
* ... | true |
ed37b462f06777a51990659a9bf412bf050e8a6b | PHP | marscore/hhvm | /hphp/test/slow/ext_mongo/no-servers/bug00359.php | UTF-8 | 492 | 2.5625 | 3 | [
"Zend-2.0",
"PHP-3.01",
"MIT"
] | permissive | <?php
<<__EntryPoint>> function main() {
$id = new MongoId;
if (getmypid() <= 65536) {
$retval = $id->getPid() == getmypid();
} else {
$retval = true;
}
var_dump($id->getPid(), $id->__toString(), $retval);
$id = new MongoID("4fe3420a44415ecc83000000");
var_dump($id->getPid(), $id->__toString());
$id = new Mon... | true |
a8dbe33a74cb5b2bcdd9ed2aee56270d2bd356d9 | PHP | ninsuo/vote | /src/Command/UserListCommand.php | UTF-8 | 1,046 | 2.609375 | 3 | [] | permissive | <?php
namespace App\Command;
use App\Entity\User;
use App\Repository\UserRepository;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class UserListCommand extends Comma... | true |
4127df02715ccd7f5438a44ad39f47f094495b90 | PHP | Fouzia09/Quizz | /quizz-api/out/production/quizz-api/App\/Entity/User.php | UTF-8 | 3,227 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping\ManyToOne;
use Doctrine\ORM\Mapping\JoinColumn;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\Serializer\Annotation\Groups;
use ApiPlatform\Core\Annotation\ApiResource;
use App\Repository\UserRepository;
use Doctrine\ORM\Mappi... | true |
c6483b04ef5b219b0dcc2c4bc4e2c90a093abc96 | PHP | Pandahisham/Forum | /src/Qrokodial/Forum/Contract/ForumContract.php | UTF-8 | 963 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php namespace Qrokodial\Forum\Contract;
interface ForumContract {
/**
* Gets the Laravel relationship of the root sections listed in descending order by weight.
*
* @return \Illuminate\Database\Eloquent\Relations\Relation
*/
public function index();
/**
* Gets the name of the section class that is spec... | true |
34983138933f013310a48a8b33e8e95c5254b10c | PHP | codelego/phpfox-pf5 | /app/library/phpfox-paging/src/AbstractDecorator.php | UTF-8 | 592 | 3 | 3 | [] | no_license | <?php
namespace Phpfox\Paging;
abstract class AbstractDecorator implements DecoratorInterface
{
/**
* @var array
*/
protected $context = [];
/**
* AbstractDecorator constructor.
*
* @param array $context
*/
public function __construct(array $context)
{
$this... | true |
4112c3d8c426a3ee3ce656db666fa807736c6e62 | PHP | ParagonJenko/parents-evening | /scripts/parents-evening/students/appointment_system.php | UTF-8 | 8,661 | 3.40625 | 3 | [] | no_license | <?php
// Allows session variables to be used.
session_start();
// Includes the database configuration file.
require($_SERVER['DOCUMENT_ROOT'].'/parents-evening/server/config.php'); //Change to where it is stored in your website.
// Display the appointments already chosen by a user
function displayTimetable($conn)
{
/... | true |
fffc5538b8b78afc1a2a37e953cad4a952d545a3 | PHP | mic22/qaa | /models/answer.php | UTF-8 | 1,530 | 2.515625 | 3 | [] | no_license | <?php
class Answer extends AppModel {
var $name = 'Answer';
var $validate = array(
'content' => array(
'notempty' => array(
'rule' => array('notempty'),
//'message' => 'Your custom message here',
//'allowEmpty' => false,
//'required' => false,
//'last' => false, // Stop validation after this ... | true |
12079911446b2b1823502c5d4252b4b88966a684 | PHP | ibmohammed/Compute | /SEET/search_results.php | UTF-8 | 991 | 2.984375 | 3 | [] | no_license | search_results.php
<?php
$results = "";
$letter = "";
if(isset($_GET['letter']) && strlen($_GET['letter']) == 1){
$letter = preg_replace('#[^a-z]#i', '', $_GET['letter']);
if(strlen($letter) != 1){
echo "ERROR: HackAttempt, after filtration thevariable is empty.";
exit();
}
// Connect to databas... | true |
36de7ed47846884663104299323995a4396e4585 | PHP | Ragav-Subramanian/My-First-Website-Intern | /edit.php | UTF-8 | 2,897 | 2.515625 | 3 | [] | no_license | <?php
include("RagavDBConnection.php");
$edited=$_GET["eid"];
$sql_detail="SELECT Sno,Full_Name,Age,Gender,Mobile_No,Email_Id FROM User_Details WHERE Sno='{$edited}'";
$selectquery=mysqli_query($db,$sql_detail);
$userdetails=mysqli_fetch_array($selectquery);
//print_r($userdetails);
if($_POST)
{
$Sno=$_POST['sno']... | true |
ed7c229c6b9d63f6cba163015ebb8c6496a61845 | PHP | ghost073/project | /ci/csv_library.php | UTF-8 | 4,242 | 2.90625 | 3 | [] | no_license | <?php
/**
* 输出CSV 文件
*
* @author shaozhigang
* @date 2014/04/11
*/
class Csv {
// 文件名
private $filename = '';
// 文件句柄
private $fp;
public function __construct() {
}
//某一天启动明细
public function start_detail() {
// 获得参数
$appid = intval($this... | true |
76aacb2770ce7c325d2927c6528f9eb558efb984 | PHP | marcjoy/SpotWebTemplate | /spot/appointments.php | UTF-8 | 4,475 | 2.703125 | 3 | [] | no_license | <?php
//template.php_check_syntaxUse this file as a model for make new application pages
?>
<?php include 'includes/config.php'; ?>
<?php include 'includes/header_list.php'; ?>
<?php
if (isset($_POST['Email'])){
/*
echo '<pre>';
var_dump($_POST);
echo'</pre>';
*/
$url = 'https://www.google.com/... | true |
b62607bc68e06a7db383d5fe7411cfdda66acb02 | PHP | thekid/xp-experiments | /arena/lang/src/net/xp_lang/tests/syntax/php/CastingTest.class.php | ISO-8859-1 | 3,436 | 2.859375 | 3 | [] | no_license | <?php
/* This class is part of the XP framework
*
* $Id$
*/
$package= 'net.xp_lang.tests.syntax.php';
uses('net.xp_lang.tests.syntax.php.ParserTestCase');
/**
* TestCase
*
*/
class netxp_langtestssyntaxphpCastingTest extends netxp_langtestssyntaxphpParserTestCase {
/**
* Test a bool-c... | true |
06a3c43c2624eba0e0c3e458f1ce87fe2316d89d | PHP | James-WB/CS3319Assignment3 | /getCustomerPurchases.php | UTF-8 | 2,107 | 2.5625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Customers and Purchases</title> <!--title and style-->
<link rel="stylesheet" type="text/css" href="assignment3.css">
<link href="https://fonts.googleapis.com/css?family=Mali" rel="stylesheet">
</head>
<body>
<h1>Customers and Purchases</h1>
<br>
<hr>
<d... | true |
2a49a2e7a8074b08a73dcaa8dd897177d3522950 | PHP | OrlandoEscamilla/Web-Landing-Page-Fitleaf | /procesar.php | UTF-8 | 704 | 2.53125 | 3 | [] | no_license | <?php
include("conexion.php");
$nombre = $_POST['name'];
$correo = $_POST['email'];
$mensaje = $_POST['mensaje'];
$sql = "INSERT INTO prospectos (nombre, correo, mensaje) VALUES('$nombre', '$correo', '$mensaje')";
$ejecutar = mysqli_query($conexion, $sql) or die("problems in query: " . mysql_error());
... | true |
5f713dcf91b3bf9468cc9cfe2bc9207cb88ef8ed | PHP | aureanemoraes/vitrinevirtual | /app/Http/Resources/Phone.php | UTF-8 | 520 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class Phone extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
return... | true |
4649e0a59b836d0c00a3e23f3007b9be881e7bd1 | PHP | chrisjdavis/habari-system-0.10.1-alpha | /system/handlers/userthemehandler.php | UTF-8 | 2,180 | 3.109375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* @package Filmio
*
*/
namespace Filmio;
/**
* Class for handling default user theme actions.
*
* @note Any theme will be able to override these default actions by registering an override function with Theme->act_some_function()
*/
class UserThemeHandler extends ActionHandler
{
/**
* Constructor ... | true |
b8d0a30c3829597da02681c7ae6d984e5d88d274 | PHP | jonsnow1357/scry | /functions.php | UTF-8 | 9,139 | 2.703125 | 3 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | <?php
//
// SPDX-License-Identifier: BSD-3-Clause
//
// !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// !! !!
// !! NOTE - this file does not need to be edited; see setup.php !!
// !! ... | true |
baedc277ef9ce453e88382cf49ac3565b828ccf3 | PHP | LeoBlanco15/Programacion3-TP-2021 | /clases/Restaurante/Mesa.php | UTF-8 | 288 | 2.5625 | 3 | [] | no_license | <?php
require '../Usuarios/Mozo.php';
class Mesa
{
public $_id;
public $_numeroIntegrantes;
public $_mozo;
public __construct($id, $integrantes, $mozo)
{
$this->_id = $id;
$this->_numeroIntegrantes = $integrantes;
$this->_mozo = $mozo;
}
} | true |
1efb9b7dce12bbbfe10162548b2d1295d135542e | PHP | manf11/oopphp | /namespace/index.php | UTF-8 | 457 | 2.609375 | 3 | [] | no_license | <?php
require_once 'App/init.php';
// $produk1 =new Komik("naruto","ahlis","gramed",1000,100);
// $produk2 =new Game("blade","sahal","sony computer",20000,50);
// $cetakProduk = new CetakInfoProduk();
// $cetakProduk->tambahProduk($produk1);
// $cetakProduk->tambahProduk($produk2);
// echo $cetakProduk->cetak();
//... | true |
b40b13509f71c6cb5aee387880bac5f37af94b09 | PHP | sousaku/paiza | /20170516/D_038.php | UTF-8 | 61 | 2.578125 | 3 | [] | no_license | <?php
$N = trim(fgets(STDIN));
echo $N * ($N - 1) / 2;
?>
| true |
24c8e9066c3c92bd7b0894be16c09601f8689e32 | PHP | JoelleCastelli/CritiCalendar | /app/Http/Requests/UserRequest.php | UTF-8 | 1,081 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;
use Illuminate\Validation\Rule;
class UserRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function a... | true |
87ed113966130d85d42d468cc14e7fd56f2c5b16 | PHP | all-ride/ride-lib-mvc | /src/ride/library/mvc/controller/Controller.php | UTF-8 | 850 | 2.875 | 3 | [] | no_license | <?php
namespace ride\library\mvc\controller;
use ride\library\mvc\Request;
use ride\library\mvc\Response;
/**
* Interface for a controller of an action
*/
interface Controller {
/**
* Sets the request for this controller
* @param \ride\library\mvc\Request $request The request
* @return null
... | true |
b4aabd608e020cd742776d136f6950904259de5c | PHP | hparadiz/emergence-skeleton | /php-classes/Cache.class.php | UTF-8 | 2,103 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
class Cache
{
public static function getKeyPrefix()
{
return Site::getConfig('handle').':';
}
public static function localizeKey($key)
{
return static::getKeyPrefix().$key;
}
public static function fetch($key)
{
return apc_fetch(static::localizeKey($key))... | true |
e7bef843bd1c041450be9f37f66e4f82aec5b760 | PHP | Tibimac/SecretBox | /includes/add.php | UTF-8 | 2,997 | 2.53125 | 3 | [] | no_license | <form method="POST"action="index.php?p=<?php echo $p; ?>&action=add">
<?php
if(!empty($_POST))
{
traitementAffichage($p, $_POST);
}
include("includes/forms/form_add_$p.php");
?>
<br/>
<br/>
<span class="nodisplay">Réinitialiser :</span><input type="reset" id="reset" value=" " onclick="reinitForm('<... | true |
8543fecec7f28efef8f1fe2bbb4d41e0e58cec4c | PHP | vukhuu/yii2-skeleton | /scripts/build.php | UTF-8 | 7,678 | 2.953125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Build script for the project
*
* @category Build
* @package Skeleton
* @author Vu Khuu <vu.khuu@gmail.com>
* @license BSD <http://www.bsd.org/>
* @link https://
*/
$root = realpath(dirname(__FILE__).'/../');
require_once $root.'/vendor/autoload.php';
/**
* Class Builder which is responsi... | true |
e3014c66fe26b3bb6f9a6d61330201f4b78f3518 | PHP | ikeba33/php_lab_4 | /user-search.php | UTF-8 | 1,073 | 2.59375 | 3 | [] | no_license | <?php
require_once __DIR__ . '/core/main_functions.php';
use \core\Users;
checkPermissions([Users::ROLE_ADMIN, Users::ROLE_MANAGER]);
$user_o = new Users();
$available_filters = ['first_name', 'last_name', 'lang'];
$conditions = array_intersect_key($_GET, array_flip($available_filters));
if(!empty($conditions)) {... | true |
ff40466b185e5bbbad32a6df3dddd81dafb8d53c | PHP | filcpress/framework | /src/Models/Post.php | UTF-8 | 721 | 2.765625 | 3 | [] | no_license | <?php
namespace FilcPress\Models;
use WP_Post;
class Post
{
/**
* @var WP_Post
*/
public $post;
/**
* @param WP_Post $post
*/
public function __construct(WP_Post $post)
{
$this->post = $post;
}
public function title()
{
if ($this instanceof Curren... | true |
eca91312c24d20d4a5963c7c2829d4b32a89d0f5 | PHP | Bastian2098/Chronicles-WoW | /index.php | UTF-8 | 852 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
</head>
<body>
<?php
session_start();
require "logic/user.php";
$pgWithoutSession = array("view/recoverPass.php", "view/au... | true |
a393c88d9c516558c2102ee371906b1c45db1b31 | PHP | 2002PHP/2002PHP | /ALL/fangwenliang.php | UTF-8 | 169 | 2.640625 | 3 | [] | no_license | <?php
$f = "./num";
$number = file_get_contents($f);
$number = $number + 1;
file_put_contents($f,$number);
echo "访问量: ",$number;echo '</br>'; | true |
fabac933b73a33c458231955618c6d6b4268b899 | PHP | kkyouhei/skit | /app/models/event.php | UTF-8 | 1,113 | 2.84375 | 3 | [] | no_license | <?php
class Event extends AppModel{
var $name = 'Event' ;
//conditionsの配列を受け取り検索するメソッド
function findEvent($whereEvent=null, $field=null, $order=null){
return $this->find('all',
array('fields'=>$field,
'order'=>$order,
'conditions'=>$whereEvent)
);
}
//event表からイベント日を取得するメソッド
/... | true |
66a32ead77bc3937369b89928867499f8cbeafec | PHP | shyclown/CMS-System | /class_file.php | UTF-8 | 2,689 | 2.953125 | 3 | [] | no_license | <?php
/**
*
*/
class File
{
private $filesize;
private $upload_location;
function __construct()
{
$this->db = new Database;
$this->filesize = 4000000;
}
function create_folder(){
// create folder for user if it doesnt exist
// runs after registration
}
public function list_all()
{
... | true |
d87acf1330ce6ad829e2c59ff0e1f9d1be882ae9 | PHP | MazitovRI/hercules | /models/CompetitiveCard.php | UTF-8 | 1,741 | 2.6875 | 3 | [] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "competitive_card".
*
* @property int $id
* @property int $employee_id
* @property string $status
* @property string $code
*
* @property Employee $employee
* @property CompetitiveCardItem[] $competitiveCardItems
* @property Progec... | true |
60732526e01e4974ac328f5391a5986cd87cdb6c | PHP | d3m37r4/gmx-web | /src/Core/Lang/Language.php | UTF-8 | 4,151 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace GameX\Core\Lang;
use \GameX\Core\Lang\Interfaces\Loader;
use \GameX\Core\Lang\Interfaces\Provider;
use \GameX\Core\Lang\Exceptions\BadLanguageException;
use \GameX\Core\Lang\Exceptions\CantReadException;
class Language
{
const HTTP_ACCEPT_PATTERN = '/([[:alpha:]]{1,8}(?:-[[:alpha:]|-]{1,8})?)(?:\... | true |
1a5aac026a84143c457850e2fdff294853a9f2d1 | PHP | muthiaana/request | /application/controllers/Auth.php | UTF-8 | 3,674 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Auth extends Core_Controller {
function __construct(){
parent::__construct();
}
public function index(){
$username = $this->session->userdata('username');
if (!empty( $username ) ) {
$this->_Redirect();
}else{
//Form Valida... | true |
3468224eafbd928a50affd06c346051537df4dbb | PHP | oligus/jad | /src/Serializers/EntitySerializer.php | UTF-8 | 4,359 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Jad\Serializers;
use Doctrine\ORM\PersistentCollection;
use Exception;
use Jad\Common\ClassHelper;
use Jad\Common\Text;
use Jad\Document\Resource;
use Jad\Exceptions\JadException;
use Jad\Exceptions\SerializerException;
use ReflectionException;
/**
* Class EntitySerializer
... | true |
274e115f1856cfe245e1de1bfad6e97e1476a964 | PHP | euautomation/canon | /src/Value/Functions/LengthFunction.php | UTF-8 | 361 | 2.8125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace EUAutomation\Canon\Value\Functions;
use EUAutomation\Canon\Value\FunctionValue;
class LengthFunction extends FunctionValue
{
/**
* @var int
*/
protected $requiredArguments = 1;
/**
* @param array $args
* @return int
*/
protected function execute($args)
{
... | true |
20b2b50b93bc19fde6c15d3861d05a92c0418bb7 | PHP | adedayomatt/shelter | /admin/actions/updatedetailscript.php | UTF-8 | 1,203 | 2.6875 | 3 | [] | no_license | <?php
require('../../resources/master_script.php');
$exist = 0;
$lost = 0;
//get all the ones in the database
$lost_dir = array();
$properties =$db->query_object("SELECT property_ID,directory,type FROM properties");
echo "<p> $properties->num_rows total record found in the database</p>";
while($p = $properties->fetch_... | true |
3e508fefae8fda896d3e517bedcafa783cc92ad3 | PHP | dashen-zky/QMG | /qmgerp.com/backend/modules/rbac/model/Assignment.php | UTF-8 | 2,492 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017/4/3 0003
* Time: 下午 5:53
*/
namespace backend\modules\rbac\model;
use backend\modules\hr\models\EmployeeBasicInformation;
use Yii;
use backend\models\interfaces\DeleteRecordOperator;
use backend\models\interfaces\RecordOperator;
use yii\db\Excep... | true |
610bfb40fdf7d57724e33fbf7e7c14928e9efd60 | PHP | joannahogberg/thenr1blog | /includes/login.php | UTF-8 | 4,251 | 2.875 | 3 | [] | no_license | <?php
session_start();
include '../error.php';
require '../classes/Users.php';
require '../classes/Blogpost.php';
require '../classes/Database.php';
// get action from button onclick actions
$action = isset( $_GET['action'] ) ? $_GET['action'] : "";
switch ( $action ) {
case 'login':
login();
break;
case '... | true |
cba72000ad03c5d8ed6df9363c1e4e0925311cbd | PHP | igops/php-deployer | /src/Kernel/Config/DeploymentConfig.php | UTF-8 | 1,452 | 2.515625 | 3 | [] | no_license | <?php
namespace Kugaudo\PhpDeployer\Kernel\Config;
use Kugaudo\PhpDeployer\Kernel\Config\Connector\RemoteConnectorConfig;
use Kugaudo\PhpDeployer\Kernel\Config\Target\RollBackConfig;
use Kugaudo\PhpDeployer\Kernel\Config\Target\RollOutConfig;
class DeploymentConfig
{
/** @var RollOutConfig */
private $roll... | true |
d3e528c0a5fb3d584c563cc976112c231fe60e2d | PHP | mathCodingClub/mcc-php-backend | /obj/instagram/instagram.php | UTF-8 | 4,047 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace mcc\obj\instagram;
class instagram {
static private $accessToken;
static private $TMPKEY;
const CACHE_TIME = 30;
static public function config($accessToken) {
$mid = array_key_exists('SERVER_NAME', $_SERVER) ? $_SERVER['SERVER_NAME'] : 'cli';
self::$TMPKEY = 'mcc-instagram-' . $mid ... | true |
564c8c4fa2f6c357de209dab5341ff3b6543210f | PHP | sebastiansulinski/laravel-pagination | /tests/FoundationTest.php | UTF-8 | 2,887 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php namespace Test;
use Illuminate\Pagination\LengthAwarePaginator;
use SSD\Pagination\Foundation;
class FoundationTest extends BaseCase
{
/**
*
* Checks for empty result with empty collection.
*
* @test
*
*/
public function foundation_returns_null_with_empty_collection()
... | true |
00438be973d47af4fc94bcce67df91df8c5c69f9 | PHP | ljvicente/bnc-php | /src/BNC/QueryTrait.php | UTF-8 | 862 | 2.90625 | 3 | [] | no_license | <?php
namespace ljvicente\BNC;
/**
* Api helper functions.
*
* @author Leo <jemnuineuron@gmail.com>
*/
trait QueryTrait
{
/**
* Set custom filters.
*
* @param array $filter_array
* @return Company
*/
public function filter($filter_array)
{
$filters = self::DEFAULT_FILT... | true |
96871e6da87592b8bd6ff41ac4336015521cde9b | PHP | square/square-php-sdk | /src/Models/UpdatePaymentLinkRequest.php | UTF-8 | 1,400 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace Square\Models;
use stdClass;
class UpdatePaymentLinkRequest implements \JsonSerializable
{
/**
* @var PaymentLink
*/
private $paymentLink;
/**
* @param PaymentLink $paymentLink
*/
public function __construct(PaymentLink $paymentLink)
... | true |
d159095eaebdbb9d3d5be066a108e133ab571eb2 | PHP | denissolomkin/lotzon | /protected/application/model/processors/GameSettingsDBProcessor.php | UTF-8 | 1,245 | 2.921875 | 3 | [] | no_license | <?php
class GameSettingsDBProcessor
{
public function update(Entity $game)
{
$sql = "REPLACE INTO `GameSettings` (`Key`, `Title`, `Options`, `Games`) VALUES (:key, :gt, :opt, :gms)";
try {
DB::Connect()->prepare($sql)->execute(array(
':key' => $game->getKey(),
... | true |
188bd5e501e868c379d5ab9a7befa30d0f3070da | PHP | khavernathy/quac | /ajax/echoEmployeeTrans.php | UTF-8 | 1,403 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | <?php
header('Content-type: application/json');
session_start();
include('../includes/database.php');
include('../includes/datetime_functions.php');
$output = '';
if (!isset($_GET['selected_id']))
{
echo 'No ID was specified (or no employee was clicked)';
}
else
{
$id = $_GET['selected_id'];
$_SESSION['lastEmployeeH... | true |
88c9864d2402543ff8e43041f584321031e65bce | PHP | HamzaHAMADI/DevOps | /GestionEtudiant.php | UTF-8 | 2,600 | 2.953125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Hamza tuni
* Date: 09/01/2018
* Time: 19:14
*/
include "Config.php";
include "Etudiant.php";
class GestionEtudiant
{
public $pdo;
function __construct()
{
$c=new Config();
$this->pdo=$c->connexion();
}
function ajouterEtudiant ($e) {
$r... | true |
91b52d4d78ed959598f39339080d5bd31c2a2d7f | PHP | maetl/ransack | /lib/ransack/CodeSniffer.class.php | UTF-8 | 2,060 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
/**
* $Id$
* Copyright (c) 2008-2009 maetl (http://maetl.net)
* Free Software under the conditions of LICENSE.
*/
/**
* @package ransack
* @subpackage analysis
*/
require_once 'PHP/CodeSniffer.php';
if (!defined('TMP_DIR')) define('TMP_DIR', sys_get_temp_dir());
/**
* Uses PHP CodeSniffer to check a pr... | true |
65ceb14312f393542431d746773658ea03db805e | PHP | LPtichka/lk.letitprichka.ru | /models/Common/MarriageDish.php | UTF-8 | 2,423 | 2.875 | 3 | [] | permissive | <?php declare(strict_types=1);
namespace app\models\Common;
use app\models\Helper\Phone;
use app\models\Repository\Dish;
use yii\base\Model;
/**
* Class Route - Маршрут
*
* @package app\models\Common
*/
class MarriageDish extends Model
{
/** @var string */
private $time;
/** @var string */
private... | true |
a4ea6bc262c09c8fc2082fb94f37391cd9313c23 | PHP | retailcrm/aliexpress-top-client | /src/Model/Entity/SimpleMoney.php | UTF-8 | 575 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* PHP version 7.3
*
* @category SimpleMoney
* @package RetailCrm\Model\Entity
*/
namespace RetailCrm\Model\Entity;
use JMS\Serializer\Annotation as JMS;
/**
* Class SimpleMoney
*
* @category SimpleMoney
* @package RetailCrm\Model\Entity
*/
class SimpleMoney
{
/**
* @var string $currenc... | true |
404d49fef0e599843166352ad4441ef2f94734a1 | PHP | HellVinc/agro | /console/migrations/m170707_122240_create_favorites_table.php | UTF-8 | 788 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Handles the creation of table `favorites`.
*/
class m170707_122240_create_favorites_table extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->createTable('favorites', [
'id' => $this->primaryKey(),
'object_id'... | true |
885acbd10967891d763739f87156cd25f6286712 | PHP | hmshafeeq/userstamps | /src/UserstampTrait.php | UTF-8 | 7,942 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace VelitSol\Userstamps;
trait UserstampTrait
{
/**
* Store the relations
*
* @var array
*/
private static $dynamic_relations = [];
// Contains the userstamp fields which depend on a model event
// Contains the userstamp fields which depends upon certain expressions... | true |
3f923ef5e35278a06daa481696ca3fa8cf9b88ff | PHP | LanderVerschueren/web-backend-oplossingen | /oplossing-opdracht-todo/todo.php | UTF-8 | 2,543 | 2.859375 | 3 | [] | no_license | <?php
session_start();
if( isset($_POST['submit']) ) {
$_SESSION['todos'][] = $_POST['todo'];
$sessionlengthtodos = count($_SESSION['todos']);
}
if( isset($_POST['done']) ) {
$postnumber = $_POST['done'];
$diddone = $_SESSION['todos'][$postnumber];
$_SESSION['done'][] = $diddone;
unset( $_SESSION['tod... | true |