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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
5968f9f7e0d4fa9012273cd09e6e0732db8119cb | PHP | rbright55/game_spot | /app/classes/GoogleAuth.php | UTF-8 | 1,567 | 2.71875 | 3 | [] | no_license | <?php
class GoogleAuth
{
protected $db;
protected $client;
public function __construct(DB $db = null, Google_Client $googleClient = null)
{
$this->db = $db;
$this->client = $googleClient;
if($this->client)
{
$this->client->setClientId('client_id');
$this->client->setClientSecret('client_secret');
... | true |
f555f43a5f0c18a3fcc59e00e9ab86ded50971c7 | PHP | ChenXL581X/distributedcourse | /HQDC/class/Notice.php | UTF-8 | 155 | 2.59375 | 3 | [] | no_license | <?php
class Notice extends Info{
public function __construct() {
$this->_db = DB::getInstance();
$this->setTableName("notice");
}
} | true |
e0ce89af724ac920d9230e0e05d118c557ef40f9 | PHP | MattiloDev/Film-Website | /genre.php | UTF-8 | 2,258 | 3.203125 | 3 | [] | no_license | <?
/**
* genre.php
*
* Responsible for rendering links to films of the selected genre
*
* @category php file
* @author Matthew Hutchings
*
*/
?>
<!doctype html>
<?
/**
* if statement to check what id has been passed into genre.php
*
* @param id, int, id passed into the url to detirmine which genre has... | true |
44b31c8b89449de697400b9d652c5dde9ff64aeb | PHP | ernst77/pdftron | /src/Flattener.php | UTF-8 | 2,272 | 2.53125 | 3 | [] | no_license | <?php
namespace PDFNet\PDFTron;
class Flattener
{
public $_cPtr = null;
protected $_pData = array();
function __set($var, $value)
{
if ($var === 'mp_impl') return Flattener_mp_impl_set($this->_cPtr, $value);
if ($var === 'thisown') return swig_PDFNetPHP_alter_newobject($this->_cPtr, $... | true |
d8b0df51b64abf9a1fdbf29263e2ae6ea7528fea | PHP | ReymondEspinosa/appetiser-coding-challenge | /database/migrations/2020_10_12_095701_create_representation_days_table.php | UTF-8 | 950 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateRepresentationDaysTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('repr... | true |
f7b23cc8aab789b3e73dd1788cde7d71c5d9d160 | PHP | OXID-eSales/PHP-Selenium | /src/Selenium/Specification/Parameter.php | UTF-8 | 1,366 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of PHP Selenium Library.
* (c) Alexandre Salomé <alexandre.salome@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Selenium\Specification;
/**
* Representation of a Selenium method... | true |
bf0436d937b7ddb574b88eb1e70a94979a5b381b | PHP | itk-dev/serviceplatformen | /lib/Oio/Ebxml/SuiteIdentifier.php | UTF-8 | 888 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace Oio\Ebxml;
/**
* Class representing SuiteIdentifier
*
* Identification which describes the location of a specific entrance door on a floor or level (repos) in the staircase referred to.
*/
class SuiteIdentifier
{
/**
* @var string $__value
*/
private $__value = null;
/**
... | true |
c5d4b4261d6484e8c3d0b68bd14fac01753ef31f | PHP | iratesoft/irate-basic | /Application/Models/UserModel.php | UTF-8 | 2,829 | 3.25 | 3 | [] | no_license | <?php
namespace Application\Models;
use Irate\System;
/**
* UserModel model
*/
class UserModel extends \Irate\Core\Model {
// Set public class variables
public $isGuest = true;
public $identity = false;
// Error is set during registration and login methods.
public $error = false;
// Storing user i... | true |
5b1f777eaa28c07b32001a85ed24e5231797f126 | PHP | jlarao/rest | /api/include/model/extend/model.login.inc.php | UTF-8 | 6,082 | 2.578125 | 3 | [] | no_license | <?php
require FOLDER_MODEL_BASE . "model.base.login.inc.php";
class ModeloLogin extends ModeloBaseLogin
{
#------------------------------------------------------------------------------------------------------#
#----------------------------------------------Propiedades------------------------------------------... | true |
f443c0f8a5029018dacf90b036e2ca7f4bb9f3c1 | PHP | MrRakhim/shop | /server/users/login.php | UTF-8 | 673 | 2.5625 | 3 | [] | no_license | <?php
$email = $_POST['login_email'];
$password = $_POST['login_password'];
include '../database.php';
$exists = $db -> query("SELECT * FROM Users WHERE email = '$email'");
if ($exists -> num_rows > 0) {
$user = $exists -> fetch_object();
if ($user -> password === md5(md5($password))) {
session_start()... | true |
48bc7d647058240caa6951b7ebac41302f9357c2 | PHP | Alexander637/phpLessons | /HomeTask5/quiz_solve-master/src/Struct/ProfileInterface.php | UTF-8 | 296 | 2.984375 | 3 | [] | no_license | <?php
namespace QuizProcessing\Struct;
interface ProfileInterface
{
/**
* Get first name.
*
* @return string
*/
public function getFirstName(): string;
/**
* Get last name.
*
* @return string
*/
public function getLastName(): string;
} | true |
4a0a399b328fe1927785efc5879146b0c7ebcdc7 | PHP | annacover/4ax_MegaHamster_191001 | /Classes/AbstractClasses/AbstractRoom.php | UTF-8 | 819 | 3.359375 | 3 | [] | no_license | <?php
namespace Annacover\Megahamster\AbstractClasses;
abstract class AbstractRoom
{
protected $name;
protected $price;
protected $equipment;
function __construct(string $name, float $price, string $equipment)
{
$this->name = $name;
$this->price = $price;
$this->equipment =... | true |
ec6d599718b8252ca1b1b85cebc7e3284cc162a5 | PHP | barretron/phphaml | /includes/haml/HamlFilters.php | UTF-8 | 835 | 3 | 3 | [] | no_license | <?php
function __interpolate($str) {
return preg_replace("/#\{([a-z0-9_ \\/+*()&|~!^$<>-]+)\}?/i", "<?php echo $1 ?>", $str);
}
function __normalize($str) {
return $str;#str_replace("\xD", "\n", $str);
}
function _cdata($str) {
$str = __interpolate($str);
return <<<HERE
<![CDATA[
$str
]]>
HERE;
}
//[a-z0-... | true |
287b13fe2b40ab357a7f4f79122c9e475b25aa59 | PHP | chenyongze/ApiManager | /models/ModifyLogs.php | UTF-8 | 982 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "modify_logs".
*
* @property string $id
* @property string $userId
* @property string $editTime
* @property string $content
* @property string $apiId
*/
class ModifyLogs extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
... | true |
27d554690b4bcbe641db42a25afab0436c55b197 | PHP | Zinedine038/WideWorldImports | /Code/inloggen.php | UTF-8 | 11,414 | 3.078125 | 3 | [] | no_license | <?php
// Zet de header in de pagina en intialiseert en prepareert variabelen.
include "header.php";
$postcode="";
$huisnummer="";
$plaats="";
$straat="";
$voornaam="";
$achternaam="";
$email="";
$wachtwoord="";
$spam="";
if (isset($_POST["voornaam"])) {
$voornaam=$_POST["v... | true |
94702d18224055c3f726bb8670c1d2c674537892 | PHP | Tdilotsotlhe/Camagru | /functions/login2.php | UTF-8 | 1,459 | 2.71875 | 3 | [] | no_license | <?php
require_once "../config/database.php";
/* echo $_POST['uname'];
echo $_POST['pwrd']; */
$user = $_POST['uname'];
$pwrd = $_POST['pwrd'];
function setlogin($row)
{
$_SESSION['uid'] = $row['user_id'];
$_SESSION['username'] = $row['username'];
$_SESSION['emailnotif'] = $row["notification"];
}
try {
$... | true |
825898097253713fea95303f5dd16b5ecbe21fe8 | PHP | pc-codyh/pongchamp2014 | /stats/game-results.php | UTF-8 | 1,586 | 2.8125 | 3 | [] | no_license | <?php
session_start();
require '../database-connect.php';
$season = $_GET['season'];
if ($season == 'overall')
{
$gamesQuery = 'SELECT * FROM `games` WHERE `id_registrations`="'.$_SESSION['userID'].'" ORDER BY `id` DESC';
}
else
{
$gamesQuery = 'SELECT * FROM `games` WHERE `id_registrations`="'.$_SESSION['userID'... | true |
c3e6ae04ae5c78f22c5ffff0be96329eff6f1b94 | PHP | brunosilvadaniel/i3geo | /ferramentas/saiku/esquemaxml.php | UTF-8 | 33,432 | 2.515625 | 3 | [] | no_license | <?php
include(dirname(__FILE__)."/../../classesphp/funcoes_gerais.php");
include(dirname(__FILE__)."/../../classesphp/classe_metaestatinfo.php");
if(!isset($dir_tmp)){
include(dirname(__FILE__)."/../../ms_configura.php");
}
if(isset($statusFerramentas) && $statusFerramentas["saiku"] != true){
exit;
}
//testa pr... | true |
6473c0e895152bdf0bd55f2993aa4f4150a0719c | PHP | viniciusfeld/MarketPlace-Laravel | /routes/web.php | UTF-8 | 6,114 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use App\Http\Controllers\Admin\CategoryController;
use App\Http\Controllers\Admin\ProductController;
use App\Http\Controllers\Admin\ProductPhotoController;
use App\Http\Controllers\Admin\StoreController;
use App\Http\Controllers\CartController;
use App\Http\Controllers\CheckoutController;
use App\Http\Controller... | true |
5d99a5d41ed305ccec3c981559a12e418a140723 | PHP | marcodeltongo/logicoder | /libs/logicoder/logger/dummy.php | UTF-8 | 746 | 2.546875 | 3 | [] | no_license | <?php
/**
* Logicoder Web Application Framework - Dummy Logger
*
* @package Logicoder
* @copyright Copyright (c) 1999-2007, Marco Del Tongo
* @license http://logicoder.com/documentation/license.html
* @version $Id$
*/
// -----------------------------------------------------------------------------... | true |
f87681578f1998ba8ba2f150163060788a7475ba | PHP | tonio71/Kubo | /Projeto/bibl/Controller/emprestimosController.php | UTF-8 | 4,653 | 2.609375 | 3 | [] | no_license | <?php
include_once '../Persistence/connection.php';
include_once '../Persistence/EmprestimoDAO.php';
include_once '../Model/Emprestimo.php';
class EmprestimoController{
public function __construct(){}
public function cadastrarEmprestimo($bibl, $aluno, $livros, $dataDevolucao){
... | true |
53c345a589ddcbe9924d90bd1657873c870b246b | PHP | VadyaOleniuk/test_google_map | /models/Area.php | UTF-8 | 1,079 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "area".
*
* @property integer $id
* @property string $name
*
* @property City[] $cities
* @property UsersAdress[] $usersAdresses
*/
class Area extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static funct... | true |
345e17ad3b3763a1a2ad3c433e72daeadfa4dfe1 | PHP | Mighelxd/PsyMeet-C12 | /storage/SchedaFollowUp.php | UTF-8 | 3,604 | 2.875 | 3 | [] | no_license | <?php
/*
* Sedute
* Questa classe contiene le informazioni relative all'oggetto scheda follow up
* Autore: Capone Francesco
* Versione: 1.0
* 2020 Copyright by PsyMeet - University of Salerno
*/
class SchedaFollowUp
{
public static $tableName='schedafollowup';
private $idScheda;
private $data;
private $ric... | true |
2db01378843f059e1177ce09d564b2b2854b50b3 | PHP | autumnzest/cloud | /reg.php | UTF-8 | 1,187 | 2.546875 | 3 | [] | no_license | <?php
if(!isset($_POST['submit'])){
exit('エラー!');
}
$username = $_POST['username'];
$password = $_POST['password'];
//注册信息判断
if(!preg_match('/^[\w\x80-\xff]{3,15}$/', $username)){
exit('error:username is unavailiable。<a href="javascript:history.back(-1);">return</a>');
}
if(strlen($password) < 4){
exit('err... | true |
5b5630e3868e0572338165b499e4651915b41561 | PHP | ASDAFF/bxApiDocs | /modules/sale/mysql/basket.php | UTF-8 | 77,853 | 2.609375 | 3 | [] | permissive | <?
require_once($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/sale/general/basket.php");
use \Bitrix\Main\Localization;
/**
*
*
*
* @return mixed
*
* @static
* @link http://dev.1c-bitrix.ru/api_help/sale/classes/csalebasket/index.php
* @author Bitrix
*/
class CSaleBasket extends CAllSaleBasket
{
/**
* The... | true |
6eb39d6029393056f8ca3ad1adc94d56ea217db3 | PHP | SkilaLee/blog | /winter_blog/php/paging.php | UTF-8 | 3,582 | 2.9375 | 3 | [] | no_license | <?php
function ff_page($content,$page)
{
global $expert_id;
if (empty($page)) {
$page = 1 ;
} //给$page赋初始值
$PageLength = 2000; //每页字数
$CLength = strlen($content); //文章长度
$PageCount = floor(($CLength / $PageLength)) + 1; //计算页数
$PageArray=a... | true |
872c5d9513a16dc08937c12cb625a8345c2e6301 | PHP | patrykwozinski/autonomous-cars | /src/Module/Speedometer/Main/Infrastructure/ReadModel/InMemorySpeed.php | UTF-8 | 424 | 2.671875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Module\Speedometer\Main\Infrastructure\ReadModel;
use App\Module\Speedometer\IO\Output\CurrentSpeed;
use App\Module\Speedometer\Main\Application\Query\CurrentSpeedQuery;
use App\Module\Speedometer\Main\Domain\SpeedometerId;
final class InMemorySpeed implements CurrentSpe... | true |
c661b78e64234aea556068fa16c477032b7b5d88 | PHP | kuzuha/Phunk | /src/Phunk/Collaborator/Head.php | UTF-8 | 496 | 2.53125 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace Phunk\Collaborator;
class Head implements \Phunk\Collaborator
{
/**
* @static
* @param callable $app
* @param array $options
* @return callable
*/
static function collaborate(callable $app, array $options = array())
{
return function($env) use ($app)
... | true |
f0712338f364c31de44fca43b3accd591c7006a1 | PHP | vasilens/Youtube | /public/model/UserDAO.php | UTF-8 | 6,345 | 2.828125 | 3 | [] | no_license | <?php
namespace model;
use PDOException;
class UserDAO extends AbstractDAO
{
/**
* @return void
*/
protected function setTable()
{
$this->table = 'users';
}
/**
* @param User $user
*
* @return bool
*/
public function registerUser(User $user): bool
{
... | true |
8674a72fdccb446e7469b370b016af151f3045c4 | PHP | livinskull/Nimda3 | /plugins/user/ChallengeStats/sites/InfoMirmo.php | UTF-8 | 1,233 | 2.71875 | 3 | [] | no_license | <?php
class InfoMirmo extends ChallengeStats {
public $triggers = array('!im', '!infomirmo');
protected $url = 'http://www.infomirmo.fr';
protected $profileUrl = 'http://www.infomirmo.fr/challenge/statchallenger.php?user=%s';
protected $statsText = '{username} solved {challs_solved} (of {challs_total})... | true |
16059fdc51f75d4e19d5385bb280d9ffa554806c | PHP | Loweville/SkillStream | /SkillStream/v1 - Original/Scripts/GenPage.php | UTF-8 | 1,159 | 2.546875 | 3 | [] | no_license | <?
Session_Start();
// FIRST SET - COPY TPL_DEX , RENAME IT AS INDEX.PHP
// $source="../tpl_for_dupli/tpl_dex.php";
// $dest="../index.php";
$source="Acc/tpl_for_dupli/tpl_dex.php";
$dest="Acc/tpl_dex.php";
if (!copy($source, $dest)) {
print ("failed to copy $dest...\n");
}
echo "";
// end of copy... | true |
d28826a86d176fc9e4bc1d040ea7945d7e13b00d | PHP | keigo-tech/php_06 | /php06_kadai/bbs_input.php | UTF-8 | 1,725 | 2.578125 | 3 | [] | no_license | <?php
session_start();
include('functions.php');
include('bbs_read.php');
$pdo = connect_to_db();
// データ取得SQL作成
$sql = 'SELECT * FROM users_table';
// SQL準備&実行
$stmt = $pdo->prepare($sql);
$status = $stmt->execute();
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="... | true |
ce7c23c44cd87b7819374e2c188319d10f665b8e | PHP | sslab-gatech/autofz | /docker/benchmark/seeds/fuzzer-test-suite/php-fuzz-parser/003.phpt | UTF-8 | 693 | 3.328125 | 3 | [
"MIT"
] | permissive | <?php
function test1() {
var_dump(func_get_args());
}
function test2($a) {
var_dump(func_get_args());
}
function test3($a, $b) {
var_dump(func_get_args());
}
test1();
test1(10);
test2(1);
try {
test2();
} catch (Throwable $e) {
echo "Exception: " . $e->getMessage() . "\n";
}
test3(1,2);
call_us... | true |
6a1d8e02a30ff7980a021b92a86241bda2d03191 | PHP | butschster/TelegramLocator | /app/Infrastructure/Telegram/Exceptions/Handler.php | UTF-8 | 2,055 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Infrastructure\Telegram\Exceptions;
use BotMan\BotMan\BotMan;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Validation\ValidationException;
use Throwable;
class Handler
{
private BotMan $bot;
public function __construct(BotMan $bot)
{
$this->bot = $bot;
... | true |
5184660a5b082d5027d4be6daecf5973878b7090 | PHP | Isabelnzi/Thecoach | /models/users.php | UTF-8 | 5,790 | 3.125 | 3 | [] | no_license | <?php
class users extends database {
//on déclare les attributs de la classe
public $id = 0;
public $login = '';
public $password = '';
public $lastname = '';
public $firstname = '';
public $birthDate = '';
public $email = '';
public $phoneNumber = '';
public $address = '';
... | true |
88c4df8e02559c88772d3948b8e2cad7af8af335 | PHP | DevFlorianD/TodoList | /tests/ItemTest.php | UTF-8 | 240 | 2.515625 | 3 | [] | no_license | <?php
require_once 'src/Item.php';
class ItemTest extends PHPUnit\Framework\TestCase
{
public function testIsValid ()
{
$item = new Item('Item 1', 'Contenu');
$this->assertTrue($item->isValid());
}
} | true |
d1c65b50c63f6d46a49f4cc4aa1c78d7cee577fc | PHP | photodude/jstats-server | /src/Controllers/SubmitControllerCreate.php | UTF-8 | 5,277 | 2.90625 | 3 | [] | no_license | <?php
namespace Stats\Controllers;
use Joomla\Controller\AbstractController;
use Stats\Models\StatsModel;
/**
* Controller for processing submitted statistics data.
*
* @method \Stats\WebApplication getApplication() Get the application object.
* @property-read \Stats\WebApplication $app ... | true |
206560d9f49f17a58b2273c29401b70694e5f288 | PHP | 21diego/TPFINALPW2 | /dao/SuscripcionDAO.php | UTF-8 | 2,089 | 2.75 | 3 | [] | no_license | <?php
class suscripcionDAO{
private $conexion;
/**
* suscripcionDAO constructor.
* @param Database $database
*/
public function __construct($database){
$this->conexion = $database;
}
public function getSuscripciones(){
$suscripciones = $this->conexion
->query("select * from ... | true |
2859c1add3db16bc936fe2ce5f4a0c7adce367ce | PHP | dekydilfianadewantara/Mxyxmxtx-W | /miyamoto/app/controllers/backend/Messages.php | UTF-8 | 863 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
class Messages extends BaseController {
public $limit = 10;
public $admin;
public function __construct()
{
$this->admin = Session::get('admin');
}
public function getIndex()
{
View::share('title','Messages');
View::share('path','Index');
$data['limit'] = $this->limit;
$data['messages'] = Mess... | true |
42c05a29da7525d3386b0013cc9cda6c76067955 | PHP | diegograssato/sf-api-problem | /src/Exception/BadFormattedRequisitionException.php | UTF-8 | 814 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace DTUX\ApiProblem\Exception;
use Exception;
use Psr\Log\LogLevel;
/**
* Exception thrown when the action can not deserialize the request, likely to be poorly formatted.
*/
class BadFormattedRequisitionException extends ApiException
{
public function __construct($status = null, $detail = null, $ty... | true |
f9c1b8cab703a3f65958ff4cf31d8cb31d5956a9 | PHP | rips/php-connector-bundle | /Responses/Application/Scan/LibraryResponse.php | UTF-8 | 745 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace RIPS\ConnectorBundle\Responses\Application\Scan;
use RIPS\Connector\Entities\Response;
use RIPS\ConnectorBundle\Responses\BaseResponse;
use RIPS\ConnectorBundle\Entities\Application\Scan\LibraryEntity;
use RIPS\ConnectorBundle\Hydrators\Application\Scan\LibraryHydrator;
class LibraryResponse extends ... | true |
977f40fe53e1e9e9347868add62912ff8d56c1d6 | PHP | Matsashi/Cours-Dev | /Cours PHP/EvalApiREST/models/front/Model.php | UTF-8 | 641 | 2.953125 | 3 | [] | no_license | <?php
abstract class Model{
private $pdo;
private function setDB(){
$this->pdo = new PDO("mysql:host=localhost; dbname=animaux;charset=utf8", "root", "");
$this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
}
protected function getDB(){
if($this->pdo == null){
... | true |
34344b007e7e555a25f7b4b7a76a4c2355e59b45 | PHP | dvsa/olcs-internal | /module/Olcs/src/Service/Data/ReportLetterTemplate.php | UTF-8 | 1,899 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Olcs\Service\Data;
use Common\Exception\DataServiceException;
use Common\Service\Data\AbstractDataService;
use Common\Service\Data\CategoryDataService;
use Common\Service\Data\Interfaces\ListData;
use Dvsa\Olcs\Transfer\Query\DocTemplate\GetList;
/**
* Class ReportLetterTemplate
*
* @package Olcs\... | true |
b94113d9726ed7af3c442e95f247c204fe7f728a | PHP | bhaskarpramanik/virgin-product | /Animus/views/StaticView.php | UTF-8 | 1,330 | 2.765625 | 3 | [] | no_license | <?php
/*
* 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.
*/
/**
* Description of StaticViewDemo
*
* @author bhaskarpramanik
*/
require_once APICORE."/AnimusStaticView.php";
class Stat... | true |
6959668708f91d7eb7b57f3d96c20dc18eab93e3 | PHP | danbettles/yacm | /src/Danbettles/Yacm/Minifier.php | UTF-8 | 3,283 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @copyright Copyright (c) 2015, Dan Bettles
* @license http://www.opensource.org/licenses/MIT MIT
* @author Dan Bettles <danbettles@yahoo.co.uk>
*/
namespace Danbettles\Yacm;
/**
* @author Dan Bettles <danbettles@yahoo.co.uk>
*/
class Minifier
{
/**
* Removes superfluous whitespace from the ... | true |
c10dd40ee33ea64e51e63b360a6c21951328d10b | PHP | Zaphnl/aoc2017 | /day7.php | UTF-8 | 2,072 | 2.921875 | 3 | [] | no_license | <?php
global $programs; // Using wrapper function, we're not at 'global' level here...
$input = explode("\n", file_get_contents("./input./day7.txt"));
$programs = [];
foreach ($input as $line) {
if (strpos($line, ' -> ') === false) {
$program = $line;
$kids = '';
} else
list($program, $kids) = explode( ' -> ', ... | true |
40ccbbff8b6dc13c5604f576c9a598cf59388193 | PHP | 1770383342/html | /p170/p170-1.php | UTF-8 | 592 | 3.3125 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>判断浏览器是否有读写Cookie的功能</title>
</head>
<body>
<?php
$testCookie=setcookie("testCookieEnabled","123");
//如果新建Cookie变量testCookieEnabled成功,setcookie()函数返回为true,否则为假。
if($testCookie){
echo"Cookie变量testCookieEnabled已经建立成功。。。".'<p>';
echo '如果能取出Cookie变量testCookieEna... | true |
3276961a41b1386173de0026ac6414cc4ee0db43 | PHP | hill-valley/fluxcap | /src/Base/ModifyTrait.php | UTF-8 | 628 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace HillValley\Fluxcap\Base;
use HillValley\Fluxcap\Duration;
/**
* @internal
* @psalm-immutable
*/
trait ModifyTrait
{
private readonly \DateTimeImmutable $dateTime;
public function modify(string $modify): self
{
return self::fromNative($this->dateTime->... | true |
34af4c17d9ef0520fc6b0125ef0fd3c37de2576c | PHP | AiPacino/dev-server | /system/library/oms/state/CanceledState.class.php | UTF-8 | 2,037 | 2.796875 | 3 | [] | no_license | <?php
namespace oms\state;
use oms\operation\FundsAuthorizeOperation;
/**
* CanceledState 已取消
*
* @author liuhongxing <liuhongxing@huishoubao.com.cn>
*/
class CanceledState extends State {
public function get_state(){
return State::OrderCanceled;
}
public function get_name(){
return '已取消... | true |
c6e7bfa897c7ecef0ae437bfa50c7f475c6c26bf | PHP | esedakov/netCmp | /netCmp/server/code/lib/lib__floc.php | UTF-8 | 1,516 | 3.078125 | 3 | [] | no_license | <?php
/*
Developer: Eduard Sedakov
Date: 2016-12-30
Description: file location
Used by: (lib_db)
Dependencies: (none)
*/
//create class to represent file location
class nc__class__flocation {
//file id
// type: INTEGER
public $_id;
//on which resource does this file reside
// 0: local server
... | true |
b6515b8dfd382c5235f75e345452e03e917f784d | PHP | makise-co/framework | /src/Util/Str.php | UTF-8 | 658 | 3.03125 | 3 | [] | no_license | <?php
/**
* This file is part of the Makise-Co Framework
*
* World line: 0.571024a
* (c) Dmitry K. <coder1994@gmail.com>
*/
declare(strict_types=1);
namespace MakiseCo\Util;
use function mb_strpos;
class Str
{
/**
* Determine if a given string contains a given substring.
*
* @param string $h... | true |
9ec42951e24a252cb134330b37e9f771cfaf95c9 | PHP | YBehti/wellnessCenter2.0 | /src/Services/Mailer.php | UTF-8 | 712 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Services;
use Twig\Environment;
class Mailer{
private $mailer;
private $templating;
public function __construct(\Swift_Mailer $mailer,Environment $templating)
{
$this->mailer = $mailer;
$this->templating = $templating;
}
public function SendMail($email... | true |
35a2484206a5a04ec26bf117a3b97c93831d562f | PHP | jmunozz/piscine-php | /rush00/admin/modify_product.php | UTF-8 | 2,376 | 2.734375 | 3 | [] | no_license | <?php
//Display all error
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
//Includes functions and constants.
require_once('../config/constants.php');
require_once('../config/functions.php');
//Get session infos
session_start();
$is_admin = isset($_SESSION['is_admin']) && ... | true |
8736d7c13f0e58a9789776b24a3cf76d747eeb97 | PHP | deepaksunny98/Deepak_PHP_Assignment4 | /messages.php | UTF-8 | 980 | 3.15625 | 3 | [] | no_license | <?php
echo '<h1>Your Message</h1>';
require('mysqli_oop_connect.php');
$q = "SELECT * from messages";
$r = $mysqli->query($q);
// Count the number of returned rows:
$num = $r->num_rows;
if ($num > 0)
{
// If it runs OK, display the records.
// echo "<p>There ar... | true |
76420c53a219912adeaa68facc83990dc04fbb30 | PHP | romalc11/ecommerce | /vendor/hcodebr/php-classes/src/Factory/Factory.php | UTF-8 | 1,198 | 2.84375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: romal
* Date: 10/12/2017
* Time: 13:08
*/
namespace Hcode\Factory;
use Hcode\Model\AllFields;
abstract class Factory
{
public static function create($attributes = array())
{
$arrModelClass = explode('Factory', (new \ReflectionClass(get_called_class()))->... | true |
069751c01e8572d8c59a154d418916d5c2567a57 | PHP | giluchipla0823/sf4-multiples-entity-managers | /src/Traits/ApiResponse.php | UTF-8 | 2,478 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Traits;
use App\Helpers\AppHelper;
use App\Helpers\JsonResponseHelper;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Response;
Trait ApiResponse{
/**
* Construir una respuesta de éxito.
*
* @param $data
* @param string $message
... | true |
08de5de1fe58a4cca183795ae9e9fb95f16779ac | PHP | alexwebstar/mad | /forms/Payment.php | UTF-8 | 12,223 | 2.59375 | 3 | [] | no_license | <?php
/**
*
* @author tim
* @copyright 2011
*
* class for users payments
*/
class Application_Form_Payment extends Zend_Form
{
public function init()
{
// form name
$this->setName('users');
$isEmptyMessage = 'Fileld is required';
$usersModel = new Applicati... | true |
f1ab81513b6779203566a9b765fbb482040485cd | PHP | fracz/refactor-extractor | /results/kakserpom--phpdaemon/9587a21b48427978d4f9b58109896bfddf6a11fe/after/CappedCacheStorageHits.php | UTF-8 | 515 | 2.9375 | 3 | [] | no_license | <?php
namespace PHPDaemon;
/**
* CappedCacheStorageHits
*
* @package Core
*
* @author Zorin Vasily <maintainer@daemon.io>
*/
class CappedCacheStorageHits extends CappedCacheStorage {
/**
* Constructor
* @param [integer Maximum number of cached elements]
* @return object
*/
public function __construct... | true |
7c8c393f37ff5be373f26f910ad6d84f353f1919 | PHP | BudiAditya/rekasys-mka | /apps/model/inventory/mr_detail.php | UTF-8 | 5,559 | 2.625 | 3 | [] | no_license | <?php
class MrDetail extends EntityBase {
public $Id;
public $MrId;
public $Sequence;
public $ItemId;
public $RequestedQty;
public $ApprovedQty;
public $ItemDescription;
public $UomCd;
public $UnitId;
public $StsItem = 1;
// Helper
public $MarkedForDeletion = false;
public $ItemCode;
public $ItemName;
... | true |
6663adc3e16268b71421d27c3c7cece957b89243 | PHP | zest-php/gui-module | /modules/gui/private/library/Object/Icons.php | UTF-8 | 1,146 | 2.65625 | 3 | [] | no_license | <?php
/**
* @category Gui
* @package Gui_Object
*/
class Gui_Object_Icons extends Gui_Object_Items implements IteratorAggregate{
/**
* @var string
*/
protected $_itemClassName = 'Gui_Object_Icons_Icon';
/**
* @var array
*/
protected $_xhrMethods = array('click');
/**
* @param string|integer $id... | true |
8355fef26a5d9d37793891a146488a9746284281 | PHP | yapep/yapep_base | /src/YapepBase/Storage/DummyStorage.php | UTF-8 | 4,806 | 2.6875 | 3 | [] | no_license | <?php
/**
* This file is part of YAPEPBase.
*
* @package YapepBase
* @subpackage Storage
* @copyright 2011 The YAPEP Project All rights reserved.
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
*/
namespace YapepBase\Storage;
use YapepBase\Application;
use YapepBase\Debugger\I... | true |
8ad279b0e812d97744bc911f70b0af04dfbc97d4 | PHP | baptiste-gauthier/runtrack3 | /jour09/site-perso/projects/forum/include/pages/inscription.php | UTF-8 | 4,949 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
if(isset($_POST['valider']))
{
$login = htmlspecialchars($_POST['login']) ;
$nom = htmlspecialchars($_POST['nom']) ;
$prenom = htmlspecialchars($_POST['prenom']) ;
$age = htmlspecialchars($_POST['age']) ;
$password = password_hash($_POST['pass'], PASSWORD_DEFAULT) ;
... | true |
f86c28cd4625853f386fa051961a48a6bd9bc118 | PHP | ChioreanOctavian/codeHighlightLib | /src/Contracts/TokenInterface.php | UTF-8 | 192 | 3.015625 | 3 | [] | no_license | <?php
namespace HighlightLib\Contracts;
interface TokenInterface
{
/**
* @param string $text
* @return string
*/
public function getCSSClass(string $text): string;
} | true |
3dd966cd3b49f0216c4ec32f121d474ad0c3a6a1 | PHP | gotenigatien/PubRoad | /Web/services/getResult.php | UTF-8 | 4,159 | 2.546875 | 3 | [] | no_license | <?php
/*
* Following code will list all the products
*/
// array for JSON response
$response = array();
$response = array();
if (isset($_GET["Who"])&& isset($_GET["Where"]) && isset($_GET["Place"]) ) {
$who = strtolower($_GET['Who']);
$where=strtolower($_GET['Where']);
$place=strtolower($_GET['Place']);
$r... | true |
161e64363895b2b92ba3032a549d0becfc00bbd8 | PHP | tayduivn/digisign-1 | /src/Http/UriResolver.php | UTF-8 | 760 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace DigitalCz\DigiSign\Http;
final class UriResolver
{
public const URI = 'https://api.digisign.org';
public const URI_SANDBOX = 'https://api.digisign.digital.cz';
/**
* @var bool
*/
private $sandbox;
public function __construct(bool $sandbox = fa... | true |
da8342cff362f491567c4d9a5d44b0bbda36959d | PHP | goto2011/OneHistory | /php-lib/tag_period.php | UTF-8 | 3,448 | 2.53125 | 3 | [] | no_license | <?php
// created by duangan, 2015-1-30 -->
// support period deal function. -->
// 时期数组
$period = array
(
array
(
array("人类之前", log(0), -2600001), // log(0) 表示无穷远.
array("农业之前", -2600000, -12001),
array("文明初期", -12000, -1600),
array("文明前期", -1600, -1000),
),
array
... | true |
d57113f19a65fa5861d12bc6b7df42cc7ade741c | PHP | locomotivemtl/charcoal-survey | /src/Charcoal/Survey/Object/Survey.php | UTF-8 | 1,955 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Charcoal\Survey\Object;
// Module `charcoal-base` dependencies
use \Charcoal\Object\Content;
// Charcoal-base dependencie
use \Charcoal\Object\RoutableInterface;
use \Charcoal\Object\RoutableTrait;
use \Charcoal\Translation\TranslationString;
/**
* Survey
* Survey is routable so you can access a ... | true |
c709a2fdd170ac37575bf45057f7c24b81384053 | PHP | yilmazhasan/pwp | /docs/personal/works/CourseRegister/student/edit.php | UTF-8 | 1,966 | 3.046875 | 3 | [] | no_license | <?php
include('../db/connectDb.php'); // connect to the database
include('../functions.php'); // some helper funvtions
include('./renderForm.php'); // form for save and edit
// check if the form has been submitted. If it has, process the form and save it to the database
if (!isset($_POST['submit'])){
// if the form ... | true |
1a761c924ff2e339bc361678ea4284d69a8f94a5 | PHP | Randyjp/BeerServiceXMLRPC | /ServiceLayer/SLBeerService.class.php | UTF-8 | 1,470 | 2.84375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: randyjp
* Date: 4/8/15
* Time: 10:16 PM
* This layer is in charge of calling the Business layer and also adding the XML tags to the respond.
*/
include "../lib/xmlrpc.inc.php";
include "../lib/xmlrpcs.inc.php";
include "../lib/xmlrpc_wrappers.inc.php";
include "../Business... | true |
0396bcd3e690c6e54bda0bb5b043fe5b1001f5ae | PHP | leom/NaSkeWriMo | /lib/app/controllers/sketches_controller.php | UTF-8 | 1,248 | 2.546875 | 3 | [] | no_license | <?php
class SketchesController extends AppController
{
var $uses = array('Profile', 'Sketch');
var $components = array('Session', 'Email');
function add()
{
$current_profile = $this->Session->read('Profile');
if (empty($current_profile)) {
$this->redirect('/auth/login');
... | true |
ae4efdf1ec3279725261b68c7457623a6efb6c2a | PHP | tomoya-ozawa/tanren | /post.php | UTF-8 | 703 | 2.875 | 3 | [] | no_license | <?php
require_once('define.php');
$insert_title = $_POST['title'];
$insert_message = $_POST['message'];
$insert_post_id = getPostID();
$query = 'INSERT INTO posts(post_id, title, message) VALUES(:post_id, :title, :message)';
try {
$dbh = new PDO(DSN, DBUSER, DBPASS);
$stmt = $dbh->prepare($query);
$stmt->... | true |
09e486dc10f79e4d9b632dc5633583bae0b5d160 | PHP | szerg97/myproject | /src/Controller/RecipeBookController.php | UTF-8 | 4,139 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
/**
* Class TsvController
* @package App\Controller
* @Route(path="recipeboo... | true |
b38b42415c234d53609eeb3c4d8b4328f1c3063f | PHP | caikeal/fourteen_unrelated | /app/Models/Order.php | UTF-8 | 3,350 | 2.53125 | 3 | [] | no_license | <?php
/*
* This file is part of the caikeal/fourteen_unrelated .
*
* (c) caikeal <caiyuezhang@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace App\Models;
use App\Libraries\Utils\Math;
use Illuminate\Database\Eloquent\Model... | true |
aa4803f8820dbaa88961d7c0b3f451c35d9e0e8e | PHP | JeCat/framework | /class/util/DataSrc.php | UTF-8 | 7,082 | 2.59375 | 3 | [] | no_license | <?php
////////////////////////////////////////////////////////////////////////////////////////////////////////////
// 这个文件是 JeCat PHP框架的一部分,该项目和此文件 均遵循 GNU 自由软件协议
//
// Copyleft 2008-2012 JeCat.cn(http://team.JeCat.cn)
//
//
// JeCat PHP框架 的正式全名是:Jellicle Cat PHP Framework。
// “Jellicle Cat”出自 Andrew Lloyd... | true |
c84763a54b1a58a510fc368f868611c6bc502ce1 | PHP | mpampam5/my_proyek | /application/helpers/public_helper.php | UTF-8 | 7,035 | 2.515625 | 3 | [] | no_license | <?php if (!defined("BASEPATH")) exit("No direct script access allowed");
function sess($str)
{
$ci=& get_instance();
return $ci->session->userdata($str);
}
function config_system($kode = null , $field = "value")
{
//$file = "value" or $file = "status" 0,1
$ci=& get_instance();
$kd = strtolower($kode);
$q... | true |
dd66379d47e5669af2d64576f8f411095ee6c926 | PHP | YouweGit/marketo-rest-api | /src/Response/GetCustomObjectsResponse.php | UTF-8 | 1,310 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Marketo REST API Client package.
*
*/
namespace CSD\Marketo\Response;
use CSD\Marketo\Response as Response;
/**
* Response for the getCustomObjectsByFilterType API method.
*
* @author Jon te Riele <j.teriele@youweagency.com>
*/
class GetCustomObjectsResponse extends Respons... | true |
d41c54cd7b6944768826e008efcd08d7a5b24afb | PHP | favdev111/healthcare-vue-yii2-docker | /modules/chat/models/query/ChatQuery.php | UTF-8 | 430 | 2.703125 | 3 | [] | no_license | <?php
namespace modules\chat\models\query;
use common\components\ActiveQuery;
use Yii;
/**
* Class ChatQuery
* @package modules\chat\models
* @property string $tableName
*/
class ChatQuery extends ActiveQuery
{
/**
* @param $chatUserId
* @return $this
*/
public function andWhereChatUserId(... | true |
d8e0cb06fbb3b377b601cb94545423568d241316 | PHP | zzanette/crud-empresa-joons | /controller/class.Controller.php | UTF-8 | 1,950 | 2.8125 | 3 | [] | no_license | <?php
class Controller {
public function redirect($location) {
header('Location: '.$location);
}
public function handleRequest() {
$op = isset($_GET['op'])?$_GET['op']:NULL;
try {
if ( !$op || $op == 'dashboard' ) {
$this->showDashboard();
... | true |
f19f8940338dab88bdb5297e8e565b76999a5762 | PHP | Vinelab/minion | /src/Vinelab/Minion/Provider.php | UTF-8 | 1,965 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Vinelab\Minion;
/**
* @author Abed Halawi <abed.halawi@vinelab.com>
*/
abstract class Provider
{
/**
* The topic prefix.
*
* @var string
*/
protected $prefix = '';
/**
* Constructor.
*
* @param \Vinelab\Minion\Client $client
*/
public function... | true |
b8879663f7b954892f92d8be6b188cef10d59917 | PHP | wesbaker/facebook-feed | /facebook_feed.php | UTF-8 | 6,430 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Directory where the class can cache the feed and images
*/
define("CACHE_DIRECTORY", $_SERVER['DOCUMENT_ROOT'].'/includes/facebook_cache/');
/**
* Length of time in minutes to cache the feed
* Default length is 5
*/
define("FEED_CACHE_TIME", 5);
/**
* Length of time in minutes to cache the images
... | true |
cf8d159a0212cd7f07a238e48b0639c1e950cd55 | PHP | fmk1233/ds | /PhalApi/PhalApi/Model/NotORM.php | UTF-8 | 6,936 | 2.609375 | 3 | [] | no_license | <?php
/**
* PhalApi_Model_NotORM 基于NotORM的Model基类
*
* - 我们这里对ext_data使用json而不是序列化,是为了更容易阅读、理解、测试
* - 可重写formatExtData() & parseExtData()重新定制针对序列化LOB的转换
* - 具体子类需要实现getTableName($id)以提供对应的表名或者分表名
* - 对于如何寻找表主键,我们将配置中全部的表(包括分表)对应的主键进行了装配,如果觉得有性能问题,可重写getTableKey($table);这是一个手动和自动的问题
*
* @package PhalApi\Mode... | true |
b79e0b7ba1d879e2b16fb32478eb7edeb3ad2b0f | PHP | damienmoulin/Blog | /src/AppBundle/Entity/Theme.php | UTF-8 | 929 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: damien
* Date: 30/03/17
* Time: 16:09
*/
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity()
* @ORM\Table(name="besoin")
*/
class Theme
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")... | true |
a4f1e438acfa3a0e5a8a7d91d3655c1289e8cdb1 | PHP | moior/cook | /plugins/redmarlin/faq/components/FaqFeatured.php | UTF-8 | 1,201 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php namespace RedMarlin\Faq\Components;
use Cms\Classes\ComponentBase;
use RedMarlin\Faq\Models\Question;
class FaqFeatured extends ComponentBase
{
public $faqsfeatured;
public function componentDetails()
{
return [
'name' => 'FAQ Latest Questions',
'description' ... | true |
4b77077a07a7b17dc175e563623f6f49035f4970 | PHP | hypeJunction/Elgg3-hypeCountries | /classes/hypeJunction/Country.php | UTF-8 | 1,022 | 2.78125 | 3 | [] | no_license | <?php
namespace hypeJunction;
/**
* @property string $name
* @property string $iso
* @property string $iso3
* @property string $iso_numeric
* @property string $fips
* @property string $capital
* @property string $area
* @property string $population
* @property string $continent
* @property string $tld
* @p... | true |
761d521b30778e759745c466cafdbdcdcb8defe8 | PHP | phacility/phabricator | /src/applications/auth/factor/__tests__/PhabricatorAuthInviteTestCase.php | UTF-8 | 10,808 | 2.609375 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
final class PhabricatorAuthInviteTestCase extends PhabricatorTestCase {
protected function getPhabricatorTestCaseConfiguration() {
return array(
self::PHABRICATOR_TESTCONFIG_BUILD_STORAGE_FIXTURES => true,
);
}
/**
* Test that invalid invites can not be accepted.
*/
public functio... | true |
0edb1adb3335c9957ff91be2a95d6d11de5d37d8 | PHP | ding94/hamsterEat | /common/models/Order/Orderpricehistory.php | UTF-8 | 1,276 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models\Order;
use Yii;
/**
* This is the model class for table "orderpricehistory".
*
* @property int $id
* @property int $did
* @property double $total
* @property double $subtotal
* @property double $deliveryCharge
* @property double $earlydiscount
* @property double $voucherdiscoun... | true |
6316ca9dcdf84d63a2ff743751dea4b17c67323a | PHP | Baachi/data-import | /src/Ddeboer/DataImport/Writer/ConsoleProgressWriter.php | UTF-8 | 872 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Ddeboer\DataImport\Writer;
use Ddeboer\DataImport\Reader\ReaderInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Helper\ProgressHelper;
/**
* Writes output to the Symfony2 console
*
*/
class ConsoleProgressWriter extends AbstractWriter
{
protected $... | true |
6b3ebb59ed1dffd7f220f0aace78bd3f1833d501 | PHP | Rayrn/Euler | /www/controllers/problems/67.php | UTF-8 | 1,419 | 2.953125 | 3 | [] | no_license | <?php
/* Registration Form Processing */
if(!defined('APP_ROOT')) {
exit('No direct script access allowed');
}
// Check if the user is allowed to access this page
if(!$auth_user) {
header("Location: /");
exit();
}
//------------------------------------------------------------------
// Action processing
//... | true |
c8d2f0715db64c11a1da6405ac8db02b0287ab32 | PHP | 1Vegas/phpoop | /model/Users.php | UTF-8 | 379 | 2.78125 | 3 | [] | no_license | <?php
namespace app\model;
class Users extends DbModel
{
public $id;
public $login;
public $pass;
protected $tableName = 'users';
public function __construct($id = null, $login = null, $pass = null)
{
$this->id = $id;
$this->login = $login;
$this->pass = $pass;
}
public stati... | true |
15ade495cbba071ed494c159b58560168dcbbbf8 | PHP | VictorVicentini/Sistema_Cadastro_de_Clientes | /php_action/delete.php | UTF-8 | 2,042 | 2.6875 | 3 | [] | no_license | <?php
// Inicia Sessão
session_start();
// Conexão
require_once 'db_connect.php';
if (isset($_POST['btn-deletar'])) :
$id = mysqli_escape_string($connect, $_POST['id']);
$sql = "DELETE FROM endereco WHERE id_cliente = '$id'";
//exclui o cliente e os contatos e endereços pertencentes a ele
if (mysqli_query($conne... | true |
8f28cca3c90a85c5d49fc6cd8370e832072eb70e | PHP | Rkitakrk/PHP-wirtualny-szpital | /db_project/src/Controllers/TreatmentController.php | UTF-8 | 1,295 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Controllers;
/* Kontroler zabiegu */
use Component\Container;
use Symfony\Component\HttpFoundation\Request;
class TreatmentController
{
private $db;
private $db_table;
private $path;
public function __construct()
{
$this->db = Container::get('query_builder');
... | true |
f5e12363881dc073e7207f04c62c8106e7a4d43a | PHP | vovadream/faced-docker | /php-code/facepass/app/src/Views/InterfaceView.php | UTF-8 | 191,281 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Views;
use App\Models\InterfaceModel;
use DateTime;
class InterfaceView
{
/**
* @var InterfaceModel
*/
private $model;
public function __construct(InterfaceModel $model)
{
$this->model = $model;
}
/*
* Вывод меню
* TODO: Добавить иконки, стили... | true |
918e867b5553aff5860ce0288637debb95ea4e20 | PHP | jeff-waite/Shirts4Mike | /mike2backup/test.php | UTF-8 | 1,100 | 3.34375 | 3 | [] | no_license | <?php
$total_pages = 9;
$i = 0;
while($i < $total_pages) {
$i += 1;
echo $i;
}
exit;
?>
<?php
$numbers = array(0.01,1,100,1003,1001,1002);
$count_less_than_one = 0;
$count_between_one_and_thousand = 0;
$count_greater_than_thousand = 0;
foreach ($numbers as $number) {
... | true |
9b6f96b6a71c5afbd637c4e798a798ec54c1b7fa | PHP | Keve00/scaff | /controller/AvaliacaoController.php | UTF-8 | 590 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Jaelson
* Date: 17/11/2015
* Time: 21:13
*/
class AvaliacaoController
{
public function cDados(){
$av = new Avaliacao();
$avDAO = new AvaliacaoDAO();
$senha = $_POST["senha"];
$disciplina = $_POST["disciplina"];
$cod_av = $_POS... | true |
2d580c68f5cc66e45fdf84b8298c79aa5c0937b3 | PHP | nathancox/silverstripe-fmfieldvalidator | /code/FMFieldValidator.php | UTF-8 | 14,464 | 2.671875 | 3 | [] | no_license | <?php
class FMFieldValidator extends Validator {
/**
* Stores all the validation methods in name => ClassName format
*
* @var array
*/
private static $validation_classes;
/**
* An array of project-wide default error messages in [ruleName] => "message" format
*
* @var array
*/
static $default_mes... | true |
cb991a8463e84326ada779e332cab912306b614c | PHP | mishrashivang/summer-internship-day5 | /merge.php | UTF-8 | 133 | 2.578125 | 3 | [] | no_license | <?php
$arr=array('c','c++','java','android','php','c++','php');
$arr1=array('10','20','30');
print_r(array_merge($arr,$arr1));
?> | true |
2ad656990503575821b760a27b4f8d5b88697129 | PHP | kassko/data-mapper | /src/Configuration/CacheConfiguration.php | UTF-8 | 1,043 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Kassko\DataMapper\Configuration;
use Kassko\DataMapper\Cache\CacheInterface;
/**
* Contains cache configuration.
*
* @author kko
*/
class CacheConfiguration
{
private $enabled = false;
private $cache;
private $lifeTime = 0;
private $shared = false;
public function isEnabled()... | true |
79fc529a60d1228bfdfe75f98f054a7ec51d2796 | PHP | Rachidoulgour/blogphp | /src/services/UserService.php | UTF-8 | 788 | 2.953125 | 3 | [] | no_license | <?php
namespace App\services;
use App\db\entities\User;
class UserService extends Service{
public function findUserByEmail(string $email){
try{
$repository= $this->doctrineManager->em->getRepository(User::class);
$user = $respository->findByEmail($email);
if (sizeof ($u... | true |
372ae37b23dba8afe2995b2217b0116fc36d61d9 | PHP | SFULibrary/lockssomatic-44 | /src/Entity/BoxStatus.php | UTF-8 | 2,867 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* (c) 2021 Michael Joyce <mjoyce@sfu.ca>
* This source file is subject to the GPL v2, bundled
* with this source code in the file LICENSE.
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Nines\UtilBundle\Entity\AbstractEntity;
/**
* BoxStatus.
*
* @ORM\Table(n... | true |
e16c2f95bfc64544f7e9e8d9986d510fd097adc3 | PHP | soholeh/20182 | /praktik-pbo-si-2/Matakuliah.php | UTF-8 | 666 | 2.828125 | 3 | [] | no_license | <?php
class Matakuliah
{
protected $kodeMk ;
protected $namaMk ;
protected $sksMk ;
public function __construct($kode, $nama, $sksMk)
{
$this->updateMk($kode, $nama, $sksMk);
}
public function tampilMK()
{
Format::cetakTebal(Format::kampus) ;
Format::cetakTebal("Data Matakuliah") ;
... | true |