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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
2a82fac8d66071bc7669bf004dc709cfb97f2189 | PHP | ngadzheva/ElectivesManagement | /exam_final/php/registerValidation.php | UTF-8 | 7,173 | 2.515625 | 3 | [] | no_license | <?php
require_once 'student.php';
require_once 'lecturer.php';
session_start();
$database = new DataBase();
$user = modifyInput($_POST['user']);
$pass = modifyInput($_POST['password']);
$confirmPass = modifyInput($_POST['confirmPassword']);
$names = modifyInput($_POST['names']);
$... | true |
2691b83a66b2fe4d05027584794d3919ad73e6fb | PHP | erodrimora/team-superman-hngi7 | /scripts/internemmanuel(scripts).php | UTF-8 | 307 | 3.171875 | 3 | [] | no_license | <?php
/*
*Just trying to keep things simple *
*but still avoid being accused of *
*plagiarism because this task doesn't *
*have many unique solutions *
*/
$output = 'Hello World, this is Emmanuel Menyaga with HNGi7 ID HNG-02898 using PHP for stage 2 task.sparklinsparky@gmail.com... | true |
629efa6cf722c1a5d6d1ef5d81b00dcf7e14a040 | PHP | sumeetshahani108/Housing-Management-System | /app/Owner.php | UTF-8 | 1,201 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
//In models we define out business logic .
namespace App;
use App\Like;
use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPas... | true |
146b948d92bf29560cc62f8c862c28b35f7ce3ce | PHP | pawelfuta/Grupa | /src/Grupa/ProjektBundle/Entity/FilmGatunek.php | UTF-8 | 1,261 | 2.59375 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace Grupa\ProjektBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Grupa\ProjektBundle\Entity\Film as Film;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Entity
* @ORM\Table()
*/
class FilmGatunek
{
/**
* @ORM\Id
* @ORM\Column(type="string")
*/
protected $name;
/**
* Get name
*
... | true |
1fc3eab3392632969baa890994657648bca82f70 | PHP | kwda1002/PHP_test | /touch restaurants_searche.php | UTF-8 | 491 | 2.671875 | 3 | [] | no_license | # restaurants_seasher.php
<?php
function write_data_to_csv(){
$restaurants = [];
$response = "hogehoge";
if(isset($response["results"]["error"])){
return print("エラーが発生しました!");
}
if(isset($response["results"]["shop"])){
foreach($response["shop"] as &$i){
$restaurant... | true |
ae5f8275a748f35491c342121474f1f703fab54f | PHP | nguyenky/shophoa | /app/Http/Middleware/RoleMiddleware.php | UTF-8 | 719 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
use Auth;
class RoleMiddleware
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next,$role)
{
$ar... | true |
1572b6144846df8c3b2110391eb5b49a29df0c4a | PHP | Guillermo-l/Bucket-list-van-je-vrienden-1b700f72 | /bucket_list_friends.php | UTF-8 | 600 | 3.65625 | 4 | [] | no_license | <?php
$vrienden = [];
echo "Hoeveel vrienden zal ik vragen om hun droom?" . PHP_EOL;
$aantalVrienden = readline(">");
if (is_numeric($aantalVrienden)) {
for ($i = 0; $i < $aantalVrienden; $i++) {
echo "Wat is jouw naam?" . PHP_EOL;
$namen = readline(">");
echo "Wat is jouw droom?" . PHP_... | true |
4643899fd78529db31f1cd62cea63b9e190ae534 | PHP | BGCX067/f1n4l-pr0j3c7-f0r-t3h-0n35-wh0-n33d-17-svn-to-git | /trunk/application/forms/Esqueci.php | UTF-8 | 1,314 | 2.53125 | 3 | [] | no_license | <?php
class Application_Form_Esqueci extends Zend_Form {
public function init() {
$validate = new Zend_Validate_Callback('userExists');
$validate->setMessage('Usuario inexistente!');
$this->addElement(
'text',
'usuario',
array(
... | true |
0d8a18bdc1309bc2b53d28e719280b268c947953 | PHP | kilofox/ftwcm-shop | /src/Event/StoreSaved.php | UTF-8 | 308 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Ftwcm\Shop\Event;
/**
* 商店保存完成事件。
*/
class StoreSaved
{
/** @var object $store */
public $store;
/**
* Constructor.
*
* @param object $store
*/
public function __construct(object $store)
{
$this->store = $store;
}
}
| true |
9985d0e91ad055872fefc389b0e6cbaecf085129 | PHP | m75687/stu3 | /src/Lib/YRow.php | UTF-8 | 1,017 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
class YRow
{
protected $row = null;
protected $minx = null;
protected $maxx = null;
protected $systemId = null;
function __construct($cury, $minx, $maxx, $systemId = 0)
{
$this->row = $cury;
$this->minx = $minx;
$this->maxx = $maxx;
... | true |
b7b027f0d17b10ad32bc53f77455b4d05fab4203 | PHP | devDzign/sf52-ddd-code-challenge | /domain/src/Security/Gateway/ParticipantGateway.php | UTF-8 | 494 | 2.796875 | 3 | [] | no_license | <?php
namespace Chabour\Domain\Security\Gateway;
use Chabour\Domain\Security\Model\Participant;
interface ParticipantGateway
{
/**
* @param string|null $email
* @return bool
*/
public function isEmailUnique(?string $email): bool;
/**
* @param string|null $pseudo
* @return bool... | true |
9bb8f4af44c40f12eab53eb8a2f7799fecde4114 | PHP | quadrowin/icengine | /Class/Query/Command/From.php | UTF-8 | 1,491 | 2.703125 | 3 | [] | no_license | <?php
/**
* Часть запроса from
*
* @author morph
*/
class Query_Command_From extends Query_Command_Abstract
{
/**
* @inheritdoc
*/
protected $mergeStrategy = Query::MERGE;
/**
* @inheritdoc
*/
protected $part = Query::FROM;
/**
* Помощник ... | true |
aef5fcfcf1b393d4e94ba3a974f25e1dfd0af607 | PHP | sfnt/ms | /protected/modules/articles/controllers/ColumnController.php | UTF-8 | 8,418 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class ColumnController extends ArticlesController
{
/**
* Displays a particular model.
* @param integer $id the ID of the model to be displayed
*/
public function actionView($id)
{
$this->render('view',array(
'model'=>$this->loadModel($id),
));
}
/**
* Creates a new model.
* If creation i... | true |
07f8d0f15c3c93a1844fb39b3f256c47e7292e74 | PHP | eliezerfot123/addons_send_email_backend | /index.php | UTF-8 | 2,224 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
header("Access-Control-Allow-Origin: *");
error_reporting(E_ALL);
ini_set('display_errors', '1');
require_once 'PHPMailer/PHPMailerAutoload.php';
if (isset($_POST['inputName']) && isset($_POST['inputEmail']) && isset($_POST['inputPhone']) && isset($_POST['inputMessage'])) {
//check if any of the inputs are ... | true |
7afc3c9c1f5180569efb40b9c8502690b3d0992c | PHP | lihaoliangGz/PhpArray | /PhpArray_ar_as.php | UTF-8 | 3,916 | 3.53125 | 4 | [] | 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.
*/
echo "array_rand — 从数组中随机取出一个或多个单元 :" . "\n";
$input = array(1, 2, 3, 4, 5, 6);
$array = array("frist", "second", "three", "fou... | true |
ae13ef466d24266c11a60c1da6bd3df72293d14d | PHP | sumitguptamca/test | /admin-common/ldap.php | UTF-8 | 7,273 | 2.6875 | 3 | [] | no_license | <?php
/*
Inroads Control Panel/Shopping Cart - LDAP Authentication Functions
Written 2018-2019 by Randall Severy
Copyright 2018-2019 Inroads, LLC
*/
require_once 'config.php';
define(LDAP_OPT_DIAGNOSTIC_MESSAGE,0x0032);
function get_ldap_error($ldap)
{
if (ldap... | true |
eb08135eb8867eb9d786efa43182316368fb7456 | PHP | Avaaren/minsk_attractions | /backend/api/authApi.php | UTF-8 | 1,839 | 2.734375 | 3 | [] | no_license | <?php
require_once 'baseApi.php';
require_once($_SERVER['DOCUMENT_ROOT'].'/services/db_layer/db_query_builder.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/services/auth/login.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/services/auth/registration.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/services/auth/AuthC... | true |
8c97b85ae0a9743b2644519d1176db25038960ff | PHP | Aleksandr0611/work | /task_6.php | UTF-8 | 422 | 3.03125 | 3 | [] | no_license | <?php
declare(strict_types=1);
$cities = ['moscow', 'london', 'berlin', 'porto'];
/**
* @param array $a
* @param int $b
* @param null $c
*/
function get(array $a, int $b, $c = null)
{
if (($a[$b] == false) && ($c == null)) {
$a[$b] = $c;
echo $a[$b] = $c;
} elseif ($a[$b] == false) {
... | true |
87bce8eddc43b1bd9bbcef046b7b668a72199651 | PHP | pcardona34/exercices_divers | /troisieme/homophones_32/scores.php | UTF-8 | 2,188 | 2.75 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Scores</title>
<link rel="stylesheet" href="style.css">
<script>
// Page affichée pour le mode évaluation 1
ch=[];
note=[];
// Fonctions appelées par le fichier "textes.js"
function titre() {}
function bouton() {}
function fenetre() {}
function mot() {}
funct... | true |
bdd3e6751292ca8b9287cb5ac9b40dfc8714a813 | PHP | bakicdj/EmailReplyExtractor | /src/ActiveCollab/EmailReplyExtractor/Extractor/OutlookExtractor.php | UTF-8 | 682 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace ActiveCollab\EmailReplyExtractor\Extractor;
/**
* @package ActiveCollab\EmailReplyExtractor\Extractor
*/
final class OutlookExtractor extends Extractor
{
/**
* @param string $html
*
* @return string
*/
static function toPlainText($html)
{
$html = str_... | true |
40c4973e7c8ea9e6d1b99013dd4b5d207530915a | PHP | IsmaelBIT/My-first-class-e527375b | /MyLogger.class.php | UTF-8 | 141 | 3.375 | 3 | [] | no_license | <?php
class MyLogger
{
public function log($message) {
echo $message;
}
}
$logger = new MyLogger();
$logger->log('Hey! :)'); | true |
bb9846e0acb4e2e45516f77c35e4eb5db4fb6ce9 | PHP | xpmozong/wavephp2 | /framework/cache/WaveRedisCluster.php | UTF-8 | 11,929 | 2.96875 | 3 | [] | no_license | <?php
/**
* PHP 5.0 以上
*
* @package Wavephp
* @author 许萍
* @copyright Copyright (c) 2016
* @link https://github.com/xpmozong/wavephp2
* @since Version 2.0
*
*/
/**
* Wavephp Application RedisCluster Class
*
* Redis 操作,支持 Master/Slave 的负载集群
*
* @package W... | true |
351078ebf56781b214d8f6db8fa1970669db813a | PHP | KatterinaM/experience-work | /dataprocessor/src/app/Entity/Entity/Cian/Traits/ShareAmount.php | UTF-8 | 2,176 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Entity\Cian\Traits;
use App\Entity\Cian\Base\AbstractObject;
use App\Entity\Cian\Base\CategoryInterface;
use JMS\Serializer\Annotation as Serializer;
use Symfony\Component\Validator\Constraints;
use Symfony\Component\Validator\Context\ExecutionContextInterface;
/**
* Trait ShareAmount
* @packag... | true |
045d0a62e9b42827ae8574467839c04bd7d86cbd | PHP | tbajorek/doctrine-file-fixtures | /src/Model/Entity/FieldNameResolver.php | UTF-8 | 1,092 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Tbajorek\DoctrineFileFixturesBundle\Model\Entity;
use Tbajorek\DoctrineFileFixturesBundle\Model\Config\BundleConfig;
use Tbajorek\DoctrineFileFixturesBundle\Model\Config\Metadata\FieldInterface;
use Tbajorek\DoctrineFileFixturesBundle\Model\FixturesException;
class FieldNameResolver
{
/**
* ... | true |
ea2d71ba04725e4914912e0a1a4aef9743abfa08 | PHP | vomoir/rubricon | /rubric_get_list.php | UTF-8 | 1,165 | 2.546875 | 3 | [
"MIT"
] | permissive | <?PHP
require_once("dbconnector.php");
//require_once("check_session.php");
error_log("In project_get_list.php\nChecking Session...");
if(!isset($_POST['submit'])){
/*
if (!checkSession()){
error_log("Session Time out.");
echo "error: Session has timed out. Please login again...";
return false;
exit;
} else ... | true |
93180ba88e6d123cd43ceb7d6e49c527e8e3896b | PHP | Jonesyei/modelphp | /includes/project/member.php | UTF-8 | 3,997 | 2.5625 | 3 | [] | no_license | <?php
include_once("../main_inc.php");
/*
$member["id"] = X; //--會員資料 參數
$member["other_account"] = 'x'; //其他榜定欄位 名稱
$member["other_type"] = 'x'; //其他榜定帳戶類型 欄位名稱
$member["data"] = $_SESSION["member_info"]["login"]; //登入資料源
$member["file_url"] = 'upload/'; //檔案上傳目錄
*/
$member["data"] = $_SESSION["member_info"]["login"];... | true |
fdf81b556f209f7b34832d60f1a86d82434338b7 | PHP | kweku360/rotaapi | /templates/clubs/index.php | UTF-8 | 1,278 | 2.546875 | 3 | [] | no_license | <?php
/**
* User: kweku
* Date: 9/18/2016
* Time: 4:42 PM
*/
error_reporting(-1); // reports all errors
ini_set("display_errors", "1"); // shows all errors
ini_set("log_errors", 1);
ini_set("error_log", "/tmp/php-error.log");
// setup the autoloading
//require_once 'vendor/autoload.php';
// setup Propel
require_... | true |
0f23ffada9008f3f16943763504f6def231063c7 | PHP | gongasvic/Naval-Territory-Devision | /inscrever.php | UTF-8 | 1,326 | 2.734375 | 3 | [] | no_license | <?php
// inicia sessão para passar variaveis entre ficheiros php
session_start();
include('comum.php');
// Carregamento das variáveis username e pin do form HTML através do metodo POST;
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$lid = test_input($_POST["lid"]);
}
if(!isset($_SESSION['validado']) || ... | true |
74e38986ff35d5760f276c0a51c442030a5ced2f | PHP | Mariana730/MarbeUrban | /modelo/FormaPagamentoModelo.php | UTF-8 | 1,665 | 2.8125 | 3 | [] | no_license | <?php
function adicionarPagamento ($descricao) {
$sql = "INSERT INTO FormaPagamento (descricao) VALUES ('$descricao')";
$resultado = mysqli_query ($cnx = conn(), $sql);
if(!$resultado) { die('Erro ao cadastrar forma de pagamento'.mysqli_error($cnx));}
return 'Forma de Pagamento cadastrada com sucesso!... | true |
6e78a45e5f0f59515c3cc069c44b6ab8ad01ea5f | PHP | xqmsg/phpsdk-core | /src/com/xqmsg/sdk/v2/services/Exchange.php | UTF-8 | 2,176 | 2.65625 | 3 | [] | no_license | <?php namespace com\xqmsg\sdk\v2\services;
use com\xqmsg\sdk\v2\exceptions\StatusCodeException;
use Config;
use com\xqmsg\sdk\v2\enums\CallMethod;
use com\xqmsg\sdk\v2\ServerResponse;
use com\xqmsg\sdk\v2\XQModule;
use com\xqmsg\sdk\v2\XQSDK;
/**
* Class Exchange
* @package com\xqmsg\sdk\v2\services
*/
class Exch... | true |
0c3629c6c222b59b2d08b5f02547eec03107b178 | PHP | JLdevprog/RPG_object | /object.php | UTF-8 | 6,320 | 3.125 | 3 | [] | no_license | <?php
/*
Imaginons un jeu de rôle.
Il existe plusieurs type de personnages : les Humains les Orques et les Elfes.
Chaque personnage possède :
> Un nom
> Des points de vie (par défaut 100)
> Des points d'attaque (par défaut 10)
> Des points de défense (par défaut 5)
> Un cri de guerre (par exemple "A l'attaqqqu... | true |
a9cad07fa8861776bf78a72541faefeadd0ec81e | PHP | alexjaboatao/ProjetoDAInscricao | /tratamento_v3.php | UTF-8 | 2,534 | 2.5625 | 3 | [] | no_license | <!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Sistema de Análise da Dívida Ativa</title>
</head>
<body>
<?php
require_once "conexao.php";
require_once "crud.php";
$nomearquivo = $_FILES["arquivo"]["tmp_name"];
$tipo = $_POST["tipo"];
if (!e... | true |
ebfaaf677e2be34d55740f9a4ae44da2976eb9a3 | PHP | stanislas-m/Scolarite | /share/model/Role.class.php | UTF-8 | 755 | 3.09375 | 3 | [] | no_license | <?php
/**
* Role
*
* @author Stanislas Michalak <stanislas.michalak@gmail.com>
*/
class RoleModel extends Model {
protected $_datasourceName = 'Role';
//Champs
protected $_idRole;
protected $_libelle;
//Erreurs
const BAD_ID_ROLE_ERROR = 1;
const BAD_LIBELLE_ERROR = 2;
public fu... | true |
80135c59ade19ab629ddf9355a1dbcd424cdec33 | PHP | doncem/homepage-php | /src/cdcollection/models/cdArtist.php | UTF-8 | 3,076 | 3.0625 | 3 | [] | no_license | <?php
namespace cdcollection\models;
/**
* Artist model
* @Entity
* @Table(name="cd_artist")
* @package cdcollection_models
*/
class cdArtist {
/**
* Autoincrement table ID
* @var int
* @Id
* @GeneratedValue
* @Column(type="integer")
*/
protected $id;
/**
* ... | true |
7beb72d6c869a88a692af33c428a6a7c3ebbc789 | PHP | Bruno-Esteban-Martinez-Millan/Proyect | /php/pago.php | UTF-8 | 497 | 2.609375 | 3 | [] | no_license | <?php
require_once("conexion.php");
class Pago extends Conexion{
public function alta($sal1,$fecha_dep1,$met_pag1,$des1){
$this->sentencia = "INSERT INTO pago VALUES (null,1,'$sal1','$fecha_dep1','$met_pag1','$des1')";
$this->ejecutarSentencia();
}
public function consulta(){
$this->sentencia = "SELECT * FROM... | true |
d98a9d6aa5f71e93a2161545d51e3fc580a8fe3e | PHP | chimerarocks/tag | /src/ChimeraRocks/Tag/Models/Tag.php | UTF-8 | 752 | 2.6875 | 3 | [] | no_license | <?php
namespace ChimeraRocks\Tag\Models;
use Illuminate\Contracts\Validation\Validator;
use Illuminate\Database\Eloquent\Model;
class Tag extends Model
{
protected $table = "chimerarocks_tags";
private $validator;
protected $fillable = [
'name',
];
public function taggable()
{
return $this->morphTo();
}... | true |
cfcbd02ca348385dfac6c5df8ae6ed2bb8d425ae | PHP | amm4yv/WebPL | /assignment1/newuser.php | UTF-8 | 1,329 | 2.5625 | 3 | [] | no_license | <?php session_start() ?>
<!DOCTYPE html>
<html>
<head>
<title>Quiz of the Day</title>
<link type="text/css" rel="stylesheet" href="style.css" media="screen" />
</head>
<body>
<header>
<h1>Quiz of the Day</h1>
</header>
<section class="container">
<div class="login">
<h1>Create an Account</h1>
<... | true |
46d58e354801e552cee53370ca7ec60c263baef1 | PHP | AlfredoMarino/SistemaVotacion | /modelo/conection.php | UTF-8 | 1,484 | 3.40625 | 3 | [] | no_license | <?php
//CLASE QUE PROVEE LA CONEXION
class conexion
{
public $conexion;
public $HostName = 'localhost';
public $dbPort = '5432';
public $dbName = 'electionDB';
public $dbUser = 'postgres';
public $dbPassword = 'aamv';
//Propiedad estática, inicializada a nulo, donde guardaremos la instancia... | true |
ad4f2721d1b63205b010f429a538656e22cf7533 | PHP | Efrat19/why-work-twice | /backend/app/Http/Controllers/AdminHomeworkController.php | UTF-8 | 3,002 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\DTO\Homework\StoreHomeworkDto;
use App\Homework;
use App\Http\Requests\Homework\HomeworkRequest;
use App\Repositories\HomeworkRepositoryInterface;
use App\School;
use App\Subject;
use Illuminate\Http\Request;
class AdminHomeworkController extends Controller
{
protect... | true |
e708907c1bcd6a9399079081b5c2267913cba9cd | PHP | arout77/diamondphp | /app/plugins/Geoip.php | UTF-8 | 4,404 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Plugin;
use GeoIp2\Database\Reader;
/*
* DOCUMENTATION:
* https://github.com/maxmind/GeoIP2-php
*/
class Geoip extends \GeoIp2\Database\Reader {
# Database access needed for some calculations
/**
* @var mixed
*/
private $db;
# Search radius properties
/**
* @var array
... | true |
89465dc47de9ca73a271d77420216257da8626e1 | PHP | Stuskoski/Achieve-Life | /achieve/achieve/WebContent/models/GetFriends.class.php | UTF-8 | 1,953 | 2.859375 | 3 | [] | no_license | <?php
include_once("Database.class.php");
class GetFriends{
public function getAll($user){
if(!is_null($user)){
try{
//echo $user;
/*** connect to the database ***/
$dbh = Database::getDB();
/*** The sql statement ***/
$stmt = $dbh->prepare("SELECT user2 FROM Friends WHERE user1=:u... | true |
2bce04bc586baacd2a7636e4501faf7c51f23321 | PHP | appers-platform/platform | /solutions/user/controller/oauth_mailru.php | UTF-8 | 1,790 | 2.515625 | 3 | [
"MIT"
] | permissive | <?
use ohmy\Auth2;
if(\solutions\user::isAuthorized()) {
\response::redirect(self::getConfig('afterAuthUrl'));
}
// @TOOD: url of this page
$redirect = \helper::fullUrl(self::getUrl().'?afterAuthUrl='.urlencode(\solutions\user::getAfterAuthUrl()));
# initialize 3-legged oauth
$auth = Auth2::legs(3)
->set('id', $th... | true |
161e13f720582ec2b05c14a1a94950739c398200 | PHP | magazord-plataforma/madeira-madeira-marketplace | /MadeiraMadeira/Marketplace/Dominio/Lote.php | UTF-8 | 994 | 2.90625 | 3 | [] | no_license | <?php
namespace MadeiraMadeira\Marketplace\Dominio;
/**
* Description of Lote
*
* @author Maicon Sasse
*/
class Lote extends AbstractModel
{
/**
* @var AbstractModel[]
*/
protected $_lista;
public function getLista()
{
return $this->_lista;
}
public function setLista(a... | true |
49eefad7f2a62cde539671dff792093af3126b62 | PHP | InHale1/test | /auth.php | UTF-8 | 2,195 | 2.578125 | 3 | [] | no_license | <br/>
<br/>
<br/>
<br/>
<br/>
<?php
include "config.php";
$db_table_to_show = 'Client';
session_start();
$_SESSION['name'] = $_POST['name'];
$_SESSION['pass'] = md5($_POST['pass']);
if (isset($_POST['exit_btn'])){
session_unset();
header("Location: http://sql-chiibip.rhcloud.com" );
}
if (($_SESSION['nam... | true |
103aed2b81c96a31526c1f8fb05c7089e720a1b4 | PHP | peludomania/cursosUdemy | /SOLID/5 DPI/LocalUserRepository.php | UTF-8 | 247 | 2.828125 | 3 | [] | no_license | <?php
class LocalUserRepository implements UserRepository
{
public function getUser(int $id): User
{
// logica para leer usuario de la base de datos
$user = new User(1, 'Alberto', 'a@a.com');
return $user;
}
} | true |
149d0b69b2531c59395f830a9b0b67f3d93ed687 | PHP | wydhit/phalcon | /common/Services/ComService.php | UTF-8 | 1,791 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: wyd
* Date: 2017-08-02
* Time: 14:17
*/
namespace Common\Services;
use Bizer\Search\ComSearch;
use Common\Exception\LogicException;
use Common\Exception\ModelNotFindException;
use Common\Models\WeCom;
use Common\Models\WeOrder;
use Common\Services\BaseService;
/**
* Cl... | true |
697e21b8f6a96a50c611896b71ae6fa170ae5b06 | PHP | TatAnt/FinalProjectPHP | /classes/Recipe.php | UTF-8 | 8,430 | 3.03125 | 3 | [] | no_license | <?php
require_once "PDO_Database.php";
require_once "Rating.php";
class Recipe{
private $Id;
private $CategoryId;
private $MealTypeId;
private $Name;
private $Ingridients;
private $PrepSteps;
private $PreparationTime;
private $CookingTime;
private $Servings;
private $RecipeDate;
private $Image;
private $Co... | true |
ba946f6bcfc3064446902cd7619c5917305f096c | PHP | norja25/16._julijs | /app/Http/Controllers/Auth/AuthController.php | UTF-8 | 2,933 | 2.609375 | 3 | [] | no_license | <?php namespace Modelbook\Http\Controllers\Auth;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Input;
use Laracasts\Flash\Flash;
use Modelbook\Http\Controllers\Controller;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\Registrar;
use Illuminate\Foundation\Auth\AuthenticatesAnd... | true |
2052d6f23db68e4406a7a8c64483bcb67c9425d3 | PHP | cvuorinen/symfony-legacy-example | /legacy/classes/info.php | UTF-8 | 246 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
class Info
{
function getUsername($id)
{
global $container;
$userRepository = $container->get('acme.demo.repository.user');
$user = $userRepository->find($id);
return $user->getUsername();
}
}
| true |
424e78f20bc1dae9fa652e8303460123266b8145 | PHP | michalsen/rearrange | /includes/admin/class-rearrange-admin.php | UTF-8 | 2,647 | 2.65625 | 3 | [] | no_license | <?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
class RearrangeAdmin {
public function __construct() {
add_action('admin_init', array($this, 'wp_rearrange_admin_init'));
add_action('admin_menu', array($this, 'admin_menu'));
}
public function admin_menu() {
$page = add_... | true |
83be061e1cd449232dc249e4f6b651cc99bdcba3 | PHP | RakeshRoy1995/cart | /admin-panel.php | UTF-8 | 1,436 | 2.578125 | 3 | [] | no_license | <?php
include('header.php');
?>
<?php
include('db.php');
if(isset($_POST['upload'])){
$name = $_POST['name'];
$code = $_POST['code'];
$price = $_POST['price'];
$target = "product-images/".basename($_FILES['image']['name']);
//product-images is the folder name to save picture... | true |
8db1de1e09537d64d242520ad5c6f9750215f516 | PHP | SuddenKey/PHPtext | /db/PHP面向对象程序设计之魔术方法/自动加载类.php | UTF-8 | 651 | 2.84375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: haohao
* Date: 2017/8/22
* Time: 下午1:52
*/
//__autoload 是在实例化对象时,如果累不存在就会被自动调用
//参数:实例化的类名
//作用:可以用于自动引入类文件
function __autoload($classname) {
//注意:类文件名要有规律
// 类文件名要统一
// 类文件的路径要有规律
$file = $classname.".php";
$path = "./class/".$file;
if (file... | true |
887e2f8885fafd2025c3b825fc5297ce1ee327db | PHP | Kenlock/microfinance | /app/Listeners/ClientPendingApprovalTaskListener.php | UTF-8 | 769 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Listeners;
use App\Events\ClientCreatedEvent;
use App\Task;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
class ClientPendingApprovalTaskListener
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()... | true |
06aad1aa3183612f3c97764caee3e725e2d58892 | PHP | JamersonWalderson/challenge-mesha | /app/Http/Controllers/Api/SpecialityController.php | UTF-8 | 1,779 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Api;
use App\Models\Speciality;
use App\Http\Resources\SpecialityResource;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class SpecialityController extends Controller
{
/**
* Display a listing of the resource.
*/
public function index()
... | true |
00b1c75c1ddde97a64e45e18fc4bac9d72e4d627 | PHP | nitsuzxz/Online-Booking-Ticket | /Admin-Side/hall/manageHall.php | UTF-8 | 2,081 | 2.5625 | 3 | [] | no_license | <?php
$cinemaID = '';
$hallName = '';
$hallType = '';
$hallPrice = '';
$hallRow = '';
$hallSeatsPerRow = '';
$query = 'SELECT * FROM hall
INNER JOIN cinema ON hall.hall_cinema_id = cinema.cinema_id
ORDER BY hall_cinema_id ASC';
$res = mysqli_query($conn, $query);
$hallList = mysqli_fetch_all($res, MY... | true |
2cfdf632dd6e2eaf87af21ff8f40d92558eacac2 | PHP | asim-altayb/retrofit-server-side | /login.php | UTF-8 | 794 | 2.765625 | 3 | [] | no_license |
<?php
//getting user values
$username=$_POST['username'];
$password=$_POST['password'];
//an array of response
$output = array();
//requires database connection
require_once('db.php');
//checking if email exit
$conn=$dbh->prepare("SELECT * FROM users WHERE username=? and password=?");
$pass=$password;
$conn->b... | true |
03dd848e3a70348055905a7e0f4955cdd083bf5a | PHP | JosueMOsunaG12/CubeSummation | /tests/CubeControllerTest.php | UTF-8 | 3,275 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class CubeControllerTest extends TestCase
{
/**
* A functional test for index.
*
* @return void
*/
public function testIn... | true |
b90b72d8b4657757aa84e258b60c9f435858be4f | PHP | takumi-okada8817/portfolio | /index.php | UTF-8 | 8,603 | 2.5625 | 3 | [] | no_license | <?php
//ログイン画面
//エラー表示(開発時のみ)
ini_set('display_errors',1);
error_reporting(E_ALL);
require_once('function.php');
if(isset($_POST['login'])){
//セッションスタート
session_start();
//入力値のサニタイズ
$clean = array();
if(isset($_POST)){
... | true |
c0b404962d03d92180b6ee930c77abb2f19e4a06 | PHP | cravler/CravlerRemoteBundle | /Service/RoomsChain.php | UTF-8 | 653 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Cravler\RemoteBundle\Service;
use Cravler\RemoteBundle\Room\RoomInterface;
/**
* @author Sergei Vizel <sergei.vizel@gmail.com>
*/
class RoomsChain
{
/**
* @var array
*/
private $rooms = array();
/**
* @param $room
*/
public function addRoom($room)
{
... | true |
09a3b8972fde6a01cab5725001481e93deae3b41 | PHP | iamandrewluca/psms | /app/Handlers/FakeGuzzleHandler.php | UTF-8 | 5,122 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: andreiluca
* Date: 1/15/18
* Time: 01:45
*/
namespace App\Handlers;
use GuzzleHttp\Promise\Promise;
use GuzzleHttp\Psr7\Response;
use Illuminate\Http\JsonResponse;
use Psr\Http\Message\RequestInterface;
class FakeGuzzleHandler
{
/**
* @param RequestInterface $r... | true |
aabaa2a6fcf3b65c50eb2d365b73296204e11ca8 | PHP | dcods22/ElectricAthletics | /php/search.php | UTF-8 | 2,598 | 2.890625 | 3 | [] | no_license | <?php
class SearchController
{
private $dbconn;
private $table;
function __construct($tablename, $dbname = 'blogdatabase', $dblogin = 'dancody', $dbpass = 'tino24', $url = 'electricathleticscom.ipagemysql.com')
{
$this->dbconn = new PDO("mysql:host=$url;dbname=$dbname", "$dblogin", "$dbpass")... | true |
b7ae0db1fc2155bb526c7604fbc621a3333caa12 | PHP | zyl6868/bh | /common/clients/UserService.php | UTF-8 | 2,927 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
declare(strict_types = 1);
/**
* Created by PhpStorm.
* User: liuxing
* Date: 17-10-16
* Time: 下午4:00
*/
namespace common\clients;
use common\components\MicroServiceRequest;
use common\components\WebDataKey;
use Httpful\Mime;
use Yii;
use yii\db\Exception;
class UserService
{
/**
* @var null
... | true |
ee2715e0ba2119811d65cb7fff1e92abc968e20a | PHP | loovien/shangjialian | /app/Utils/WxUtils.php | UTF-8 | 2,681 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: luowen
* Date: 2017/3/20
* Time: 22:05
*/
namespace App\Utils;
final class WxUtils
{
use SingletonTrait;
/*
* wechat app id
*/
const WX_APPID = "wx41680155348354c9";
/*
* wechat secret
*/
const WX_SECRET = "4bd4ceaaeaab5b46c2e2a0... | true |
4eb12a560e336926ec0a3129e69d935ba6fc3587 | PHP | spryker/git-hook | /src/GitHook/Command/FileCommand/PreCommit/ArchitectureSniff/ArchitectureSniffConfiguration.php | UTF-8 | 740 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* MIT License
* For full license information, please view the LICENSE file that was distributed with this source code.
*/
namespace GitHook\Command\FileCommand\PreCommit\ArchitectureSniff;
class ArchitectureSniffConfiguration
{
/**
* @var array
*/
protected $config;
/**
* @pa... | true |
bc577ba52d9006f19a6b0c7bbf596e6f94b6bf51 | PHP | tiagofrancafernandes/teste-api-enderecos | /docker-php7.4_laravel-pgsql-mysql/public/pdo_test.php | UTF-8 | 1,343 | 2.75 | 3 | [] | no_license | <?php
$type = 'mysql'; //mysql/postgres
$pdo_config = [
'pgsql' => [
'driver' => 'pgsql',
'host' => '127.0.0.1',
'port' => 5432,
'user' => 'postgres',
'password' => 'postgres',
'database' => 'postgres',
'more' => '',
],
... | true |
2d85a1bdccc18800325f5642c124df0423ab1ce5 | PHP | sitedata/panel | /tests/Integration/Api/Client/ClientControllerTest.php | UTF-8 | 5,805 | 2.515625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
namespace Pterodactyl\Tests\Integration\Api\Client;
use Pterodactyl\Models\User;
use Pterodactyl\Models\Server;
use Pterodactyl\Models\Subuser;
use Pterodactyl\Models\Permission;
class ClientControllerTest extends ClientApiIntegrationTestCase
{
/**
* Test that only the servers a logged in user is assi... | true |
4fe4de47bf2f306532ffcef13f0986ad748e7d65 | PHP | trailburning/tb-api | /src/AppBundle/Repository/UserRepository.php | UTF-8 | 975 | 2.515625 | 3 | [] | no_license | <?php
namespace AppBundle\Repository;
use AppBundle\Entity\User;
class UserRepository extends BaseRepository
{
/**
* @param int $limit
*
* @return User[]
*/
public function findLatestActiveWithAvatar($limit = 10): array
{
$clientId = 'race_base';
$qb = $this->getQB();
... | true |
b96272de4d0195faceee9a967686ab253a9a4a3c | PHP | kikipermana17/latihan-git | /rekursif/latihan/latihan1.php | UTF-8 | 1,004 | 3.109375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<fieldset>
<legend>Perhitungsn</legend>
<form action=" " ... | true |
86894760201e0f19d6b3ed9b67baeb1addaa47c0 | PHP | kvu-luong/data_web2 | /model/CategoryModel.php | UTF-8 | 604 | 3.03125 | 3 | [] | no_license | <?php
class CategoryModel{
var $category_id ;
var $categoryName;
function __construct($category_id, $categoryName) {
$this->category_id = $category_id;
$this->categoryName = $categoryName;
}
function getCategory_id() {
return $this->category_id;
}
... | true |
9d8035ed6f0e981c7385f8b91feb906b2d4f263f | PHP | algo26-matthias/phlymail | /phlymail/shared/lib/phlyDAV/Locks.php | UTF-8 | 4,352 | 2.765625 | 3 | [] | no_license | <?php
/**
* extending functionality for SabreDAV
* @package phlyMail Nahariya 4.0+ Default branch
* @subpackage WebDAV server
* @copyright 2009-2015 phlyLabs, Berlin (http://phlylabs.de)
* @version 0.0.3 2015-03-12
*/
class phlyDAV_Locks extends Sabre_DAV_Locks_Backend_Abstract {
/**
* The DB connectio... | true |
c11af192a5c19d673f69fc214b0cab0a915f2544 | PHP | nilsenj/storecamp | /app/Core/Transformers/LayoutTransformer.php | UTF-8 | 641 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Core\Transformers;
use League\Fractal\TransformerAbstract;
use App\Core\Models\Layout;
/**
* Class LayoutTransformer
* @package namespace App\Core\Transformers;
*/
class LayoutTransformer extends TransformerAbstract
{
/**
* Transform the \Layout entity
* @param \Layout $model
... | true |
6325fe2c063502b6d8f74284d51ce6802905f579 | PHP | nguaki/PHP | /PHPUNIT/jeffreyway/tips-tricks-pitfalls/tests/MockTest.php | UTF-8 | 942 | 3.3125 | 3 | [] | no_license | <?php
class MockTest extends PHPUnit_Framework_TestCase
{
public function test_mockery()
{
//Nov 12, 2018
//Mocking is a way to fake calling.
//This is not a good example of mocking.
//A good example is as follows:Lets say you need to test
//a method which inserts a row of a new user and send an
//email... | true |
59ea1bca94040b36246db5e57168a3d6aab2e6e9 | PHP | anthony39100/cinema | /src/Entity/Acteur.php | UTF-8 | 2,488 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\ActeurRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ActeurRepository::class)
*/
class Acteur
{
/**
* @ORM\Id
* @ORM\GeneratedVal... | true |
cc931e593057c35f0cd4d8ef5040c86dc5dc625d | PHP | SergSad/prize | /models/UserPrizes.php | UTF-8 | 2,021 | 2.6875 | 3 | [] | permissive | <?php
declare(strict_types=1);
namespace app\models;
use Yii;
use yii\db\ActiveQuery;
/**
* This is the model class for table "user_prizes".
*
* @property int $id
* @property int $user_id
* @property string $prize_type
* @property boolean $is_send
*
* @property ActiveQuery $prize
*... | true |
ac78d31d88cf7012378b9d86378141042f1dab78 | PHP | Oskitaa/Velazquez | /Servidor/php/ddbb/login/creaAlumnos/muestraAlumnos.php | UTF-8 | 824 | 2.59375 | 3 | [] | no_license | <?php
require_once('../conexion.php');
print (compareHas("123456","10$614b8e510efc167704a728634b1a7f5f"));
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Muestra Alumnos</title>
</head>
<body>
<?php
... | true |
5971a00d124b8db5ca0497d72e7beb4fbfeb59c8 | PHP | 2dq2t/FSMProject | /backend/components/Logger.php | UTF-8 | 7,103 | 2.953125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\components;
use Yii;
use DateTime;
use RuntimeException;
use yii\helpers;
use yii\helpers\FileHelper;
/**
* Class Logger is contain attributes and functions correlate log
*/
class Logger {
const INFO = 'INFO';
const ERROR = 'ERROR';
const WARNING = 'WARNING';
/**
* Th... | true |
3742797073e6ab280aae7763fc29d13acda53be3 | PHP | mindXtension/civicracy | /civi-php/protected/views/vote/_path.php | UTF-8 | 1,436 | 2.859375 | 3 | [] | no_license | <?php
/**
* Graphical display of vote path - shows where the user's vote is being delegated to
*
* @param array $votePath array of vote elements, each with realname, slogan, candidate_id, reason
* @param boolean $noSloganChange optional to hide slogan-change button
*/
foreach($votePath as $vote)
{ ?>
<div cla... | true |
0b876e3345fe7bc90a056247777e1492cb830920 | PHP | Boyche/shortenUrlFix | /backend_tests/url_shortener/openUrl.php | UTF-8 | 1,092 | 2.78125 | 3 | [] | no_license | <?php
if(isset($_GET['shortUrl'])){
$url = $_GET['shortUrl'];
require_once('functions.php');
$conn = connectToDatabase();
//preparing query that will find real url hidding behind short url if it exists
$query = "SELECT *
FROM `requests`
WHERE SHORTURL = ?";
$stmt = $conn->prep... | true |
a2dafd47dc69c6c53ea99c8beca9e83a1a6cd2b5 | PHP | mineirim/observer | /application/modules/data/models/Projetos.php | UTF-8 | 4,974 | 2.734375 | 3 | [] | no_license | <?php
class Data_Model_Projetos {
private $_db_table;
/**
*
* @param int $projeto_id
* @return Data_Model_DbTable_Rowset_Organizacoes
*/
public function getFinanciadores($projeto_id) {
$projetosTable = new Data_Model_DbTable_Projetos();
/* @var $projeto Data_Model_DbTable_Row_Projeto */
$projeto = $pr... | true |
d3891d9481abee189056f659bb82d6e5711fa4ea | PHP | dimitar1024/Telerik | /PHP web development Gatakka/Telerik - 05. ExtensionBooksCataloge/register.php | UTF-8 | 2,775 | 2.671875 | 3 | [] | no_license | <?php
ob_start();
$title = 'Регистрация';
include 'includes/header.php';
include 'includes/functions.php';
?>
<nav>
<ul>
<li>
<a href="login.php">Вход</a>
</li>
<li>
<a href="index.php">Книги</a>
</li>
<li>
<a href="book.php">Нова Книга</a>
</li>
<li>
<a href="author.php">Нов Автор</a>
</li... | true |
fa647d1fd5f07aacf9cdff0dc6a4d61922530539 | PHP | jefftocco21/LearningPHP | /LearningPHP/Chaper_3/arithmetic_operators.php | UTF-8 | 181 | 3.6875 | 4 | [] | no_license | <?php
//standard across most languages, following pemdas
echo 5 * 6 + 3 - 1 . '<br>';
echo (5 * 6) + 3 - 1;
echo '<br>';
//Square of a number
echo 5**2;
?> | true |
758d26d9f7e05ea5963f4fe35756288370091f4d | PHP | dengchunhui/classlib | /PHP_常用类class/class/checklogin.class.php | UTF-8 | 806 | 2.609375 | 3 | [] | no_license | <?php
class checklogin {
var $name;
var $pwd;
function __construct($username, $password) {
$this->name = $username;
$this->pwd = $password;
}
function checkinput() {
global $db;
$sql = "select * from tb_manager where name='$this->name' and pwd='$this->pwd'";
... | true |
06e9226a6900e00f4c14a2306ec930d53a56185d | PHP | shardulrane/Web-Development-Using-PHP | /MIS/jhc_mis/admin/addsession2.php | UTF-8 | 857 | 2.546875 | 3 | [] | no_license | <?php
session_start();
$q=$_GET["q"];
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "MIS";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error)
{
die("Connection failed: " . $conn->connect_error)... | true |
a498ed1ce79caa025cd7e89c4983dcb02c907b2e | PHP | phpstan/phpstan-src | /tests/PHPStan/Rules/DummyCollector.php | UTF-8 | 519 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace PHPStan\Rules;
use PhpParser\Node;
use PhpParser\Node\Expr\MethodCall;
use PHPStan\Analyser\Scope;
use PHPStan\Collectors\Collector;
/**
* @implements Collector<MethodCall, string>
*/
class DummyCollector implements Collector
{
public function getNodeType(): string
{
... | true |
f7b2c6df54ffb13313cebfed16e6640bb2f39cb3 | PHP | andrey-silivanov/Geonames | /src/Repositories/Admin1CodeRepository.php | UTF-8 | 920 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace MichaelDrennen\Geonames\Repositories;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use MichaelDrennen\Geonames\Models\Admin1Code;
class Admin1CodeRepository {
/**
* @param string $countryCode
* @param string $admin1Code
* @return Admin1Code
*/
public function... | true |
5786d6d794d9e47e91bcdbac3445a9a90df746c2 | PHP | maciejslawik/otomoto-scrapper | /src/App/Manufacturer/Scrapper/ManufacturerHtmlScrapperInterface.php | UTF-8 | 571 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* File: ManufacturerHtmlScrapperInterface.php
*
* @author Maciej Sławik <maciekslawik@gmail.com>
* Github: https://github.com/maciejslawik
*/
namespace MSlwk\Otomoto\App\Manufacturer\Scrapper;
use MSlwk\Otomoto\App\Manufacturer\Data\ManufacturerDTOArray;
/**
* Interface ManufacturerHtmlScra... | true |
e4fb8a6c106c6da4d39ffa020df45d5e412ee51a | PHP | hongha1997/Lbstory_Laravel | /app/Http/Controllers/Admin/CatController.php | UTF-8 | 3,666 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\Cat;
use App\Story;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class CatController extends Controller
{
public function __construct(Cat $mcat, Story $mstory){
$this->mcat = $mcat;
$this->mstory = $mstory;
}
public function inde... | true |
f4c95489c08a70b4099a020a00277c1d74e4d91f | PHP | leopires/billion-dollar-app | /brand-actions.php | UTF-8 | 696 | 2.59375 | 3 | [] | no_license | <?php
if (!$_POST)
header("Location: index.html");
$brandName = $_POST['txtBrand'];
if ($brandName) {
$errorMessage = NULL;
$db = NULL;
try {
$db = new PDO("sqlite:db/db-billion-dollar-app.sqlite");
$query = $db->prepare("INSERT INTO CAR_BRANDS (BRAND) VALUES (?)");
if ... | true |
ff31792fc50213df93f31e9263d78c46dca2a0db | PHP | yzawudi/food_web | /login.php | UTF-8 | 981 | 2.75 | 3 | [] | no_license | <?php
/*开启会话*/
//session_start();
$data=$_POST;
/*获取登录表单提交过来的数据*/
$user=$data['Username'];
$pwd=$data['Password'];
// 创建连接
$conn = new mysqli('localhost', 'root', 'root', 'test');
// Check connection
if ($conn->connect_error) {
die("连接失败: " . $conn->connect_error);
}
$sql = "select * from `user` wher... | true |
6f738db3b0e98f78b6f4983b8792aa72aeb80545 | PHP | itstructure/yii2-template-multilanguage | /models/AboutQuality.php | UTF-8 | 2,288 | 2.65625 | 3 | [] | permissive | <?php
namespace app\models;
/**
* This is the model class for table "about_qualities".
*
* @property int $about_id
* @property int $qualities_id
*
* @property About $about
* @property Quality $quality
*/
class AboutQuality extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static f... | true |
1a370dd05a0d4ae9c6a7ad00e1d73f6aa5657948 | PHP | CindyLilianaDiaz/ContentManagementSystem | /edit-admin.php | UTF-8 | 2,021 | 2.75 | 3 | [] | no_license | <?php ob_start();
require_once('auth.php');
//set the page title
$title = 'Edit Administrator';
require_once('header.php');
//check if we have an user ID in the querystring
//isset means does this value has something or it is null
if(isset($_GET['user_id'])) {
//if we do, store in a variable
$user_id ... | true |
144bfdffcc574ef09d2c645e748b6d3a09e00dad | PHP | usg2010/usg | /mail.php | UTF-8 | 627 | 2.734375 | 3 | [] | no_license | <?php
if(isset($_POST['submit'])){
$name = $_POST['name'];
$email= $_POST['email'];
$phone= $_POST['phone'];
$msg=$_POST['msg'];
$to = "usg.lu.21@gmail.com";
$subject = "From submission";
$message="Name: ".$name."\n".$phone."\n"."wrote the followin... | true |
64eb39fa32b819025ba442fb347a49a9e0b044e8 | PHP | FrittenKeeZ/laravel-vouchers | /tests/HasVouchersTest.php | UTF-8 | 3,478 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace FrittenKeeZ\Vouchers\Tests;
use FrittenKeeZ\Vouchers\Tests\Models\Color;
use FrittenKeeZ\Vouchers\Tests\Models\User;
use FrittenKeeZ\Vouchers\Vouchers;
/**
* @internal
*/
class HasVouchersTest extends TestCase
{
/**
* Test HasVouchers::createVoucher().
*
... | true |
c62e112688d2e7e258822a353b4f01c329b0a0c2 | PHP | kdrdmr/dhl-sdk-api-express | /src/Webservice/Soap/Type/Tracking/ShipperReference.php | UTF-8 | 1,044 | 2.6875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* See LICENSE.md for license details.
*/
namespace Dhl\Express\Webservice\Soap\Type\Tracking;
/**
* ShipperReference class.
*
* @api
* @author Ronny Gertler <ronny.gertler@netresearch.de>
* @link https://www.netresearch.de/
*/
class ShipperReference
{
/**
* @var string
*/
pro... | true |
109cad23c64c23333e02edf54cfd007da3ffb6b0 | PHP | jezzaluzande/thisproject | /odll/application/base.php | UTF-8 | 2,963 | 2.734375 | 3 | [] | no_license | <?php
class Application
{
var $uri;
var $model;
var $db;
function __construct($uri)
{
$this->uri = $uri;
}
function loadDatabase()
{
$this->db = new Database;
//connect to database
$this->db->connect();
}
function loadController($class)
{
$file = "application/controller/".$this->... | true |
6c6de91be03bdc913f64aa7e1eb1a179db342462 | PHP | aLuckyfellow/agileSwoole | /src/Kernel/Core/Route/IRoute.php | UTF-8 | 159 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Kernel\Core\Route;
interface IRoute
{
public function add(string $method, string $path, $closure) : IRoute;
public function getRouter();
} | true |
5c570dc0ad45806d89e705d98c48495b4352f85d | PHP | Aviyajeet/PHPProject_CE140_CE077 | /MobileShop/EditMobile.php | UTF-8 | 5,457 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
error_reporting(E_ALL ^ E_DEPRECATED);
require_once('User.php');
require_once('DataBase.php');
require_once('Mobile.php');
session_start();
$mobile = null;
$DB = new DataBase();
if(
(isset($_SESSION['AdminID']) && !empty($_SESSION['AdminID']))
&& ((!empty($_POST['ID']))&& (isset($_POST['ID'])))
&& (... | true |
d7afdc8733a0d326416fbeb933ffc1506a74ab1d | PHP | luobobaozi/HC | /Server/GameServer/server2/DbModule/SysPlayerConnectionInfo.php | UTF-8 | 19,606 | 2.515625 | 3 | [] | no_license | <?php
require_once ($GLOBALS ['GAME_ROOT'] . "CMySQL.php");
require_once ("SQLUtil.php");
/**
* [The generated files]
*/
class SysPlayerConnectionInfo {
private /*string*/ $id; //PRIMARY KEY
private /*string*/ $user_id;
private /*int*/ $server_id;
private /*string*/ $account;
private /*string*/ $proxy_id;
... | true |
278570662e5c68e767979631de6da4f9d9c5f6e4 | PHP | kamguir/garagelavage | /lib/model/TblFacture.php | UTF-8 | 5,557 | 2.671875 | 3 | [] | no_license | <?php
/**
* Skeleton subclass for representing a row from the 'tbl_facture' table.
*
*
*
* This class was autogenerated by Propel 1.6.6-dev on:
*
* 10/12/13 18:14:04
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as i... | true |
5b26591d7f2684062ae3eef4907331086fb53858 | PHP | balihoo/scrumboard | /RestClient.php | UTF-8 | 6,448 | 2.890625 | 3 | [] | no_license | <?php
/*
Copyright (c) 2012 Balihoo, Inc.
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, d... | true |