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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
a9624ab888c0b3e13e33dc0d090586d6d3a29e1b | PHP | TejaSreenivas/Online_course_registration | /student2.php | UTF-8 | 985 | 2.6875 | 3 | [] | no_license | <?php
$name=$_POST['student'];
$pass=$_POST['password'];
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "project1";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->conn... | true |
02155c1070db8aa6a550c044d271982929245325 | PHP | anchetaWern/freebase-php | /class.freebase.php | UTF-8 | 1,627 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
class Freebase {
private $api_key;
public function __construct( $api_key ) {
$this->api_key = $api_key;
}
public function search( $query = '', $start = 0, $limit = 10, $exact = 'false' ) {
$query = urlencode( $query );
$url = 'https://www.googleapis.com/freebase/v1/search?query='. $... | true |
4ba068ae94960e0354fe4cac9cff87bbc3bd3517 | PHP | n-dw/goodseeds | /craft/plugins/customerpoints/services/CustomerPoints_UserService.php | UTF-8 | 4,693 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: nathan
* Date: 9/8/17
* Time: 7:18 PM
*/
namespace Craft;
class CustomerPoints_UserService extends BaseApplicationComponent
{
public function getPlugin()
{
return craft()->plugins->getPlugin('customerpoints');
}
public function getSettings()
... | true |
e874b0d3657b5acd438bd687e213c27e2217577d | PHP | xliyq/porto-core | /Generator/Traits/PrinterTrait.php | UTF-8 | 532 | 2.671875 | 3 | [] | no_license | <?php
namespace Porto\Core\Generator\Traits;
trait PrinterTrait
{
public function printStartedMessage($containerName, $fileName) {
$this->printInfoMessage("> Generating ( $fileName ) in ( $containerName ) Container");
}
public function printFinishedMessage($type) {
$this->printInfoMessa... | true |
cdd51da94d99ca11a14d355d468d00ffc9ae72bf | PHP | andeeDev/tickets | /app/Services/UserService.php | UTF-8 | 1,202 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Services;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Storage;
class UserService
{
public function updateUser($request, $user) {
$values = $request->only(['name', 'email', 'country', 'sex']);
$password = $request-... | true |
ea73dd47242d46dc58d4038457d596ad0fddb45a | PHP | crbarto/4500-PHP | /HandsOn/Aula06/conexao_pdo.php | UTF-8 | 632 | 2.8125 | 3 | [] | no_license | <?php
$conexao = new pdo('pgsql:host=localhost;dbname=pdo;','barto','1234');
$conexao->exec("insert into tb_alunos(id,nome,email,sobrenome) values (6,'Dragao','dragao@hotmail.com','Branco')");
$alunos = $conexao->query('SELECT * FROM tb_alunos');
$alunos = $alunos->fetchAll(PDO::FETCH_ASSOC);
// $alunos = $alunos->... | true |
1457e352e3c5bb638e96a612f10881e54c5c20bf | PHP | TechnoCentric/portal89 | /app/controllers/EtypesController.php | UTF-8 | 3,032 | 2.796875 | 3 | [] | no_license | <?php
class EtypesController extends BaseController {
/**
* Etype Repository
*
* @var Etype
*/
protected $etype;
public function __construct(Etype $etype)
{
$this->etype = $etype;
}
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
if(Auth::user()... | true |
b32da6291f364430bd4bed1178744b0bd64708cb | PHP | yunniko/casexe_test_task | /models/ActiveRecord/Wins.php | UTF-8 | 3,342 | 2.578125 | 3 | [] | no_license | <?php
namespace app\models\ActiveRecord;
use app\interfaces\PrizeARInterface;
use app\interfaces\PrizeRecipientInterface;
use app\models\prizes\Bonus;
use app\models\prizes\Object;
use app\models\User;
use Yii;
/**
* This is the model class for table "wins".
*
* @property string $id
* @property string $prize_id
... | true |
b4416beb0fe7ebfe68cc259ad4e7771cf74b71f9 | PHP | Daveawb/Laravel-Datatables | /src/Daveawb/Datatables/Columns/Input/BaseInput.php | UTF-8 | 3,721 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
namespace Daveawb\Datatables\Columns\Input;
use Illuminate\Http\Request;
abstract class BaseInput {
/**
* Array of fields that have only one value from the input
* @var {Array}
*/
protected $globalFields = array();
/**
* Array of fields that use iColumns as their iterator
... | true |
653768ab0080c620f451c4a41bb24b72a5723475 | PHP | lex-kim/newtech-admin-hq | /100_code/170_stdTable/class/clsStdTable.php | UTF-8 | 8,355 | 2.53125 | 3 | [] | no_license | <?php
class cStandard extends DBManager {
private $DATA_SAVE_PATH; // 저장경로.
private $ALLOW_FILE_EXT; // 업로드 가능 확장자
// Class Object Constructor
function cStandard($DATA_SAVE_PATH,$ALLOW_FILE_EXT) {
$this->DATA_SAVE_PATH = $DATA_SAVE_PATH;
$this->ALLOW_FILE_EXT = $ALLOW_FILE_EXT;
}
/**
* 조회
* @p... | true |
5283a039be42f4fdc0c3b7fe18815d1ab4e24428 | PHP | binsuper/sapling | /src/Open/IPlugin.php | UTF-8 | 868 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Sapling\Open;
use \Sapling\Plugin\Context;
/**
* 插件接口定义
* plugin接口定义了插件与系统对接的唯一标准
*/
interface IPlugin {
/**
* 获取插件的根目录
* @return string 根目录的绝对路径
*/
public function getBasedir(): string;
/**
* 获取插件名称
* 注意:插件名称是唯一的,如果与其它插件的名称相同,将无法正常接入
... | true |
746a6f8203fcf0cb9bacc39b1a73eb4cbaf4dad5 | PHP | maoshuoqiong/game | /_game/niuniu/bullfightingApi/interface/ActivityRank.php | UTF-8 | 2,105 | 2.546875 | 3 | [] | no_license | <?php
/**
* 活动排行榜
*/
class ActivityRank extends APIBase {
public $tag = "ActivityRank";
public function before() {
$this->initCacheRedis();
return true;
}
public function logic() {
if (!isset($this->param['id'])) {
$this->returnError(301, '榜单不存在');
return;
}
... | true |
5797b8d69333500a174280522448b4f53e8661df | PHP | zoya-sh/Alin | /join-us.php | UTF-8 | 5,820 | 2.71875 | 3 | [] | no_license | <?php
require_once('include/require.php');
$JoinUs = new JoinUs();
$Mode = ReplaceEmpty("mode", "view");
//if the registration was successful
if ($Mode == "register")
{
//registration made successfully
if ($JoinUs->Register())
{
SetMsg('<b><font color=red>ברוך הבא</b></font>',"success");
header... | true |
9fe56fbeb9a0db9d30c4dac43ada7b0b16301bb1 | PHP | OctavioBerruti/TarjetaSC | /src/Viajes.php | UTF-8 | 655 | 2.75 | 3 | [] | no_license | <?php
namespace Poli\Tarjeta;
class Viajes{
protected $nombreultimotransporteusado;
protected $horaultimoviajehecho;
protected $fechaultimoviaje;
protected $monto;
public function darnombre(){
return $this->nombreultimotransporteusado;
}
public function darhora(){
return $this->horaultimoviajehecho;
}
... | true |
41f901c416ac94eb72dc9d2b1de5427abc614ae1 | PHP | hi-frameork/library | /src/Database/PDOConfig.php | UTF-8 | 3,489 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace Library\Database;
/**
* Copy from https://github.com/swoole/library/blob/4.8.x/src/core/Database/PDOConfig.php
*/
class PDOConfig
{
public const DRIVER_MYSQL = 'mysql';
/** @var string */
protected $driver = self::DRIVER_MYSQL;
/** @var string */
protected $host = '127.0.0.1';
... | true |
6bf10ba8115c8790ea285c27d5e6ea521607e51e | PHP | OliVilchis0/Nomina-Vice | /app/controladores/Login.php | UTF-8 | 1,199 | 2.5625 | 3 | [] | no_license | <?php
class Login extends Controlador
{
private $session;
public function __construct()
{
$this->Login_Model = $this->modelo('Logeo');
$this->session = new Session();
}
public function index()
{
$datos = [
'titulo' => 'nomina',
'dir' => 'Login/signin',
];
$this->vista('paginas/login',$datos);
}
... | true |
169d1fb29c51d9622836475fdbf9ccab3b093b7c | PHP | PHP-CS-Fixer/PHP-CS-Fixer | /tests/Console/SelfUpdate/NewVersionCheckerTest.php | UTF-8 | 19,461 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\Test... | true |
e35504be708c46fa7bd7e53396e4cf654fe395e0 | PHP | qingfusheng/php_refer | /php/2/annotation.php | GB18030 | 501 | 3.40625 | 3 | [] | no_license | <?php
/*
PHPע
phpļhello world HTMLз ϵͳǰʱ
*/
echo "hello world!";//PHPעͣhello world
echo "<br/>";#PHPעͣ<br/>
echo date("YmdHʱis");//ҲPHPעͣϵͳǰʱ
?>
<!--
עphpʼǺͽ֮ĴΪHTML룬
ʾHTMLעͷ
-->
<br/>
PHPעͺHTMLеע
| true |
f65a830c71d17224fd8545fda92185b9e4d31fe0 | PHP | dinakartumu/books4us | /addCategory.php | UTF-8 | 593 | 2.59375 | 3 | [] | no_license | <?php
//include "connection.php";
// Create connection
$conn = mysqli_connect('localhost', 'root', '', 'tumudina_books4us');
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
//Fetching Values from URL
$catName=$_POST['catName'];
$sql = "INSERT INTO categories (ca... | true |
2dabfc1148757403d85519766b5c1c0f3a1a9315 | PHP | Stijn456/scrum | /Sprint (7)/PHP/Kaartspel2.php | UTF-8 | 444 | 2.75 | 3 | [] | no_license | <?php
echo "<H2>// Kaarten //</H2>";
/**
* Created by PhpStorm.
* User: Stijn
* Date: 02/04/2019
* Time: 15:17
*/
$kaarten = array("schoppen", "ruiten", "harten", "klaveren");
$nummer = array("boer", "heer", "vrouw", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10");
for ($x = 0; $x <= 4; $x++) {
$getkaa... | true |
dac8ca83f2a352b0b3d01c16beceb2e4d255fce4 | PHP | miaddison/wdv341 | /finalProject/adminMealForm.php | UTF-8 | 22,082 | 2.90625 | 3 | [] | no_license | <!--
Name: Merna Addison
Email: merna.addison@gmail.com
Date: 11/18/17
Course: WDV341 Intro to PHP
-->
<?php
session_start(); // join current session equivalent to cookies in browser
//Only allow a valid user access to this page
if ($_SESSION['validUser'] == "yes") {
$username = $_SESSION['username'];
$userM... | true |
488a6d1cefec9be636a57bf795708b3040db24f9 | PHP | BanYarRescue/SwooleDistributed | /src/Server/Route/NormalRoute.php | UTF-8 | 723 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: tmtbe
* Date: 16-7-15
* Time: 下午3:11
*/
namespace Server\Route;
class NormalRoute implements IRoute
{
private $client_data;
/**
* 设置反序列化后的数据 Object
* @param $data
*/
public function handleClientData($data)
{
$this->client_data = $da... | true |
2919c4026036ec4854ad2e7fdaeb9b71e7c0b93b | PHP | pitomi-oblak/viline-vode | /admin/classes/core.class.php | UTF-8 | 1,859 | 2.78125 | 3 | [] | no_license | <?php
class Core {
private static $instance;
public $debug = false;
public $base_path;
public $internal_config;
public $config;
public $page;
public $routes;
public $controller;
// Singleton
private function __construct() { }
public static function get()
{
i... | true |
b1e3b2b21aa1a17983907a9f868d12bac7d5e728 | PHP | Juancesar123/sifadu | /app/Models/inventarisproyek.php | UTF-8 | 2,420 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Eloquent as Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* @SWG\Definition(
* definition="inventarisproyek",
* required={"nama_proyek", "volume", "biaya", "lokasi", "keterangan", "tahun"},
* @SWG\Property(
* property="id",
* descripti... | true |
9bb9458f266ea71f7ef0ac544e4802afccae691b | PHP | Gotgot59/braldahim | /braldahim/library/Bral/Batchs/CreationBuissons.php | UTF-8 | 8,794 | 2.5625 | 3 | [] | no_license | <?php
/**
* This file is part of Braldahim, under Gnu Public Licence v3.
* See licence.txt or http://www.gnu.org/licenses/gpl-3.0.html
* Copyright: see http://www.braldahim.com/sources
*/
class Bral_Batchs_CreationBuissons extends Bral_Batchs_Batch
{
public function calculBatchImpl()
{
Bral_Util_Log::batchs()... | true |
9a61ae8573afba04893ab5a1705dc55c5a4c5a71 | PHP | nilBora/nil-hashtag-wall-social | /common/nilHashtagWallSocialPlugin.php | UTF-8 | 1,041 | 2.578125 | 3 | [] | no_license | <?php
class nilHashtagWallSocialPlugin extends nilCorePlugin
{
protected function onInit()
{
$this->onInitFrontendPlugin();
$this->onInitBackendPlugin();
parent::onInit();
}
public function onInitFrontendPlugin()
{
if (!class_exists('nilHashtagWallSocialFrontendPlugin.php')) {
require_once(
HASHTA... | true |
bc637ad57d4182edcce50cbd547f841af43cf4c3 | PHP | BureauVeritasPeru/CertificacionVehiculos | /app/class/CrmFacturacion.php | UTF-8 | 2,279 | 2.5625 | 3 | [] | no_license | <?php
require_once("base/Database.php");
class CrmFacturacion extends Database
{
public static function getItem($facturacionID){
$query = " SELECT *
FROM crm_facturacion
WHERE facturacionID='$facturacionID' ";
return parent::GetObject(parent::GetResult($query));
}
public static function getList(){
$qu... | true |
18fd0690cfb0f12f60a4b246943c4afeade9e7cc | PHP | sabooshagun/pesky | /app/Http/Controllers/TipController.php | UTF-8 | 1,304 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Rahul Sahni
* Date: 18-Mar-18
* Time: 12:09 PM
*/
namespace App\Http\Controllers;
use App\ErrorLog;
use App\Tip;
use Exception;
use Illuminate\Http\Request;
class TipController extends Controller
{
function getTip(){
$response = new ApiResponse();
tr... | true |
47a015284577cd2b49a01f4a8ed87050d4a868f3 | PHP | nulledcc/speedme | /api/helpers/helper.cookie.php | UTF-8 | 1,938 | 2.953125 | 3 | [] | no_license | <?php
/*speedme framework
*Author : Davit G.
*contact-email: dxjan@ya.ru*/
namespace speedme\helper{
class cookie extends helper {
/**
* @param bool $name
* @param string $value
* @param int $expire
* @param string $path
* @param string $domain
... | true |
9fd413fe6a1afc9989f1b8888fef2e6d261320e7 | PHP | ibrahimbadram/icm_europe | /application/widgets/navigation.php | UTF-8 | 567 | 2.59375 | 3 | [] | no_license | <?php
/*
* Demo widget
*/
class Navigation extends Widget {
public function display($data) {
if (!isset($data['items'])) {
$data['items'] = array('Home', 'About', 'Contact');
}
$rand1 = rand(1,10);
$rand2 = rand(1,10);
$result = $rand1+$rand2;
$this->session->set_us... | true |
fb452d346e12fde28e0faa8dc722c79d536a9989 | PHP | harryabd/number-problems | /tests/src/CollatzSequenceTest.php | UTF-8 | 541 | 2.71875 | 3 | [] | no_license | <?php
namespace NumberProblems\Test;
use NumberProblems\NumberUtils\CollatzSequence;
use PHPUnit\Framework\TestCase;
class CollatzSequenceTest extends TestCase
{
public function testGetNextTerm() {
$this->assertEquals(1, CollatzSequence::getNextTerm(1));
$this->assertEquals(1, CollatzSequence::ge... | true |
98c8a25935987352ede78409d266cd09880a7b3e | PHP | Isnirae/Php-Formation | /11-sessions/exercice/connecte.php | UTF-8 | 689 | 2.703125 | 3 | [] | no_license | <?php
session_start();
// On vérifie si on se déconnecte
if (isset($_GET['logout'])) {
unset($_SESSION['user']);
}
// On vérifie si l'utilisateur est connecté
// S'il ne l'est pas, on le redirige vers le login
if (!isset($_SESSION['user'])) {
header('Location: index.php');
// exit;
}
?>
<... | true |
86b4ac89fa1a64da277e8a604ea24e34126773bd | PHP | albuszheng/OnlineCOMParts | /website/app/Salesperson.php | UTF-8 | 737 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class Salesperson extends Model
{
protected $table = 'salesperson';
protected $primaryKey = 'id';
public $timestamps = false;
public function Store() {
return $this->belongsTo(Store::class, 'Sto... | true |
9c98a79728a2330379899aa4e921553cd2dac2c1 | PHP | Vostro11/VoteEverything | /Modules/Object/Repositories/ObjectEloquent.php | UTF-8 | 1,000 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\Object\Repositories;
use Modules\Object\Entities\Object;
use Image;
class ObjectEloquent implements ObjectRepository{
private $object;
public function __construct(Object $object){
$this->object = $object;
}
public function getAllObject(){
return $this->object->all();
}
public func... | true |
e563e571d82e4773d22c136295c46dc56e44a1c7 | PHP | ZoranWong/driving_traning | /app/Entities/Channel.php | UTF-8 | 1,326 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entities;
use Illuminate\Database\Eloquent\Model;
use Prettus\Repository\Contracts\Transformable;
use Prettus\Repository\Traits\TransformableTrait;
/**
* Class Channel.
*
* @package namespace App\Entities;
* @property int $id
* @property string $slug 英文标示
* @property string $name 渠道名称
* @p... | true |
43bee4e227dc52104d9c6d0a7c0c6c68e5fb69de | PHP | dez-php/adroit | /src/bitExpert/Adroit/Action/Action.php | UTF-8 | 1,094 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace bitExpert\Adroit\Action;
use bitExpert\Adroit\Domain\DomainPayload;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
/**
* An Action is an adapter between the contents of an incoming HTTP request and the
* corresponding business logic that should be executed to p... | true |
a648f8427092df8ce3b4d10cb0866351e0d99fd3 | PHP | kkasharaj17/SmartStyle | /Code/action/invoice_pdf.php | UTF-8 | 1,885 | 2.765625 | 3 | [] | no_license | <?php
include_once('config.php');
include_once('fpdf182/fpdf.php');
$product_id = $_GET['id'];
// Create instance of PDF class
$pdf = new FPDF();
// Add 1 page in your PDF
$pdf->AddPage();
// Set Arial Bold font with size 22px
$pdf->SetFont("Arial", "B", 22);
// Write text with 0 width & height (it ... | true |
fc96054a89d39723c4fdb3b105c11c3ad8760991 | PHP | AnhhNguyen/DoAn | /backend/P3DataAccess/User/000account.php | UTF-8 | 2,861 | 2.59375 | 3 | [] | no_license | <?php
class AccountDA{
public function AccountDataAccess($what, $param){
switch ($what) {
//******************p000account************************
// p000account(id,IdRole,name,email,phone,address,role,created_date)
// Get all data from 0 staff
... | true |
1f487a9ebffcc996d768c13646aa65eabadc0677 | PHP | zstevovich/Unfi | /Src/Entity/Size.php | UTF-8 | 1,405 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php declare (strict_types = 1);
namespace SCH\Unfi\Entity;
class Size
{
private $length, $width, $height, $weight, $distanceUnit = "in", $massUnit = 'lb';
/**
* @return mixed
*/
public function getLength()
{
return $this->length;
}
/**
* @param mixed $length
*/... | true |
4bbd5ecd900efd0c4216674545a6d4e766b1bab7 | PHP | KandarpD9ithub/TCL | /app/Franchise.php | UTF-8 | 1,017 | 2.5625 | 3 | [] | no_license | <?php
/**
* @package App
*
* @class Franchise
*
* @author Ritu Slaria <ritu.slaria@surmountsoft.com>
*
* @copyright 2016 SurmountSoft Pvt. Ltd. All rights reserved.
*/
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Franchise extends Model
{
use S... | true |
9ca9af856bd70231e2d9fdc833a25b17bf2ffbe5 | PHP | samuelrcosta/classificados | /models/Categorias.php | UTF-8 | 310 | 2.59375 | 3 | [] | no_license | <?php
class Categorias extends model{
public function getLista(){
$array = array();
$sql = $this->db->query("SELECT * FROM categorias");
$sql = $sql->fetchAll();
if($sql && count($sql)){
return $sql;
}else{
return $array;
}
}
}
?> | true |
0159776a984a4c3ead509d8967608dd72fdd3021 | PHP | nextstage-brasil/ns-util | /src/Assync/Assync.php | UTF-8 | 9,687 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace NsUtil\Assync;
use Closure;
use Exception;
use NsUtil\Log;
use NsUtil\Helper;
use ReflectionClass;
use NsUtil\Eficiencia;
use NsUtil\StatusLoader;
use Laravel\SerializableClosure\SerializableClosure;
/**
* Class that can execute a background job, and check if the
* background job is still running
... | true |
fe16933757832b53b472e01d67ec655d235f4155 | PHP | claudito/phpvirtual | /crud/source/login.php | UTF-8 | 1,224 | 2.625 | 3 | [] | no_license | <?php
include'../config.php';
include'../modelo/Conexion.php';
$conexion = new Conexion();
$conexion = $conexion->get_conexion();
$usuario = trim($_REQUEST['usuario']);
$password = trim($_REQUEST['password']);
$password = md5($password);
try {
$query = "
SELECT
id,
nombres,
apellidos,
dni,
usuario,
pa... | true |
9e52b67e75d17a0a6a6202f9db6ab18dd9c0df8f | PHP | DaijiroMakabe/MatchUp | /Models/make-schedule.php | UTF-8 | 5,719 | 2.890625 | 3 | [] | no_license | <?php
require_once(ROOT_PATH . '/Models/Db.php');
class Schedule extends Db {
public function __construct($dbh = null) {
parent::__construct($dbh);
}
// // スケジュール入力データをテーブルに挿入する
// // @param string
// // @return Array
public function create_schedule() {
try {
$this->dbh->beginTransaction(); // トランザクションの開... | true |
e8c42b004c72512e4c2c1c8b8b9cd430bcec1f52 | PHP | keyanmca/stream-site | /api/master.php | UTF-8 | 685 | 2.734375 | 3 | [] | no_license | <?php
class master {
public $params;
public $key;
public $surl;
public $furl;
public function __construct($key, $params) {
$protocol = $_SERVER['HTTPS'] === 'on' ? 'https://' : 'http://';
$this->surl = $_SERVER['HTTP_HOST'];
$this->furl = $protocol . $this->surl;
$this->params = $params;
$th... | true |
8876ac5cf6028d4d73354d818431d8abbdb026e8 | PHP | souleymane96/Air_Azur | /vues/v_reservations.php | UTF-8 | 684 | 2.546875 | 3 | [] | no_license | <?php
?>
<table border="1">
<tr>
<th>Nom</th>
<th>Prenom</th>
<th>Numéro de vol</th>
<th>Nbrs places</th>
<th>PDF</th>
</tr>
<?php foreach ($lesReservations as $k =>$uneReservation): ?>
<tr>
<td><?php echo $uneReservation['nom'] ?></td>
... | true |
f3142f4c8ec6e3f0b4b0be8f7a87200f91c87311 | PHP | YogaAPSY/starter-rest-api | /app/Http/Requests/storeUserRequest.php | UTF-8 | 1,463 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Contracts\Validation\Validator;
use Illuminate\Http\Exceptions\HttpResponseException;
class storeUserRequest extends FormRequest
{
protected function failedValidation(Validator $validator)
{
$errors = implod... | true |
ef0703c08a8a5daa964b01b91a16a580241c9913 | PHP | valefebvre/Grumpyer | /library/database/Database.php | UTF-8 | 1,196 | 2.84375 | 3 | [] | no_license | <?php
class Database extends PDO {
private $engine;
private $host;
private $database;
private $user;
private $pass;
public function __construct(){
$this->engine = 'mysql';
$this->host = 'XXXXXXXXXXXXXXX';
$this->database = 'XXXXXXXXXXXXXXX';
$this->us... | true |
eea388a3153619e38524019518afa5e372b4e0d7 | PHP | RyanGlouw/PHP | /php/lesson10/Dog.php | UTF-8 | 407 | 3.234375 | 3 | [] | no_license | <?php
// класс реализующий интерфейс обязан реализовывать все его
// абстрактные методы
class Dog extends Animal implements LearnAble
{
public function lear()
{
echo 'собака занимается с хозяином';
}
public function run()
{
echo 'реализация в классе Dog';
}
} | true |
efba689ac3c50de2677a233de909ed7a954c0a8c | PHP | kiwari-engineering/bot-sdk-php | /tests/Model/CustomTest.php | UTF-8 | 1,077 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
use PHPUnit\Framework\TestCase;
use Kiwari\Model\Custom;
class CustomTest extends TestCase
{
public function testGivenNullTypeThenShowError(): void
{
$this->expectException(\InvalidArgumentException::class);
Custom::create()->setType(null);
}
public function testGivenNullConten... | true |
20dd10cfecba22ba1593ffa000117ffe9e2e6caf | PHP | mtgeorgiev/kn2020 | /Db.php | UTF-8 | 410 | 2.734375 | 3 | [] | no_license | <?php
class Db {
public static function getConnection() {
$config = parse_ini_file("config.ini", true);
return new PDO('mysql:host=' . $config['db']['host'] . ';charset=utf8;Collation=utf8mb4_unicode_ci;dbname=' . $config['db']['name'] . '',
$config['db']['username'] . '', $config['d... | true |
e0f3b639681f599ebd7cfb7de98493b486f7b940 | PHP | luxmealeks/sygdap | /database/migrations/2019_08_30_000007_create_pieces_table.php | UTF-8 | 1,264 | 2.625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePiecesTable extends Migration
{
/**
* Schema table name to migrate.
*
* @var string
*/
public $tableName = 'pieces';
/**
* Run the migr... | true |
3ffbd41ad4d08dfba9a603ec79b196ceabb9a411 | PHP | ComputerScienceIsBad/ShapeAreaWithPHP | /CalculateRectangle.php | UTF-8 | 2,088 | 4.21875 | 4 | [] | no_license | <?php
$Rectangle1 = new Rectangle(); // Creates the object "$Rectangle1", which has all the properties of class "Rectangle".
$Rectangle1->setWidth(); // Calls the method "setWidth", which is so the object is encapsulated.
$Rectangle1->setLength(); // Calls method "setLength"
$Rectangle1->calculateArea(); // Calls met... | true |
f77a1e9ce9636835a030193a25409509bcee6263 | PHP | samsanval/master-php | /learning-php-poo/06-abstract/index.php | UTF-8 | 558 | 3.8125 | 4 | [] | no_license | <?php
abstract class Computer{
protected $turned;
abstract public function turnOn();
abstract public function turnOff();
public function getTurned(){
return $this->turned;
}
}
class PCAsus extends Computer{
private $software;
public function turnOnSoftware(){
$this->sof... | true |
6a189414c232811ad14ea7b21bf6834fd7542b3e | PHP | joosweb/Bilder | /includes/my-publications.php | UTF-8 | 1,899 | 2.515625 | 3 | [] | no_license | <?php
$user_id = $_SESSION['id'];
$pdo = new Conexion();
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$pdo->exec("SET CHARACTER SET utf8");
$stm = $pdo->prepare("SELECT * FROM c_publisheds WHERE account_id = ?");
$sql = $stm->execute(array($user_id));
$i=1;
$status = false;
$return = $return.'<tabl... | true |
865981a6683dc2fbe0d8ecac6cabd4ee1a34f85d | PHP | minsuRob/devJunior | /진욱스/phpSource/syntax/function/function7.php | UTF-8 | 102 | 2.8125 | 3 | [] | no_license | <?php
function get_arguments($arg1, $arg2) {
return $arg1 + $arg2;
}
echo get_arguments(15, 20);
?> | true |
5e7da1ecfee9dfbb3a17bddc4da17693bf31fc92 | PHP | ludwig-sam/mt_xxl | /providers/Hook/HookDispatcher.php | UTF-8 | 807 | 2.59375 | 3 | [] | no_license | <?php namespace Providers\Hook;
use Providers\Hook\Contracts\HookInterface;
use Providers\Hook\Contracts\HookMessageContract;
class HookDispatcher
{
private function syncHandle(HookInterface $hanlder, HookMessageContract $message)
{
$hanlder->handle($message);
}
private functi... | true |
82a36c2fa09ef945c0fa20ca8969f78f77b2c0e0 | PHP | koen860/LISA | /application/pages/admin/ApiResetPage.php | UTF-8 | 1,808 | 2.84375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"OFL-1.1"
] | permissive | <?php
/**
* @author Adriaan Knapen <a.d.knapen@protonmail.com>
* @date 5-4-2017
*/
/**
* Class TransactionApiPage
*/
class ApiResetPage extends ApiFrame
{
const USER_NOT_FOUND = 'userNotFound';
const INVALID_ARGUMENT = 'invalidArgument';
const DATABASE_ERROR = 'databaseError';
function call()
... | true |
ff1850a86667176dce85736c1f95f3acfd06bf8e | PHP | DIEUDONNE-DENGUN/Laravel-Skills-Test-v1.0 | /app/Services/UtilityService.php | UTF-8 | 1,031 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/**
* User: Dieudonne Takougang
* @Description: handle general utility for application
*/
namespace App\Services;
use Illuminate\Http\Request;
use App\Services\Interfaces\UtilityServiceInterface;
use Illuminate\Support\Facades\Auth;
class UtilityService implements UtilityServiceInterface
{
private $requ... | true |
859b9c2c527a21354e1c469a413d750ce6960218 | PHP | nahual/qc-elPibePlay | /classes/GameType.php | UTF-8 | 1,010 | 3 | 3 | [] | no_license | <?php
/**
* User: Proyecto Nahual
* Date: 04/11/12
*
* Cualquier inquietud, enviar un mail a sumate@nahual.com.ar
*
*/
class GameType
{
public static $PS = "PlayStation";
public static $PS2 = "PlayStation2";
public static $PS3 = "PlayStation3";
public static $NINTENDO = "Nintendo";
public static $XBOX ... | true |
62eb7f819e109435b7259406ef8aa109e0cd61c9 | PHP | Sumanathilaka/travel-blog-ticket-booking | /flight/search.php | UTF-8 | 3,747 | 2.578125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<style >
body{
color: black;
background-image: url("2.jpg");
background-size :cover;
text-align : center;
}
</style>
</head>
<body>
<?php
$week_day=mysqli_real_escape_string($conn, $_POST['way']);
if($_POST['way'] == 2)
{
$conn... | true |
635db01a6b8e1c4f7170b148ee4748b61295548a | PHP | d0nth4x/SymfonyModularMonolith | /src/Core/Doctrine/Type/IntIdDoctrineType.php | UTF-8 | 1,122 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Core\Doctrine\Type;
use App\Core\Domain\IntValue;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\IntegerType;
abstract class IntIdDoctrineType extends IntegerType implements DoctrineType
{
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $pl... | true |
26186f5be70082c2e318bf39488352e482b4a3d3 | PHP | Eynosoft/sequatic | /app/Common/Repositories/AllEmailsRepository.php | UTF-8 | 7,452 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Common\Repositories;
use App\Common\Repositories\Base\AllEmailsRepositoryInterface;
use App\Common\Models\AllEmail;
use App\common\helpers\MessageOtherDetails;
use File;
Class AllEmailsRepository implements AllEmailsRepositoryInterface {
protected $allEmail;
protected $messageDetails;
... | true |
45cabb5d628a680d16c45e70833cf6bea6d32a2d | PHP | Shilpa25453/codeigniterproject | /222.php | UTF-8 | 64 | 2.640625 | 3 | [] | no_license | <?
$a=5;
$b=5;
$sum=$a+$b;
echo("sum of $a & $b is", $sum);
?> | true |
cc7d62a8ada419ac59773dfb0f07b246fef68cc7 | PHP | maneeshs/orchestra | /supports/builder.php | UTF-8 | 1,421 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php namespace Orchestra\Support;
use \Closure,
\InvalidArgumentException;
abstract class Builder {
/**
* Create a new Builder instance
*
* @static
* @access public
* @param Closure $callback
* @return Builder
*/
public static function make(Closure $callback)
{
return new static($callbac... | true |
ee12e48ad8e6db6730f86977b285091fce9c91a2 | PHP | ishunter216/Pley2013 | /app/library/Pley/Shipping/CarrierServicePicker.php | UTF-8 | 3,645 | 2.53125 | 3 | [] | no_license | <?php /** @copyright Pley (c) 2014, All Rights Reserved */
namespace Pley\Shipping;
use \Pley\Config\ConfigInterface as Config;
/** ♰
* The <kbd>CarrierServicePicker</kbd>
*
* @author Alejandro Salazar (alejandros@pley.com)
* @version 1.0
* @package Pley.Shipping
* @subpackage Shipping
*/
class CarrierService... | true |
a666dfc488c6fbad4eddc334fdddf017ad7d5483 | PHP | archistico/dotsap | /app/db.php | UTF-8 | 1,261 | 2.796875 | 3 | [] | no_license | <?php
namespace App;
class DB extends \Prefab
{
private static $_instance = null;
private $dbconn = null;
private function __construct()
{
/*
$DB_HOST = '127.0.0.1';
$DB_NAME = 'my_db_name';
$DB_USER = 'my_db__user';
$DB_PASS = 'my_db_passw';
$DB_PORT =... | true |
765cef7eea7f579b0042a904b471ca49adca725f | PHP | rueduphp/flaty | /vendor/rueduphp/octo/lib/arrays.php | UTF-8 | 23,735 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Octo;
class Arrays
{
public static $delimiter = '.';
private static $resources = [];
public static function fixed(array $array = [])
{
return \SplFixedArray::fromArray($array);
}
public static function makeResourceWithName($name... | true |
94c210ef3c862e1ca02d10168c596b179abe2bd8 | PHP | owenbean/supportportal | /app/View/Members/view.ctp | UTF-8 | 11,907 | 2.515625 | 3 | [] | no_license | <?php
//declare variables for later use.
$smart_form_count = null;
//this is used to see if the member has any extras. if not, will display 'none'
$extras_count = null;
$citi = ($member['Member']['citi_integration'] == 1 ? 'CITI Integration' : null);
$wirb = ($member['Member']['wirb_integration'] == 1 ? 'WIRB Integrati... | true |
c49254d75203b9ba1c1107e0862c46d7d0bc27ea | PHP | npn225/PHPandMYSQLBasics | /Exercise Files/Chapter_NN/globe_bank/public/staff/pages/edit.php | UTF-8 | 4,228 | 2.859375 | 3 | [] | no_license | <?php
// There can be NO whitespace before or after the php-tag
// since we are dealing with html headers
require_once("../../../private/initialize.php");
// The if statement directly below prevents this page from
// being shown if there is no value for "id"
if (!isset($_GET["id"])) {
r... | true |
a8dcfba550342c4689450fc4d211c28e573eabd2 | PHP | marvinsjsu/sugar-bug-portal | /app/models/Bug.php | UTF-8 | 776 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
class Bug {
var $id, $number, $subject, $status, $priority, $type, $category, $resolution, $description;
var $created_by_name, $assigned_user_name, $date_entered;
function __construct($options) {
$this->id = $options["id"];
$this->number = $options["bug_number"];
$this->subject = $options["na... | true |
74ede650ad2b4de0c8addad60695db5ea66c5c97 | PHP | guptashash/Foodshala | /Creg.php | UTF-8 | 3,885 | 2.859375 | 3 | [] | no_license | <?php
require_once "config.php";
$username = $password = $confirm_password = "";
$username_err = $password_err = $confirm_password_err = "";
if ($_SERVER['REQUEST_METHOD'] == "POST"){
if(empty(trim($_POST["username"]))){
$username_err = "Username cannot be blank";
}
else{
$sql = "SEL... | true |
195000d27ebc294314ea219168bd400924aeface | PHP | mahmok/PHP-Course | /lecture-4/mysqli/update.php | UTF-8 | 1,055 | 3.03125 | 3 | [] | no_license | <?php
require("connection.php");
if(isset($_POST['email']))
{
$name = $_POST['name'];
$email = $_POST['email'];
$id = $_POST['id'];
$sql = "UPDATE users SET name='$name', email='$email' WHERE id=$id";
if (mysqli_query($conn, $sql)) {
echo "Record updated successfully";
} else {
... | true |
ff86dbf81755f5b188544f4ef0fc304f6c0ec1fb | PHP | grahamsutton/validator | /src/Validations/Integer.php | UTF-8 | 600 | 3.390625 | 3 | [
"MIT"
] | permissive | <?php
namespace Validator\Validations;
use Validator\Validation;
/**
* The Integer Validation Rule
*
* This class is responsible for validating that a value is an integer.
*/
class Integer extends Validation
{
/**
* Determines if the value is valid.
*
* @return bool
*/
public function... | true |
1f0a33a8caf3be4d8a55b0393ad0f181c9cb3271 | PHP | cpilton/FlashQuiz | /scripts/get-game.php | UTF-8 | 3,687 | 2.78125 | 3 | [] | no_license | <?php
require 'database.php';
session_start();
if (isset($_POST[ 'pin' ])) {
$pin = $_POST[ 'pin' ];
$_SESSION['pin'] = $pin;
unset($_SESSION['used']);
} else {
$pin = $_SESSION['pin'];
}
$limit = $_GET['limit'];
if (strpos($pin, '/') !== false) {
$arr = explode("/", $pin, 2);
$first = $arr[0];
$second ... | true |
b56aa90c7c194d71367562f129eb5234783f69c5 | PHP | Marbreeze/PhP-Piscine | /day07/ex05/NightsWatch.class.php | UTF-8 | 385 | 3.203125 | 3 | [] | no_license | <?php
class NightsWatch implements IFighter
{
private $soilder = array();
public function recruit($s)
{
$this->soilder[] = $s;
}
function fight()
{
foreach ($this->soilder as $s) {
if (method_exists(get_class($s), 'fight'))
... | true |
05dc7d4040ee75f97873f3621394d8c4b96f8792 | PHP | amansheaven/form | /login/index.php | UTF-8 | 739 | 2.671875 | 3 | [] | no_license | <?php
if(isset($_POST['submit'])) {
session_start();
$username = $_POST['username'];
if(!empty($username)) {
$_SESSION['username'] = $username;
header('Location: ../index.php');
} else {
echo 'You username should not be empty, Faggot';
}
}
?>
<!DOCTYPE html>
<htm... | true |
5e65995c424bb5ac0802a04c68198fead3646eaf | PHP | minghuaPu/aoshi | /Application/Admin/Controller/LoginController.class.php | UTF-8 | 2,201 | 2.53125 | 3 | [] | no_license | <?php
namespace Admin\Controller;
use Think\Controller;
use Think\Verify;
/**
* 总后台登录用的控制器
*/
class LoginController extends Controller {
public function index()
{
if (IS_POST) {
//第一步:验证码校验
$Verify = new \Think\Verify();
if (!$Verify->check(I('verify_val'))) {
... | true |
f05036087ce94be4b0f9bbc3a28e280802528122 | PHP | 0712459379/hotelproject | /lipa_na_mpesa.php | UTF-8 | 26,255 | 2.609375 | 3 | [] | no_license | <?php
session_start();
//require_once "db_connect.php";
$mysqli = mysqli_connect('localhost', 'root', '', 'restaurant');
$sql = "SELECT * FROM rooms WHERE room_type='Single' AND room_status='Available'";
$result = mysqli_query($mysqli, $sql);
$sql = "SELECT * FROM rooms WHERE room_type='Double' AND room_status='A... | true |
f1b5aec3456f3a7accacb942e702c09c22a7f11e | PHP | theofanet/TFW | /Core/TFile/Base.php | UTF-8 | 8,224 | 2.671875 | 3 | [] | no_license | <?php
class TFile_Base extends TFW_Abstract{
protected $_path;
protected $_path_infos;
protected $_file;
protected $_opened_mode;
protected $_exists;
protected $_valid_extensions = array();
const INFO_FILENAME = 'basename';
const INFO_FILEDIR = 'd... | true |
39ef39b7506ec1701344de46e11b9aea655e4f71 | PHP | jakefolio/joind.in | /src/api-v2/models/TalkCommentMapper.php | UTF-8 | 2,198 | 2.53125 | 3 | [
"DOC",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class TalkCommentMapper extends ApiMapper {
public function getDefaultFields() {
$fields = array(
'rating' => 'rating',
'comment' => 'comment'
);
return $fields;
}
public function getVerboseFields() {
$fields = array(
'rating' =... | true |
07e6b05ecedab3c63f774d800746d5fa91f266f4 | PHP | Lutrumo/galeriadefotos | /cruddegaleria/administracion/listarimagenes.php | UTF-8 | 2,273 | 2.90625 | 3 | [] | no_license |
<?php
/* Se abre la conexion a la base de datos y se escribe una sentencia de lo que nos devolvera la tabla */
include_once "conexionbasededatos.php";
$sentencia = $base_de_datos->query("SELECT * FROM galeri;");
$imagenes = $sentencia->fetchAll(PDO::FETCH_OBJ);
?>
<!DOCTYPE html>
<html lang=... | true |
b7c2c53951cde36123956a896bf7f41ee12775a5 | PHP | sabbirsabat/lukas-ecommerce-website-php-oop | /Classes/Size.php | UTF-8 | 3,316 | 3.1875 | 3 | [] | no_license | <?php
$filepath = realpath(dirname(__FILE__));
include_once ($filepath.'/../lib/Database.php');
include_once ($filepath.'/../helpers/Format.php');
?>
<?php
class Size{
private $db;
private $fm;
public function __construct(){
$this->db = new Database();
$this->fm = new For... | true |
061f6d2552d358eb85106f3e98a7b782988ce21e | PHP | srikarrohit/dost | /comments.php | UTF-8 | 2,917 | 2.625 | 3 | [] | no_license | <?php
if($user)
$author=$fullname;
if($user_stud)
$author=$fullname.' '.$user_stud;
#COMMMENT BOX
echo'<br><hr><br>
<div class=detailBox2>
<div>
<div class="titleBox">
<label class="fontpara" id="comm">Comments</label>
</div>
<div class="actionBox">
<ul class="commentList">';
$postid = $r... | true |
04292137722527df3831a6ceb5393b713d1fe8c5 | PHP | davidgeorgiev/DYH | /some_external_phps/return_hw_info_by_id.php | UTF-8 | 16,894 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
include "some_external_phps/FixURLLinks.php";
function ConvertDataFromSolvedHomewokrsToSentence($ArraySolvings){
$dateTimeArray = explode(" ", $ArraySolvings["Date"]);
$mydatesolved = $dateTimeArray[0];
$mytimesolved = $dateTimeArray[1];
switch ($ArraySolvings["TimeForSolve"]) {
case 0.083: $FirstPar... | true |
1295b5185180fffb455fde0bc4f39034a745971d | PHP | TeissierYannis/SDS-CLEAN | /domain/tests/Fixtures/Adapter/MuscleGroupRepository.php | UTF-8 | 781 | 2.53125 | 3 | [] | no_license | <?php
namespace TYannis\SDS\Domain\Tests\Fixtures\Adapter;
use Ramsey\Uuid\UuidInterface;
use TYannis\SDS\Domain\Sport\MuscleGroup\Entity\MuscleGroup;
use TYannis\SDS\Domain\Sport\MuscleGroup\Gateway\MuscleGroupGateway;
class MuscleGroupRepository implements MuscleGroupGateway
{
/**
* @inhe... | true |
ce6296a2c7218ba302034b0f761037af8b43b91b | PHP | brguru90/STUDENT-AND-FACULTY-PERFORMANCE-ANALYSIS | /admin_notes_updt.php | UTF-8 | 1,064 | 2.71875 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION['admin']))
{
header('Location:home.php');
}
?>
<!DOCTYPE html>
<html>
<head>
<title id="title">ADMIN</title>
<style>
#ip{width:200px}
</style>
</head>
<body>
<?php
include('db.php');
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
/... | true |
299764c4bd9ededcfac1beff09e79d63d8147945 | PHP | unil-lettres/dilps-tiresias | /server/Application/DBAL/Types/PrecisionType.php | UTF-8 | 449 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Application\DBAL\Types;
use Ecodev\Felix\DBAL\Types\EnumType;
class PrecisionType extends EnumType
{
final public const LOCALITY = 'locality';
final public const SITE = 'site';
final public const BUILDING = 'building';
protected function getPossibleValues():... | true |
2ea4c4171070409713bc79b730c4679e2bc3423d | PHP | EDataScriptware/SeniorProjectDevelopment | /application/views/user/vetList.php | UTF-8 | 14,634 | 2.65625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <!-- Makes a check to see if there's an ID in the URL if there is it creates an individual team view, if not it creates a more detailed single view -->
<?php if ($id === null) { ?>
<div class='wrapper text-center'>
<div class="btn-group btn-group-lg">
<!-- Button view lets you shift between each section -->
<button ty... | true |
46fc5f22db70bed25bf9fd48c779d149b40ec7db | PHP | RouteMediaGroup/cimply | /cimply/core/core.php | UTF-8 | 1,752 | 3.046875 | 3 | [] | no_license | <?php
namespace Cimply\Core {
use \Cimply\Interfaces\{ICast};
abstract class Core implements ICast {
public static $fillable;
/**
* Cast a Object to Current Class-Object to itself
* @param mixed $mainObject
* @param mixed $selfObject
* @return mixed
... | true |
94338ff99439007c7baa8008709957b7c7ed3b1c | PHP | IvanGrigorov/PHPCheckout | /src/Services/Product/IProductService.php | UTF-8 | 328 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Services\Product;
use App\Models\RequestModels\ProductRequestModel;
interface IProductService {
public function create(ProductRequestModel $productRequestModel) : int;
public function update(ProductRequestModel $productRequestModel) : bool;
public function delete(int $productId) : ... | true |
4d427ee5c153823a1f31779f790d41d54b9f269f | PHP | LukaszST/WalletDDD | /app/Http/Controllers/WalletController.php | UTF-8 | 775 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Wallet\Infrastructure\Repositories\WalletRepository as WalletRepositoryContract;
/**
* Class WalletController
* @package App\Http\Controllers
*/
class WalletController extends Controller
{
/**
* @var WalletRepositoryContract
... | true |
397387164c8f46c8f53f0e636d48ab43679e93ff | PHP | duyuan1989/PhpDesignPatterns | /src/AbstractFactory/AbstractFactory.php | UTF-8 | 280 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
namespace Patterns\AbstractFactory;
/**
* 在这种情况下,抽象工厂是创建一些组件的契约
* 在 Web 中。 有两种呈现文本的方式:HTML 和 JSON
*/
abstract class AbstractFactory {
abstract public function createText(string $content): Text;
} | true |
37258e837323ca6704349e1759c493bb597bd682 | PHP | lucasnpinheiro/Kiterp | /src/Controller/UsuariosController.php | UTF-8 | 4,704 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controller;
use App\Controller\AppController;
/**
* Usuarios Controller
*
* @property \App\Model\Table\UsuariosTable $Usuarios
*/
class UsuariosController extends AppController {
public function __construct(\Cake\Network\Request $request = null, \Cake\Network\Response $response = null, ... | true |
48709515b4534c57958ba03e4430b31b132a4437 | PHP | donvercety/php.class.MiniDB | /lib/DB.php | UTF-8 | 8,600 | 3.1875 | 3 | [] | no_license | <?php
/**
* Database Wrapper.
* Implements C.R.U.D. functionality.
*
* @author Tommy Vercety
*/
class DB {
/**
* DB Connection Instance
* @var object
*/
private static $_instance = null;
/**
* Connection credentials
* @var array
*/
private static $_cfg = [
"... | true |
fa9995c80d6164c41430adcefeafefb97d84a642 | PHP | Sahar-1/webbb | /newsletter/preferences.php | UTF-8 | 4,932 | 2.59375 | 3 | [
"MIT"
] | permissive | # preferences.php
<?php
require_once 'admin/config.php';
if(isset($_POST['submitted'])) {
$id = (int) $_POST['id'];
$link = new mysqli(DB_SERVER, DB_USER, DB_PASSWORD, DB_NAME) or die('There was a problem connecting to the database.');
$sql = "UPDATE subscribers SET name='"... | true |
84ee4ce8a89d2c64b4cbee38b569aef01b964174 | PHP | bhknx3/CSC-17B | /SurveyEngine/admin/delete_survey.php | UTF-8 | 6,236 | 2.640625 | 3 | [] | no_license | <style type="text/css">
body {text-align: center;}
</style>
<?php
$page_title = 'Delete Survey';
include ('../includes/header.php');
require_once "../config.php";
echo '<div class="page-header"><h2><b>Delete Survey</b></h2></div>';
// Check for a valid survey unique ID, through GET or POST:
if (isset($_GET['id'])... | true |
b5a772ed2b187a71c4dd5e06e8dc549cf49f49e9 | PHP | adsy2010/LaravelStripeWrapper | /src/Models/StripeCustomerAddress.php | UTF-8 | 1,229 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Adsy2010\LaravelStripeWrapper\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Datab... | true |
6da552db67c091602c67c8f48dd6cd4e67efd272 | PHP | alexisgruny/ExercicePHP5 | /ExercicePHP3/index.php | UTF-8 | 318 | 3.140625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang=fr>
<head>
<meta charset="utf-8" />
<title>Exercice 3</title>
</head>
<body>
<p>
<?php
$who = 'qui est';
$you = 'tu ?';
function concatenation($text, $text2) {
return $text . ' ' . $text2;
}
echo concatatenation($who, $you);
?>
</p>
</body>
</html>
| true |
cdd767c9e1d71cd62797be286bf4549b247df084 | PHP | edo9k/learn | /php/sqlite3-zetcode/fetch_all.php | UTF-8 | 177 | 2.78125 | 3 | [] | no_license | <?php
$db = new SQLite3('store.db');
$res = $db->query('SELECT * FROM cars');
while ($row = $res->fetchArray()) {
echo "{$row['id']} {$row['name']} {$row['price']} \n";
}
| true |