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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c4aeea19ba6d9058867f61bcdccb1435580d25d3 | PHP | frmatias/easyMQTT | /easyMQTT.php | UTF-8 | 8,261 | 2.9375 | 3 | [] | no_license | <?php
namespace easyMQTT;
class easyMQTT{
private $socket; /* holds the socket */
private $msgid = 1; /* counter for message id */
public $keepalive = 10; /* default keepalive timmer */
public $timesinceping; /* host unix time, used to detect disconects */
public $topics = array(); /* use... | true |
e31b998c13cb005c8e4b4f90739f0dc404b59d22 | PHP | hugdru/LBAW | /ltw/ltw-eventos/database/connection.php | UTF-8 | 1,606 | 3.15625 | 3 | [] | no_license | <?
class Database
{
/**
* @var Singleton The reference to *Singleton* instance of this class
*/
private static $instance;
private $connection;
/**
* Returns the *Singleton* instance of this class.
*
* @return Singleton The *Singleton* instance.
*/
public static functio... | true |
ba55e408ad2aed4f0019f6cadc2b8a947b02e7f8 | PHP | lapnguyenvitopmedia/flexhome | /platform/plugins/location/src/Location.php | UTF-8 | 1,987 | 2.921875 | 3 | [] | no_license | <?php
namespace Botble\Location;
use Botble\Base\Enums\BaseStatusEnum;
use Botble\Location\Repositories\Interfaces\CityInterface;
use Botble\Location\Repositories\Interfaces\StateInterface;
class Location
{
/**
* @var StateInterface
*/
public $stateRepository;
/**
* @var CityInterface
... | true |
8ba95972bc6a7de41a7a4d18ff058f32f80a90c0 | PHP | febridh/golex | /golex.php | UTF-8 | 2,008 | 2.8125 | 3 | [] | no_license | <?php
class golex {
public function __construct() {
$this->koneksi();
}
public function koneksi() {
$this->konek = new mysqli("localhost","root","","golex");
return $this->konek;
}
public function addSitus($a, $b, $c, $d, $e, $f) {
$cek = mysqli_num_rows(mysqli_query($this->konek, "SELECT url F... | true |
11d9ac0072807e2ec596206669ae6cdaf1a7f819 | PHP | XanChoon/guardhouse | /check.php | UTF-8 | 1,018 | 2.78125 | 3 | [] | no_license | <?php
/* Attempt MySQL server connection. Assuming you are running MySQL
server with default setting (user 'root' with no password) */
$link = mysqli_connect("localhost", "root", "", "user");
// Check connection
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
// Escape user in... | true |
368f9b9cc8a8f79a58acdda6b556e63941c266dc | PHP | hayuzi/design-pattern-php | /Lib/DesignPattern/State/StopState.php | UTF-8 | 520 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: yuzi
* Date: 2019/3/23
* Time: 22:05
*/
namespace Lib\DesignPattern\State;
use Utils\StringFmt;
/**
* 具体的状态类 Stop状态
*
* Class StopState
* @package Lib\DesignPattern\State
*/
class StopState implements StateInterface
{
/**
*
*/
public function do... | true |
784cb59d66822b564f3864d0dba1f1ea4bc12b25 | PHP | BarishYumerov/PHP | /Repositories/CartRepository.php | UTF-8 | 3,619 | 2.8125 | 3 | [] | no_license | <?php
namespace Repositories;
use Db;
use Configs\DbConfig;
class CartRepository
{
private $db;
private static $inst = null;
private function __construct(Db $db)
{
$this->db = $db;
}
public static function create()
{
$dbConfigClass = new DbConfig();
Db::setInst... | true |
74756305966a87dc5a325228a7621c347f75b247 | PHP | WayKwin/PHP- | /Frame/Vendor/PDOWrapper.class.php | UTF-8 | 2,780 | 3.203125 | 3 | [] | no_license | <?php
namespace Frame\Vendor;
/*PDO是全局空间的 注意不是Frame\vendor中的*/
use \PDO;
use \PDOException;
//定义最终的PDOWarpper
final class PDOWrapper
{
private $pdo = NULL;
//数据库的配置属性
private $db_type;
private $db_host;
private $db_port;
private $db_user;
private $db_pass;
private $db_name;
priva... | true |
bc6894965540235e82590ea2505534fad40ee1ae | PHP | manjirik/drupal_Projects | /dmmproject/phase-ii/.svn/text-base/scriptRemoveJunkFiles.php.svn-base | UTF-8 | 1,127 | 2.703125 | 3 | [] | no_license | <?php
/*
* File : To delete unwanted files from temp_upload
* It displays deleted files
*/
include_once 'inc/database.php';
include_once 'controller/tblSongsController.php';
$dbObj = new database();
$conObj = $dbObj->connectDB();
$songsObj = new tblSongsController($conObj);
$recordsArray = $songsObj->getS... | true |
2fe503df9ca72b3c6d5ac26bbdac44027424c91a | PHP | semyon-san/ygin | /modules/backend/components/event/CreateInstanceEvent.php | UTF-8 | 273 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
class CreateInstanceEvent extends CEvent {
public $idObject;
public $create;
public function __construct($sender, $idObject, $create=true) {
parent::__construct($sender);
$this->idObject = $idObject;
$this->create = $create;
}
}
| true |
f17a74eb9bf7cfb9c6ee98c3ff43a52a5f8c23f2 | PHP | OmarMohamed95/lacommerce | /app/Http/Controllers/App/ProfileController.php | UTF-8 | 1,317 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\App;
use App\Http\Controllers\Controller;
use App\Http\Requests\ProfileRequest;
use App\Model\User;
use App\Repositories\Contracts\UserRepositoryInterface;
use Auth;
class ProfileController extends Controller
{
/**
* @var UserRepositoryInterface $userRepository
*/
... | true |
99ffccc5e2b5ad4b36e0c6e43a9c9dfaa7795deb | PHP | WillZWL/shop | /system/plugins/XmlArray.php | UTF-8 | 3,049 | 2.875 | 3 | [] | no_license | <?php
include_once(BASEPATH . "plugins/TransformArray.php");
include_once(BASEPATH . "plugins/Inflector.php");
class XmlArray extends TransformArray
{
private $XMLFile;
/** @var DOMDocument */
private $doc;
/**
* setXMLFile
* @param $XMLFile
* @return bool
*/
public functio... | true |
03d92cf830e3f47d45c36d2baa7bd59e79e885ed | PHP | w01f/VolgaTeam.SalesLibrary | /WebSalesLibraries/protected/models/auth/models/TokenRequestData.php | UTF-8 | 1,106 | 3 | 3 | [] | no_license | <?
namespace application\models\auth\models;
class TokenRequestData
{
public $configured;
public $login;
public $password;
public $firstName;
public $lastName;
public $email;
public $phone;
public $group;
public $token;
public function __construct()
{
$this->password = 'gtvninja!@#';
... | true |
f413dbdffe106a3e89d4f4698c7314f22621905c | PHP | Raphhh/puppy | /tests/DemoModuleTest.php | UTF-8 | 1,316 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Puppy;
use Puppy\Client\Client;
/**
* Class DemoModuleTest
* @package Puppy
* @author Raphaël Lefebvre <raphael@raphaellefebvre.be>
*/
class DemoModuleTest extends \PHPUnit_Framework_TestCase
{
/**
* @medium
*/
public function testHomePage()
{
$client = new Client('t... | true |
9bc5b1e5658a07d250fda89258ba400b9b45baa5 | PHP | kijanawoodard/crunchytacos | /lib/Object.php | UTF-8 | 1,756 | 2.984375 | 3 | [] | no_license | <?php
class_exists('Hashtable') || require('Hashtable.php');
class Object{
public function __construct($attributes = null){
if(self::$observers == null){
self::$observers = array();
}
if($attributes != null){
foreach($attributes as $key=>$val){
$this->$key = $val;
}
}
// 2009-08-... | true |
85b92f67791d58e10345dca2f80e7c4a3c2a54c5 | PHP | ZhengChaoLong/yii2-cms | /frontend/modules/user/controllers/SiteController.php | UTF-8 | 5,315 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\user\controllers;
use Yii;
use common\models\User;
use common\models\Profile;
use common\models\PasswordForm;
use frontend\models\AvatarForm;
use yii\web\Controller;
use yii\web\UploadedFile;
use frontend\widgets\Image;
use yii\filters\AccessControl;
/**
* SiteController i... | true |
cfdd39de311d2b5e183dc47a5d09616d5132a3c2 | PHP | vtson/media | /app/Controller/CategoriesController.php | UTF-8 | 856 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: vtson
* Date: 01/05/2018
* Time: 15:36
*/
class CategoriesController
{
public function create($parameters){
return view('categories.create');
}
public function store($parameters){
$validate = validator([
'required' => ['name', 'description'... | true |
ecba7a8c65f64b779307ff80a21a80553a2c2479 | PHP | entonyogithub/website | /backend/models/TeacherSearch.php | UTF-8 | 1,536 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\models;
use yii;
use \common\models\User;
use yii\data\ActiveDataProvider;
/*
* 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.
*/
class TeacherSearch extends User... | true |
83421fd1314a16754d3fadd92f42aee155c4bc49 | PHP | yottooo/Anketirai | /php/db.php | UTF-8 | 9,937 | 2.890625 | 3 | [] | no_license | <?php
class Db {
private static $uniqueInstance;
var $show_errors = false;
var $suppress_errors = false;
var $last_error = '';
var $num_queries = 0;
var $num_rows = 0;
var $rows_affected = 0;
var $insert_id = 0;
var $last_query;
var $last_result;
var $col_info;
var $que... | true |
a653dbd631923e3c4e16d383a5d30b1b527e40ed | PHP | mochrira/selvi-firebase | /src/Manager.php | UTF-8 | 420 | 2.640625 | 3 | [] | no_license | <?php
namespace Selvi\Firebase;
use Kreait\Firebase\Factory;
class Manager {
private static $firebaseFactory;
static function setup($config = []) {
if(isset($config['serviceAccountFile'])) {
self::$firebaseFactory = (new Factory())->withServiceAccount($config['serviceAccountFile']);
... | true |
97f804a0328c4aafd7857235eecd52def282123a | PHP | SaurabhTotey/Keep-It-Secret | /scripts/Database.php | UTF-8 | 1,486 | 3.3125 | 3 | [] | no_license | <?php
class Database{
//The connection of the database
//This is used so that the connection isn't redone every time a connection is attempted
protected static $connection;
/*
* This function connects to the database
* if the database had already been connected to, another connection is... | true |
4663f69c4134d99b0532a6c30f04198bc9329073 | PHP | jakzal/phpunit-globals | /src/Attribute/TargetAware.php | UTF-8 | 424 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Zalas\PHPUnit\Globals\Attribute;
trait TargetAware
{
private int $target = 0;
/**
* @internal
*/
public function withTarget(int $target): self
{
$clone = clone $this;
$clone->target = $target;
return $clone;
}
/**
... | true |
a59216b97d08e21aeafa3882c8d96045ed1083a9 | PHP | rochelli/deployThalesmee | /src/graph/excel/occupation_annuel_excel.php | UTF-8 | 17,462 | 2.953125 | 3 | [] | no_license | <?php
/** Error reporting */
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
date_default_timezone_set('Europe/Paris');
date_default_timezone_set('Europe/Paris');
require('../../conf/connexion_param.php');// connexion a la base
set_include_path(get_include_path() . PAT... | true |
037cb08a47d1daf3572394970ba174e0ea443107 | PHP | Simsarmy/php-fms-test | /includes/FileManagementSystem.php | UTF-8 | 5,408 | 2.796875 | 3 | [] | no_license | <?php
ini_set("display_errors", 1);
error_reporting(E_ALL);
require("FileInterface.php");
require("FileSystemInterface.php");
require("FolderInterface.php");
class File implements FileInterface {
private $CreatedTime;
private $ModifiedTime;
private $Name;
private $ParentFolder;
... | true |
5eee792b159a16126a8b3add7572df53961bde7e | PHP | unsocialism/php-template-151 | /website/src/Service/Login/LoginService.php | UTF-8 | 211 | 2.625 | 3 | [] | no_license | <?php
namespace Unsocialism\Service\Login;
Interface LoginService
{
public function authenticate($username, $password);
public function getUserIdByEmail($email);
public function getPasswordByEmail($email);
} | true |
55e683ab83a904219df603f5f0226611af968331 | PHP | Just1ce013/php | /infrastructure/repository/TaskRepository.php | UTF-8 | 4,886 | 2.59375 | 3 | [] | no_license | <?php
namespace app\infrastructure\repository;
use app\domain\entity\TaskEntity;
use app\domain\fabric\CommentFabric;
use app\domain\fabric\CostFabric;
use app\domain\fabric\StatusFabric;
use app\domain\fabric\TaskFabric;
use app\domain\fabric\TypeFabric;
use app\domain\repository\ITaskRepository;
use app\models\Comme... | true |
676dabfbdc734db0316135d94f5b32752411321f | PHP | dadajuice/zephyrus-framework-api | /app/Controllers/ApiController.php | UTF-8 | 5,500 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php namespace Controllers;
use Models\Token;
use Zephyrus\Application\Configuration;
use Zephyrus\Network\Response;
abstract class ApiController extends SecurityController
{
/**
* @var string
*/
protected $resourceIdentifier = "";
/**
* Basic sample API authentication with a simple API K... | true |
692c249852cd915b63cca6e6ef2427ef79f85835 | PHP | laurayang321/BirthdayGenerator | /records.php | UTF-8 | 8,602 | 2.53125 | 3 | [] | no_license | <?php
/*
Allows the user to both create new records and edit existing records
*/
// connect to the database
include("connect-db.php");
// creates the new/edit record form
// since this form is used multiple times in this file, I have made it a function that is easily reusable
function renderForm($first = '', $last = ... | true |
9f48df46b45ea41c3640d09df09d4296f7578b55 | PHP | hoku/toridashiWikipedia | /toridashiWikipedia.php | UTF-8 | 4,565 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
/**
* WikipediaのXMLからタイトルとカテゴリを抽出するスクリプト。
*
* @license MIT License
* @author hoku
*/
// 1ファイル当たりに出力するデータ件数のデフォルト値
define('DEFAULT_FLUSH_SIZE', 5000);
// 引数チェック
if (count($argv) < 3) {
echo "ERROR: 引数が足りません。\n";
echo "ERROR: php GetWordsFromWikipedia.php srcFilePath outDirPath [flushSize = " . ... | true |
34be55b5a66a27a2a904bcf7c8733f4785be26d4 | PHP | armageddon-cat/skuz | /protected/views/statistics/callersDay.php | UTF-8 | 415 | 2.640625 | 3 | [] | no_license | <h1>Диспетчера: количество звонков за текущий день</h1>
<table>
<tr>
<th>Имя</th>
<th>Фамилия</th>
<th>Количество звонков</th>
</tr>
<?php
foreach($model as $worker){
echo '<tr>';
echo '<td>'.$worker['realname'].'</td>';
echo '<td>'.$worker['surname'].'</td>';
echo '<td>'.$worker['count(*)'].'</td>';
... | true |
b1e5fbbdbcaba78b5648644617bbf40e81e55e61 | PHP | oqq/broetchen | /api/src/Exception/UserNotFoundByEmailException.php | UTF-8 | 446 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Oqq\Broetchen\Exception;
use Oqq\Broetchen\Domain\EmailAddress;
use Oqq\Broetchen\Domain\User\UserId;
class UserNotFoundByEmailException extends \Exception
{
/** @var EmailAddress */
private $email;
public function __construct(EmailAddress $email)
{
$... | true |
395857316c7d4ffad191e9e217c852201eaa0721 | PHP | luutruonghailan/hoc-lap-trinh-online-zendvn | /khoa-hoc-lap-trinh-php/ch02/05-time/05/02.php | UTF-8 | 2,082 | 3.09375 | 3 | [] | no_license | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Thao tac voi ngay thang</title>
<link rel="stylesheet" media="screen" href="style.css">
</head>
<body>
<?php
$arrDays = range(1... | true |
19404b923f316deb1e00bf0a90325d7baa5a1a5b | PHP | neighborhoods/Buphalo | /src/V2/FabricationFile/Builder.php | UTF-8 | 3,164 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Neighborhoods\Buphalo\V2\FabricationFile;
use LogicException;
use Neighborhoods\Buphalo\V2\FabricationFile;
use Neighborhoods\Buphalo\V2\FabricationFileInterface;
use Symfony\Component\Finder\SplFileInfo;
use Symfony\Component\Yaml\Yaml;
class Builder implements BuilderInterf... | true |
8341b624cb006e42484d6c209bd850d44044a2ab | PHP | samhol/data.samiholck.com | /sphp/php/Sphp/Html/Attributes/GeneralAttribute.php | UTF-8 | 1,950 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
/**
* SPHPlayground Framework (http://playgound.samiholck.com/)
*
* @link https://github.com/samhol/SPHP-framework for the source repository
* @copyright Copyright (c) 2007-2018 Sami Holck <sami.holck@gmail.com>
* @license https://opensource.org/licenses/MIT The MIT License
*/
namespace Sphp\Html\A... | true |
030ad1670621b1d28170c848329904a699c2719f | PHP | sanket0052/laravelpro | /app/Category.php | UTF-8 | 661 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Category extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'categories'; // put your table name here
/**
* The attributes that are mass assignable.
*
* @var... | true |
1d43f45cd13d47c18d2a9faa4f66d262e6f29d25 | PHP | Ruslan-zik/php-3 | /testsite/demo/test.php | UTF-8 | 1,115 | 2.703125 | 3 | [] | no_license | <?php
mb_internal_encoding("UTF-8");
$link = mysqli_connect('127.0.0.1', 'root', '', 'web');
if(!$link) {
echo mysqli_connect_errno();
echo "<br>";
echo mysqli_connect_error();
}
/* изменение набора символов на utf8 */
if (!mysqli_set_charset($link, "utf8"))
echo "Ошибка при загрузке набора символов utf8: \n... | true |
1e88c2f70d986f138cf0bae5e3724c26e798ae7f | PHP | Infranology/drupen_features | /drupen/includes/drupen.user.inc | UTF-8 | 1,952 | 2.609375 | 3 | [] | no_license | <?php
/**
* @file
* User (Drupal core) configuration tasks.
*/
/**
* Creates the roles 'administrator', 'editor' and 'assistant'. Also configures
* the Admin role module if available, setting 'administrator' as the
* administrator role and updates the permissions.
*/
function _drupen_user_configure() {
modul... | true |
ecb5a1ca89b58d5960113cc8649afc1484daa847 | PHP | ariddick117/riddick_a-singh_i-3014-cms | /admin/admin_singleproductedit.php | UTF-8 | 2,653 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
require_once '../load.php';
confirm_logged_in();
$getProduct = getSingleProduct($tbl, $col, $id);
$sport_table = 'tbl_sport';
$sport = getAll($sport_table);
$id = $_GET['id'];
if (isset($_GET['id'])) {
$id = $_GET['id'];
$tbl = 'tbl_products';
$col = 'product_... | true |
476de16b0768a2c0bae36f199d675efc259480de | PHP | yyinsomnia/my | /oo/DirectoryIterator.php | UTF-8 | 188 | 2.984375 | 3 | [] | no_license | <?php
$dir = new DirectoryIterator( dirname(__FILE__) );
foreach ($dir as $fileinfo)
{
if (!$fileinfo->isDir())
{
echo $fileinfo->getFilename(),"\t",$fileinfo->getSize(),PHP_EOL;
}
} | true |
67163622e3b2489d23275f63add62cfb95f6d559 | PHP | kerbeh/valence-wrapper | /src/Model/AssessmentsAndRubrics/RubricAssessment.php | UTF-8 | 1,781 | 2.625 | 3 | [] | no_license | <?php
namespace ValenceWrapper\Model\RubricAssessment;
use ValenceWrapper\Model\BaseValenceModel;
use ValenceWrapper\Model\Basic\UtcDateTime;
use ValenceWrapper\Model\Basic\RichText;
/**
* Defines an assessment with accompanying rubric.
* @see https://docs.valence.desire2learn.com#Rubric.RubricAssessment
*/
class ... | true |
aa6a1cd0a2964afa7274d4c4b1c649e705eab8f7 | PHP | lorranapereira/sistema | /trabalho de BD/cadastros/inserir/professor.php | UTF-8 | 480 | 2.546875 | 3 | [] | no_license | <?php
require_once('../../daos/professorDao.php');
require_once('../../classes/professor.php');
$id = isset($_POST["id"]);
$cur = new Professor($_POST["nome"]);
$cdao = new ProfessorDAO();
//se o id existe então é um UPDATE, senão é um INSERT
if($id){
echo $id;
$cur->setid(intval($_POST["id"]));
$c... | true |
48f6fca0650016beab33c75384711c9a7524fd08 | PHP | kamilloo/crud | /app/Post.php | UTF-8 | 548 | 2.5625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
protected $fillable = ['description','preface','status'];
static protected $validationRules = [
'description' => 'required|max:10000',
'preface' => 'required|min:10|unique:posts,preface',
's... | true |
9aa2d088c145f5d0c840804df349a9439822092f | PHP | dutymess/hashids | /src/HashidsModelTrait.php | UTF-8 | 568 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Hashids;
use Illuminate\Database\Eloquent\Builder;
trait HashidsModelTrait
{
/**
* add a select by hashid to the query builder.
*
* @param Builder $builder
* @param array $hashids
*
* @return void
*/
public function scopeWithHashids(Builder $builder, $has... | true |
42a4970b528887542260d2e07957ba13a687876e | PHP | oezguerisbert/modul-307 | /Praxisarbeit/incs/createPriorities.func.inc.php | UTF-8 | 552 | 2.984375 | 3 | [] | no_license | <?php
function createPriorities(array $options, string $selected = ""){
$d = "";
foreach ($options as $key => $option) {
$name = "prio".($key+1);
$d .= "<div class=\"custom-control custom-radio\">
<input type=\"radio\" id=\"$name\" name=\"prio\" value=\"".strtolower($option)."\" clas... | true |
fde9cb57555f523e42e122df0c847da994671b89 | PHP | Bogdan2106/geolocation | /frontend/models/SignupForm.php | UTF-8 | 2,895 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace frontend\models;
use common\models\User;
use yii\base\Model;
use Yii;
/**
* Signup form
*/
class SignupForm extends Model
{
public $username;
public $email;
public $password;
public $service_number;
/**
* @inheritdoc
*/
public function rules()
{
return ... | true |
e5613a94fd738e8cdd8603ad153e7509e54244dc | PHP | hxrxd/pruebafelipe | /pruebafelipe/database/migrations/2018_11_15_174729_create_complaints_table.php | UTF-8 | 995 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateComplaintsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
if (!Schema::hasTable('complaints')) {
Schema::create('compla... | true |
ce21116794b8aa156417d72445a83e10c9c11418 | PHP | InfraBackend/dsshop | /api/app/Models/v1/GoodCode.php | UTF-8 | 1,898 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/** +----------------------------------------------------------------------
* | DSSHOP [ 轻量级易扩展低代码开源商城系统 ]
* +----------------------------------------------------------------------
* | Copyright (c) 2020~2023 https://www.dswjcms.com All rights reserved.
* +-----------------------------------------------------... | true |
9f93fd8d207b3684318324b6dc953c9cb3063778 | PHP | eristoni/stemmingsunda | /controlstemm.php | UTF-8 | 808 | 3.25 | 3 | [] | no_license | <?php
require_once('preprocessing.php');
require_once('stemmsunda.php');
class ControlStemm
{
function doPreprocessing($InputKata)
{
$preprocessing = new Preprocessing();
$split = $preprocessing->stopword($preprocessing->tokenizing($preprocessing->casefolding($preprocessing->deliminating($InputKata))));
$lim... | true |
ee0ad95a09863145d7761474339347d6d8b506fb | PHP | andrestorresw/PHP_inicio | /01.Introduccion/02.variables.php | UTF-8 | 967 | 3.984375 | 4 | [] | no_license | <?php
$numero = 5;
echo "Esto es una variable numero $numero<br>";
var_dump($numero);
echo "<br></br>";
// Variable de texto
$palabra = "palabra";
echo "Esto es una variable de texto $palabra<br>";
var_dump($palabra);
echo "<br></br>";
// Variable boolena
$boleana = true;
echo "Esto es una varibale boleana: $bolean... | true |
9ebe3cd6ac6584324800128daca6ae946139775a | PHP | kakharmanov/php | /test/index.php | UTF-8 | 724 | 2.671875 | 3 | [] | no_license | <?php
include 'class/login.php';
session_start();
if(isset($_POST['ok'])){
$user = new login();
$log = $_POST['login'];
$pass = $_POST['password'];
$user->Entry($log,$pass);
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X... | true |
01b810f796e6175be4cc728ad933c2efeb746fec | PHP | chiahuang/IngredientMissr | /index.php | UTF-8 | 2,297 | 2.953125 | 3 | [] | no_license | <!doctype html>
<html>
<body>
<head>
Ingredients: <?php
echo "<br> Working <br>";
$ingredients = $_GET["ingredient"];
$listOfIngredient = explode(", ", $ingredients);
//$maxSizeofIngredients = sizeof($listOfIngredient);
$key = null;
// Begin Searching
$search = "http://food2fork.com/api/search?key=802d345... | true |
1657594cc1244b210782bf898407f239e19c56d1 | PHP | wjcgithub/drupal | /custom_chat/custom_chat.api.inc | UTF-8 | 1,444 | 2.609375 | 3 | [] | no_license | <?php
/**
* @param $chatarr(uid,chatname,token)
*
*/
function createChat($chatarr){
extract($chatarr);
$newChat = new customChat();
$newChat->set('uid',(isset($uid) && is_numeric($uid)) ? $uid : $GLOBALS['user']->uid);
$newChat->set('title',$chatname);
$newChat->set('token',$token);
$newChat->set('public... | true |
f626857abe6e5d0fa32204d5f1b21a29d43f8616 | PHP | Cyrkcyrk/ECEBay2020 | /account.php | UTF-8 | 5,054 | 2.65625 | 3 | [
"MIT"
] | permissive |
<?php
$erreur = "";
if($logged)
{
$adresses = null;
$sql = "SELECT * FROM `adresse` WHERE `OwnerID` = '" . $user["ID"] . "';";
$mysqli = new mysqli($_DATABASE["host"],$_DATABASE["user"],$_DATABASE["password"],$_DATABASE["BDD"]);
mysqli_set_charset($mysqli, "utf8");
if ($mysqli -> connect_errno) {... | true |
2426d6144b67a9a07f3bc64ca7bbd53e95b2defe | PHP | FabienBehra/GaleriePhoto | /controller/ajoutImage.php | UTF-8 | 2,788 | 2.84375 | 3 | [] | no_license | <?php
require_once("model/imageDAO.php");
/**
*
*/
class ajoutImage
{
protected $dao;
function __construct()
{
$this->dao = new ImageDAO();
global $data;
$data = new stdClass();
$data->menu['Home']="index.php";
$data->menu['A propos']="index.php?controller=home&action=aPropos";
$data-... | true |
8960c23182854ffbecb7e3beaa195d5ad15e6074 | PHP | bybrand/shortener-url | /src/Shorten.php | UTF-8 | 893 | 2.65625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Bybrand\ShortenerURL;
use Bybrand\ShortenerURL\ShortenInterface;
class Shorten
{
protected $provider;
public function __construct(ShortenInterface $provider)
{
$this->provider = $provider;
}
public function destination($string)
{
$this->provider->destination(... | true |
aaa131289e2b464138937b766ae907551530d167 | PHP | petrenkorf/file-storager | /src/Handlers/ModelFileHandler.php | UTF-8 | 1,412 | 2.78125 | 3 | [] | no_license | <?php
namespace Impacte\FileStorager\Handlers;
use Impacte\FileStorager\HasFiles;
class ModelFileHandler
{
protected $model;
protected $fileMap = [];
public function __construct(HasFiles &$model = null)
{
$this->model = $model;
$this->fileMap = $this->model->getStorageFolderMap();
... | true |
3ef9d668ee2b364e16c070187f1d677b399abd35 | PHP | fabioaraujopt/fire_planner | /app/auth.php | UTF-8 | 510 | 2.859375 | 3 | [] | no_license | <?php
class Auth{
#return
#user_id (if exists)
#null (if not exists)
public static function getMember($db,$email,$password )
{
try {
$query=$db->prepare('SELECT user_id FROM users where email=:email and password=:password ');
$query->execute([':email' => $email... | true |
ad56dd42eda7819464d39d7da4ad587249550b61 | PHP | botuniverse/php-libonebot | /src/OneBot/Driver/Interfaces/DriverInitPolicy.php | UTF-8 | 794 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace OneBot\Driver\Interfaces;
interface DriverInitPolicy
{
/**
* 多进程时在 Master 进程内执行 driver.init
*/
public const MULTI_PROCESS_INIT_IN_MASTER = 1;
/**
* 多进程时在 Manager 进程内执行 driver.init
* 如果没有 Manager 进程,则执行在 Master 进程内
*/
public const MULT... | true |
438c9153f4b9a89907187e32a0f450c05d51776a | PHP | jitongming/Memory-server | /app/controller/mobileController.php | UTF-8 | 10,043 | 2.515625 | 3 | [] | no_license | <?php
class mobileController extends Controller {
private $response = Array(
'ret' => 0,
'msg' => '',
'data' => Array()
);
private $inputArray;
public function __construct() {
$json = file_get_contents("php://input");
$inputArray = json_decode($json, TRUE);
if ($inputArray == NULL) {
$thi... | true |
89fb25d5c81b3971a73b72a93d914d73b5b9c321 | PHP | jin1852/shop | /Application/Shop/Model/AdvancesModel.class.php | UTF-8 | 1,331 | 2.515625 | 3 | [] | no_license | <?php
namespace Shop\Model;
class AdvancesModel extends BaseModel{
//配置数据表
public $Advances = 'jd_advances'; //广告主表
//获取banner数据
public function advances_list(){
//$Advances_list = M()->table($this->Advances)->where('status=0')->limit(5)->order('seriation desc,advanceId desc')->cache(true, $t... | true |
03d5fe9951158b1be98442bfbee6cadfa7a29cbf | PHP | kaiofelipe55/website-functions | /loja.php | UTF-8 | 1,388 | 2.703125 | 3 | [] | no_license | <?php
session_start();
require 'init.php';
$nome_produto = isset($_POST['nome']) ? $_POST['nome'] : null;
$quantidade_produto = isset($_POST['quantidade']) ? $_POST['quantidade'] : null;
$preco_produto = isset($_POST['preco']) ? $_POST['preco'] : null;
$descricao_produto = isset($_POST['descricao']) ? $_POST['descri... | true |
22016d05cf6f3707e4b7e5aa0a8dae7e07db9956 | PHP | er-jyotirmoy-nath/library_app | /app/PHP/db_connect.php | UTF-8 | 626 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
class db_connect {
protected $db, $sql, $query, $result, $row;
public function __construct() {
$tns = "(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521)))
(CONNECT_DATA =(SERVICE_NAME = XE)) )";
$db_username = "sa";
$db_password = "s... | true |
c922904c884a65b005d072804ce806e8f1e9119d | PHP | parijke/ResidenceCMS | /src/Dto/FeedbackDto.php | UTF-8 | 1,732 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Dto;
use Symfony\Component\Validator\Constraints as Assert;
final class FeedbackDto
{
/**
* @Assert\NotBlank()
* @Assert\Length(min="2", max="100")
*/
private ?string $from_name;
/**
* @Assert\NotBlank()
* @Assert\Email()
* @Ass... | true |
d938c4342fd3c214834a9cedfcd84df559cd8df7 | PHP | EDSM-NET/Process | /Record/FarthestSystemSagittarius.php | UTF-8 | 1,659 | 2.5625 | 3 | [] | no_license | <?php
/**
* Elite Dangerous Star Map
* @link https://www.edsm.net/
*/
namespace Process\Record;
use Process\Process;
class FarthestSystemSagittarius extends Process
{
static private $cacheKey = 'Statistics_SystemsController_FarthestSystemSagittarius';
static public function run()
{
... | true |
40cb2b0f258798ba82f47ff36e0495da51dc0109 | PHP | barkesaid/InterviewPractise | /3sums.php | UTF-8 | 800 | 3.78125 | 4 | [] | no_license | <?php
/*
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note: The solution set must not contain duplicate triplets.
For example, given array S = [-1, 0, 1, 2, -1, -4],
A solution set is:
[ [-1, 0, 1], ... | true |
e51967a009f877a9a9355743af3994b2f2885b9a | PHP | odolbeau/janephp | /src/OpenApi3/Tests/fixtures/api-platform-demo/expected/Endpoint/GetBookCollection.php | UTF-8 | 3,133 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace ApiPlatform\Demo\Endpoint;
class GetBookCollection extends \Jane\OpenApiRuntime\Client\BaseEndpoint implements \Jane\OpenApiRuntime\Client\Endpoint
{
/**
*
*
* @param array $queryParameters {
* @var array $properties[] Allows you to reduce the response to contain only the ... | true |
1553b58a6d0c03f20d573567e3353581ea3fce88 | PHP | jf-project-management/management-api | /tests/Core/HistoryTest.php | UTF-8 | 2,349 | 2.625 | 3 | [] | no_license | <?php
namespace App\Tests\Core;
use App\Entity\Feature;
use App\Entity\History;
use App\Entity\Task;
use App\Tests\CommonInitializer;
use App\Utils\Utils;
class HistoryTest extends CommonInitializer
{
public function testSimpleInitializer()
{
$feature = new Feature();
$history = new History(... | true |
93fc363253d1b27c99c9167534f5e580f48d933d | PHP | wen945/codeigniter-pratice | /application/controllers/Auth/RegisterController.php | UTF-8 | 4,564 | 2.796875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class RegisterController extends CI_Controller
{
function __construct(){
parent::__construct();
$this->load->helper('form');
$this->load->library('form_validation');
$this->load->library('session');
$this->load->m... | true |
07478898014b0223430e3c13e4c2dbd75f83d1f3 | PHP | clearidea/neuron | /tests/Util/LanguageTest.php | UTF-8 | 616 | 2.84375 | 3 | [] | no_license | <?php
class LanguageTest extends PHPUnit\Framework\TestCase
{
public function testLoad()
{
$Language = new \Neuron\Util\Language();
$this->assertTrue(
$Language->load(
"english,title,Awesome program
french,title,Programme genial"
)
);
$this->assertTrue(
$Language->getText( '', 'english' ) =... | true |
3bf04f6963c112dbcab4c339579d92dd56495301 | PHP | amiyasahu/laravel-settings | /src/Foundation/Setting.php | UTF-8 | 5,144 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
namespace Amiya\Setting\Foundation;
abstract class Setting
{
/**
* The application
*
* @var
*/
protected $app;
/**
* The settings data.
*
* @var array
*/
protected $settings = [ ];
/**
... | true |
e4181bd2fcf7618fc890d38004b49d4f71c98572 | PHP | mehdiFa-web/coding-challenge | /backend/app/Console/Commands/DeleteProduct.php | UTF-8 | 1,100 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\Services\ProductService;
use Illuminate\Console\Command;
class DeleteProduct extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'delete:product';
/**
* The console command... | true |
10bea8827b14ca3e481355ae8338eaade7b6af07 | PHP | apontador/Dojos | /campo-minado/test/CampoMinadoTest.php | UTF-8 | 2,459 | 2.8125 | 3 | [] | no_license | <?php
use Apontador\CampoMinado;
class CampoMinadoTest extends PHPUnit_Framework_TestCase
{
public function testUmaBomba()
{
$entrada = array(
array("*", "0", "0","0"),
array("0", "0", "0","0"),
array("0", "0", "0","0"),
array("0", "0", "0","0"),
);
$campoMinado = new CampoMinado($entrada);
... | true |
b51d0b104fcde9addf0bfe8dce19d8dff00d3c37 | PHP | JeffreyZhu983/qii | /src/Router/Parse/Regx.php | UTF-8 | 1,157 | 3.046875 | 3 | [] | no_license | <?php
namespace Qii\Router\Parse;
/**
* Route规则 支持正则表达式
*
* @author Jinhui Zhu<jinhui.zhu@live.cn>2015-10-24 23:11
* @version 1.2
*/
class Regx
{
const VERSION = '1.2';
private $config;
public function __construct()
{
}
public function setConfig($config)
{
$this->config = $config;
}
/**
* 匹配路由
... | true |
7f7e7467e602e798f49f333e24e6b891957c16f6 | PHP | mmohl/travel-paradep | /app/traits/StationAbleModelTrait.php | UTF-8 | 4,104 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace traits;
use \DB;
use \Stationed;
use \Station;
trait StationAbleModelTrait {
public function stationeds()
{
return $this->morphMany('Stationed', 'stationable');
}
protected function stateMachineConfig()
{
return [
'states' => [
'avalaible' =>... | true |
76e6efd71553a0ba6a48771ab907982796292121 | PHP | bigwhoop/sentence-breaker | /data/oed-export.php | UTF-8 | 722 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* Exports data from Oxford English Dictionary.
*
* @see http://public.oed.com/how-to-use-the-oed/abbreviations/
*/
require __DIR__ . '/../vendor/autoload.php';
use Goutte\Client;
use Symfony\Component\DomCrawler\Crawler;
$client = new Client();
$crawler = $client->request('GET... | true |
c1ced6873b1e010b55206f4f6a1aa41c9beb98c4 | PHP | HikmatullahEhsan/User-Location-Detection | /im_p/3.php | UTF-8 | 166 | 3.40625 | 3 | [
"MIT"
] | permissive | <?php
function secret($one){
$i=null;
$prod= 1;
for($i=1; $i<=3; $i++)
{
$prod=$prod*$one;
}
return $prod;
}
echo 2*secret(6);
?> | true |
d835fde10d68958860d56b876ec83482ec37f68f | PHP | stefancarlton/robotdemo | /src/robotdemo/Models/Instructions/InstructionAbstract.php | UTF-8 | 1,348 | 3.109375 | 3 | [] | no_license | <?php
namespace robotdemo\Models\Instructions;
use robotdemo\Interfaces\EnvironmentInterface;
use robotdemo\Interfaces\ObjectInterface;
use robotdemo\Exceptions\ObjectNotPlacedException;
abstract class InstructionAbstract
{
/**
* @TODO - these need to moved to a central location
*/
const NORTH = 'NORTH';
... | true |
8521919352e45b75ec5dd1914a9c8ae7e606f1da | PHP | vlasscontreras/php-trainer | /src/Principles/InterfaceSegregation/WorkableInterface.php | UTF-8 | 197 | 2.625 | 3 | [] | no_license | <?php
namespace Trainer\Principles\InterfaceSegregation;
interface WorkableInterface
{
/**
* Make this entity work
*
* @return void
*/
public function work(): void;
}
| true |
d5847adf31dc2bef33fda6095b1466873fcf0e8a | PHP | azis101/TiketKeretaApi | /tiket_jadwal2.php | UTF-8 | 862 | 2.6875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Jadwal</title>
</head>
<body>
<?php
include "konekdatabase.php";
$sql = "SELECT * FROM 09_kereta NATURAL JOIN 09_jadwal";
$result = $conn->query($sql);
?>
<table border="1" cellspacing="1" cellpadding="4">
<tr bgcolor="#3cff00">
<th>Kode Jadwal</th>
<th>Nama Kere... | true |
48a643c3ace79e6fa11bf0efd459dd82a360dcf8 | PHP | raulvictorrosa/lojavirtual | /cdg/model/model_menu_2.php | UTF-8 | 246 | 2.546875 | 3 | [] | no_license | <font face="Arial, Helvetica, sans-serif">
<?php
while ($registro = mysql_fetch_array($query)) {
echo "<a href='../index.php?categoria=" . $registro['id'] . "'>";
echo $registro['categoria'] . "</a>";
echo " <br /><br />";
}
?>
</font>
| true |
bdcdefb7fca055b8b2c9da718e0f33495439a72e | PHP | fireproofsocks/jenerator | /src/Generators/StringGenerator.php | UTF-8 | 1,623 | 3 | 3 | [] | no_license | <?php
namespace Jenerator\Generators;
use Jenerator\FormatFaker\FormatFakerFactoryInterface;
use Jenerator\JsonSchemaAccessor\JsonSchemaAccessorInterface;
use Jenerator\RandomString\RandomStringInterface;
use Jenerator\ReverseRegex\ReverseRegexInterface;
class StringGenerator implements GeneratorInterface
{
/**
... | true |
044e7af9d2c69c60ddf91872cdf1e1eb1210f1d3 | PHP | Dyziekd/Jobster | /jobster/classes/profile.php | UTF-8 | 2,714 | 3.046875 | 3 | [] | no_license | <?php
include_once '../config/dbConnection.php';
class Profile
{
private $db;
private $profileTable = "profile";
public function __construct()
{
$this->db = new Connection();
}
// create profile (insert new profile into data... | true |
28c7fa6ba233076d0b591e98c524f22baf3dd4f3 | PHP | thpr/doorapp | /var-www-html/action_page.php | UTF-8 | 712 | 2.765625 | 3 | [] | no_license | <html>
<body>
<?php
$name = $pw = "";
$pwhash = "abc";
$name = test_input($_POST["name"]);
$pw = test_input($_POST["psw"]);
$dbpw = "xyzzy"
$db = new mysqli('127.0.0.1', 'root', $xyzzy, 'doorapp', 3306);
if (mysqli_connect_errno())
{
$errmsg = mysqli_connect_error()
echo "Fail to connect to user database $errmsg... | true |
184719bd66875b26b335f7ba5a57978b1258af62 | PHP | LEmanRUS17/Practice_code | /Practice_PHP_code/PHP tutorial for beginners/Регулярки/task22/task3.php | UTF-8 | 115 | 2.53125 | 3 | [] | no_license | <?php
$str = 'aba aca aea abba adca abea';
echo $str.'<br>';
echo preg_replace('#ab.a#', '!', $str);
?> | true |
5247fa3c2cd773b9ebcf70572becd79d5506f895 | PHP | denisprust/teste-elian | /app/Core/Controller.php | UTF-8 | 1,578 | 3.109375 | 3 | [] | no_license | <?php
namespace TesteElian\Core;
class Controller {
/** @var string Diretório onde será buscado o arquivo da view */
private $viewDir;
/** @var array Array de variaveis que serão enviadas para a view */
private $vars = [];
function __construct()
{
$this->setViewDir();
}
/**
... | true |
3482e589279a9d63f465f573f19c85e0cee0afff | PHP | Daniel-Ola/File-unzipper-download | /downloader.php | UTF-8 | 958 | 2.65625 | 3 | [] | no_license | <?php
if(!isset($_GET['file']))
{
header("location: download.php") ;
}
else
{
$folderCode = $_GET['file'] ;
$folder = base64_decode($folderCode) ;
// echo $folder;
$files = glob($folder."/*.*") ;
// print_r($files) ;
for($i = 0 ; $i <= count($files)-1 ; $i++)
{
$myFile = $files[$i];
echo $myFile;
$fileTy... | true |
5712f1ef23584e902b7ec8017815bbf7681d1348 | PHP | gurungbee/unitenepal | /classes/User.class.php | UTF-8 | 8,617 | 2.9375 | 3 | [] | no_license | <?php
/**
* User class for linknect.com
* @author Rabi Thapa
* @version 1.1 2014
*/
class User{
private $id;
private $username;
private $email;
private $pwd;
private $realname;
private $realsurname;
private $ip;
private $lastlogin;
private $activated;
private $joindate;
private $fbid;
private $img;
p... | true |
d97b8c581eb2b68bf25bd94bc82e12260fe6064b | PHP | katsuyoshiaiko/facturasphp | /www/clients/functions.php | UTF-8 | 3,965 | 2.53125 | 3 | [] | no_license | <?php
// plugin = clients
// creation date :
//
//
function clients_field_id($field, $id) {
global $db;
$data = null;
$req = $db->prepare("SELECT $field FROM clients WHERE id= ?");
$req->execute(array($id));
$data = $req->fetch();
//return $data[0];
return (isset($data[0]))? $data[0] : f... | true |
17a83bcd4f56453728d49af1fdb78ac6e9c32f34 | PHP | DeltaCorporate/teachers | /api/src/Entity/Disponibilites.php | UTF-8 | 950 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\DisponibilitesRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=DisponibilitesRepository::class)
*/
class Disponibilites
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/... | true |
57f06835d2a3abbb85247e9ed0fea2e059d5633e | PHP | adoy/php-src | /ext/dom/tests/bug80602_2.phpt | UTF-8 | 5,387 | 2.515625 | 3 | [
"PHP-3.01",
"IJG",
"Zlib",
"OLDAP-2.8",
"BSD-4-Clause-UC",
"ISC",
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-public-domain",
"TCL",
"BSD-2-Clause",
"GD"
] | permissive | --TEST--
Bug #80602 (Segfault when using DOMChildNode::after())
--FILE--
<?php
declare(strict_types=1);
$doc = new \DOMDocument();
$doc->loadXML('<a>foo<last/></a>');
$target = $doc->documentElement->firstChild;
$target->after($target);
echo "1 ", $doc->saveXML($doc->documentElement).PHP_EOL;
$doc = new \DOMDocument(... | true |
7a8575aeae7e3001c274cf9ad5ded5cd2842b1f4 | PHP | phpcircus/glowinggrace_beta | /app/Http/Actions/Auth/Login.php | UTF-8 | 840 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Actions\Auth;
use BrightComponents\Actions\Action;
use App\Http\Requests\Auth\LoginRequest;
use App\Http\Responders\Auth\LoginResponder;
class Login extends Action
{
/** @var \App\Http\Responders\Auth\LoginResponder */
private $responder;
/**
* Construct a new Login action.... | true |
b634712c9ef52295de779ead80a70fa1902b15ec | PHP | nuriakman/ab2018 | /hazinede-php-egitimi/dbtest/okul.listele4.php | UTF-8 | 787 | 2.8125 | 3 | [] | no_license | <?php
// Okulları listeleme 3 adımda yapılır.
// 1. Bağlan
// 2. SQL Çalıştır
// 3. Sonuçları ekrana yaz
// ADIM 1
require("vt_baglan.php");
// ADIM 2
$SQL = "SELECT distinct sehir FROM okullar ORDER BY sehir";
$SONUC = mysqli_query($VT, $SQL);
// if(mysqli_num_rows($SONUC) > 0)
?>
<h1>Üniversiteleri List... | true |
3e0cb1d4da1b1c7f1a1c78f84b3014b40f31f622 | PHP | damienlorthiois/blogDamien | /Model/Post.Class.php | UTF-8 | 2,270 | 2.796875 | 3 | [] | no_license | <?php
class Model_Post
{
public $db;
function __construct()
{
$this->db = new Helper_Database();
}
public function getPost($id)
{
return $this->db->queryOne("select * from post WHERE id = ?", array($id));
}
public function getLatestPost($limit=5, $offset=0)
{
return $this->db->query(
"select post.i... | true |
6c8d26986c768bf80b083f3ef72b8721d12af6dd | PHP | mr-asad92/cms | /ilm/application/models/Programs_model.php | UTF-8 | 786 | 2.671875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Hafiz Ali Hamza
* Date: 8/15/2018
* Time: 5:50 PM
*/
class Programs_model extends CI_Model
{
public function getPrograms()
{
$q = $this->db->get('programs');
return $q->result();
}
public function add_program($data)
{
return $th... | true |
2b31349bb434c45acf79c2aa1702fda20ba46ecc | PHP | tadasuke/akatsuki | /AK_Gadget.php | UTF-8 | 6,850 | 3.25 | 3 | [] | no_license | <?php
class AK_Gadget {
/**
* 日付形式変更
* @param string $date
* @param string $format
*/
public static function dateFormat( $date, $format = 'YmdHis' ) {
$time = strtotime( $date );
return ($time === FALSE) ? NULL : date( $format, $time );
}
/**
* 残り時間取得処理
* YmdHis形式の時刻の差を秒数で求める
* @param i... | true |
853ae8398711db18052b83fcc8b0ad7ea0fe3781 | PHP | briath/web-my_fr | /web/src/model/Users.php | UTF-8 | 966 | 3.140625 | 3 | [] | no_license | <?php
class Users implements MemberRepository
{
private $link;
private $user = 'root';
private $pass = '01151522223m';
public function __construct()
{
try{
$this->link = new PDO('mysql:host=localhost;dbname=ProPUBG_databases', $this->user, $this->pass);
} catch (PDO... | true |
859f56d3d561e2dc86d255689a015eee996c8448 | PHP | kajalebiz/kerry_local | /kb18/inc-old/_helpers/tribe-events.php | UTF-8 | 1,860 | 2.640625 | 3 | [] | no_license | <?php
// Funtion to check if we are on a tribe events page
function is_event_calendar_page() {
if ( class_exists( 'TribeEvents' ) ) {
$is_event_calendar = false; // Default is false so if everything falls through it returns that it is not an EC page
if ( tribe_is_month() && ! is_tax() ) { // Month View Page
... | true |
3f290f1e1aa600feeeddcde0294dd0c4e3afa100 | PHP | LeandroCGMS/DesenvolvimentoWeb | /funcoes.php | UTF-8 | 839 | 2.65625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/aulas.css">
<title>Funções PHP</title>
<script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
<Script type="text/javascript" src="js/aula/index.js"></script>
<body>
<div>
<?php
... | true |
ca7b2fd4ca10c49db2fda85d7273dee1f02b84aa | PHP | polandj/securetomato | /release/src/router/php/ext/posix/tests/posix_getgrnam_basic.phpt | UTF-8 | 494 | 2.578125 | 3 | [
"BSD-3-Clause",
"BSD-4-Clause-UC",
"Zlib",
"ISC",
"LicenseRef-scancode-other-permissive",
"TCL",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"JSON",
"LicenseRef-scancode-pcre",
"blessing",
"PHP-3.01"
] | permissive | --TEST--
posix_getgrnam(): Basic tests
--SKIPIF--
<?php
if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
if (!function_exists('posix_getgrnam')) die('skip posix_getgrnam() not found');
?>
--FILE--
<?php
echo "Basic test of POSIX posix_getgrnam function\n";
var_dump(posix_getgrnam(NULL));
v... | true |
c5f91ea54a4163dcac05f093f5b5e5f9b112a21a | PHP | ktb702/it261 | /calculator.php | UTF-8 | 4,350 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Calculator</title>
<style>
form{
width: 350px;
margin: 0 auto;
background: beige;
}
.header{
margin: 0 auto;
text-align: center;
}
... | true |