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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
5e9593071833728158478e4351e9b784796aea6a | PHP | vannoa/CodeIgniter-4---eCommerce-sedarhana | /app/Controllers/Pelanggan.php | UTF-8 | 4,880 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controllers;
use CodeIgniter\Controller;
use App\Models\PelangganModel;
class Pelanggan extends Controller
{
public function __construct()
{
// Mendeklarasikan class ProductModel menggunakan $this->product
$this->pelanggan = new PelangganModel();
/* Catatan:
... | true |
a720ea43281ec86c2bff0b38ab0be5b67d19ce28 | PHP | ajapha/MyRep | /take2.php | UTF-8 | 2,389 | 3.171875 | 3 | [] | no_license | <?php
echo '<a href="./take2.php?page=nameform">Click to View Name Form</a> ';
echo '<br>';
echo '<a href="./take2.php?page=carform">Click to View Your Car\'s Value</a>';
echo '<br>';
$page = $_GET['page'];
$obj = new $page;
$obj->show_form;
$obj->writeForm;
class carform {
public show_form() {
echo... | true |
aef54c68a942a11af789bda862c477b778ceed89 | PHP | gh123man/Expermiments | /php/resources/helpers.php | UTF-8 | 372 | 3 | 3 | [] | no_license | <?php
function varJS($name, $value) {
$out = "";
$out .= "<script>";
$out .= "var " . $name . " = '" . $value . "';";
$out .= "</script>";
return $out;
}
function arrJS($name, $value) {
$out = "";
$out .= "<script>";
$out .= "var " . $name . " = " . $value . ";";
... | true |
0684551519542aa8b98295b3965ddccf5519ee37 | PHP | mahmudalhakim/Backend_FEND19 | /Lektion-06/telefonlista/read.php | UTF-8 | 1,206 | 2.953125 | 3 | [] | no_license | <?php
/**************************************
*
* Filnamn: read.php
* Författare: Mahmud Al Hakim
* Date: 2020-03-04
*
* Filen hämtar en tabell från databasen
*
*************************************/
$sql = "SELECT * FROM contacts";
$stmt = $db->prepare($sql);
$stmt->execute();
// $stmt är ett objekt som i... | true |
498982ef442fc3316bbc7552fa66282a0af44843 | PHP | rozaverta/cmf-core | /RozaVerta/CmfCore/Session/SessionManager.php | UTF-8 | 2,762 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by GoshaV [Maniako] <gosha@rozaverta.com>
* Date: 01.11.2015
* Time: 22:17
*/
namespace RozaVerta\CmfCore\Session;
use RozaVerta\CmfCore\Interfaces\Getter;
use RozaVerta\CmfCore\Support\Prop;
use RozaVerta\CmfCore\Traits\ComparatorTrait;
use RozaVerta\CmfCore\Traits\GetTrait;
use RozaVerta\Cmf... | true |
3e816547547b7994fcf79b268d1fc7d187005b93 | PHP | nabu-3/core | /nabu/cli/app/CNabuClusterApp.php | UTF-8 | 3,361 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/** @license
* Copyright 2019-2011 Rafael Gutierrez Martinez
* Copyright 2012-2013 Welma WEB MKT LABS, S.L.
* Copyright 2014-2016 Where Ideas Simply Come True, S.L.
* Copyright 2017 nabu-3 Group
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in... | true |
06bbf3b9357b912b27cce7272f682bee053c49f9 | PHP | dohnall/historycarprague | /lib/classes/MySQL.class.php | UTF-8 | 4,264 | 2.75 | 3 | [] | no_license | <?php
class MySQL implements IDatabase {
public $log = false;
public $module = "";
public $submodule = "";
private $conn;
private static $instance;
public function __construct($host, $user, $pass, $name, $charset) {
$this->connect($host, $user, $pass, $name);
$this->setNames($... | true |
6f123ffb4b00a0f78e266954c8fc9a407880467d | PHP | michalswietochowski/SPDB | /module/Application/src/Application/Db/Table/Regions.php | UTF-8 | 1,711 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by m.swietochowski
*/
namespace Application\Db\Table;
use Application\Gis\Shapefile;
use Zend\Db\Sql;
use Zend\Db\TableGateway\Feature;
use Zend\Db\TableGateway\TableGateway;
class Regions extends TableGateway
{
/**
* @var string
*/
protected $importDir;
public function _... | true |
3da24a1b07f333e530c55378b90587f8f58a464a | PHP | Mesuva/msv_script_output | /controller.php | UTF-8 | 777 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
// Author: Ryan Hewitt - http://www.mesuva.com
namespace Concrete\Package\MsvScriptOutput;
use Concrete\Core\Package\Package;
use Concrete\Core\Block\BlockType\BlockType;
class Controller extends Package {
protected $pkgHandle = 'msv_script_output';
protected $appVersionRequired = '5.7.5';
protected $pkgVer... | true |
d8b36b911aba3927d91bd890d420cb8d77c18415 | PHP | Mrknister/BlueAnime | /includes/bbcode.php | UTF-8 | 1,304 | 2.875 | 3 | [] | no_license | <?php
function bbc2html($tmpText){
/*[b]*/ $tmpText = preg_replace('#\[b\](.*)\[/b\]#isU', '<b>$1</b>', $tmpText);
/*[i]*/ $tmpText = preg_replace('#\[i\](.*)\[/i\]#isU', '<i>$1</span>', $tmpText);
/*[u]*/ $tmpText = preg_replace('#\[u\](.*)\[/u\]#isU', '<span style="text-decoration:underline">$1</span>', $tmpText);... | true |
3423a020a8b1e1d49d44dc04ce979da5444466de | PHP | kpicaza/schooly | /src/AppBundle/Command/Grade/CreateGradeCommand.php | UTF-8 | 2,286 | 2.65625 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace AppBundle\Command\Grade;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Exception\RuntimeException;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterfa... | true |
8e8e286388e03ccd1e12425bc8ff7990f13556d1 | PHP | techdivision/import | /src/Subjects/FileResolver/AbstractFileResolver.php | UTF-8 | 7,956 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* TechDivision\Import\Subjects\FileResolver\AbstractFileResolver
*
* PHP version 7
*
* @author Tim Wagner <t.wagner@techdivision.com>
* @copyright 2016 TechDivision GmbH <info@techdivision.com>
* @license https://opensource.org/licenses/MIT
* @link https://github.com/techdivision/import
* ... | true |
c15742525eae11c5734fa6e8472d0eb9bfad1a0e | PHP | brick/postcode | /src/Formatter/ADFormatter.php | UTF-8 | 881 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Brick\Postcode\Formatter;
use Brick\Postcode\CountryPostcodeFormatter;
/**
* Validates and formats postcodes in Andorra.
*
* Postcodes consist of the letters AD, followed by 3 digits, without separator.
* This formatter accepts the 3 digits with and without the AD prefix... | true |
a80b8a18817835008e72aced7c5112e76a934015 | PHP | atomicbomber-git/meatball-selfordering-webapp | /application/controllers/Login.php | UTF-8 | 1,411 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
use App\BaseController;
use App\EloquentModels\User;
use App\Helpers\DefaultRoute;
use App\Helpers\Auth;
class Login extends BaseController {
public function __construct()
{
parent::__construct();
Auth::check() && redirect(DefaultRoute::get());
}
protected function allowedMethod... | true |
9de0c14ba8584b67b0cf28bbbacf42e8579a2523 | PHP | SalientCRGT/epa-rfi | /api/facilityService.php | UTF-8 | 1,772 | 2.71875 | 3 | [] | no_license | <?php
class FacilityService extends RestService{
const TABLE_NAME = "frs_state_facility";
public function getFacilities(){
$params = $this->app->request->get();
$selectStmt = new SelectStmt();
$selectStmt->setTableName(self::TABLE_NAME);
$selectStmt->se... | true |
3f9949f77b166bf4c082ac3bb274537ca689577a | PHP | EssyShadowPHP/ws | /src/socket/SocketException.php | UTF-8 | 525 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace ws\socket;
use RuntimeException;
use function socket_last_error;
use function socket_strerror;
use function trim;
class SocketException extends RuntimeException{
/**
* @param string $message
* @param resource|null $socket
* @return self
*/
public static fun... | true |
a864945a1763e9be73f6ad67a5f46e7a0f28bca4 | PHP | along186/get2b-api | /application/Library/Response.php | UTF-8 | 2,816 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Library;
use think\Response as ThinkResponse;
use think\Request as ThinkRequest;
class Response extends ThinkResponse{
/**
* 返回JSON
*
* @param mixed $data
* @param array $header
* @param int $code
*
* @return \think\Response
*/
final public fu... | true |
98c92b08a5f44979ea97e40155ee265426e66384 | PHP | krageon/php-deobfuscator | /src/Scope/VariableScope.php | UTF-8 | 1,165 | 3.078125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Transip\Scope;
use ast\Node;
interface VariableScope
{
/**
* Goes one scope "deeper" (eg into a function definition).
*/
public function stepIntoScope();
/**
* Goes one scope "shallower" (eg out of a function definition).
*/
public function stepOutOfScope();
... | true |
b4407fa4b328eead99f11eae1fbe1baa0058549c | PHP | KuNman/LOD_PHP_W_01_Egzamin_2 | /zad2_receiver.php | UTF-8 | 847 | 2.75 | 3 | [] | no_license | <?php
require_once dirname(__FILE__).'/config.php';
if ($_SERVER['REQUEST_METHOD'] != 'GET') {
echo 'Proszę wejść na stronę metodą GET';
} elseif ($_SERVER['REQUEST_METHOD'] == 'GET') {
$conn = new mysqli(DB_HOST, DB_USER, DB_PASSWORD, DB_DBNAME);
if ($_GET['userId'] == '') {
echo 'Brak przesłania ... | true |
15375a756780732ef97150e922d20f823636cc0c | PHP | anjara3389/engPrac | /Game/FrmGame.php | UTF-8 | 3,713 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
$numPhra = "";
include("../Menu/Menu.php");
include("./Game.php");
include("../Category/Category.php");
$category = new Category();
$categories = $category->select(true);
?>
<html>
<head>
<script src="../jquery-3.2.1.min.js"></script>
<script>
$(document).ready(function... | true |
6787b602d0c44c1ed16d6aad51b763ec54fa9a7e | PHP | xz02108040/oil_main_bak_20211004 | /app_bak_20211004/Model/Report/rept_doorinout_car_t.php | UTF-8 | 3,423 | 2.65625 | 3 | [
"Unlicense"
] | permissive | <?php
namespace App\Model\Report;
use Illuminate\Database\Eloquent\Model;
class rept_doorinout_car_t extends Model
{
/**
* 使用者Table:
*/
protected $table = 'rept_doorinout_car_t';
/**
* Table Index:
*/
protected $primaryKey = 'id';
/**
* The attributes that are mass assig... | true |
e2f7d98abc9cff8b699dd3c0d44dc02b54758413 | PHP | ashwiniks/luxe | /backend/models/Itinery.php | UTF-8 | 1,097 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\models;
use Yii;
/**
* This is the model class for table "itinery".
*
* @property integer $id
* @property integer $tour_id
* @property string $day
* @property string $details
*
* @property Tour $tour
*/
class Itinery extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
... | true |
6c6c0d483cbe4fb3e9ba59e63e3ef69b73d8d206 | PHP | HarryGz/todooo | /app/server/class/Notes.php | UTF-8 | 1,662 | 2.984375 | 3 | [] | no_license | <?php
require_once 'DBManager.php';
class Notes {
// private $log;
public function __construct() {
}
public function get_notes() {
$db = new DBmanager();
$dbh = $db->open_connection();
$sth = $dbh->prepare('SELECT * FROM notes ORDER BY id ASC');
$s = $sth->execute();
$... | true |
28e9344803a477d8367a386777411d7a7a1f5560 | PHP | Proyecto-de-Software/2018_grupo5 | /src/controllers/InstitucionController.php | UTF-8 | 1,383 | 2.75 | 3 | [] | no_license | <?php
require_once(CODE_ROOT . "/controllers/Controller.php");
use controllers\Controller;
class InstitucionController extends Controller {
/** @var InstitucionDAO $institucionDao */
private $institucionDao;
function __construct() {
parent::__construct();
$this->institucionDao = new Ins... | true |
4bcd2c4ae7a6f18606449323a389aa08b523387f | PHP | hyperf/hyperf | /src/view-engine/src/Compiler/Concern/CompilesTranslations.php | UTF-8 | 1,197 | 2.78125 | 3 | [
"BSD-3-Clause",
"WTFPL",
"MIT",
"Apache-2.0",
"LGPL-2.1-only",
"LGPL-2.1-or-later"
] | permissive | <?php
declare(strict_types=1);
/**
* This file is part of Hyperf.
*
* @link https://www.hyperf.io
* @document https://hyperf.wiki
* @contact group@hyperf.io
* @license https://github.com/hyperf/hyperf/blob/master/LICENSE
*/
namespace Hyperf\ViewEngine\Compiler\Concern;
trait CompilesTranslations
{
/*... | true |
dd7985be5c2c550513621053f9379f3faf150b48 | PHP | bfmack/create | /word/common/php/situation_data.php | UTF-8 | 1,161 | 2.609375 | 3 | [] | no_license | <?php
$dsn='mysql:dbname=translate;host=localhost';
$user='root';
$password='';
$dbh=new PDO($dsn,$user,$password);
$dbh->query('SET NAMES utf8');
/* ---シチュエーションテーブルからのデータ取り出し--- */
for($no=1;;$no++){
$sql='SELECT SITUATION,SITUATION_KEY,SITUATION_PATH FROM situation WHERE SITUATION_KEY=?';
$stmt=$dbh->prepare($sq... | true |
8193f663a40ee66ebd0c96f8ba4ddcd17b9b849f | PHP | konorws/sms-mode | /src/SMSMode.php | UTF-8 | 4,244 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace SMSMode;
use SMSMode\Exception\RequestException;
use SMSMode\Request\Client;
use SMSMode\Request\Message;
use SMSMode\Request\Response;
/**
* Class SMSMode
* @package SMSMode
* @author Mykhailo YATSYHSYN <myyat@mirko.in.ua>
* @copyright Mirko 2021 <https://mirko.in.ua>
*/
class SMSMode
{
con... | true |
08163df56cca421ec09b9e6fec2d6b4b8d1b822a | PHP | walkyang/crm_system | /app/Http/Controllers/UploadController.php | UTF-8 | 1,531 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Request;
class UploadController extends Controller
{
//上传图片
public function upload_images(){
$img = Request::file('img');//图片
$file_path = Request::post('path');//存储位置
if($img){
$rule = ['jpg', 'png', 'gif'];
$code = 1;... | true |
2d4c0bd93461f2c66f98e761459cf21e7ba75501 | PHP | crudch/framework | /src/Cache/Cache.php | UTF-8 | 1,173 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
namespace Crudch\Cache;
use Crudch\Cache\Interfaces\CacheDriverInterface;
/**
* Class Cache
*
* @package Crudch
*/
class Cache
{
protected $driver;
/**
* Cache constructor.
*
* @param CacheDriverInterface $cache
*/
public function __construct(CacheDriverInterface $cache)
... | true |
f5d2ee42d1d2ef8aefaa484c5411c2c4048d5721 | PHP | inakiabt/barakus | /src/Helpers/DateHelper.php | UTF-8 | 1,916 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
class DateHelper
{
function arrayToTimestamp($array, $hora = 1, $mins = 1, $segs = 1)
{
if (is_array($array['Day']))
{
$return = array();
foreach ($array['Day'] as $index => $day)
{
$retur... | true |
b3c3b08573907da01527d84ffdf1b261723d765d | PHP | ryu38000/Projet-GOW1.1 | /update_userlang.php | UTF-8 | 498 | 2.515625 | 3 | [
"LicenseRef-scancode-other-permissive",
"MIT"
] | permissive | <?php
session_start();
require_once("models/user.class.php");
require_once("sys/db.class.php");
$user = user::getInstance();
$sql = "UPDATE user SET userlang ='"
. $_GET['userlang']
. "' WHERE userid = '" . intval($user->id)."'";
$db = db::getInstance();
echo $sql;
if ($db->query($sql)){
echo "update... | true |
69d98109fd0d56086f7421784e91978d25121145 | PHP | JacksonMcGlasson/SuperWebsite | /controller/login-user.php | UTF-8 | 984 | 2.921875 | 3 | [] | no_license | <?php
//getting information from other page
require_once (__DIR__ . "/../model/config.php");
//filters the username and password data
$username = filter_input(INPUT_POST, "username", FILTER_SANITIZE_STRING);
$password = filter_input(INPUT_POST, "password", FILTER_SANITIZE_STRING);
//selects the the salt and password ... | true |
44810e6ac13ef01b8aaceec4b2540e774806a3c1 | PHP | codersclub/forum | /htdocs/sources/storeitems/item_basicsteal.php | UTF-8 | 5,537 | 2.59375 | 3 | [
"MIT"
] | permissive | <?
//---------------------------------------------------
// IBStore Basic Steal
//---------------------------------------------------
class item
{
var $name = "Steal";
var $desc = "Steal some money from any user.";
var $extra_one = "0";
var $extra_two = "1000";
var $extra_three = "50";
var $apply_prote... | true |
f067ac794b6dc7231638729372ad3687f16cc308 | PHP | ajitsnz/PMCRM | /app/Queries/TaskDataTable.php | UTF-8 | 1,204 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Queries;
use App\Models\Task;
use Illuminate\Database\Eloquent\Builder;
/**
* Class TaskDataTable
*/
class TaskDataTable
{
/**
* @param array $input
*
* @return Task|Builder
*/
public function get($input = [])
{
/** @var Task $query */
$query = ... | true |
a4e52ada8c289e3f570eec6023219d60be15d4f8 | PHP | AaronDDM/XMLBuilder | /lib/Writer/SabreXMLWriterService.php | UTF-8 | 2,059 | 3 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the XML Builder Library.
*
* (c) Aaron de Mello <https://aaron.de-mello.org/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace AaronDDM\XMLBuilder\Writer;
use AaronDDM\XMLBuilder\Exception... | true |
c71129f375f72fc58c3220b7ea87e3a59f624c4b | PHP | AntonKabarov/Diplom-Danwer- | /www/search.php | UTF-8 | 4,111 | 2.609375 | 3 | [] | no_license | <?php
//require "functions/functions.php";
//$db = connect("localhost","root","","praktika");
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASS', '');
define('DB_NAME', 'praktika');
if (!mysql_connect(DB_HOST, DB_USER, DB_PASS)) {
exit('Cannot connect to server');
}
if (!mysql_select_db(... | true |
f210de8a02a8355d6711d7aad71c3c017af9c1a4 | PHP | jgmuchiri/evanto-author-portal | /functions.php | UTF-8 | 671 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
if(!function_exists('dd')) {
/**
* Dumps a given variable along with some additional data.
*
* @param mixed $var
* @param bool $pretty
*/
function dd($var, $pretty = TRUE)
{
$backtrace = debug_backtrace();
echo "\n<pre>\n";
if(isset($backtrace[0]['file... | true |
c13f4bd9f07d4932aeafb73d259f751352dd6a7c | PHP | Millen-yoobee/dorys | /app/Http/Controllers/DishesController.php | UTF-8 | 4,504 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use Intervention\Image\ImageManager;
use App\Dishes;
use App\Categories;
use Session;
class DishesController extends Controller
{
public function index()
{
// return view("dishes.index");
// // return ("... | true |
3dc6bc95a31ae07bbcdb94f27ce3b6ec80ef6c0b | PHP | matiux/ddd-utente-esempio | /src/Company/UtenteDDDExample/Infrastructure/Domain/Model/Utente/Doctrine/DoctrineUtenteRepository.php | UTF-8 | 1,023 | 2.609375 | 3 | [] | no_license | <?php
namespace UtenteDDDExample\Infrastructure\Domain\Model\Utente\Doctrine;
use UtenteDDDExample\Domain\Model\Utente\EmailUtente;
use UtenteDDDExample\Domain\Model\Utente\Utente;
use UtenteDDDExample\Domain\Model\Utente\UtenteId;
use UtenteDDDExample\Domain\Model\Utente\UtenteRepository;
use Doctrine\ORM\EntityRepo... | true |
81d8ba623276fdcad062a511c0570665e7e03a81 | PHP | nilmadhab/gray | /nil.php | UTF-8 | 354 | 2.90625 | 3 | [] | no_license | <html>
<head></head>
<body>
<h1> we are here </h1>
<?php
ini_set('display_errors', true);
error_reporting(E_ALL ^ E_NOTICE);
$date = date('Y-m-d');
$date = explode("-", $date);
$start = implode("-", array($date[0],$date[1],"01") );;
$end = implode("-", array($date[0],$date[1],"31") );
echo $start." ... | true |
ef968fbf807d71aa78991cb6ce94964f68c1002a | PHP | gmp1993/gabriel | /projetologica/exercicio1.php | ISO-8859-1 | 239 | 4.28125 | 4 | [] | no_license | <?php
print "Programa para ler dois nmeros";
print "\nDigite o primeiro nmero: ";
$n1 = trim(fgets(STDIN));
print "\nDigite o segundo nmero: ";
$n2 = trim(fgets(STDIN));
$soma = $n1 + $n2;
print "\nA soma dos nmeros : " .$soma; | true |
897c69159e6d77422fa350ee0b7221b6dffab839 | PHP | catchup-forks/PackageEws365 | /src/StructType/EwsUpdateBookingStaffResponseMessageType.php | UTF-8 | 2,067 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Ews\StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for UpdateBookingStaffResponseMessageType StructType
* @package Ews
* @subpackage Structs
* @author WsdlToPhp <contact@wsdltophp.com>
*/
class EwsUpdateBookingStaffResponseMessageType extends EwsResponseMessag... | true |
5374b9dd30b18431f44c7f87a533276f00f3e496 | PHP | raysn0w/Scout | /app/LdapDomain.php | UTF-8 | 5,406 | 2.6875 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Support\Str;
use Illuminate\Database\Eloquent\Model;
use LdapRecord\Models\Entry as UnknownModel;
use LdapRecord\Models\OpenLDAP\Entry as OpenLdapModel;
use LdapRecord\Models\ActiveDirectory\Entry as ActiveDirectoryModel;
class LdapDomain extends Model
{
// The LDAP connection... | true |
2bd6b281e861185e72bcc0d425dc4acfbcdc67d7 | PHP | shilpabharamanaik/shilpazend3Fisdap | /packages/fisdap/members-api/app/Data/Practice/DoctrinePracticeItemRepository.php | UTF-8 | 13,809 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php namespace Fisdap\Data\Practice;
/*
* This file is subject to the terms and conditions defined in the
* 'COPYRIGHT.txt' file, which is part of this source code package.
*/
use Fisdap\Data\Repository\DoctrineRepository;
use Fisdap\Entity\InstructorLegacy;
use Fisdap\EntityUtils;
/**
* Class DoctrinePracticeI... | true |
7e17db8fa35ce0669c46a1ea4582e2a1d040d134 | PHP | ChampsyGnom/GeoPatrimoine | /data/rest-abstract-output.php | UTF-8 | 164 | 2.515625 | 3 | [] | no_license | <?php
abstract class RestAbstractOutput
{
protected $api =null;
public function __construct($api)
{
$this->api = $api;
}
}
?> | true |
f2ba23dc0de36ff700d093d7c83ace41f87ea32b | PHP | Pmertgen/PHP-functions-and-problem-solving | /php_functions.php | UTF-8 | 1,866 | 4.15625 | 4 | [] | no_license | <?php
/* This one checks an input for its type and outputs either that it is an int or not.
*/
function TypeCheck($i)
{
if (intval($i) == 0) {
echo "Bad String";
} else {
echo intval($i);
}
}
/*
This class takes N, showing the number of integers and $a which is an array of integers. it then print... | true |
c26f0e101496a1827994198e8b361f61e9a3e274 | PHP | ausarion/IT202-008 | /MultiProduct/searchProduct.php | UTF-8 | 4,813 | 2.78125 | 3 | [] | no_license | <?php
ini_set('display_errors',1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
if( isset($_POST['productName'])
&& isset($_POST[date'])
&& isset($_POST['email'])
&& isset($_POST['password'])
&& isset($_POST['confirm'])
){
$pass... | true |
1a57eab5a605ebad9f67e91fca94277171c5cf3d | PHP | MaksymIvakhnenko/Homework | /30.08.17/23.php | UTF-8 | 427 | 2.765625 | 3 | [] | no_license | <?php
print ("Напишите 3 строки, используя три разные функции для вывода текста.<br>");
echo 'Напишите 3 строки, используя три разные функции для вывода текста.<br>';
$A='Напишите 3 строки, используя три разные функции для вывода текста.<br>';
echo sprintf($A);
?> | true |
7d1d3e35e1b02854e40d38bad23de51a512b652e | PHP | nikmen560/quizotopia | /src/Entity/UserPosition.php | UTF-8 | 1,704 | 2.578125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Entity;
use App\Repository\UserPositionRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=UserPositionRepository::class)
*/
class UserPosition
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
... | true |
f8cf9121197e445618e90af201f8f64658941f13 | PHP | veslo1/apmgr | /extras/ZFHtml/WeekTable.php | UTF-8 | 5,466 | 2.921875 | 3 | [] | no_license | <?php
/**
* Provides the Html for week elements
*
* @author jvazquez
*/
class ZFHtml_WeekTable extends ZFDate_Abstract_DateUtils implements ZFHtml_Interface_HtmlInterface,ZFObserver_ILogeable {
/**
* The userId we are fetching info
* @var integer
*/
protected $userId;
/**
*
* Logger for PHPUnit
* @... | true |
78ece65fa7b1e357f70227114d599e18716db287 | PHP | pcnay/Control_Incidencias | /php/Subir_Archivos_CSV/ProcesarUsuario.php | UTF-8 | 1,882 | 3.046875 | 3 | [] | no_license | <?php
include("conexion.php");
// Determina si es un archivo "CVS"
if (substr($_FILES['excel']['name'],-3)=="csv")
{
$fecha = date('Y-m-d');
$rand = rand(99999999999999,99999999999);
$carpeta = "archivos-excel/";
$excel = $fecha."-".$rand."-".$_FILES['excel']['name'];
// Mueve el archivo a l a ruta espe... | true |
038f2ff97e2275c84f00ed33cd2ad26565214188 | PHP | toyjack/hanzi-text-shori | /djt.php | UTF-8 | 1,031 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
function read_File($file_name)
{
$file = [];
if (file_exists($file_name)) {
$handle = fopen($file_name, "r");
while (!feof($handle)) {
$line = trim(fgets($handle));
array_push($file, $line);
}
fclose($handle);
return $file;
} else {
... | true |
b5ad9c54e3c44b8ae47abd9f3df16260eaf2fb87 | PHP | kopiaman/printshop | /upload/bootstrap.php | UTF-8 | 3,883 | 2.609375 | 3 | [] | no_license | <?php
/**
* This file wraps everything together
* It connects to your database
* and creates the tables needed
*
*/
require __DIR__ . '/vendor/autoload.php';
require_once __DIR__ . '/config.php';
#error_reporting(E_ALL);
#ini_set('display_errors', true);
use Illuminate\Database\Capsule\Manager as Capsu... | true |
1b0989ec3901e3d0693653ac5918128c7438afc4 | PHP | HT3/camagru_new | /forgot_password.php | UTF-8 | 3,053 | 2.671875 | 3 | [] | no_license | <?php
include 'functions/change_password.php';
session_start();
if ($_POST['submit_forgot_password'] == OK) {
$email = $_POST['email'];
$host = 'localhost';
$user = 'root';
$pass = 'qwerty1234';
$db = 'db_camagru';
$dsn = "mysql:host=$host;dbname=$db;charset=u... | true |
1948d14fdeba658f14a1048562d7025affac333e | PHP | VictorHSMoura/E09-Show-do-Bilhao | /iniciaSessao.php | UTF-8 | 923 | 2.546875 | 3 | [] | no_license | <?php
/*
* Set de cookies e variáveis de Session
*/
ob_start();
require 'functions.inc';
$array = decodifica("users.json");
if(UserRepetido($_POST["login"], $array, "login") && UserRepetido($_POST["senha"], $array, "senha")){
session_start();
$_SESSION["nome"] = $_POST["logi... | true |
d5d2ab21426152888632789e920d922f6cd62404 | PHP | Fanddibay/kampusKU-WEB | /functions.php | UTF-8 | 5,282 | 2.859375 | 3 | [] | no_license | <?php
// connect database
$conn = mysqli_connect("localhost", "root", "", "phpdasar");
// conect query
function query($query)
{
global $conn;
// lemari
$result = mysqli_query($conn, $query);
$rows = [];
while ($row = mysqli_fetch_assoc($result)) {
$rows[] = $row;
}
return $rows;
}
... | true |
7641bb1c755272c1eddc0c1626e27163809587ae | PHP | wayofdev/laravel-cycle-orm-adapter | /src/Bridge/Laravel/Console/Commands/Migrations/MigrateCommand.php | UTF-8 | 1,553 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace WayOfDev\Cycle\Bridge\Laravel\Console\Commands\Migrations;
use function sprintf;
/**
* See original spiral framework commands.
*
* @see https://github.com/spiral/cycle-bridge/blob/master/src/Console/Command/Migrate/MigrateCommand.php
*/
final class MigrateCommand extends... | true |
8e5b655dd7682d93cdcdd404603482ed45246c54 | PHP | anilgurjar/uccinew | /src/Controller/ExecutiveCategoriesController.php | UTF-8 | 3,821 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Controller\AppController;
/**
* ExecutiveCategories Controller
*
* @property \App\Model\Table\ExecutiveCategoriesTable $ExecutiveCategories
*/
class ExecutiveCategoriesController extends AppController
{
/**
* Index method
*
* @return \Cake\Network\Respon... | true |
e2fe0fd6cf22fe906790379c096ba430668db635 | PHP | catsAND/quiz_task | /server/Entity/QuizUsers.php | UTF-8 | 4,241 | 2.65625 | 3 | [
"Unlicense"
] | permissive | <?php
namespace Api\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* QuizUsers
*
* @ORM\Table(name="quiz_users", indexes={@ORM\Index(name="idx1", columns={"quiz_id"})})
* @ORM\Entity
*/
class QuizUsers
{
/**
* @var string
*
* @ORM\Column(name="id", type="string", length=16, nullable=false, opti... | true |
64a6655cabd9f471a31209aad0c370b4c67bf44f | PHP | OnnigPano/proyecto_integrador | /classes/Validator.php | UTF-8 | 669 | 3.4375 | 3 | [] | no_license | <?php
abstract class Validator
{
protected $errors;
public function __construct()
{
$this->errors = [];
}
public function setError(string $field, string $text)
{
$this->errors[$field] = $text;
}
public function getErro... | true |
46194650d82839664172d606c121d2c6f1faed94 | PHP | xobotyi/basen | /tests/BaseNTest.php | UTF-8 | 4,993 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @Author : a.zinovyev
* @Package: basen
* @License: http://www.opensource.org/licenses/mit-license.php
*/
namespace xobotyi\basen;
use PHPUnit\Framework\TestCase;
class BaseNTest extends TestCase
{
public function testCommonMethods() {
$base8 = new BaseN('01234567');
$this->assert... | true |
1d774b3c5e67560dbae226ddb4478a4cec7fc518 | PHP | WaseemCake/qb | /code_gen/QBSIMDHandler.php | UTF-8 | 787 | 2.71875 | 3 | [
"PHP-3.01"
] | permissive | <?php
class QBSIMDHandler extends QBHandler {
protected $operandPadding = 0;
public function __construct($name, $operandType, $addressMode, $vectorSize = "variable") {
if(gettype($vectorSize) == 'string') {
if(preg_match('/\\+P$/i', $vectorSize)) {
$vectorSize = (int) $vectorSize;
$this->operandPaddin... | true |
e6f9e4ded57d786d1fb6d5daf381b4cc8b85a1f9 | PHP | pillar04/dake | /library/helper/BaseDao.php | UTF-8 | 166 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class BaseDao extends Dao {
/**
* 缓存KEY
* @param string $key
*/
public function cacheKey($key) {
return $this->table_name . $key;
}
} | true |
85871ae9dc9577d024b9b05fa82b48208c434a16 | PHP | OscarDuranX/Exercicis_laracasts_Oscar | /Encapsulation/LightSwitch.php | UTF-8 | 357 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: oscar
* Date: 08/10/2015
* Time: 13:00
*/
class LightSwitch
{
public function on(){
}
public function off()
{
}
private function connect()
{
}
private function activate()
{
}
}
$click = new... | true |
6421918344183dbbd2e3a64763413cd9560bf5fa | PHP | rcrossa/Produccion_web | /Login/crud_usuarios/administrar_roles.php | UTF-8 | 1,240 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
require_once ('crud_tiporoles.php');
require_once ('roles.php');
$crud= new CrudTiporol();
$roles= new Roles();
try {
// si el elemento insertar no viene nulo llama al crud e inserta un Rol
if (isset($_POST['insertar'])) {
$roles->setIdrol( $_POST['idrol']);
//llama a la función insertar defi... | true |
2ca788f27867661ffa8404723e3e01de746c5ec9 | PHP | Gossteer/Work | /task2/ArrayIntersect.php | UTF-8 | 1,513 | 3.25 | 3 | [] | no_license | <?php
class ArrayIntersect extends ArrayIterator
{
public function __construct(array $array = array(), $flags = 0)
{
parent::__construct(array_values($array), $flags);
$this->unset_string();
}
private function unset_string()
{
//Занимает больше памяти
// foreach ($t... | true |
ab1ee88db96dfe8b3d1d5bd9bd911a2ea8c5dfb4 | PHP | rojasjoaquin129/TP-COMARCA | /TP/src/Controllers/CustomerController.php | UTF-8 | 4,762 | 2.875 | 3 | [] | no_license | <?php
namespace Controllers;
use Models\Customer;
use Components\GenericResponse;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
/*
-> No se termino de testear, porque quizás no se use.
*/
class CustomerController
{
public function getAll(Req... | true |
3d6acf5daf02f1d37599b4d13ad4a2a00ff0550e | PHP | ValValeria/Guzzle | /src/URLHandler/URLHandler.php | UTF-8 | 795 | 2.90625 | 3 | [] | no_license | <?php
namespace Main\URLHandler;
use Main\Dictionary\Dictionary;
class URLHandler
{
public $dictionary;
public $content;
public function __construct()
{
$this->dictionary = new Dictionary();
$this->content = file_get_contents(realpath('src/Templates/MainPage.blade.php')... | true |
14fa0d8096b5ad357adde96a01a7b756ee8aed72 | PHP | BryghtShadow/gw2-database | /classes/gw2api.class.php | UTF-8 | 8,709 | 2.546875 | 3 | [
"WTFPL",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | <?php
/**
* GW2API
*
* @filesource gw2api.class.php
* @version 0.1.0
* @link https://github.com/codemasher/gw2-database/blob/master/classes/gw2api.class.php
* @created 08.03.14
*
* @author Smiley <smiley@chillerlan.net>
* @copyright Copyright (c) 2013 {@link https://twitter.com/codemasher Smil... | true |
7f6cdca3f95812b3bbf9a55b4130050a901b0a1f | PHP | yuli-05/Docker_hub | /webapp/volume/insert.php | UTF-8 | 1,077 | 2.84375 | 3 | [] | no_license | <?php
$nombre = $_POST['nombre'];
$email = $_POST['email'];
$telefono = $_POST['telefono'];
$conexion = new SQLite3('agenda2.db');
$conexion->exec("CREATE TABLE personas (nombre varchar(50), email varchar(50), telefono int)");
$conexion->exec("INSERT INTO personas VALUES('".$nombre."','".$email... | true |
10509e58b8ca86c9dcda29547b53f51b4f5cfd8c | PHP | kishan980/php-node-both | /Project/JavaScript/assimentOPt.php | UTF-8 | 512 | 2.796875 | 3 | [] | no_license | <html>
<head>
</head>
<body>
<script>
var number1 = 100;
numbre2 =200;
document.write(number1+=numbre2;);
document.write("<br>");
var num1=5;
num2 =5;
document.write(num1-=num2);
document.write("<br>");
var mul1 =2;
mul2=2;
document.write(mul1*=mul2);
documen... | true |
9fd4a1142e55f0d050a34486ba8aa57dcb775a3d | PHP | AdrienneBeaudry/wieg16-http | /functions.php | UTF-8 | 630 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
// "HTTP/1.0 404 Not Found"
function status_header($code = 200) {
$message = [
200 => "OK",
404 => "Page not found",
302 => "Moved temporarily",
303 => "Something something",
500 => "Server error"
];
header("HTTP/1.0 ".$code." ".$message[$code]);
}
status_header... | true |
91c82b95df6af7dd9d7a634c89847218dc76d5d5 | PHP | stuartmcfarlane/rest | /Classes/Log/Logger.php | UTF-8 | 3,045 | 2.765625 | 3 | [] | no_license | <?php
namespace Cundd\Rest\Log;
use TYPO3\CMS\Core\Log\LogManager;
use TYPO3\CMS\Core\Utility\GeneralUtility;
class Logger implements LoggerInterface
{
/**
* @var \Psr\Log\LoggerInterface
*/
private $concreteLogger;
/**
* Logger constructor
*
* @param \Psr\Log\LoggerInterface|... | true |
a4117f8b0a6c6932bc4a9e37ca56b91c7ce89035 | PHP | Anthony-AUDOIN/CovoituragePHP | /classes/DepartementManager.class.php | UTF-8 | 965 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
class DepartementManager
{
private $db;
public function __construct($db)
{
$this->db = $db;
}
public function getAllDepartement(): array
{
$listeDepartements = array();
$sql = 'SELECT dep_num, dep_nom, vil_num FROM departement';
$requete = $this->db->pre... | true |
d13137c131acdffc717f41cd42a3c57b89d55615 | PHP | j0hnd/milestones | /database/migrations/2017_11_12_013439_create_milestone_assignees.php | UTF-8 | 803 | 2.53125 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateMilestoneAssignees extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('milestone... | true |
418c964e3cbf5b1e6e71ecd44e06fa6849c634dc | PHP | nrctkno/SGPHPEngineeringChallenge | /domain/Product/StyleNumber.php | UTF-8 | 514 | 3.078125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Domain\Product;
use Domain\Common\DomainException;
class StyleNumber
{
private string $id;
function __construct(string $id)
{
if (!preg_match('/^([A-Z]{3})([|]{1})([0-9]{3})$/i', $id)) {
throw new DomainException('Invalid style number format... | true |
74a0b6443b96f7c8e3f1526aa04c4d7e16e0b78b | PHP | LiveSafely/LiveSafely-WebApp | /app/models/admin.php | UTF-8 | 1,631 | 3.21875 | 3 | [] | no_license | <?php
//Se requiere mandar a llamar la instancia para realizar la conexion a la base de datos.
require '../app/utils/Connection.php';
//Se crea el modelo para declarar todas las funciones que se utilizaran en el código.
class admin_model{
//Creamos el constructor
public function __construct(){}
//Funcion ... | true |
563aedba7256142b217ffb007f102ae78404874f | PHP | MobydickUA/Films | /controllers/controller_films.php | UTF-8 | 1,798 | 2.625 | 3 | [] | no_license | <?php
class Controller_films extends Controller
{
function __construct()
{
$this->model = new Model_films();
}
function action_index()
{
$data = $this->model->getData();
$this->view('main_view',['data' => $data]);
}
function action_search_by_title()
{
if(isset($_GET['film_name'])) {
$data = $th... | true |
9975a5acdb901d963a763ccaeb894d0237e9fcca | PHP | ashikgithub/sft_ashik | /Complete_Project/regform_contact_list_groupwise_7June,2016/Form/config.php | UTF-8 | 746 | 2.640625 | 3 | [] | no_license | <!-- database configuration here -->
<?php
//mysql_connect('localhost','root','') or die(mysql_error());
//mysql_select_db("sign_up");
/*$dbhost='localhost';
$dbname='sign_up';
$dbuser='root';
$dbpass='';
try
{
$db= new PDO("mysql:host={$dbhost};dbname={$dbname}",$dbuser,$dbpass); //conection
$db->setAttrib... | true |
59d6e026d240add91c0cc534f7e4e26cb789f79d | PHP | VEinteligente/orion7 | /src/Orion7/CoreBundle/Entity/Categoria.php | UTF-8 | 2,483 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Orion7\CoreBundle\Entity;
class Categoria
{
protected $id;
protected $nombre;
protected $descripcion;
protected $categoria_ushahidi;
protected $subcategorias;
/**
* Constructor
*/
public function __construct()
{
$this->subcategorias = new \Doctrine\Com... | true |
012a22282233b4275d4d6eaeb9854d104f432d71 | PHP | QQruz/citrus | /src/Controllers/UserController.php | UTF-8 | 1,332 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Controllers;
use App\Controllers\Controller;
use App\Models\User;
use App\Models\Comment;
class UserController extends Controller {
public function loginPage() {
if (isset($_SESSION['user'])) {
redirect(PUBLIC_PATH . 'users');
}
$this->view('login');
... | true |
c4254e582c8e17f7261a8d253d8605a81b59d051 | PHP | linmasahiro/my_lib | /demo/edit.php | UTF-8 | 1,579 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
try {
$id = $_POST['id'];
$type = strtoupper($_POST['type']);
$title = $_POST['title'];
$tag = $_POST['tag'];
$content = htmlspecialchars($_POST['content']);
$filename = __DIR__ . "/my_data.csv";
$handle = fopen($filename, "r");
$csv = [];
if ($handle) {
flock($handle, ... | true |
dde0c38c8bfa6693f60d618ca27517707214b36f | PHP | XAOPT/xpt-framework | /lib/class.bb.php | UTF-8 | 3,081 | 2.703125 | 3 | [] | no_license | <?php
class ClassBB
{
public function __construct($smiles = array())
{
$this->smiles = $smiles;
}
public function show($text)
{
$text = htmlspecialchars($text);
$text = preg_replace('/\[(\/?)(b|i|u)\s*\]/iu', "<$1$2>", $text);
$text = preg_replace("/\[dvred\](.*?)\[... | true |
93105f007136c9ac562ab2ce437d5a319a8c439e | PHP | voseyev/student | /lookup.php | UTF-8 | 599 | 2.84375 | 3 | [] | no_license | <?php
$sid = $_POST['sid'];
require_once 'config.php';
$cnxn = new PDO(DB_DSN,DB_USERNAME,DB_PASSWORD);
$select = "SELECT * FROM student2 WHERE sid=:sid";
$statement = $cnxn->prepare($select);
$statement->bindValue(':sid', $sid);
$statement->execute();
$row = $statement->fetch(PDO::FETCH_ASSOC);
if(emp... | true |
bd2d4eb9b032bea2d27e69b32a71b5e0abd51a1f | PHP | SonicGD/bioengine | /common/modules/main/models/AdminRights.php | UTF-8 | 1,484 | 2.578125 | 3 | [] | no_license | <?php
namespace bioengine\common\modules\main\models;
use bioengine\common\components\BioActiveRecord;
use Yii;
/**
* This is the model class for table "admins_rights".
*
* @property integer $id
* @property integer $uid
* @property integer $admin
* @property integer $news
* @property integer $articles
* @pro... | true |
7d364c2c90b70d6d40e1e30241d314661a182f6a | PHP | 1090197965/auto | /extend/other/Base.php | UTF-8 | 371 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: L
* Date: 2017/8/11 0011
* Time: 15:08
*/
namespace other;
class Base {
protected static $instance = null;
/*初始化*/
public static function instance(){
/*单例*/
if(empty(self::$instance)){
self::$instance = new static();
}
return self::$instance;
}
// ... | true |
6bdd10a120573f35261006ecb8d05ab748a79b41 | PHP | danolez1/sample | /app/Controllers/UserController.php | UTF-8 | 6,995 | 2.515625 | 3 | [] | no_license | <?php
use danolez\lib\DB\Controller;
use danolez\lib\DB\Model;
use danolez\lib\Security\Encryption;
use Demae\Auth\Models\Error;
use Demae\Auth\Models\Shop\Address;
use Demae\Auth\Models\Shop\Administrator;
use Demae\Auth\Models\Shop\Log;
use Demae\Auth\Models\Shop\CreditCard;
use Demae\Auth\Models\Shop\PaymentDetails... | true |
5d4fdbde0a9f5e1dcd4ca440d14d1f172c7ebc89 | PHP | 1164953899/Blog | /app/client/Model/UserModel.php | UTF-8 | 1,756 | 2.9375 | 3 | [] | no_license | <?php
namespace app\client\Model;
use libs\Model;
class UserModel extends Model {
public $link;
public function register($username, $pwd, $phone, $email, $balance, $create, $admin) {
//把数据用PDO的预处理方式 INSERT 进入到表中
//提示: Model父类中只有 fectchAll()方法, 用于查询
//需要大家自己去封装一个 exec() 方法, 负责执行增删改, 返回值是影响的条数
//(如果不... | true |
a76ecc5969ae90a1e20e6e7e6e21353697ed59eb | PHP | BenMakesGames/PsyPets | /commons/questlib.php | UTF-8 | 1,085 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
$PLUSHY_QUEST_LIST = array(
'Desikh Plushy', 'Duck Plushy', 'Mongoose Plushy', 'Mole Plushy',
'Purple Dragon Plushy', 'Chickie Plushy', 'Turtle Plushy', 'Wereplushy',
'Mouse Plushy'
);
if($user['idnum'] % 2 == 0)
$PLUSHY_QUEST_LIST[] = 'Ghosty Plushy';
else
$PLUSHY_QUEST_LIST[] = 'Lion Plushy';
functi... | true |
6a070931918f3f7eccc4e6698049c17e9605e6ce | PHP | arima-ryunosuke/dbml | /src/dbml/Entity/Entityable.php | UTF-8 | 675 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace ryunosuke\dbml\Entity;
/**
* エンティティであることを示すインターフェース
*
* エンティティとして利用するには必ずこのインターフェースを実装しなければならない。
*/
interface Entityable extends \ArrayAccess
{
/**
* 配列からプロパティをセットする
*
* @param array $fields 元配列
* @return $this 自分自身
*/
public function assign(array $fields): Entitya... | true |
b7e9de5322d1000e3ec4fad3fb9ee43957c21ab3 | PHP | daguzman93/AplicacionCamisetas | /class/Camiseta.php | UTF-8 | 1,542 | 2.859375 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Camiseta
*
* @author Daniel
*/
class Camiseta implements JsonSerializable {
//put your code here
... | true |
57ba8322ab54b513fae6c33493c5a16896201648 | PHP | halim880/Laravel-TMDB-movies | /app/TMDB/Traits/Actors.php | UTF-8 | 997 | 2.609375 | 3 | [] | no_license | <?php
namespace App\TMDB\Traits;
trait Actors{
public static function actors(){
$actorsArray = self::get('person/popular')['results'];
return collect($actorsArray)->map(function($actor){
return collect($actor)->merge([
'image'=> 'https://image.tmdb.org/t/p/w500'.$actor[... | true |
d71cd75c0b5665ac79cd08bf8f23eec85af9daea | PHP | PurvaDhuri25/DairySystem | /alogin.php | UTF-8 | 1,070 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
$con = mysqli_connect("localhost", "id11189794_root", "root123", "id11189794_dairyy");
// Check connection
if($con === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
session_start();
// If form submitted, insert values into the database.
if (isset($_POST['aname'])){
$a... | true |
180f07c787aa4aeaf3ea08fc298e9cb3a60f916d | PHP | AnasOmarObaid/BlogSystem | /app/Http/Controllers/RegisterController.php | UTF-8 | 952 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Requests\StoreUserRequest;
use App\Models\User;
use Illuminate\Validation\Rule;
use Illuminate\Support\Facades\Validator;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
class RegisterController extends Controll... | true |
f39bfb0b264c8892a03e428e2b40fbddfd1dc8c7 | PHP | phptj/laravel_h- | /app/Http/Controllers/V1/ApiBaseController.php | UTF-8 | 1,446 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\V1;
use Illuminate\Http\Request;
use Log;
/**
* @ignore
*/
class ApiBaseController extends Controller {
/**
* @ignore
*/
public function __construct(Request $request){
Log::debug($request->fullUrl(),$request->all());
}
/**
* 接口调用成功返回json数据结构
*
* @return strin... | true |
e2d91da4003b56efe4001416fcc4e17a8dd0eaf5 | PHP | utkarshsingh341/webbd.xyz | /includes/handlers/ajax_search.php | UTF-8 | 1,729 | 2.9375 | 3 | [] | no_license | <?php
include("../../config/config.php");
include("../classes/User.php");
$query = $_POST['query'];
$userLoggedIn = $_POST['userLoggedIn'];
$names = explode(" ", $query);
//If query contains an underscore, assume username is to be searched
if(strpos($query, '_')!== false)
$usersReturnedQuery = mysqli_query($con,"... | true |
ce38760a24df26d16f3157ba725afce1e350f3af | PHP | Egoes98/deustoGames | /src/DGamesBundle/Entity/Game.php | UTF-8 | 4,393 | 2.59375 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace DGamesBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table()
* @ORM\Entity(repositoryClass="DGamesBundle\Entity\GameRepository")
* @ORM\HasLifecycleCallbacks()
*/
class Game
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
p... | true |
d6b459213e7da9823b515755b2affcfc8312a6c3 | PHP | dannywj/knowledge | /PHP/DesignPattern/link_call.php | UTF-8 | 691 | 3.28125 | 3 | [] | no_license | <?php
/**
* Created by DannyWang
* wangjue@mia.com
* 2016/8/15
*/
class Temp{
private $type;
private $val;
/**
* Temp constructor.
* @param $type
*/
public function __construct($type) {
$this->type = $type;
}
/**
* @return mixed
*/
public function getV... | true |
2baa39572dc5a954bd9efdfdaa2638deb75290e1 | PHP | jadeit/catalogd | /src/CatalogD/BaseBundle/Entity/Item.php | UTF-8 | 4,554 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the CatalogD package.
*
* Copyright (c) Jade IT <jrgns@jadeit.co.za>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CatalogD\BaseBundle\Entity;
use Doctrine\Common\Collections\ArrayColl... | true |
3a0c717c4c2116cf38ac9b4caedcb2e68c7ebee7 | PHP | sagarkbhatt/WP-Lyrics | /trait-singleton.php | UTF-8 | 814 | 2.9375 | 3 | [] | no_license | <?php
/**
* Trait Singleton
*
* @package WP_Blocks
*/
namespace WP_Lyrics\Traits;
/**
* Trait Singleton
*/
trait Singleton {
/**
* Instance of class.
*
* @var $instance
*/
protected static $instance;
/**
* Create instance only once.
*
* @return static Current class object.
*/
final public ... | true |