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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
6228319b3509f4605e9eb026a46593ea49185abf | PHP | vnnguyen/basic | /models/TourInCtForm.php | UTF-8 | 521 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use yii\base\Model;
class TourInCtForm extends Model
{
public $language;
public $days;
public $sections;
public $logo;
public $note;
public function attributeLabels()
{
return [
'days'=>'In các ngày (vd 1-3,4,5-7)',
'sections'=>'In các phần',
'logo'=>'Logo',
... | true |
34391b41241ff15f5352ff2aa8174cf37e336db3 | PHP | rodnaph/edhen | /tests/EdhenTest.php | UTF-8 | 2,637 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
use Edhen\Decoder;
use Edhen\TagHandler;
use Edhen\Token;
class EdhenTest extends PHPUnit_Framework_TestCase
{
public function testDecodingSingleElements()
{
$this->assertEquals(null, Edhen::decode('nil'));
$this->assertEquals(true, Edhen::decode('true'));
$this->assertEquals(fal... | true |
56df3d338a25cb880da8be3860b9309f6ac4198d | PHP | ahmadhanis/FlutterA201 | /food_ninja/food_ninjav2/php/load_restaurant.php | UTF-8 | 1,761 | 2.53125 | 3 | [] | no_license | <?php
error_reporting(0);
include_once("dbconnect.php");
$location = $_POST['location'];
$status = "OPEN";
$rating = $_POST['rating'];
if (isset($_POST['foodname'])){
$foodname = $_POST['foodname'];
$sql ="SELECT DISTINCT RESTAURANT.ID,RESTAURANT.NAME,RESTAURANT.PHONE,RESTAURANT.LOCATION,RESTAURANT.IMAGE,
RESTAUR... | true |
06e545096b3dd5e7bd682985a62572397e76b38d | PHP | phug-php/phug | /src/Phug/Lexer/Lexer/Scanner/ConditionalScanner.php | UTF-8 | 1,039 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @example if $var == 2
*/
namespace Phug\Lexer\Scanner;
use Phug\Lexer\State;
use Phug\Lexer\Token\ConditionalToken;
class ConditionalScanner extends ControlStatementScanner
{
public function __construct()
{
parent::__construct(
ConditionalToken::class,
['if', 'u... | true |
ec9a97fcc082c012e05f3a55124f78cc17589b65 | PHP | mnk-19900910/php_pronami | /asobi/gakunen.php | UTF-8 | 468 | 2.9375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>1995</title>
</head>
<body>
<?php
$gakunen=$_POST['gakunen'];
switch($gakunen){
case '1': $kousha='南校舎'; break;
case '2': $kousha='西校舎'; break;
case '3': $kousha='東校舎'; break;
... | true |
e934f80eebf6176dd4f8afdd70d996fc82f96dbf | PHP | worenga/cobweb_framework | /index.php | UTF-8 | 5,344 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* ************************************************************************************************
* _____ _ __ __ _ ______ RAPID WEB APPLICATION FRAMEWORK _
* / ____| | |\ \ / / | | | ____| | |
* | | ... | true |
21341c352214195957ea01f9317b25c278a4c4a6 | PHP | richhaho/our-air-vue-reactnative-laravel | /api/app/Models/Flight/Category.php | UTF-8 | 1,411 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models\Flight;
use App\Models\Aircraft;
use App\Models\Booking;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* Class Category
* @package App\Models\Flight
*/
class Category extends Mode... | true |
bba65bd1e0cc333d049a479b91a6c70246e431ba | PHP | IgnatBulychov/elp-back | /app/Http/Controllers/ItemController.php | UTF-8 | 5,260 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Item;
use Validator;
use Illuminate\Http\Request;
class ItemController extends Controller
{
public function getAll()
{
$items = Item::all()->load('categories');;
return response()-> json([
'items' => $items
], 200);
}
... | true |
229a2e3fe1687fa88d0c88e263581793e4a3cea4 | PHP | MistouZ/stm | /_cfg/classes/class_folder.php | UTF-8 | 3,068 | 2.921875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: adewynter
* Date: 22/11/2018
* Time: 11:30
*/
class Folder extends Features
{
private $idFolder;
private $folderNumber;
private $label;
private $isActive;
private $date;
private $description;
private $companyId;
private $customerId;
priv... | true |
ab5e02eb7a8309a1582e762d5a214c45b122fb5f | PHP | jan-martinek/kiskbase | /app/model/TagRepository.php | UTF-8 | 1,057 | 2.640625 | 3 | [] | no_license | <?php
namespace Model\Repository;
class TagRepository extends Repository
{
public function lookup($query)
{
return $this->connection->query('SELECT [tag.id], [tag.text], count(*) AS [count]
FROM [tag]
INNER JOIN entry_tag ON entry_tag.tag_id = tag.id
WHERE [text] LIKE %~like... | true |
f15bfaa57895fe8a326bf995376103ed08fc9815 | PHP | fracz/refactor-extractor | /results/piwik/6bf0530c94cfd08f11bf6c35d56102b0345c8eca/before/ExceptionHtmlFormatter.php | UTF-8 | 2,276 | 2.59375 | 3 | [] | no_license | <?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Log\Formatter;
use Piwik\Common;
use Piwik\Error;
use Piwik\Log;
use Piwik\Version;
/**
* Formats a log message containing an exception object into... | true |
2f56ffb1366692b72ad60fdbeb51eccdc2aad56e | PHP | OliverMensahDev/laravel-patterns | /solid/app/Services/EmployeeFactory.php | UTF-8 | 791 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Domains\Personnel\FullTimeEmployee;
use App\Domains\Personnel\Intern;
use App\Domains\Personnel\PartTimeEmployee;
use App\Models\EmployeeType;
class EmployeeFactory
{
public static function create(object $request)
{
$employeeType = strtolower($request->type);
if( $e... | true |
f13d846cffdac7e0c1eb9839cf6533bec28bb841 | PHP | bousoutennshi/wordpress | /rop/archives/archives.php | UTF-8 | 5,490 | 2.75 | 3 | [] | no_license | <?php
/*
Template Name: archives
*/
?>
<?php
// 定数設定
define('CUSTOM_NAME1', 'イベント開始日');
define('CUSTOM_NAME2', 'イベント終了日');
// 投稿タイプ取得指定
$post_type = isset($_REQUEST['post_type']) ? $_REQUEST['post_type'] : 'post';
// 最新の取得件数指定
$numberposts = isset($_REQUEST['results']) ? $_REQUEST['results'] : 30;
// 取... | true |
bda2355aefdd8c37297809ba6827c02ddc7af40a | PHP | vuryss/aoc-2018-php | /day-11.php | UTF-8 | 1,799 | 3.1875 | 3 | [] | no_license | <?php
$input = trim(file_get_contents('input/' . substr(basename(__FILE__), 0, -4)));
$start = microtime(true);
$input = (int) $input;
$cells = [];
for ($y = 1; $y <= 300; $y++) {
for ($x = 1; $x <= 300; $x++) {
$power = (($x + 10) * $y + $input) * ($x + 10);
$power = $power > 99 ? (int) substr($... | true |
31f3c5ceb52f2adb2f774072fc61e2f5d1a20da1 | PHP | P79N6A/kaiminclan_com | /app/Service/Interaction/InteractionCommentImpressionService.php | UTF-8 | 5,581 | 2.625 | 3 | [] | no_license | <?php
/**
*
* 印象/标签
* 互动
*/
class InteractionCommentImpressionService extends Service {
/**
*
* 调整印象使用数量
*
* @param $commentId 印象ID
* @param $quantity 数量
*
* @reutrn minxed;
*/
public function adjustImpressionUseNum($impressionId,$quantity = 1){
$where = array(
'identity' =>$impressi... | true |
2fd08f99febf023565afa8089d0d6adf39a858ca | PHP | silinternational/yii2-json-log-targets | /features/bootstrap/FeatureContext.php | UTF-8 | 3,164 | 2.75 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
use Behat\Behat\Context\Context;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
use PHPUnit\Framework\Assert;
use Sil\JsonLog\JsonLogHelper;
/**
* Defines application features from the specific context.
*/
class FeatureContext implements Context
{
private $logMessageData = [];
... | true |
da0eb3941468884eaeeff8d6c227ad46547042c1 | PHP | EagamerNew/sokol | /functions/education-program/education-program-post.php | UTF-8 | 992 | 2.59375 | 3 | [] | no_license | <?php
include('../database_connection.php');
$form_data = json_decode(file_get_contents("php://input"));
$id = $form_data->id;
$userId = $form_data->userId;
$total= $form_data->total;
$busy= $form_data->busy;
$specId= $form_data->specId;
$theme= $form_data->theme;
$data = array();
$message = "";
if($id == -1){
... | true |
37f002e1dcc4803f1ffc01cc77ab58fb032325a3 | PHP | BrunoNicholas/construction-profiler | /app/Http/Controllers/PostController.php | UTF-8 | 2,997 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Post;
use Illuminate\Http\Request;
class PostController extends Controller
{
/**
* Display the constructor of the resource.
*
* @return \Illuminate\Http\Response
*/
public function __construct()
{
$this->middleware('role:sup... | true |
3be48e0f5d36a8c8ab59e8d73c09284c41f8fcde | PHP | samuelmelo98/republica | /conexao.php | UTF-8 | 409 | 2.65625 | 3 | [] | no_license | <?php
class Conexao {
public static $instance;
public static function getConexao(){
if(!isset(self::$instance)){
self::$instance =
new PDO("mysql:host=localhost;dbname=trabalhos_projecao", "root", "");
self::$instance->setAttribute(PDO::ATTR_ERRM... | true |
2d5cc586a4855e2e691a17664c0ee7171fcd2e98 | PHP | GluttonyD/e-library | /src/e-library/backend/controllers/AutocompleteController.php | UTF-8 | 1,866 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: arito
* Date: 05.06.2018
* Time: 16:35
*/
namespace backend\controllers;
use yii\web\Controller;
use common\models\Author;
use common\models\Publication;
use common\models\AuthorPenname;
class AutocompleteController extends Controller
{
public function actionAutocom... | true |
862a11084599a488f4a88f448c667dbb9b89b585 | PHP | sqonedeveloper/gosabang | /app/Models/Production/Business.php | UTF-8 | 2,109 | 2.75 | 3 | [] | no_license | <?php namespace App\Models\Production;
use CodeIgniter\Model;
class Business extends Model {
protected $db;
public function __construct() {
$this->db = \Config\Database::connect();
}
function getProductItem($id) {
$table = $this->db->table('tb_items');
$table->select('name, price, ima... | true |
b4703cc801cc15e8fa262342e52c04aea4d10214 | PHP | bryanbarreto/zeusthunder-php | /academia-backend/classe/cadexercicio.class.php | UTF-8 | 2,336 | 3.171875 | 3 | [] | no_license | <?php
class CadExercicio{
//atributos
private $descricao;
private $id;
//getter
public function getDescricao(){
return $this->descricao;
}
public function getId(){
return $this->id;
}
//setter
public function s... | true |
13d24c80988f30f15aa6e831a610c5cddd3f6794 | PHP | juliansap/PHP | /wwwijzigen1.php | UTF-8 | 2,856 | 2.5625 | 3 | [] | no_license | <?php session_start(); ?>
<!DOCTYPE html>
<html lang="nl">
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<script src="https://code.jqu... | true |
1f58040b5041f6eb9151b5ec06816f0672caed43 | PHP | Lormenyo/iot-projects | /lab1 - Databases & Web Tech Updated/lab1/insert.php | UTF-8 | 872 | 2.84375 | 3 | [] | no_license | <?php
//Include the config file
include "config.php";
//get option
if(isset($_GET['insert']))
{
//get the data values
$SensorName=$_GET['SensorName'];
$SensorType=$_GET['SensorType'];
$CurrentReading=$_GET['CurrentReading'];
$SensorLocation=$_GET['SensorLocation'];
//Run the query for insertio... | true |
fb192acdd3fc5bdb30e46286e7af408e7b80f532 | PHP | AMoktar/zend-validator | /test/UuidTest.php | UTF-8 | 2,855 | 2.5625 | 3 | [] | permissive | <?php
/**
* @link http://github.com/zendframework/zend-validator for the canonical source repository
* @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace ZendTest\Validator;
use PHPUnit\Framew... | true |
06624549bdf233a7c9b47a94948f6264c61d3f29 | PHP | douvewane85/WebMastering_Liage_2021 | /controle/boucles/theorie.php | UTF-8 | 861 | 3.34375 | 3 | [] | no_license | <?php
/*
-Boucles ou structures répétitives ou itératives
//Repeter un ensemble d'instructions tant que la condition verifie
//--ValDepart
//-- Condition Execution
//true : boucle s'execute
//false : boucle s'arrete
//Pas
//Incrementation
//Décrementation
... | true |
21bf849908a20a8c29688feacb3680fe3dab136f | PHP | vlakoff/Carbon | /tests/AbstractTestCase.php | UTF-8 | 3,416 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Carbon package.
*
* (c) Brian Nesbitt <brian@nesbot.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Tests;
use Carbon\Carbon;
use Carbon\CarbonInterval;
use Closure;
use PHPUnit... | true |
57848d442a03239d36aec6fe44c1c240a5cb1da7 | PHP | ProgramSalamander/WebBigWork | /php/modifyUser.php | UTF-8 | 1,001 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: xuyangchen
* Date: 2017/12/5
* Time: 上午11:16
*/
require_once 'dbHelper.php';
if (isset($_POST['user_id']) && isset($_POST['username']) && isset($_POST['phone']) && isset($_POST['nickname'])) {
$user_id = $_POST['user_id'];
$username = $_POST['username'];
$phone... | true |
5c9153a690e7fd236977114b68e55a83d21c33ac | PHP | thegraymonkey/thegraymonkey | /app/Http/Controllers/Auth/AuthController.php | UTF-8 | 1,381 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
use Redirect;
use Illuminate\Http\Request;
use App\User;
use Illuminate\Support\Facades\Auth;
class AuthController extends Controller {
/*
|--------------------------------... | true |
dcd6460d459139b3d97d1e805b7645d320b71170 | PHP | Mashbo/console-toolkit | /ansi.php | UTF-8 | 315 | 3.03125 | 3 | [] | no_license | <?php
$CSR = function($code) {
return chr(27) . "[" . $code;
};
echo "Hello" . $CSR('2D');
sleep(1); echo "L";
echo $CSR('?25l');
sleep(1); echo "O";
//echo chr(27) . "[42m" . "Hi" . chr() . chr(27) . "[0m";
sleep(2);
//echo chr(27) . "[5m" . "eegeg" . chr(27) . "[0m";
echo $CSR('0m');
echo $CSR('?25h');
| true |
c62dc75e576fcc9912eb8af3262359dc89a7c7f2 | PHP | Sylcab74/thelag | /core/Auth.class.php | UTF-8 | 639 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: tartiflette
* Date: 20/12/18
* Time: 10:59
*/
namespace Lag\Core;
use Lag\Model\User;
class Auth
{
public static function isLogged()
{
if(!isset($_SESSION['token']))
{
return false;
}else
{
return true;
... | true |
b415a835dfab8606dd01a9b9616bedd5cb122c4f | PHP | CodeCaven/Real-Estate-Web-Database-App | /ass3/Property_DAO.php | UTF-8 | 2,958 | 2.796875 | 3 | [] | no_license | <?php
class DAO_Property
{
public $PROPERTY_ID;
public $PROPETY_STREET;
public $PROPERTY_SUBURB;
public $PROPERTY_STATE;
public $PROPERTY_PC;
public $TYPE_NAME;
public $LIST_PRICE;
public $FEATURES = array();
public $FEATURES_NAMES = array();
private $_conn;
function __construct($conn)
... | true |
97e5d5006e91217fc6968242a4b0e6e9f4066376 | PHP | dacolera/zend-original-skeleton | /application/modules/admin/controllers/IndexController.php | UTF-8 | 5,192 | 2.578125 | 3 | [] | no_license | <?php
class IndexController extends Zend_Controller_Action
{
public function indexAction()
{
$this->view->HeadTitle('M�dulo Administrativo');
$this->view->usuario = App_Plugin_Login::getInstance()->getIdentity();
}
//action de login
public function loginAction()
{
$this->view->HeadTitle('Autentica��o');
... | true |
71b9c1a9cb09a80c343aea779c5d87df4bd78878 | PHP | kateriska/IISprojekt | /scripts/initDatab.php | UTF-8 | 7,887 | 2.5625 | 3 | [] | no_license | <?php
//PROVIDES DB HANDLE $db
require('inc.db_handl.php');
function controlProcedures($db, $command, $link, $info){
if(mysqli_query($db, $command)){
echo "Command created successfully($info)\n\n<br>";
}else{
echo "ERROR: command '$command' " . mysqli_error($db) . "\n\n";
}
}
$link='';
// DROP DATABAS... | true |
2020c783f45b2d922f1dfc0a6880bd7e1506043a | PHP | rafaelgalvan/imobiliaria | /www/app/src/Model/Service/LocadorService.php | UTF-8 | 948 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Model\Service;
use \App\Model\Service\ResultadoValidacao;
use \App\Model\Entidades\Locador;
class LocadorService {
public function validar(Locador $locador)
{
$resultadoValidacao = new ResultadoValidacao();
if (empty($locador->getNome())) {
$resultadoValidaca... | true |
3007c94b11c4ccf25e634b59099c67cbb527c980 | PHP | Twrecks/mytodo | /application/models/user_model.php | UTF-8 | 378 | 2.671875 | 3 | [] | no_license | <?php
class User_model extends Model {
function User_model()
{
parent::Model();
}
function get_user_list() {
$userlist = array();
$users = $this->db->select('id, name')->get('users')->result();
$userlist = array('' => "-- select user --");
foreach($users as $user):
$userlist[$user->id] ... | true |
a8750f7816a93721f70e7e038145bc61c599d012 | PHP | VikasJKatariya/array_function | /array_replace_recursive.php | UTF-8 | 2,424 | 3.640625 | 4 | [] | no_license | <?php
//*******************************************************
//Author : Vikas Katariya
//*******************************************************
//The array_replace_recursive() function replaces the values of the first array with the values from following arrays recursively.
//Tip: You can assign one array to t... | true |
55ea65de387be222a91cb66d51fa29037fe4d0e0 | PHP | Chiuchiuchiu/shop-own | /apps/www/models/WechatRedPackLog.php | UTF-8 | 1,765 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace apps\www\models;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "wechat_red_pack_log".
*
* @property integer $id
* @property integer $member_id
* @property integer $number
* @property string $amount
* @property string $result
* @property integer $created... | true |
47eebf41fb60c9571814d7a15a69a435ad9dc0bb | PHP | ilei/blog | /www/common/libraries/ymt/Memcached_thncr.php | UTF-8 | 2,917 | 2.90625 | 3 | [] | no_license | <?php
/**
* The Memcache Library For Thncr
*
* @author Dennis( yuantaotao@gmail.com )
* @version 3
* @copyright Dennis( yuantaotao@gmail.com ),
* @package ymt360
**/
/**
* Class Memcached_thncr
* @author Dennis( yuantaotao@gmail.com )
*/
class Memcached_thncr
{
private $config;
private $m;
priv... | true |
df3bf68642a1b527a3f34a1db73aa7941c8025ac | PHP | cranux/LaravelDevTemplate | /app/Handler/TextMessageHandler.php | UTF-8 | 352 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Handler;
use EasyWeChat\Kernel\Contracts\EventHandlerInterface;
/**
* Class TextMessageHandler.
*/
class TextMessageHandler implements EventHandlerInterface
{
/**
* @param null $payload
* @return false|string
*/
public function handle($payload = null)
{
return... | true |
216e843ee03e24cf672dca7305e62c88f749f494 | PHP | ibraamEmad/ratingX | /app/Http/Controllers/MovieController.php | UTF-8 | 4,945 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use App\movie;
use App\User;
use Illuminate\Http\Request;
use Google\Cloud\Speech\SpeechClient;
class MovieController extends Controller
{
var $output;
public function __construct()
{
... | true |
8f695c2e792a125160b40ee60e90a29fe77f4468 | PHP | Kevin-sa/Code-audit | /Aston/UploadTest.php | UTF-8 | 2,247 | 2.609375 | 3 | [] | no_license | <form action="" enctype="multipart/form-data" method="post" name="upload">
file:
<input type="file" name="file" />
<input type="submit" value="upload">
</form>
<?php
/**
* Created by PhpStorm.
* User: Kevinsa
* Date: 2018/11/14
* Time: 7:48 PM
*/
class UploadTest {
var $file;
var $file_name;... | true |
9c79025389b75d268c922804d391655dda87cfeb | PHP | matheuscamarques/parcelamentos | /api/model/Connection.php | UTF-8 | 2,171 | 2.84375 | 3 | [] | no_license | <?php
class Connection{
private static $host = "localhost";
private static $username = "root";
private static $password = "";
private static $driver = "mysql";
private static $database = "parcelamentos";
public static $conn ;
public f... | true |
94e8ea5f2a2e2f1a2ccb30ffc1cf6f139013b4a2 | PHP | fourum/fourum | /app/Model/Forum.php | UTF-8 | 2,054 | 2.703125 | 3 | [] | no_license | <?php
namespace Fourum\Model;
use Fourum\Forum\ForumInterface;
use Fourum\Model\Forum\Type;
use Fourum\Tree\NodeRepositoryInterface;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Facades\App;
/*... | true |
158139e050c44769aa7ed71a5599c5b2cc1dd472 | PHP | bbrianh/umhackathon | /student_site/chart/getDataForGraph(b).php | UTF-8 | 1,392 | 2.546875 | 3 | [] | no_license | <?php
header('Content-Type: application/json');
function sqlGenByhr($date,$hr){
$sql = "select count(*),time_hour,consumptionLocation,mealtype ";
$sql = $sql."from v_hour ";
$sql = $sql."where consumeTime like '".$date."%' and mealtype='breakfast' and time_hour=".$hr ;
$sql = $sql." group by time_hour, consumption... | true |
ff003962c42f10f6e4d86f5c6587820bacdb9745 | PHP | CyrusVatandoost/warehouse | /app/MyThread.php | UTF-8 | 1,195 | 2.6875 | 3 | [] | no_license | <?php
namespace App;
use Cmgmyr\Messenger\Models\Thread;
use Cmgmyr\Messenger\Models\Models;
use Cmgmyr\Messenger\Models\Message;
use Cmgmyr\Messenger\Models\Participant;
class MyThread extends Thread
{
/**
* Generates a string of participant information.
*
* @param null $userId
* @param array... | true |
c0a55ef524ef4aee10bc556b92ce6a42c65cb67f | PHP | magium/configuration-manager | /tests/Config/IniConfigurationRepositoryTest.php | UTF-8 | 441 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Magium\Configuration\Tests\Config;
use Magium\Configuration\Config\Repository\IniConfigurationRepository;
use PHPUnit\Framework\TestCase;
class IniConfigurationRepositoryTest extends TestCase
{
public function testXpath()
{
$ini = <<<YAML
[one]
two[three] = value
YAML;
$obj =... | true |
79fcc9bdf2f7a601a697e5fdf071b74555125d8e | PHP | php-addition-repository/core | /test/Unit/Values/ToStringTest.php | UTF-8 | 2,989 | 2.671875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Par\CoreTest\Unit\Values;
use Par\Core\Values;
use Par\CoreTest\Traits;
use PHPUnit\Framework\TestCase;
use stdClass;
use Stringable;
final class ToStringTest extends TestCase
{
use Traits\ResourceTrait;
/**
* @test
*/
public function itCanDetermineStr... | true |
e97495dde3a706ff7afa42f6beffae0519d4b4d7 | PHP | cmsx/CMSx | /inc/lib/SQL.php | UTF-8 | 5,715 | 2.78125 | 3 | [] | no_license | <?php
class SQL extends StandartErrors
{
/** В объекте нет соединения */
const ERROR_NO_CONNECTION = 10;
/** Соединение не является объектом PDO */
const ERROR_BAD_CONNECTION = 11;
/** Ошибка при select`е по паре ключ-значение, нет такого ключа */
const ERROR_SELECT_BY_PAIR_NO_KEY = 20;
/** Ошибка при se... | true |
ebf4d661a39b608f85c826afc578c1f3cc053305 | PHP | chiragsenjaliya/angular-drive | /app/Components/Core/FileHelpers.php | UTF-8 | 1,335 | 2.9375 | 3 | [] | no_license | <?php
namespace App\Components\Core;
Trait FileHelpers
{
/**
* helper to get filetype
*
* @param $mimetype
* @param string|file $default
* @return string
*/
public static function getFileTypeHelper($mimetype,$default = 'file')
{
if(strpos($mimetype, 'pdf') !== false)
... | true |
559c6b094928a2f9016c8a77f488453a69f941d0 | PHP | pablorg9/feria_construccion | /model/pavilion.model.php | UTF-8 | 3,522 | 2.890625 | 3 | [] | no_license | <?php
Class PavilionModel{
private $pdo;
public function __CONSTRUCT(){
try {
$this->pdo = DataBase::connect();
$this->pdo->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
die($e->getMessage()." ".$e->getLine()." ".$e->getFile());
}
}
public fu... | true |
b7486ec5bcd5a9a286856bcf3707ff53268bf349 | PHP | MOstafaMOhamedX/laravel-crud | /src/Utils/FileUtils.php | UTF-8 | 1,415 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace MOstafaMOhamedX\Crud\Utils;
class FileUtils {
public static function getFiles(string $path, array $filter = []) {
if (!is_dir($path)) return [];
$iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path));
/** @var \SplFileInfo $file */
for... | true |
ae8c9fc8431aac8fe88623352761980a6af50f18 | PHP | purpen/itablet | /src/Eshop/Action/Common.php | UTF-8 | 3,301 | 2.671875 | 3 | [] | no_license | <?php
/**
* 电子商务系统共用变量及通用操作方法
*
* @author purpen
* @version $Id$
*/
abstract class Eshop_Action_Common extends Anole_Dispatcher_Action_ModelDriven {
public $_id = null;
public $_page=1;
/**
* 检验是否已经登录
*
* @return string
*/
public function isLogged(){
return Anole_Util_Cookie::getUserID() >... | true |
abfe5e88b233b23f8308c0e9aeb7067a77de57bd | PHP | KunalAwasthi/b2c | /apies/file_upload_s3.php | UTF-8 | 1,032 | 2.5625 | 3 | [] | no_license | <?php
ini_set("display_errors", 1);
use Aws\S3\S3Client;
require dirname(__DIR__).'/vendor/autoload.php';
$config = require('awsconfig.php');
$bucket = $config['s3']['bucket'];
//filename must be unique otherwise s3 is gonna rewrite previous file
$keyname = 'assets/images/test-img-file';
// $filepath should be abs... | true |
93c9f2f802eacdd4d677c1fa7ac043f170f1de0f | PHP | lawrence175/Database-Connection | /ConnectionTest.php | UTF-8 | 1,457 | 2.640625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<style type="text/css">
body { margin:100px 0 0 200px; }
input { width:300px; }
</style>
</head>
<body>
<div style="width:500px;">
<?php
error_reporting(E_ALL ^ E_DEPRECATED); //Report all errors except E_DEPRECATED
if( count($_POST) )
{
$OK = false;
if( $MySQL =... | true |
715e24c4ec7d3f9c387075829c61fdc62cd29858 | PHP | wexo-labs/siteimprove-magento2 | /src/Setup/TokenSetup.php | UTF-8 | 1,415 | 2.625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Siteimprove\Magento\Setup;
use Magento\Framework\FlagManager,
Siteimprove\Magento\Model\Token,
Magento\Framework\HTTP\ClientFactory,
Magento\Framework\Serialize\Serializer\Json;
class TokenSetup
{
/**
* @var Json
*/
protected $_json;
/**
... | true |
eab374025c9209e02ef627ca7ab2f570b214484f | PHP | zhuabinge/daog | /sys/models/tbkactivity.php | UTF-8 | 1,264 | 2.8125 | 3 | [] | no_license | <?php
/**
* 淘宝客活动类
* @author KaiFu <aixinqing@gmail.com>
*/
class TbkactivityModel extends BpfModel
{
/**
* 插入淘宝客活动对象
* @param arrary $tbkActivities 商家对象
*/
public function insertTaobaokeActivities($tbkActivities)
{
$mysqlModel = $this->getModel('mysql');
try {
$result... | true |
63e64faa52dc8a9ca8ba733d702d3879157e14cb | PHP | jingqilong/QudaoLaravel | /app/Exceptions/FieldDoesNotExistException.php | UTF-8 | 184 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Exceptions;
use Exception;
class FieldDoesNotExistException extends Exception
{
protected $code = 100;
protected $message = 'Field does not exist!';
} | true |
51f5ea3783b2c70656013e42281841a7f25387e4 | PHP | fz19/Notification | /Message/SMSSender.php | UTF-8 | 2,573 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Libraries\Message;
class SMSSender extends MessageSender
{
const TYPE = 'sms';
const REST_URI_SEND = 'https://apis.aligo.in/send/';
public function __construct($config)
{
$this->ALIGO_SMS_KEY = $config->ALIGO_SMS_KEY;
$this->ALIGO_USER_ID = $config->ALIGO_USER_ID;
... | true |
3824166c517b50b90042e5f7e51467c9f97ac3d1 | PHP | cuongcd/dgtkbt | /app/Helpers/Position.php | UTF-8 | 1,175 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: cuongdc
* Date: 5/6/16
* Time: 10:38 AM
*/
namespace App\Helpers;
use App\Models\Position as ModelClass;
class Position
{
public static function getListPositions($room_id){
$data = ModelClass::where('room_id','=',$room_id)->get();
if (isset($data['e... | true |
61c8104e374eb09dcea6db353ff1cbf679304846 | PHP | bmanzella/2017-107-01 | /fred-dev/posts.php | UTF-8 | 1,242 | 3.03125 | 3 | [] | no_license | <?php
/* posts.php */
// Don't let anybody access the site
// Who has not logged in yet. ($_SESSION[user...] is set)
session_start(); // check/open the session
if(isset($_SESSION['userId']) == false) {
header('Location: sign-in.php');
}
// fred-dev/posts.php
$server = 'fred-dev.caokxintrssz.us-east-1.rds.amazonaws.... | true |
6a41f7ff81ec207522433272abbec73b73af359d | PHP | JebKenobi/Melannie | /themes/kadabra/inc/widgets/widget-testimonials.php | UTF-8 | 1,864 | 2.5625 | 3 | [] | no_license | <?php
require_once(dirname(__FILE__).'/widget.php');
class dfd_testimonails extends SB_WP_Widget {
protected $widget_base_id = 'dfd_testimonails';
protected $widget_name = 'Widget: Testimonials';
protected $options;
/**
* Register widget with WordPress.
*/
public function __construct() {
$thi... | true |
c550ad5b684daad51dd033f3026d713e3d3cbb81 | PHP | Talesoft/tale-di | /src/Di/Dependency/ParameterDependency.php | UTF-8 | 1,591 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Tale\Di\Dependency;
use Psr\Container\ContainerInterface;
use Psr\Container\NotFoundExceptionInterface;
use Tale\Di\DependencyInterface;
/**
* A ParameterDependency can be configured to be optional and contain a default value.
*
* If the service id given can not be resolv... | true |
62feeca8a9faa2abb473540c1c260975c3c6c1ae | PHP | DevShoesed/tdd-php-kata | /tests/FizzBuzzKata/FizzBuzzKataTest.php | UTF-8 | 1,937 | 3.375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Tests\FizzBuzzKata;
require_once './vendor/autoload.php';
use App\FizzBuzzKata\FizzBuzzKata;
use PHPUnit\Framework\TestCase;
final class FizzBuzzKataTest extends TestCase
{
/**
* Test return 'Fizz' string when receive multiple of 3
*/
public function... | true |
a1196c8bfc66c2a9e5c259c4f2d8f901d8e3b488 | PHP | emtit27/Project | /editform.php | UTF-8 | 4,311 | 2.671875 | 3 | [] | no_license | <?php require_once('inc/header.html.php'); ?>
<div class="topnav">
<a href="viewchildinfo.php?childID=<?php echo clearData($_GET['childID'])?>">Back</a>
</div>
<?php
// define variables and set to empty values
$chname = $pname = $pemail = $ADHDT = $gender = $Age = $query = $chname_err= "";
?>
<d... | true |
85f9ff7e98d2d73fff1e9320b6fbf0c8f32d84fe | PHP | mrbob100/symfony | /src/VL/SiteBundle/Entity/Category.php | UTF-8 | 2,688 | 2.703125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace VL\SiteBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use VL\SiteBundle\Utils\Site as site;
/**
* Category
*/
class Category
{
/**
* @var integer
*/
private $id;
/**
* @var string
*/
private $name;
/**
* @var string
*/
private $slug;
/**... | true |
d8edf5922f36732aa692b2b29684a559d8c6eddf | PHP | TomasBFerreira/tdd-oop | /tests/DogTest.php | UTF-8 | 620 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Tests;
use App\Animal;
use App\Dog;
use PHPUnit\Framework\TestCase;
class DogTest extends TestCase
{
public function testClassDogExists()
{
$this->assertTrue(class_exists(Dog::class));
}
public function testDogInstanceOfAnimal()
{
$dog = $this->getMockBuilder... | true |
9b5ef03c492b29ee7f28f6c527bf1dab5d263488 | PHP | pierrepentier/Gestion-employ-s-services | /OLD/formulaire.php | UTF-8 | 1,264 | 2.65625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
</head>
<body>
<form action="formulaire.php" me... | true |
6a3637c9087c3efbff2bad75878ac41eecb16cdb | PHP | tomkralidis/yamcat | /catselect.php | UTF-8 | 442 | 2.703125 | 3 | [] | no_license | <?php
include("connect.php");
$sql = "SELECT * FROM `categories` where `lang`='en' order by catname asc";
$result = mysql_query($sql);
print "<select name=\"category\" size=\"1\">\n";
while ($row = mysql_fetch_assoc($result)) {
$catname=$row["catname"];
print "<option value=\"".$row["catname"]."\" ";
if ($catnam... | true |
fd52b92ccd9bc7102ba88c0ba24897c657cd9fde | PHP | Fulfillment-dot-com/oms-api-php | /src/Models/Response/User.php | UTF-8 | 3,207 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by IntelliJ IDEA.
* User: mduncan
* Date: 8/17/15
* Time: 3:40 PM
*/
namespace Fulfillment\OMS\Models\Response;
use Fulfillment\OMS\Contracts\Validatable;
use Fulfillment\OMS\Models\Request\User as RequestUser;
use Fulfillment\OMS\Models\Response\Contracts\ContactInfo;
use Fulfillment\OMS\Mod... | true |
06d7487bb2633e307cb8ad1efc0d53780e672eb4 | PHP | gosquared/gosquared-admin-api-php-sdk | /sdk.php | UTF-8 | 2,202 | 2.59375 | 3 | [] | no_license | <?php
if (file_exists(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.inc.php'))
{
@include_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'config.inc.php';
}
/** include all libs **/
array_map(function($path){
require_once $path;
}, array_merge(glob(__DIR__.'/include/*.php'), glob(__DIR__.'/lib/*.php')));
... | true |
d783f073fec18577e50c18ed605bf0b3c5ec0f07 | PHP | GameCrusherTechnology/HeroTowerServer | /framework/.svn/pristine/7e/7eca972c43bb6c659f8e8c8f70725b20f614a403.svn-base | UTF-8 | 2,219 | 2.75 | 3 | [] | no_license | <?php
class Guild extends ModelBase{
/**
* 取得工会的列表
* @param array $params
* @return array
*/
public function getList($params){
$page = intval($params['page']);
$per_page_count = intval($params['per_page']);
if($page < 1){
$page = 1;
}
if($per_page_count < 1){
$per_page_count = 10;
}
$offs... | true |
5894302d08512e4219108df9b708ba37dac6a8ec | PHP | venenux/simplegastos | /sysgastosweb/simplegastoswebphp/appsys/libraries/Table.php | UTF-8 | 18,053 | 2.765625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
* An open source application development framework for PHP 5.1.6 or newer
*
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2008 - 2011, EllisLab, Inc.
* @license http://codei... | true |
6162ec28506ddd91adccc50914f2f61ecac8cf44 | PHP | KevinArce98/RedSocialMusicos | /application/models/MusicalGenre.php | UTF-8 | 806 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
class MusicalGenre extends CI_Model {
public function __construct(){
parent::__construct();
// Your own constructor code
}
public function all(){
$query = $this->db->get('musicalgenre');
return $query->result();
}
... | true |
f520d72bb3f0a45d16b7cef917b6a27b8d3523fe | PHP | mtruon01/HTBK | /client/checkin.php | UTF-8 | 1,666 | 2.84375 | 3 | [] | no_license | <?
require_once( "includes/header.inc.php" );
if ( !isAdmin() && !isStaff() )
{
die("<div class='errormsg'> You don't have the authorization to do this function </div></br>");
}
if ( isset($_GET['checkin']) )
{
$isbn = pg_escape_string($_GET['isbn']);
$user_id = pg_escape_string($_GET['user_id']);
$error = false... | true |
4e7eba1f0ef400ed838cd5018cc2408291e4dd1a | PHP | smartcoinpayments/smartcoin-php | /lib/Smartcoin/Object.php | UTF-8 | 4,820 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace Smartcoin;
class Object implements \ArrayAccess
{
protected $api_keys;
protected $_values;
protected $_unsavedValues;
public function __construct($params=null, $api_keys=null)
{
$this->_values = array();
$this->_unsavedValues = array();
$this->refresh_objec... | true |
1b4aba266a40c07c7496344f1b55c15031e1d91b | PHP | calderacc/stvo | /src/Caldera/Bundle/StvoBundle/StvoDiff/Lines/ChangedLine.php | UTF-8 | 728 | 2.75 | 3 | [] | no_license | <?php
namespace Caldera\Bundle\StvoBundle\StvoDiff\Lines;
class ChangedLine extends AbstractDiffLine
{
protected $oldLines = [];
protected $newLines = [];
public function __construct()
{
}
public function addOldLine(string $oldLine): ChangedLine
{
$this->oldLines[] = $oldLine;
... | true |
55367abfeb0b062664a43a0a31a83821211fd687 | PHP | dharam11495/medical-Store-management | /application/models/mymodel.php | UTF-8 | 3,335 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Mymodel extends CI_model
{
public function isvalidatemedical($username,$password)
{
$q=$this->db->where(['username'=>$username,'password'=>$password])
->get('user');
// echo "<pre>";
// print_r($q->row()->username);
// exit;
if ($q->num_rows()) {
return $q->row()->id... | true |
a4ecbf6131c5292723017b18bb14d07928435949 | PHP | MalcolmW99/WW2OOB | /person.php | UTF-8 | 8,044 | 2.875 | 3 | [] | no_license | <!DOCTYPE html >
<head>
<title>WW2 Website</title>
<meta http-equiv="description" content="page description" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<style type="text/css">@import url(css/styles.css);</style>
</head>
<body>
<!--<h1>World War 2 Database</h1>-->
<div class = 'header'>
<?... | true |
a6db9ada7aa2d93051d99b2f5109ee069f399f89 | PHP | pragyan03/Online-Quiz-Portal | /adduser.php | UTF-8 | 3,445 | 2.71875 | 3 | [] | no_license | <?php
include 'config.php';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST['username'])) {
$_SESSION['msg'] ="Name is required";
header("Location:error.php");
}
else {
$name = test_input($_POST["username"]);
// check if name only contains letters and whitespace
if (!preg_... | true |
fca1c63646734ef3a79d72b4d227fe9bc661d8fc | PHP | carl-schelin/inventory | /edit/users.mysql.php | UTF-8 | 13,238 | 2.5625 | 3 | [] | no_license | <?php
# Script: users.mysql.php
# Owner: Carl Schelin
# Coding Standard 3.0 Applied
# Description: Retrieve data and update the database with the new info. Prepare and display the table
header('Content-Type: text/javascript');
include('settings.php');
$called = 'yes';
include($Loginpath . '/check.php');
inc... | true |
88da6e39b47a127d432283bcecb1df7dc1688caf | PHP | nimrabaksh/nimrabaksh.github.io | /send_email.php | UTF-8 | 2,111 | 2.78125 | 3 | [] | no_license | <?php
if(isset($_POST['form_email'])) {
$email_to = "goto.nimra@gmail.com";
$email_subject = "Summarized propose of the email";
//Errors to show if there is a problem in form fields.
function died($error) {
echo "We are sorry that we can procceed your request due to error(s)";
echo "Below is the error(s) list <... | true |
9c679b0615874c976a483e961cdf2f707796c68f | PHP | iWader/Legacy-CMS | /admin/sources/index.php | UTF-8 | 3,069 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Retrieves the content required for the selected page and
* then load the style file
* Last Edited: 02-01-2012 22:14:58 -00:00 (2 January 2012)
*
* @author Wader
* @copyright (c) 2011 Wade Urry
* @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
*/
# Check file isn'... | true |
22bc078d1a8e2db5616ce9cc463da6f03a35fc7e | PHP | Tegmenn/chat | /Realtime-Chat-master/RTC-Web/message.php | UTF-8 | 2,122 | 2.515625 | 3 | [] | no_license | <?php session_start();
ob_start();
try {
$db = new PDO("mysql:host=localhost;dbname=rtc", "root", "");
} catch ( PDOException $e ){
print $e->getMessage();
}
?>
<!DOCTYPE html>
<html>
<head>
<META http-equiv="Refresh" content="5">
<title>RTC Web</title>
</head>
<body>
<h5>I didn'... | true |
cd2df8585cd7417151f40ba9635c96bbe1fbbf24 | PHP | balte786/student_management | /database/migrations/2021_06_23_104539_create_schools.php | UTF-8 | 1,219 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSchools extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('schools', function (... | true |
471075aeca68ecc684e4a8bf68609dd0a8c5bab2 | PHP | neiimad/local | /workspace/equinode/controller/wscontrollerprofil.php | UTF-8 | 1,573 | 2.578125 | 3 | [] | no_license | <?php
require_once WS_CONTROLLER.'wscontroller.php';
class wscontrollerprofil extends wscontroller {
public $modelname = 'wsmodeldefault';
/**
Constructeur
**/
public function wscontrollerprofil ($wscontext = false) {
parent::wscontroller($wscontext);
require_once MODEL.$this->modelname.'.php... | true |
22a51698071cb7953a7243ab38d99fe3bae1ed34 | PHP | AMgrade/laravel-roles | /tests/Traits/PermissionsTrait.php | UTF-8 | 1,375 | 2.6875 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace McMatters\LaravelRoles\Tests\Traits;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use McMatters\LaravelRoles\Models\Permission;
use const null;
use function func_get_args, is_array;
/**
* Trait PermissionsTrait
*
... | true |
0a4d87d127856f530cb9c97a7b14436642a1376c | PHP | Maximilyanus29/Yii4bit | /engine/View.php | UTF-8 | 1,158 | 2.671875 | 3 | [] | no_license | <?php
namespace app\engine;
/**
*
*/
class View
{
private $css;
private $js;
function __construct($layout,$controllerId,$params=[],$view)
{
$pathToView='../view/'.$controllerId.'/'.$view.'.php';
// var_dump($pathToView);
if (file_exists($pathToView)) {
$content = $this->render... | true |
69670b28e4533d19dc4caef5c16c0225479aa116 | PHP | tzwjt/xcshop | /dao/extend/weixin/WxPayData/WxPayUnifiedOrder.php | UTF-8 | 13,029 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace dao\extend\weixin\WxPayData;
/**
* ok
* 统一下单输入对象
* @author widyhu
*
*/
class WxPayUnifiedOrder extends WxPayDataBase
{
/**
* 设置微信分配的公众账号ID
* @param string $value
**/
public function SetAppid($value)
{
$this->values['appid'] = $value;
}
/**
* 获取微信分配的公众... | true |
78a3adb337034bc075c1ab69632f2e7f97fd4727 | PHP | ajduncan/stint | /core/classes/db.class.php | UTF-8 | 964 | 2.859375 | 3 | [
"BSD-2-Clause-Views"
] | permissive | <?php
namespace Stint;
class DB {
private static $instance = NULL;
private function __construct() {}
private function __destruct() {}
private function __clone() {}
final public static function getInstance() {
if (!self::$instance) {
$config = config::getInstance();
$db_type = $con... | true |
7e7eb873a3713624c485ab9ec244f4ed024ace14 | PHP | danilms/bookshelf | /src/Bookshelf/Model/ActiveRecord.php | UTF-8 | 2,409 | 3.296875 | 3 | [] | no_license | <?php
namespace Bookshelf\Model;
use Bookshelf\Core\Db;
/**
* @author Aleksandr Kolobkov
*/
abstract class ActiveRecord
{
/**
* @return mixed
*/
abstract public function getId();
/**
* Method that will find object from Database by id
*
* @param $id
* @return ActiveRecord
... | true |
2c9324976e7b6266426630f53b2982e6d795bf2d | PHP | SergioGordillo/StudentsDDBB | /buscar.php | UTF-8 | 2,968 | 2.890625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Buscar</title>
</head>
<body>
<?php
if(isset($_POST["buscar"])){
$nombre = $_POS... | true |
5eded5fe870a310976bde15e74c66741b0d777f7 | PHP | Weble/laravel-playbooks | /src/Command/MakePlaybookCommand.php | UTF-8 | 1,689 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Weble\LaravelPlaybooks\Command;
use Illuminate\Console\GeneratorCommand;
use Illuminate\Support\Str;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class MakePlaybookCommand extends GeneratorCommand
{
/**
* The console command name.
*... | true |
9623c548f901d1763052322880852fa20fa47857 | PHP | affinitybridge/nationbuilder_api_php | /src/Environment/Callback.php | UTF-8 | 2,102 | 2.765625 | 3 | [] | no_license | <?php
namespace Affinitybridge\NationBuilder\Environment;
use Affinitybridge\NationBuilder\Container as Container;
class Callback implements EnvironmentInterface {
protected $container = null;
protected $callbacks = [];
public function __construct(Container $container)
{
$this->setContainer(... | true |
8dad30258bb7fa97773bd0059eec323a27dd879d | PHP | linhuangwei/library | /php/V/showBroBooks.php | UTF-8 | 3,331 | 2.78125 | 3 | [] | no_license | <?php
include('../M/book.php');
include('../C/manBroBook.php');
$manBroBook = new manBroBook();
//获取所有的图书
$rows = $manBroBook->getAllBroBook();
//var_dump(sizeof($rows));
// <!-- 通过页码查询书本 -->
$pageSize = 60; //每页显示的数量
$rowCount = 0; //要从数据库中获取
$pageNow = 1; //当前显示第几页
$rowns = $manBroBook->getBro... | true |
a6d56021e9fe06ded0687ecac50157534e976dab | PHP | JoniR/JrSync | /jrsync.php | UTF-8 | 8,233 | 2.65625 | 3 | [] | no_license | <?php
/*
PHP script which fetch Evernote note via Evernote Cloud API with certain tag.
Fetched notes are inserted to task in Wunderlist2 web service.
Version history:
1.00 16.08.2013 Joni Räsänen - Initial version
1.01 18.08.2013 Joni Räsänen - Fetch default list for Wunderlist from configuration file, variable $wlDef... | true |
7d97d0b39a7cb9e474ac15ed9057dc6a26f1f0e2 | PHP | pOpPyShield/DoAnPhpThuan | /classes/validation.php | UTF-8 | 249 | 2.5625 | 3 | [] | no_license | <?php
class Validation {
private $_passed = true,
$_errors = false,
$_db = null;
public function __construct() {
$this->_db = DB::getInstance();
}
}
?> | true |
915a6840e6d238819e9c9384b42e6f8393442fa1 | PHP | studiowbe/laravel-table | /tests/DumpTest.php | UTF-8 | 1,286 | 2.515625 | 3 | [] | no_license | <?php
namespace Studiow\Laravel\Table\Test;
use Illuminate\Http\Request;
use Studiow\Laravel\Table\Column\Column;
use Studiow\Laravel\Table\Filter\SelectFilter;
use Studiow\Laravel\Table\Table;
class DumpTest extends TestCase
{
public function testDumpTest()
{
$data = [
['id' => 1, 'name'... | true |
be164ece9a7f7bd539217e9fe18e4067640f1f81 | PHP | hir0nobu0tas/seisan_2 | /bak/pdf_test_4.php | UTF-8 | 5,791 | 2.515625 | 3 | [] | no_license | <?php
// 生産計画システム 生産管理票(バーコード)サンプル
// 2007/04/11
// 表示対象データの作成
// 実業務アプリケーションではDBからの読み込みになる
//$data = array();
$plan = $_GET["plan"];
$operate_no = '1234-00';
$dash_no = '012345';
$product = 'ABCDEFG-00';
// MBFPDFの読み込みと拡張クラス定義
require_once("fpdf/fpdf.php");
require_once("fpdf/mbfpdf.php");
$EUC2SJIS... | true |
076d07655b00122b036e0f39c5eb9a7d8b14de8f | PHP | PAKdev1993/SocialNetwork | /app/Table/UserModel/UserModel.php | UTF-8 | 8,997 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace app\Table\UserModel;
use app\App;
use core\Session\Session;
use core\Functions;
class UserModel
{
private $db;
//#todo effectuer les modification pour ne plus jamais passer le db en paramètre
public function __construct($db = false)
{
if($db)
{
$this->db =... | true |