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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
485143f2f99c5e7a6c9a7024c8a7b1243048f243 | PHP | requtize/routing | /tests/unit/Routing/RouteCollectionTest.php | UTF-8 | 14,912 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
use Requtize\Routing\RouteCollection;
use Requtize\Routing\Route;
class RouteCollectionTest extends PHPUnit_Framework_TestCase
{
protected $collection;
protected function setUp()
{
$this->collection = new RouteCollection;
}
protected function tearDown()
{
$this->collect... | true |
9e65fce5f5dbd36253b89bbb2962c3def77b59d5 | PHP | phoebius/proof-of-concept | /lib/Cache/Cache.class.php | UTF-8 | 2,410 | 2.6875 | 3 | [] | no_license | <?php
/* ***********************************************************************************************
*
* Phoebius Framework
*
* **********************************************************************************************
*
* Copyright (c) 2009 phoebius.org
*
* This program is free software; you can redist... | true |
6d302f05ab9cefc1555646bbf2112d8af13ad986 | PHP | mafd16/curious-george | /src/Pages/PagesController.php | UTF-8 | 6,077 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Mafd16\Pages;
use \Anax\Configure\ConfigureInterface;
use \Anax\Configure\ConfigureTrait;
use \Anax\DI\InjectionAwareInterface;
use \Anax\DI\InjectionAwareTrait;
use DateTime;
/**
* A controller class for the main pages.
*/
class PagesController implements
ConfigureInterface,
InjectionAware... | true |
3c645833ca46804e95f3c8be5bbddccbaae4b25b | PHP | MazurekPiotr/web-backend-oplossingen | /Opdracht-CRUD-queryorderby/index.php | UTF-8 | 2,309 | 2.953125 | 3 | [] | no_license | <?php
try{
if(isset($_GET['order_by']))
{
$orderArray = explode('-', $_GET['order_by']);
$orderColumn = $orderArray[0];
$order = $orderArray[1];
}
$db = new PDO('mysql:host=localhost;dbname=bieren', 'root', 'rtoip3107')... | true |
a7b48b9645f905d812e6ee2c3a7198a8cbe51a0e | PHP | katheroine/languagium | /php/arrays/operations_on_elements/prepending_elements.php | UTF-8 | 373 | 2.921875 | 3 | [] | no_license | #!/usr/bin/php8.0
<?php
$array = [2, 4, 6];
print("Initial state:\n\n");
print_r($array); print("\n");
// array_unshift
array_unshift($array, 0);
print("After prepend by array_unshift(\$array, 0):\n\n");
print_r($array); print("\n");
array_unshift($array, -6, -4, -2);
print("After prepend by array_unshift(\$arra... | true |
ca84a5228ddadbb4ee12c85f51e1b3cc89ecd2a0 | PHP | huntercasteel/MyHealth-Portal | /patient-services.php | UTF-8 | 10,490 | 2.796875 | 3 | [] | no_license | <?php
session_start();
error_reporting(0);
include 'includes/dbconn.php';
$conn = new mysqli($servername, $username, "", "db1", $sqlport, $socket);
if($conn->connect_error)
{
die("Connection failed: " . $conn->connect_error);
}
$patientID = $_SESSION['PATIENT_ID'];
$patient = mysqli_fetch_assoc(mysqli_qu... | true |
ba4109a7dbd689f425156a68cbf2749d01e41c50 | PHP | wuyonghui666/PMPDailyTest | /day24.php | UTF-8 | 214 | 3.28125 | 3 | [] | no_license | <?php
function Add($num1, $num2)
{
if($num1 == 0)
{
return $num2;
}
if($num2 == 2)
{
return $num1;
}
$num1 = array_sum($num1,$num2);
return $num1;
}
echo Add(0,1); | true |
6774e7bff5dfd1db1852373398ed2b8e555a69a1 | PHP | 04andresdiaz/sisadmin | /consultas/consulta_reserva_usuarios.php | UTF-8 | 881 | 2.515625 | 3 | [] | no_license | <?php
require ("../global/conexion.php");
session_start();
if (isset($_SESSION['id_usuario'])) {
$id_usuario = $_SESSION['id_usuario'];
$consulta = $conexion -> query("SELECT * FROM reservas ");
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href... | true |
c467a58f49cce8f5026eeaf2de719b083b4bf5cc | PHP | rizkiaprilan/Laravel---Student-Management | /database/seeds/StudentSeeder.php | UTF-8 | 680 | 2.703125 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use Faker\factory as Faker;
class StudentSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$data = [
['majority_id'=>1],
['majority_id'=>2],
['majority_id'=>... | true |
351c8f41dfb89a2833a01cad05d2df984156f916 | PHP | amarzora/banana | /app/Http/Requests/MoviesRequest.php | UTF-8 | 1,915 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: machine
* Date: 10/03/16
* Time: 16:51
*/
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
/**
* Class CategoriesRequest
* @package App\Http\Requests
* @package App\Http\Requests
*/
class MoviesRequest extends FormRequest
{
/**
* crration d... | true |
67915e69950e090228cd1316de3a0f4a0249bc4e | PHP | jgthms/forest | /madeleine/admin/widgets/videos-widget.php | UTF-8 | 4,119 | 2.5625 | 3 | [] | no_license | <?php
/*-----------------------------------------------------------------------------------
Plugin Name: Madeleine videos Widget
Plugin URI: http://haxokeno.com
Description: A widget that displays a list of your latest videos, with a pagination
Version: 1.0
Author: Haxokeno
Author URI: http://haxokeno.com
------... | true |
82ebe6d7d335f2985d873a69f22f5958acd7ed9b | PHP | yijie8/shopForSwoft | /app/Services/UtilService.php | UTF-8 | 4,359 | 2.65625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | <?php
namespace App\Services;
use Swoft\Http\Message\Request;
class UtilService
{
/**
* 获取POST请求的数据
* @param $params
* @param null $request
* @param bool $suffix
* @return array
*/
public static function postMore($params, $request = null, $suffix = false)
{
if ($request === null) $reques... | true |
f75b8f49b47923602232107c7f7f9708120f0514 | PHP | Zhouxiaoqing/zphp | /classes/Common/ClassLocator.php | UTF-8 | 364 | 2.578125 | 3 | [] | no_license | <?php
namespace common;
use framework\util\Singleton;
/**
* 获取class实例的工具类
*
* @package service
*
*/
class ClassLocator {
public static function getService($service) {
return Singleton::get("service\\{$service}Service");
}
public static function getDao($dao) {
return Singleton::get(... | true |
2f546fad4a7f8d39fa2412783f13620869ef5ea4 | PHP | BreizhTek/IntranetCesi | /controller/ControllerLogin.php | UTF-8 | 1,765 | 2.765625 | 3 | [] | no_license | <?php
//require '/path/to/FlashMessages.php';
require_once "ressources/modele/ModelLogin.php";
class ControllerLogin {
public function index(){
require "./view/login.php";
}
/**
* Function which chek email and password
*/
public function authentification(){
$mail = ... | true |
470b39dae2a9c023c2729a8ddd112b5b99557310 | PHP | ps7is/PokemonGoAPI-PHP | /res/POGOProtos/Networking/Requests/Messages/GetGymDetailsMessage.php | UTF-8 | 6,426 | 2.796875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
// Generated by https://github.com/bramp/protoc-gen-php// Please include protocolbuffers before this file, for example:
// require('protocolbuffers.inc.php');
// require('POGOProtos/Networking/Requests/Messages/GetGymDetailsMessage.php');
namespace POGOProtos\Networking\Requests\Messages {
use Protobuf;
... | true |
e80a80021a85cd6ccc50c55d0901e82f48036144 | PHP | DanielCsonka987/WFAThesisProject | /WFAThesisProject/ThesisChemoSafeStore/php/logingIn/passwordTester.php | UTF-8 | 565 | 3.1875 | 3 | [] | no_license | <?php
class passwordRevise{
private $writtenPassword;
private $hashedPassword;
public function setPasswordDatas($norm, $hashed){
$this -> writtenPassword = $norm;
$this -> hashedPassword = $hashed;
}
public function verifyPassword(){
if ($this -> writtenPasswo... | true |
addd1ca60835cef0fc290828dbbae2002b87c527 | PHP | Sohrab-hossain/Training-Center-Management-System | /client/student_course.php | UTF-8 | 1,810 | 2.53125 | 3 | [] | no_license | <div class="links">
<a href="?p=student_course_new">Enter New Student Course</a>
</div>
<?php
$cn = mysqli_connect("localhost", "root", "", "dbuscoaching");
if(isset($_GET['student']) && isset($_GET['course']))
{
$sql = "delete from student_course where studentId = ".mysqli_real_escape_string($cn, base64_decod... | true |
890c0ea85f79fa228f5a55c1e45c5ca42b99d091 | PHP | renegare/skip_php_framework | /tests/Skip/Tests/Dummy/TestModel.php | UTF-8 | 286 | 2.734375 | 3 | [] | no_license | <?php
namespace Skip\Tests\Dummy;
class TestModel {
// stub
public function getData() {}
public function setDummyService( TestModel $service ) {
// just called so this can be tested!
$service->getData();
}
} | true |
7b712920fa508dcfc5952193920f18b40663b3cf | PHP | AlejandraGomez1994/SGV | /Modelo/ModEspecieID.php | UTF-8 | 1,715 | 3.015625 | 3 | [
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | <?php
class EspecieID
{
private $id;
private $descripcion;
public function __construct($id,$descripcion)
{
$this->descripcion=$descripcion;
$this->id=$id;
}
public function setId($id)
{
$this->id=$id;
}
public function setDescripcion($descripcion)
{
... | true |
a44695d08100ab924d24e64bcbd053fb6e4a4ff8 | PHP | vargasgabriel/exercism-tracks | /php/gigasecond/gigasecond.php | UTF-8 | 128 | 2.65625 | 3 | [] | no_license | <?php
function from($date)
{
$new_date = clone($date);
return $new_date->add(new DateInterval('PT1000000000S'));
} | true |
526768f0e8b2daf74fdfa4cec59fc36f3105faaa | PHP | Besmerch123/phone.book | /application/libraries/IDriver.php | UTF-8 | 431 | 2.765625 | 3 | [] | no_license | <?php
namespace application\libraries;
interface IDriver
{
public function __construct($host, $database, $user, $password, $port, $charset);
public function getConnection();
public function find($table, $id = null);
public function insert($table, $data);
public function update($table, $data, $... | true |
a8d4eeb5046929c6e65bd091fa080ba6c5195b5e | PHP | wascasla/voley7 | /app/models/Partido.php | UTF-8 | 2,299 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
class Partido extends Eloquent { //Todos los modelos deben extender la clase Eloquent
protected $table = 'partido';
protected $fillable = array("fechaPartido","horaPartido","datosPartido","fecha_id","equipoLocal","equipoVisitante","golEquipoLocal","golEquipoVisitante","cargado");
//un partido perte... | true |
81930df36a8fbc2ddbb65ebc2b32e3145a68345a | PHP | MatheusOliveira10/tccMatheus_Bruno | /controller/LeituraController.php | UTF-8 | 2,077 | 2.515625 | 3 | [] | no_license | <?php
//require "model/query.php";
class LeituraController
{
public function view()
{
$qry = "SELECT assentos.id, passageiros.nome, assentos.posicao, passagens.preco, assentos.PCD, assentos.overbooking FROM assentos INNER JOIN passagens on assentos.id_passagem = passagens.id ";
$qry .= "INNER ... | true |
e75e8575488e3c8bcd4aac8e5d697aa90b270adf | PHP | Nza6920/FinancialSystem | /app/Http/Requests/AddIncomeRequest.php | UTF-8 | 1,008 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class AddIncomeRequest extends FormRequest
{
public function authorize()
{
return true;
}
public function rules()
{
return [
'money' => 'required|numeric|regex:/^[0-9]+\.?[0-9]{0,9}$... | true |
8181360ae98316942f1705c4999a953eb2b1fc4a | PHP | caduzindev/imoveisBackend | /app/helpers.php | UTF-8 | 431 | 2.59375 | 3 | [] | no_license | <?php
use Image;
use Illuminate\Support\Facades\Storage;
function SaveImageDir($file,$dimension,$dir): string{
$img = Image::make($file);
$resize = $img->fit($dimension)->encode($file->extension());
$hash = md5($resize->__toString().now());
$path = $dir.'/'.$hash.'.'.$file->extension();
$pat... | true |
f7e82fa1f249c3b450655dec91e33b66b5dead53 | PHP | munizeverton/crud | /app/View/Funcionarios/index.ctp | UTF-8 | 1,072 | 2.546875 | 3 | [] | no_license | <h1>Funcionários Cadastrados</h1>
<table>
<tr>
<th></th>
<th>Nome</th>
<th>Email</th>
<th>Ação</th>
</tr>
<?php
$cont = 1;
foreach ($funcionarios as $funcionario){ ?>
<tr>
<td><?php echo $cont; $cont++ ?></td>
<td>
<?php echo $this->... | true |
8411a71812288cd40fe93c302230f891f0a67c45 | PHP | a285577011/Laravel | /goWhere/02Source/app/Models/FairReservation.php | UTF-8 | 1,308 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class FairReservation extends Model
{
protected $table = 'fair_reservations';
public $timestamps = false;
/**
* 定义与fair表的关系
*/
public function fairs()
{
return $this->belongsTo('\App\Models\Fair', 'fair_id');... | true |
3ae2fff53157f8236be6971217ff943822a039bd | PHP | nathanlesage/Zettlr_old | /app/Http/Controllers/ReferenceController.php | UTF-8 | 9,121 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\RedirectResponse;
use Illuminate\Support\Collection;
use App\Http\Requests;
use App\Reference;
use App\Note;
use Validator;
use Storage;
use Illuminate\View\View;
use OpenJournalSoftware\BibtexBundle\Helper\Bibtex;
class Refe... | true |
50cf71cafec3df1d236d887bbbeb38f1383b40ac | PHP | DeepakZelite/Research | /app/Repositories/Company/EloquentCompany.php | UTF-8 | 7,150 | 2.546875 | 3 | [] | no_license | <?php
namespace Vanguard\Repositories\Company;
use Vanguard\Company;
use Carbon\Carbon;
class EloquentCompany implements CompanyRepository
{
public function __construct()
{
}
/**
* {@inheritdoc}
*/
public function find($id)
{
return Company::find($id);
}
/*publ... | true |
f960a04ab2be1b66aa0aef487b5e8cf2ec54f8cb | PHP | AyakaNomura/tourapps | /app/User.php | UTF-8 | 1,866 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email',... | true |
79f6ab96eeff4b1a003cc61dc68a48a4cfa9e997 | PHP | bernardxf/wodstormapp | /src/Crossfit/Dados/AgrupadorFinanceiro.php | UTF-8 | 503 | 2.5625 | 3 | [] | no_license | <?php
namespace Crossfit\Dados;
use Crossfit\Conexao;
use Crossfit\App;
class AgrupadorFinanceiro
{
public static function retornaTodos()
{
$sql = "SELECT * from agrupador_financeiro where id_organizacao = ?";
$resultado = Conexao::get()->fetchAll($sql, array(App::getSession()->get('organizacao')));
return $... | true |
596666b19c1b1af76ff3394499155be5653398a2 | PHP | BackupYM/MyRepositoryGit | /includes/pages/user/registerUser.php | UTF-8 | 2,754 | 2.71875 | 3 | [] | no_license | <?php
//Vérifie qu'il est administrateur
confirm_is_admin();
if (isset($_POST['submit']))
{
$name = $_POST['name'];
$first_name = $_POST['first_name'];
$username = $_POST['username'];
$password = $_POST['password'].'?$#à9';
$query = "INSERT INTO users (user_name... | true |
7e9b7ec4ec836b4bb4c388a863b61b114f7f57d7 | PHP | 00F100/fcphp-shttp | /src/SEntity.php | UTF-8 | 7,128 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
namespace FcPhp\SHttp
{
use FcPhp\SHttp\Interfaces\ISEntity;
class SEntity implements ISEntity
{
/**
* @var array Types available to login
*/
private $types = [
null => 'guest',
1 => 'admin',
2 => 'user',
];
... | true |
a1dc1d8e1ce23aae6c7695e885d308c33c8b8cdf | PHP | flamisz/music-streaming | /app/DataTransferObjects/StoreLikesData.php | UTF-8 | 681 | 2.65625 | 3 | [] | no_license | <?php
namespace App\DataTransferObjects;
use App\Actions\DeleteOldLikesAction;
use App\DataTransferObjects\LikeData;
use App\Http\Requests\StoreLikeRequest;
use Spatie\DataTransferObject\DataTransferObject;
class StoreLikesData extends DataTransferObject
{
/** @var \App\DataTransferObjects\LikeData[] */
publ... | true |
41eb0c53ce88c60df23b982b2c628eaf0850ba15 | PHP | hynner/glotr-sync | /services/users.php | UTF-8 | 1,815 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
class users extends base
{
protected $tblName = "users";
protected $idField = "id_user";
public function login($name, $password)
{
$name = $this->container["database"]->escape($name);
$ret = $this->container["database"]->queryAndFetch("select * from $this->tblName where username = ... | true |
6944a688af4a7ce4f4528d9874d34b92d5510197 | PHP | djkost85/ngn | /ngn/lib/more/stm/StmDataManager.class.php | UTF-8 | 5,458 | 2.5625 | 3 | [] | no_license | <?php
class StmDataManager extends DataManagerAbstract {
/**
* type - для имен классов
* subType - для папок
*/
protected $requiredOptions = array('type', 'subType', 'location');
public function __construct(array $options = array()) {
$this->setOptions($options);
parent::__construct(new Form... | true |
89b66a2ec6298e03b9f1977b1ab6f5bce980a10f | PHP | antonday07/1909ePHP | /Day15(PHP)/001/index3.php | UTF-8 | 726 | 3.3125 | 3 | [] | no_license | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Php first 1</title>
</head>
<body>
<pre>
... | true |
700b25ca4ecd6e085ff2c2065cad73c32fef3c9e | PHP | symplely/http2 | /src/UpgradeStream.php | UTF-8 | 2,068 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Concurrent PHP HTTP.
*
* (c) Martin Schröder <m.schroeder2007@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types = 1);
namespace Concurrent\Http;
use Concurrent\Netwo... | true |
6185b225de6c6a9114143d64163446c3d42f30cd | PHP | Joker-Peng/TheDocsOfJob | /algorithm/selection_sort.php | UTF-8 | 1,251 | 3.734375 | 4 | [] | no_license | <?php
/**
* 选择排序
* @authors Joker (njfupl@foxmail.com)
* @date 2017-10-22 11:48:15
*
* 一种简单直观的排序算法。它的工作原理是每一次从待排序的数据元素中选出最小(或最大)的一个元素,存放在序列的起始位置,
* 然后,再从剩余未排序元素中继续寻找最小(大)元素,然后放到已排序序列的末尾。
* 以此类推,直到全部待排序的数据元素排完。
* 选择排序是不稳定的排序方法。
*
* 时间复杂度: O(n*n)
*
* 实现数组的升序
*/
echo "<pre>";
function se... | true |
ec84cae569c99fa6ab067d3a0e23c248fcd40483 | PHP | Shamyyoun/GPSTrackingAPIs | /get_vehicles.php | UTF-8 | 1,335 | 2.8125 | 3 | [] | no_license | <?php
require_once 'connection.php';
// change content type to json
header('Content-type: application/json');
if (isset($_GET['username'])) {
// escape sql statements from parameters
$username = mysql_real_escape_string($_GET['username']);
// validate required inputs
if (empty($username)) {
... | true |
d5d113d349060be4abb02d62fe236172a9f4af25 | PHP | hoanganf/pos-local-api | /src/models/dao/OrderDAO.php | UTF-8 | 2,910 | 2.625 | 3 | [] | no_license | <?php
class OrderDAO extends BaseDAO{
function __construct(){
parent::__construct("`order`");
}
//getOrderListByArea
function getOrderListGroupByTableInArea($area_id=-1){
$sql=null;
if($area_id>0){
$sql='SELECT o.*,t.name as table_name, sum(o.count) as count_sum,sum(o.price) as price_sum FRO... | true |
594bb4d962449f6e48e524b2b51cbdfa89cad786 | PHP | kuzovkov/webcam | /app/include/module/MySQL.class.php | UTF-8 | 12,746 | 3.21875 | 3 | [] | no_license | <?php
/**
* Класс для работы с СУБД MySQL
*/
class MySQL implements Db{
private $DB_CHARSET = 'utf8';
private static $instance = null;
private $db_host = null;
private $db_user = null;
private $db_pass = null;
private $db_name = null;
private $tables = array();
private $schema = SCHE... | true |
80f685f44c762bacefe174baaab626743aa59c0c | PHP | pwsdotru/dbdesc | /dbdesc.php | UTF-8 | 3,739 | 2.90625 | 3 | [] | no_license | <?php
/**
* Script for builde description of database structure
* Author: Aleksandr Novikov, pwsdotru@gmail.com, http://pws.ru
*/
set_time_limit(0);
error_reporting(E_ALL);
ini_set("display_errors", 1);
$run_params = array(
"host" => "localhost",
"user" => "root",
"password" => "",
"base" => "",
... | true |
b5c975a61ac8e191f74afeea5e6420b907e1ae72 | PHP | Iadergunov/ShortLink | /store.php | UTF-8 | 739 | 2.578125 | 3 | [] | no_license | <?php
$loader = require_once __DIR__.'/vendor/autoload.php';
use MyClasses\Link;
$received_link = $_POST['link'];
//Убираем возможные http и https префиксы
$formatted_link = Link::formatLink($received_link);
$link = new Link($formatted_link);
$link->store();
?>
<html>
<head>
<link href="https://maxcdn.bootstrapcdn... | true |
b2094efd9dce97e171fffadf6b267410522adac5 | PHP | zhiyb/vocab | /set/session_update.php | UTF-8 | 1,142 | 2.6875 | 3 | [] | no_license | <?php
$uid = $_GET['uid'];
$index = $_GET['index'];
if ($uid == null) {
http_response_code(400);
die();
}
$data = null;
$post = $_SERVER["REQUEST_METHOD"] == "POST";
if ($post)
$data = file_get_contents("php://input");
if ($index == null && !$post) {
http_response_code(400);
die();
}
require '..... | true |
214fe4c0b18c0532b1a428de08c9f302869f502d | PHP | salahuiste/exercice_dashboard | /includes/transaction_class.php | UTF-8 | 1,861 | 3.359375 | 3 | [] | no_license | <?php
/*la classe ci-dessous représente une transaction*/
class Transaction{
private $transaction_id;
private $date_transaction;
private $account_id;
private $total_transaction;
private $currency;
private $type;
//status == -1 ==>Canceled,status == 0 ==> Pending, status==1 ==> Confirmed
priv... | true |
d3bbc35fb6e407c04d8f3b7f5c4b876f6b78b22d | PHP | yitznewton/2048 | /src/Yitznewton/TwentyFortyEight/Output/Output.php | UTF-8 | 482 | 3.015625 | 3 | [] | no_license | <?php
namespace Yitznewton\TwentyFortyEight\Output;
use Yitznewton\TwentyFortyEight\Grid;
interface Output
{
/**
* @param Grid $grid
* @param int $score
* @return void
*/
public function renderBoard(Grid $grid, $score);
/**
* @param int $score
* @return void
*/
pub... | true |
23a0d7be37393d94e976c476fadde392ca61f04c | PHP | arahim56/std | /Admin/student_new.php | UTF-8 | 2,265 | 2.953125 | 3 | [] | no_license | <?php
$name = "";
$contact = "";
$email = "";
$dateofbirth = "";
$gender = "";
$address = "";
$city = "0";
$cv["name"] = "";
if(isset($_POST['submit']))
{
$name = $_POST['name'];
$contact = $_POST['contact'];
$email = $_POST['email'];
$dateofbirth = $_POST['dateofbirth'];
$gender = $_POST['gender'];
$address = $_... | true |
f994c19383f926be87322ca420d6259cd29c3bbb | PHP | pherapeutic/MVP | /backend_pherapeutic/app/Http/Controllers/Admin/LanguagesController.php | UTF-8 | 5,302 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\Languages;
use Validator;
class LanguagesController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
... | true |
490efe17bccbacf459ad78e314623669fdb1690d | PHP | ihsanfikri12/nilaikelompok | /backend/app/Http/Controllers/SkorPoint.php | UTF-8 | 4,349 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\Client;
class SkorPoint extends Controller
{
//show all skor point
public function index()
{
$client = new Client(['base_uri' => 'http://127.0.0.1:8000/api/skorpoint']);
... | true |
665cc4ec1f419b23ce205572a4a5818096857406 | PHP | dexteryam/rmdb | /peoplePage.php | UTF-8 | 4,064 | 2.796875 | 3 | [] | no_license | <?php
include_once("include/header.php");
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"css/mp.css\">";
?>
<div class="frame group">
<div>
<?php
$people_id = $_GET['id'];
if(isset($_POST['submit'])){
$date = $_POST['birthday'];
if (!preg_match ("/^([0-9]{4})-([0-9]{2})-([0-9]{2})$/", $date,... | true |
8360f93203853da47448670c6bc8ba9ed6c66948 | PHP | AgenziaXilweb/passalibro | /includes/actions/demands.php | UTF-8 | 1,866 | 2.53125 | 3 | [] | no_license | <?php
if ($_REQUEST['azione'] == 'email') {
$busto = 'marco.lilly@email.it';
$sesto = 'marco@ingruppo-ict.com';
$milano = 'marco@carryexpress.it';
$sassuolo = '';
$incopia = 'marco@ingruppo-ict.com';
if ($_SESSION['mailsede'] = 1) {
$destinatario = $busto;
} elseif ($_SESSION['mailsede'] = 2) {
$des... | true |
c1dfd3f043e500a39da07829de005692c01886e2 | PHP | wol-soft/php-json-schema-model-generator | /src/Model/Property/CompositionPropertyDecorator.php | UTF-8 | 1,885 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace PHPModelGenerator\Model\Property;
use PHPModelGenerator\Exception\SchemaException;
use PHPModelGenerator\Model\SchemaDefinition\JsonSchema;
use PHPModelGenerator\Model\SchemaDefinition\ResolvedDefinitionsCollection;
/**
* Class CompositionPropertyDecorator
*
* @package ... | true |
ca560a140db089a4d2c49a11fb98ba45d0812482 | PHP | designwebvn/annuaire_audition | /trunk/protected/modules/site/controllers/CronController.php | UTF-8 | 1,602 | 2.625 | 3 | [] | no_license | <?php
class CronController extends BaseController {
//check if has end auction, and set end
//update backcash, ...
//it will run every minutes and 1st second
public function actionIndex() {
//check
$current = time()-1;
$conditions = "start_time <= NOW() AND bid_quote = 0 AND(en... | true |
9eb56dc144ac261e11e12ea9f25f3fae816b84a2 | PHP | drpremo/cis355 | /fitness355/activity/read.php | UTF-8 | 2,142 | 2.625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<?php
session_start();
if (empty($_SESSION['user'])) {
header("location:../login.php");
} else {
echo '<title>Fitness355 - ' . $_SESSION['user'] . '</title>';
}
require '../Template.php';
Template::sources("../");
... | true |
b2fe79b57b191ace82eb5fff5ee1edbbf957ef63 | PHP | alex-eberly/JagWarz2017 | /assets/utilities/class-generator/handlers/download.php | UTF-8 | 574 | 2.78125 | 3 | [] | no_license | <?php include("../includes/dataObjects.php"); ?>
<?php
$filename = "";
if (isset($_GET["filename"]))
{
$filename = $_GET["filename"];
}
$file = "../temp/" . $filename;
if(!file_exists($file))
{
// File doesn't exist, output error
die('File not found');
}
else
{
// Set headers
header("Cache-Control: public");
hea... | true |
aaaa870a3294290368cb84c8676bc613d655c7ff | PHP | burdiuz/php-callbacks | /tests/aw/CallableSequenceTest.php | UTF-8 | 1,286 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by Oleg Galaburda on 03.12.15.
*/
namespace aw {
use \PHPUnit_Framework_TestCase as TestCase;
class CallableSequenceTest extends TestCase {
public $collection;
public $handler1;
public $handler2;
public $handler3;
public $handlerArgs1;
public $handlerArgs3;
publ... | true |
9c95be0b3ade1631a8be9ad031df70e27242ba2e | PHP | Ilya-lab/cliga-php | /app/Sport/BidPlayer.php | UTF-8 | 2,175 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Sport;
use Illuminate\Database\Eloquent\Model;
class BidPlayer extends Model
{
use \Awobaz\Compoships\Compoships;
protected $table = 'sport.tb_bidplayer';
/**
* За конкретную заявку
* @param $query
* @param $bid - идентификатор заявочного окна
*/
public functi... | true |
1611fbcef9dbef3701ebc130b7f78b76ca5de3db | PHP | ahmed-debbech/uno_online | /core/game/ajax/update_table.php | UTF-8 | 2,763 | 2.703125 | 3 | [
"Unlicense"
] | permissive | <?php
include("../../../keys.php");
function setColors($text){
$colo = $text[strlen($text)-1];
switch($colo){
case 'r': return "ff4747"; break;
case 'g': return "6fc763"; break;
case 'b': return "5496ff"; break;
case 'y': return "eddc1c"; break;
default: return "grey"; b... | true |
ae08643f9413c59afeae617fe20918034d8cc9d2 | PHP | soomahouraiby/projects | /database/migrations/2021_04_08_221446_create_effective_material_table.php | UTF-8 | 727 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateEffectiveMaterialTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('effec... | true |
6f16506239563c2aed51ac44717a3ae319142d73 | PHP | mindofmicah/filters | /src/mindofmicah/Filters/EqualFormatter.php | UTF-8 | 301 | 2.828125 | 3 | [] | no_license | <?php
namespace mindofmicah\Filters;
class EqualFormatter implements FormatableInterface
{
public function formatAsSQL()
{
return trim(preg_replace('%\s*=\s*%', '=', $this->orig, 1));
}
public function __construct($argument1)
{
$this->orig = $argument1;
}
}
| true |
81e2c8223a0a8f040dd49427adbb38806f790ed2 | PHP | hamidkom/appinjaz | /app/Http/Controllers/API/registerController.php | UTF-8 | 1,712 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Http\Controllers\API\BassController as BassController;
use App\Models\User;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Auth;
use Larave... | true |
acdd199ba4ec4b0ceac1973b8e010a64a58c9acf | PHP | achton/nordea-payment | /src/TransactionInformation/BankCreditTransfer.php | UTF-8 | 2,623 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace NordeaPayment\TransactionInformation;
use DOMDocument;
use InvalidArgumentException;
use NordeaPayment\AccountInterface;
use NordeaPayment\BIC;
use NordeaPayment\FinancialInstitutionInterface;
use NordeaPayment\IID;
use NordeaPayment\Money;
use NordeaPayment\PaymentInformation\PaymentInformation;
use ... | true |
e3c1003a82fd85ce6f00c80713611cb78a857f17 | PHP | bibleexchange/church | /app/Repository/Report/EloquentRepository.php | UTF-8 | 3,724 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Repository\Report;
use \Illuminate\Database\Eloquent\Model as Model;
use \App\Repository\Base\EloquentRepository as BaseRepository;
use \App\Repository\Query\EloquentQueryRepository as QueryRepository;
use \Locker\XApi\Helpers as XAPIHelpers;
use \App\Helpers\Helpers as Helpers;
class EloquentRepo... | true |
f21dfebe963c89f1bfdf4d4a2f524683127c1960 | PHP | Izaack-B97/Manejador-de-Contenido---Periodico | /public/staff/articulos/index.php | UTF-8 | 1,889 | 2.546875 | 3 | [] | no_license | <?php require_once('../../../private/initialize.php'); ?>
<?php
$articulos_set = find_all_articulos();
?>
<?php $page_title = 'Articulos'; ?>
<!-- Importamos el header con sus respectivas funciones -->
<?php include(SHARED_PATH . '/staff_header.php'); ?>
<br>
<h3>Listado de Articulos</h3>
<a class="btn btn-succ... | true |
7ac4126785042144731fca824f0412c5b3c83c65 | PHP | traedamatic/AppTemplateCakePHP | /Controller/Component/UploadfileComponent.php | UTF-8 | 4,841 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
class UploadfileComponent extends Component {
/**
* @var string name
*/
public $name = 'Uploadfile';
/**
* @var components settings
*/
public $settings = null;
/**
* @var lastfile name saved
*/
public $lastFileUploaded = null;
/**
*
*/
public $supportedFileExtensions = array(
... | true |
530b6580084aa20a6384fd24afdaf0d6b4007a5e | PHP | ralf000/mvc | /app/models/CRUDInterface.php | UTF-8 | 151 | 2.71875 | 3 | [] | no_license | <?php
namespace app\models;
interface CRUDInterface {
public static function findById($id);
public static function findAll();
}
| true |
6492f7198663ce5489cea3017c9214cb37407bef | PHP | antoniocarlosmjr/pagamento-simplificado | /src/app/Exceptions/TransacaoException.php | UTF-8 | 647 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Exceptions;
use Exception;
use Illuminate\Http\JsonResponse;
use Throwable;
/**
* Class TransacaoException
* @package App\Exceptions
* @author Antonio Martins
*/
class TransacaoException extends Exception
{
/**
* TransacaoException constructor.
* @param string $message
* @p... | true |
534c497fd750fdd5ec8789ea8d5d6c3412371531 | PHP | SergioGomez24/asignaciones | /database/seeds/CampusTableSeeder.php | UTF-8 | 445 | 2.71875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use App\Campus;
class CampusTableSeeder extends Seeder
{
private function seedCampus(){
DB::table('campus')->delete();
$c = new Campus;
$c->name = 'Campus de Puerto Real';
$c->save();
}
/**
* Run the database seeds.
*
* @return void
*/
pub... | true |
0511853915ad34e6eec9386991d554c7139852ed | PHP | khoipv-1315/designPattern | /SingletonPattern/index.php | UTF-8 | 536 | 2.984375 | 3 | [] | no_license | <?php
require('Database.php');
require('SingletonDatabase.php');
// get a instance database
$database = new Database('product');
print_r($database->getName());
print_r('</br>');
$database = new Database('product_b');
print_r($database->getName());
print_r('</br>');
// get a instance database with singleton
$databa... | true |
a2c22d64d1f6849fa5ac476c066a0265fcc95f81 | PHP | toddpan/sooncore-admin | /application/libraries/Account/AccountUpload/SitePowerChangeUploadImpl.php | UTF-8 | 1,216 | 2.515625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* 站点权限变更
* @file SitePowerChangeUploadImpl.php
* @author caohongliang <hongliang.cao@quanshi.com>
* @copyright Copyright (c) UC
* @version: v1.0
*/
require_once(__DIR__.DIRECTORY_SEPARATOR.'AccountUploadInterface.php');
clas... | true |
89e2113e623af7b2882d909a4f5bae5a45ee7cd3 | PHP | 10degrees/10degrees-base | /app/Boot/GoogleMapsAPIIntegration.php | UTF-8 | 2,009 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Boot;
/**
* Google Maps API Instructions
*
* 1. Make sure you're logged in as support@10degrees.uk
* 2. Go to https://developers.google.com/maps/documentation/javascript/
* 3. Click "Get a key"
* 4. Create a key
* 5. Name the project as per the domain, using spaces, .e.g. domain-co-uk
* 6... | true |
2f7d13439afa2cd182f4a8719248b701b3412607 | PHP | ecjia/ecjia-daojia | /vendor/classpreloader/classpreloader/src/Factory.php | UTF-8 | 2,326 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Class Preloader.
*
* (c) Graham Campbell <graham@alt-three.com>
* (c) Michael Dowling <mtdowling@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ClassPreloader;
use ClassPrel... | true |
c88165adc9827b9a7bccd46423b758ed4e47caf9 | PHP | kentprojects/api | /admin/classes/session.php | UTF-8 | 1,682 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author: James Dryden <james.dryden@kentprojects.com>
* @license: Copyright KentProjects
* @link: http://kentprojects.com
*
* Class Session
* Sessions hold data that is meant to surpass a single page.
*/
class Session
{
/**
* Delete a (range of) Session key(s).
*
* @param string $key
* [ @pa... | true |
eda5638ecf910f56fc57460492b386714bedbc85 | PHP | lausek/inf19bot | /src/cmds/help.php | UTF-8 | 726 | 2.875 | 3 | [] | no_license | <?php
require_once __DIR__ . '/../../vendor/autoload.php';
// Display all commands that implement `HasHelp`.
class HelpCommand extends Command implements HasHelp
{
function help() : string
{
return Language::get('CMD_HELP_HELP');
}
function run(Response $response, $update = null)
{
... | true |
7925dfc48154ace8ea8119426a69a575781033b7 | PHP | UCLComputerScience/COMP0034-PHPBasics | /databasePhp/phpGetUsers.php | UTF-8 | 1,374 | 3.265625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="../css/bootstrap.css">
<title>List of users</title>
</head>
<body>
<div class="container">
<h... | true |
40defa44251e2f2e24d795aa7986ff350b3d2477 | PHP | tiagofinger/boardingpass | /tests/CityTest.php | UTF-8 | 692 | 2.953125 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
use \App\Classes\City;
class CityTest extends TestCase
{
public function testOK()
{
$city1 = new City('Roma');
$city2 = new City('Roma');
$this->assertEquals($city1, $city2);
}
public function testNotOK()
{
$city1 = new Ci... | true |
f1311b7f72a0fbe8dff867af457b732b8a9e7db3 | PHP | maxiatanasio/curso-php-oop | /clase2/2-mysql/index.php | UTF-8 | 748 | 2.84375 | 3 | [] | no_license | <?php
require __DIR__ . '/classes/MysqlConnection.php';
// require( __DIR__ . '/mySQLExtend.class.php');
$operation = $_GET['action'] ?? 'get';
try {
$mysql = new MySQLConnection("localhost", "notesdb", "root", "");
switch($operation) {
case 'get' :
$mysql->query('select * from notes');... | true |
b859b4e36e8d7e4b9175469c98b040c6bb377fc0 | PHP | Aggie21/TestCase | /application/library/Models/Excel/GameVersionDB.php | UTF-8 | 665 | 2.640625 | 3 | [] | no_license | <?php
class Models_Excel_GameVersionDB{
public function getAllGameVersion(){
}
/**
* 获取游戏的版本
* @param unknown_type $gameId
* @return multitype:multitype:unknown
*/
public function getGameVersionByGameId($gameId){
$db = new DBTool_DB();
$sql = "select * from tc_game_v where game_id = ?";
$params =... | true |
ffa001add5b99a96f15d0e50d65bb04ae71abd0f | PHP | Gouga34/SiteSPA | /SPA-beziers/models/Utilisateur.php | UTF-8 | 1,078 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "utilisateur".
*
* @property string $type
* @property string $mdp
* @property string $nom
* @property string $prenom
* @property string $mail
* @property integer $telephone
*/
class Utilisateur extends \yii\db\ActiveRecord
{
/*... | true |
10bb73a36cb34ba399fb82e3948e8e6c8ea166f4 | PHP | fullstackbelgium/fullstackbelgium.be | /app/Console/Commands/SendScheduledTweetsCommand.php | UTF-8 | 578 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\Models\ScheduledTweet;
use Illuminate\Console\Command;
class SendScheduledTweetsCommand extends Command
{
protected $signature = 'fullstack:send-scheduled-tweets';
protected $description = 'Send scheduled tweets';
public function handle()
{
$thi... | true |
40cb9abf6e564714a5da7c831377e909bfbe108a | PHP | 329944908/blog | /model/BlogModel.class.php | UTF-8 | 953 | 2.8125 | 3 | [] | no_license | <?php
class BlogModel{
public $mysqli;
function __construct(){
$this->mysqli = new mysqli("localhost","root","123456","blog");
$this->mysqli->query('set names utf8');
}
public function add($data){
$createtime = date("Y-m-d H:i:s");
$sql = "insert into blog(title,content,image,classify_id,createtime... | true |
4ddd01a03a19e14619c1c499ea8f80f29716a0c2 | PHP | mithunmo/phpsample | /libraries/cli/command/serialise.class.php | UTF-8 | 1,820 | 3.390625 | 3 | [] | no_license | <?php
/**
* cliCommandSerialise Class
*
* Stored in cliCommandSerialise.class.php
*
* @author Dave Redfern
* @copyright Dave Redfern (c) 2007-2010
* @package scorpio
* @subpackage cli
* @category cliCommandSerialise
* @version $Rev: 707 $
*/
/**
* cliCommandSerialise class
*
* Utili... | true |
560c65fccc4ca44b24691c9469bbb8028ebe86b5 | PHP | Bagro/tvcenter | /application/helpers/auth_helper.php | UTF-8 | 984 | 2.609375 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
if ( ! function_exists('is_logged_in'))
{
function is_logged_in()
{
$CI =& get_instance();
$isloggedin = $CI->session->userdata('isloggedin');
if(isset($isloggedin))
return $isloggedin;
return false;
}
}
if ( ! function_exi... | true |
c9ebd6dc793ffaba7d8c227e9641ab9029b2bb92 | PHP | happyabbi/excelsparser | /app/models/Autoencode.php | UTF-8 | 1,188 | 2.625 | 3 | [] | no_license | <?php
class Autoencode extends \Phalcon\Mvc\Model
{
/**
*
* @var string
*/
public $code_type;
/**
*
* @var integer
*/
public $code_max;
/**
*
* @var integer
*/
public $code_count;
/**
*
* @var string
*/
public $code_head;
... | true |
dc000793b0ebf29cb779efc31a7e20197e7e115f | PHP | BGCX262/zweer-reload-svn-to-git | /trunk/library/Zwe/Model/Page/Messages.php | UTF-8 | 3,462 | 2.796875 | 3 | [] | no_license | <?php
/**
* @file library/Zwe/Model/Page/Messages.php
* Il modello della pagina dei messaggi.
*
* @category Zwe
* @package Zwe_Model
* @subpackage Zwe_Model_Page
* @version $Id: Messages.php 112 2011-08-01 14:57:36Z flicofloc@gmail.com $
*/
/**
* Il modello della pagina dei messaggi.... | true |
253b53e810305b55171c102e42ffa1928f030c08 | PHP | master4eg/Vostok_Laravel | /app/Http/Controllers/UsersController.php | UTF-8 | 2,718 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\User;
use Illuminate\Http\Request;
class UsersController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$users = User::get();
$count ... | true |
7a071e5ccd45025f34a97c8effa78d50706be79a | PHP | filipe-ferraz/CeL | /instalacaoCEL/cel/aplicacao/script_bd.php | WINDOWS-1252 | 3,918 | 2.671875 | 3 | [] | no_license | <html>
<head>
<title></title>
</head>
<body>
<?php
include_once("bd.inc") ;
include_once("CELConfig/CELConfig.inc");
$link = bd_connect() or die("Erro na conexo BD : " . mysql_error() . __LINE__);
if ( $link && mysql_select_db(CELConfig_ReadVar("BD_database") ))
echo "SUCESSO NA CONEXO BD <br>";
el... | true |
5e87e533e810e95f018eb8f053f712f0895444bd | PHP | eujoanderson/twiter_clone | /vendor/MF/Init/BootStrap.php | UTF-8 | 1,201 | 3.140625 | 3 | [] | no_license | <?php
namespace MF\Init;
abstract class Bootstrap{
protected $routes;
abstract protected function initRoutes(); //contrato
public function __construct() {
$this->initRoutes();
$this->run($this->getUrl());
} //Recebe no contructor o array e a url passada pelo Cliente
public function getRoutes() {
... | true |
cee78ae94d1bff81079dbf4e1e6125cd00dfb58d | PHP | solale-dev/MVC_todo | /Models/AnmeldungModel.php | UTF-8 | 1,561 | 2.828125 | 3 | [] | no_license | <?php
class AnmeldungModel extends Model
{
public function create($Anmeldename, $Password, $KundenID)
{
$sql = "INSERT INTO anmeldungen (Anmeldename, Password, KundenID) VALUES (:Anmeldename, :Password, :KundenID)";
$req = Database::getBdd()->prepare($sql);
return $req->execute([
... | true |
ba390d1a42f660e490efd78e0e538cffe2a2cb6c | PHP | chiubor/PHP_Homework | /homework/3_1.php | UTF-8 | 762 | 3.296875 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<h3>將 images 底下的圖片全部存成 base64的格式到陣列中,<br>
接著將陣列中圖片全部顯示出現</h3>
<?php
if ($handle = opendir('images')) {
$fileArray = [];
while (false !== ($file = readdir($handle))) {
if ($file != "." && $file != "..") {
$path = "images/... | true |
1111b4b35eab882f03bf1a00bd7b22c8c70a1110 | PHP | phalapi/phalapi | /vendor/phalapi/kernal/src/Error.php | UTF-8 | 716 | 2.75 | 3 | [
"GPL-3.0-only",
"Apache-2.0"
] | permissive | <?php
namespace PhalApi;
/**
* 错误类
*
* @package PhalApi\Error
* @license http://www.phalapi.net/license GPL 协议 GPL 协议
* @link http://www.phalapi.net/
* @author dogstar <chanzonghuang@gmail.com> 2020-03-25
*/
interface Error {
/**
* 自定义的错误处理函数
* @param int $errno 包含了错误的级别,是一个 i... | true |
afd0b5d2231a9f462309ec06f5d0bb034e6422fb | PHP | 89Omer/classifiedmarkaz | /app/Http/Controllers/Api/SubCategoryController.php | UTF-8 | 1,807 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\SubCategory;
class SubCategoryController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index(... | true |
6ccf0df41ec6579feaf12e6966cbabd44d74a910 | PHP | francoisauclair911/stripe-mock-example | /app/Models/Charge.php | UTF-8 | 457 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class Charge
* @package App\Models
*
* @property float $amount
* @property string $currency
* @property string $type
*/
class Charge extends Model
{
protected $fillable = [
'amount',
'currency',
'type',
... | true |
5b75b7e49dc8a04c3b0442adf30875103e96e33c | PHP | ANDERSOUNDZ/LaravelFinal | /database/seeds/UserTableSeeder.php | UTF-8 | 709 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class UserTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$user = new \App\User();
$user -> name = 'Daniel Romero';
$user -> email = 'daniel@ed.team';
$user -> p... | true |
2a749e5b5a5a34e5f4c852da6357fef471904bf6 | PHP | AbdullahNassar/Brilliance | /app/Helpers/Uploader.php | UTF-8 | 417 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Helpers;
use Illuminate\Support\Str;
class Uploader
{
public static function upload($file,$path)
{
$extension = $file->getClientOriginalExtension();
$oldFileName = pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME);
$fileName = $oldFileName .'-'. Str::ran... | true |
61b96836ea770e0b469646bb676fbf816f89a224 | PHP | tuxpoll/chirp | /src/Chirp.php | UTF-8 | 9,155 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of Chirp package
*
* Copyright (c) 2015 Alberto Pagliarini
*
* Licensed under the MIT license
* https://github.com/batopa/chirp/blob/master/LICENSE
*/
namespace Bato\Chirp;
use Bato\Chirp\Utility\Parser;
use MongoDB\Client;
use Abraham\TwitterOAuth\TwitterOAuth;
/**
* Chirp Class... | true |
9e513cf3b1e16ed756f48c28a52156656345ed4f | PHP | ozdemirmehmet/php-notes | /Public Chat GCM/register.php | UTF-8 | 1,585 | 2.6875 | 3 | [] | no_license | <?php
require_once("baglan.php");//veritabanı bağlantısı
if (isset($_POST["regId"]) & isset($_POST["androidId"]) & isset($_POST["language"]) & isset($_POST["appVersion"])) { //Kontrol
//POST ile gelen verileri aldık
$regId = $_POST['regId'];
$androidId = $_POST['androidId'];
$language = $_POST['language... | true |
55c528daff9234db3987ebc1b1cfe1a7d273d765 | PHP | szymonsniadach/PHP-CRUD | /delete-user.php | UTF-8 | 296 | 2.515625 | 3 | [] | no_license | <?php
require 'mysqli.php';
$id = $_GET['id'];
$query = "DELETE FROM `users` WHERE id='$id'";
if ($result = $mysqli->query($query)) {
echo "<p style='color: green;'>Success delete user! :)</p>";
}else{
echo "oh no, problem with delete user :(";
}
$mysqli->close();
?> | true |
99daa81febcff05f7fa5ac023854a6001b8ef2d1 | PHP | Kelvin52/Integrated-Display-System | /DPS/WebApp/login.php | UTF-8 | 1,543 | 2.6875 | 3 | [] | no_license | <!DOCTYPE html>
<?php session_start(); ?>
<?php
/* $serverName = "BammBamm";
$uid = "Timetable";
$pwd = "a%89UIes";
$databaseName = "TestDB";
$connectionInfo = array("Database"=>$databaseName,
"UID"=>$uid,
"PWD"=>$pwd);
$conn = sqlsrv_connect( $se... | true |