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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
dae3dc58fd1524d216fca44a63667a8a119a6b82 | PHP | herdita/belajar-php | /2_Intermediate_php/6_contoh_login.php | UTF-8 | 897 | 2.765625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<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>Document</title>
</head>
<body>
<form action="" method="post">
<input type="text" nam... | true |
83f4f2459211de3d2615e6ea0c160eb340462795 | PHP | box4pes/pes | /src/Application/UriInfoFactory.php | UTF-8 | 3,228 | 2.9375 | 3 | [] | no_license | <?php
/*
* Copyright (C) 2019 pes2704
*
* This is no software. This is quirky text and you may do anything with it, if you like doing
* anything with quirky texts. This text is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FI... | true |
1364293f75736f7c8b7841f647c176e2ee8f7850 | PHP | onacvooe/HautoNL | /app/Http/Controllers/RoomsController.php | UTF-8 | 1,411 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
//use Illuminate\Http\Request;
use App\Room;
class RoomsController extends Controller
{
public function index()
{
$rooms = \App\Room::all();
return view('dashboard.rooms.index', compact('rooms'));
}
public function create()
{
return vie... | true |
99e98507d7ec7e4425ab7b2233ae3c716df48336 | PHP | oworyoakim/eshop | /app/Http/Middleware/TenantConnection.php | UTF-8 | 3,476 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use App\Models\Business;
use App\Models\Tenant\Employee;
use App\Models\Tenant\Role;
use App\Repositories\System\IBusinessRepository;
use Illuminate\Support\Facades\Config;
use Closure;
use Illuminate\Support\Facades\DB;
use Exception;
use PDOException;
use Sentinel;
class Tenant... | true |
f9aa810e5c2ec2c02928e547e4a2a9ba54573864 | PHP | corollari/UAB_projects | /3A1S/TDIW/vscomponentes/controllers/controllerUserPanel.php | UTF-8 | 1,571 | 2.515625 | 3 | [] | no_license | <?php
session_start();
if(isset($_COOKIE['username']) && isset($_COOKIE['password']))
{
require("../model/model.php");
$stmt = $DB->getUserData($_COOKIE['username'], $_COOKIE['password']);
/* vincular variables a la sentencia preparada */
$stmt->bind_result($name, $username, $password, $email, $stre... | true |
2a3a131844ed2ac37bd8998867648734d0ef0e8f | PHP | baobeiboboda/efan_admin | /Application/Home/Model/User/ModuleModel.class.php | UTF-8 | 1,921 | 2.796875 | 3 | [] | no_license | <?php
namespace Home\Model\User;
use Think\Model;
/**
* 员工管理中用到的功能模块模型
* Class ModuleModel
* @package Home\Model\User
*/
class ModuleModel extends Model
{
/**
* 根据url和key查询module数量
* @param $url 请求的url
* @param $key 标识
* @return mixed 返回module数量
*/
public function getCountByUrlAn... | true |
b8d9623fef06728d7a3caae05a4946577a493102 | PHP | zanner-own-archive/php-zcms | /core/kernel/location/location.php | WINDOWS-1251 | 24,502 | 2.609375 | 3 | [] | no_license | <?
class Z_LOCATION
{
final static private function array_merge(&$target, $source, $flag = 0, $I = 0)
{
$__FUNCTION__ = __FUNCTION__;
if ((int)$I > 1000) throw new Exception('Location::array_merge. Is to depth (iteration = ' . $I . ').');
elseif (is_array($target) && is_array($source))
{
$return = true;
... | true |
1063fce918b78ec2e6c2187d6a76fa44c8878500 | PHP | ManniManfred/liga-manager | /Backend/services/upload.php | UTF-8 | 637 | 2.921875 | 3 | [] | no_license | <?php
require_once("config.php");
foreach ($_FILES as $key => $file)
{
if ($file["error"] > 0)
{
echo "Return Code: " . $file["error"] . "<br />";
}
else
{
echo "Upload: " . $file["name"] . "<br />";
echo "Type: " . $file["type"] . "<br />";
echo "Size: " . ($file["size"] / 1024) . "... | true |
a8846feb1e1c3ae4d498f6143d29dc25b5628257 | PHP | yosuagrs/belajar-php-fungsi-dan-variabel-.-dasar-php | /variabel fungsi dan jenis pemanggilannya.php | UTF-8 | 1,667 | 3.84375 | 4 | [] | no_license | <!-- bagian ini akan menjelaskan mengenai variable-->
<!-- php berada di dalam <?php ?> -->
<?php
// ini adalah comment dimana ini tidak akan dibaca oleh kodde
// hal pertama yang perlu di ketahui adalah membuat variabel, menggunakan $
$name = "hello";
//variabel pada php tidak p... | true |
bf7f2df93821a06de621728621dbc538e932aae3 | PHP | wirtsi/Bancha | /_Model/Movie.php | UTF-8 | 810 | 2.53125 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | <?php
class Movie extends AppModel {
var $name = 'Movie';
var $validate = array(
'director_id' => array('numeric'=>array('rule'=>'numeric','message'=>'Invalid director')),
'name' => array('notempty'),
'year' => array('numeric'=>array('rule'=>'numeric','message'=>'Must be a year'))
);
//The Associations belo... | true |
62c364ff1aeb7a8dbcdd04ef901ca836d60d0cf9 | PHP | decodelabs/glitch | /src/Glitch/Dumper/Inspect/Ds.php | UTF-8 | 1,375 | 2.65625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* @package Glitch
* @license http://opensource.org/licenses/MIT
*/
declare(strict_types=1);
namespace DecodeLabs\Glitch\Dumper\Inspect;
use DecodeLabs\Glitch\Dumper\Entity;
use DecodeLabs\Glitch\Dumper\Inspector;
use Ds\Collection;
use Ds\Pair;
use Ds\Set;
class Ds
{
/**
* Inspect Collection... | true |
7281eb5cde9ef00e1d231aa9dfaa588543875f60 | PHP | kirubha7/cloudwatch-logs-laravel | /src/Cloudwatchlogs.php | UTF-8 | 7,907 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace kirubha7\CloudwatchLogsLaravel;
use Aws\CloudWatchLogs\CloudWatchLogsClient;
class Cloudwatchlogs{
/***Description */
const DESCRIPTION = 'Cloudwatch Logs Laravel';
/**Version */
const VERSION = 'v1.0';
/**AWS clinet SDK params*/
private $client;
/**Success Status */
con... | true |
446d709c449b47c19ce473f4641925ade5c96663 | PHP | async-aws/aws | /src/Service/CognitoIdentityProvider/src/Input/AdminConfirmSignUpRequest.php | UTF-8 | 5,497 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace AsyncAws\CognitoIdentityProvider\Input;
use AsyncAws\Core\Exception\InvalidArgument;
use AsyncAws\Core\Input;
use AsyncAws\Core\Request;
use AsyncAws\Core\Stream\StreamFactory;
/**
* Confirm a user's registration as a user pool administrator.
*/
final class AdminConfirmSignUpRequest extends Input
{... | true |
32edeffb2e0883d37504dc3c4eebfce5e4dc0c74 | PHP | davidyuan7536/FFM | /site/admin/pictures-upload.php | UTF-8 | 9,180 | 2.625 | 3 | [] | no_license | <?php
ini_set("html_errors", "0");
if (!isset($_FILES["Filedata"]) || !is_uploaded_file($_FILES["Filedata"]["tmp_name"]) || $_FILES["Filedata"]["error"] != 0) {
echo getErrorJSON('Invalid upload');
exit(0);
}
require_once "../global.php";
$tempFile = $_FILES["Filedata"]["tmp_name"];
$info = pathinfo($_FILES... | true |
be495ffeed7cdc3367cead9caceacc2f6be32bfc | PHP | spooner77/dream-cms | /module/Application/src/Application/Utility/ApplicationDisableSite.php | UTF-8 | 1,729 | 2.640625 | 3 | [] | no_license | <?php
namespace Application\Utility;
use Acl\Model\AclBase as AclBaseModel;
use Application\Service\ApplicationSetting as SettingService;
use User\Service\UserIdentity as UserIdentityService;
use Zend\Http\PhpEnvironment\RemoteAddress;
class ApplicationDisableSite
{
/**
* Is allowed to view the site
*
... | true |
aadf3439d9ee7dce6fd41535e426fe9382ad4883 | PHP | lw222gz/Php_A_Shitty_Monday | /Application/view/RegisterView.php | UTF-8 | 4,487 | 3 | 3 | [] | no_license | <?php
class RegisterView{
private static $RegisterID = "RegisterView::Register";
private static $UserNameID = "RegisterView::UserName";
private static $PasswordID = "RegisterView::Password";
private static $PasswordCheckID = "RegisterView::PasswordRepeat";
private static $messageID = "Register... | true |
d7af8d6c2c9060786ff8604e6fe61d488aa9511d | PHP | nicola-felice/php-snacks-b1 | /snack-1/index.php | UTF-8 | 1,156 | 3 | 3 | [] | no_license |
<?php
// Creiamo un array contenente le partite di basket di un’ipotetica tappa del calendario.
// Ogni array avrà una squadra di casa e una squadra ospite, punti fatti dalla squadra di casa e punti fatti dalla squadra ospite.
// Stampiamo a schermo tutte le partite con questo schema.
// Olimpia Milano - Cantù | 55... | true |
486fdf4a5881750f27c884940c1151e290e1835f | PHP | fmales/Gamificacion | /problemon_frontend/data/Recursos/Funciones/Excel.php | UTF-8 | 4,175 | 2.78125 | 3 | [] | no_license | <?php include $_SERVER['DOCUMENT_ROOT'] . "/global.php" ?>
<!DOCTYPE html>
<html>
<head>
<title>Leer Archivo Excel</title>
<link rel="stylesheet" href="../css/estilos.css">
</head>
<body>
<?php
include './CurlRequest.php';
require_once './PHPExcel/Classes/PHPExcel.php';
$url = $host_url; //"localhost... | true |
4a41be0ae8d66bf7d4ae6a4e09b538d6ce7569ce | PHP | devious507/member | /index.php | UTF-8 | 4,287 | 2.59375 | 3 | [] | no_license | <?php
require_once("project.php");
$db = myDB();
if(isset($_POST['search'])) {
unset($_POST['search']);
foreach($_POST as $k=>$v) {
$v=preg_replace("/\*/",'%',$v);
$v=preg_replace("/\?/",'%',$v);
if($v != '') {
if(preg_match("/%/",$v)) {
switch($k) {
case "NameLast":
$wheres[] = "({$k} LIKE '... | true |
f652cf09ef9ff867bdbbf7a115075fc6d00ff4ee | PHP | encinecarlos/box4buy | /app/Lib/ProductServices.php | UTF-8 | 592 | 2.703125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: carlos
* Date: 28/02/19
* Time: 11:58
*/
namespace App\Lib;
class ProductServices
{
public static function totalizaProdutos()
{
$totalProdutos = 0;
$totalPeso = 0;
$produtos = session('produtos');
if($produtos)
{
... | true |
c061972e9c0ed1751590563fd898f3aed0f45661 | PHP | romanbatavi/knn-pm-skr | /guru/dataset_import.php | UTF-8 | 4,261 | 2.578125 | 3 | [] | no_license | <div class="container-fluid">
<div class="row">
<div class="col-12">
<div class="portlet">
<div class="portlet-header portlet-header-bordered">
<h3 class="portlet-title">Import Dataset</h3>
</div>
<div class="portlet-body">
<!-- <p>
In this example you can see Datatable doing bo... | true |
a875cb2bd1235110102b220361d0a4cf7670f0e5 | PHP | SelviBalaB/Laravel-custom-registration | /app/Http/Controllers/CustomAuthController.php | UTF-8 | 687 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\User;
class CustomAuthController extends Controller
{
//
public function ShowRegisterForm()
{
return view('custom.register');
}
public function Register(Request $request)
{
$this->validation($request);
... | true |
94fb525fa5e04c73da97e91bc6f66251d4e304f0 | PHP | ferodss/salesforce-api | /src/Api/Bulk/XmlEntity.php | UTF-8 | 1,218 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Salesforce\Api\Bulk;
/**
* Abstract Xml entity
*
* @author Felipe Rodrigues <lfrs.web@gmail.com>
*/
abstract class XmlEntity implements XmlSerializable
{
/**
* XML representation of this entity
*
* @var \SimpleXMLElement
*/
protected $xml;
/**
* {@inheritDoc}
... | true |
f5c3ef98a4d07f7793408f9b4d6af0adcd4edae2 | PHP | nandom5/Proyecto | /ModificarCatalogo/ModificarMunicipio/listarMunicipio.php | UTF-8 | 1,305 | 2.828125 | 3 | [] | no_license | <?php
include_once "../../BaseDatos/database_connection.php";
$sentencia = $connect->query("SELECT * FROM tb_cat_municipios;");
$personas = $sentencia->fetchAll(PDO::FETCH_OBJ);
?>
<!--Recordemos que podemos intercambiar HTML y PHP como queramos-->
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title... | true |
37e920c67b53b371aae321c095b83e5d3e5474b7 | PHP | Marwa124/ego_laravel_application | /app/Models/DeliveryState.php | UTF-8 | 847 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Models;
use Eloquent as Model;
/**
* Class DeliveryAddress
* @package App\Models
* @version December 6, 2019, 1:57 pm UTC
*
* @property \App\Models\User user
* @property string description
* @property string address
* @property string latitude
* @property string longitude
* @property bo... | true |
5242ac63747404d2c03ebda0a1083edd8f1e3083 | PHP | Raspfarbend/RPi-Jukebox-RFID | /htdocs/index.php | UTF-8 | 5,417 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
include("inc.header.php");
/*******************************************
* START HTML
*******************************************/
html_bootstrap3_createHeader("en","Phoniebox",$conf['base_url']);
?>
<body>
<div class="container">
<?php
include("inc.vlcStatus.php");
?>
<?php
include("inc.navigation.php");
... | true |
8c2acf4784450befc9ff57623f22bb83177616b5 | PHP | haideralise/events-api | /app/Models/Roster.php | UTF-8 | 2,023 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphTo;
/**
* Class Roster
* @package App\Models
*/
class Roster extends Model
{
/**
* @return Mor... | true |
fb91f1847607edd35310d96a3012bd0956f0e10e | PHP | karispk/synologylyric | /tests/FujirouLyricWikiTest.php | UTF-8 | 694 | 2.578125 | 3 | [] | no_license | <?php
declare (strict_types = 1);
require_once 'LyricsTestCase.php';
final class FujirouLyricWikiTest extends LyricsTestCase
{
protected $module = 'FujirouLyricWiki';
public function testSearch()
{
$artist = 'taylor swift ';
$title = 'style';
$answer = array(
'artist'... | true |
44f85bcb9b028ba9750460e7909f249125de58e6 | PHP | fusion52/laravel-likeable | /src/Favoriteable.php | UTF-8 | 4,184 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Fusion52\Favoriteable;
/**
* Copyright (C) 2016 Fusion52 Team
*/
trait Favoriteable
{
/**
* Boot the soft taggable trait for a model.
*
* @return void
*/
public static function bootFavoriteable()
{
if(static::removeFavoritesOnDelete()) {
static::deleting(function($model) {
$model... | true |
e70d84b326c8d4a6b513c01a49e3c99833402e7e | PHP | tomeksadzik/coordinates-rest-api | /src/Service/PointProviderInterface.php | UTF-8 | 289 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Entity\Point;
interface PointProviderInterface
{
/**
* @param int $pointId
* @return Point
*/
public function getPoint(int $pointId): Point;
/**
* @return Point[]
*/
public function getAllPoints(): array;
} | true |
560193efd98fed0e521a73bec5cc1dbb8eedddc8 | PHP | itsmenayrb/webdev-project | /controller/RegisterController.php | UTF-8 | 855 | 2.59375 | 3 | [] | no_license | <?php
session_start();
require_once '../classes/Config.php';
require_once '../classes/Register.php';
$config = new Config();
if(isset($_POST['register']))
{
$username = $config->checkInput($_POST['username']);
$email = $config->checkInput($_POST['email']);
... | true |
4ef6f3248f2fd56a272b6dc9f158b4876fd17ddc | PHP | hilyb/test_online | /test.php | UTF-8 | 2,761 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* User: liyubing
* Date: 2018/4/21
* 在线答题考试功能处理
*/
//error_reporting(E_ALL ^ E_NOTICE);
session_start();
header("Content-type:text/html;charset=utf-8");
$data=require "./data/data.php";
$studentid = $_POST['studentid'];
$name = $_POST['name'];
$_SESSION['studentid'] = $studentid;
$_SESSION[... | true |
ff5e628090a2726463ccedb539d4d5de864efc3d | PHP | Candy128x/phpBasic | /SortingAll/InsertionSort.php | UTF-8 | 429 | 3.734375 | 4 | [] | no_license | <?php
function insertionSort($arr)
{
$n = count($arr);
for($i=0; $i<$n; $i++)
{
$val = $arr[$i];
$j = $i-1;
while($j>=0 && $arr[$j]>$val)
{
$arr[$j+1] = $arr[$j];
$j--;
}
$arr[$j+1] = $val;
}
return $arr;
}
$arr = array(7,8,5,2,4,6,3);
echo "UnSorted Array: <br>".imp... | true |
daf9cd46cae7f9e610bb18ca3d4b6fd9f30869f1 | PHP | im7md3/Queue-Management-System | /app/Repository/QueueRepository.php | UTF-8 | 153 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repository;
interface QueueRepository
{
public function all();
public function store($queue);
public function clear();
} | true |
ad5d2a7548ba292b2984b4bd52e864fe8fdc62e0 | PHP | karlosdiaz99/BOLSAT | /consulta_busqueda.php | UTF-8 | 1,452 | 2.828125 | 3 | [] | no_license | <?php
/////// CONEXIÓN A LA BASE DE DATOS /////////
require('conexion.php');
if ($conexion1 -> connect_errno)
{
die("Fallo la conexion:(".$conexion1 -> mysqli_connect_errno().")".$conexion1-> mysqli_connect_error());
}
//////////////// VALORES INICIALES ///////////////////////
$tabla="";
$query="SEL... | true |
15f02c68c634b35c5c01db51be8215f6ee6bd297 | PHP | ckhero/coca | /frontend/module/v1/swagger/model/user.php | UTF-8 | 823 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @SWG\Definition(required={}, type="object", @SWG\Xml(name="user"))
*/
class user
{
/**
* @SWG\Property(description="用户的可乐id")
* @var int
*/
private $coca_id;
/**
* @SWG\Property(description="积分")
* @var int
*/
private $point;
/**
* @SWG\Property(d... | true |
f8919a7800265833c82109552f23f0e9d068bff9 | PHP | studiokam/verbs | /application/Application/Service/Words/GetListService.php | UTF-8 | 384 | 2.84375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace application\Application\Service\Words;
use application\Domain\Model\Words\WordsRepositoryInterface;
class GetListService
{
private $wordsRepo;
public function __construct(WordsRepositoryInterface $wordsRepo)
{
$this->wordsRepo = $wordsRepo;
}
/**
* @return array
*/
public function exe... | true |
9304dee2ab5eae588d461e00917ff392d144ed0b | PHP | juliette1994/etna-movies | /etna_movies.show_student.php | UTF-8 | 373 | 2.671875 | 3 | [] | no_license | <?php
require_once('includes/student.utils.php');
if ($argc == 1)
student_show_all();
elseif ($argc == 2)
{
if (!student_validate_login($argv[1]))
puts($argv[1] .': is not a valid login.');
elseif (!student_exists($argv[1]))
puts($argv[1] .': student does not exist.');
else
student_show($argv[1]);
}
else
put... | true |
d07e0f894381afc87fb8ceb43ea984d0936b3e89 | PHP | seclab-fudan/TEFuzz | /CodeWrapper/main.php | UTF-8 | 14,271 | 2.515625 | 3 | [] | no_license | <?php
require 'vendor/autoload.php';
use PhpParser\Error;
use PhpParser\NodeDumper;
use PhpParser\ParserFactory;
use PhpParser\Lexer;
use PhpParser\Parser\Tokens;
const UNIQUE_STRING = 'Un1QuE';
const EXEC_CODE = <<<'CODE'
phpinfo();
CODE;
const COMMENTS_TOKENS=array(376,377,378,379);
const FUNCTION_CLASS = array('... | true |
9e4e1e6e1698264f5552c2afc06ba3a6b2937d53 | PHP | wkollernhm/openup | /protected/components/Sources/HebrewLinda.php | UTF-8 | 1,125 | 2.75 | 3 | [] | no_license | <?php
/**
* Hebrew names
*
* @author wkoller
*/
class HebrewLinda extends SourceComponent {
public function query($term) {
$response = array();
// find all fitting entries
$models_sourceHebrewLinda = SourceHebrewLinda::model()->findAllByAttributes(array(
'CleanScient... | true |
a1737d8595e690c7c6c860c51d832fd0bc284254 | PHP | skamz/healer-simc | /include/Generators/priest_dc.php | UTF-8 | 1,435 | 2.625 | 3 | [] | no_license | <?php
require_once(dirname(__DIR__, 2) . "/autoloader.php");
function startRotation($rotation) {
echo "add: " . $rotation . "<br>\n";
Database::getInstance()->query("insert ignore into priest_dc set rotation='{$rotation}'");
}
function fillStates($startPath) {
$firstState = [
"spells" => [
17 => ... | true |
7745f2f537d4dcd9c86fd0227b12255e4a993211 | PHP | olvisdevalencia/intivefdvtest | /tests/Feature/rentBikesTest.php | UTF-8 | 2,193 | 2.5625 | 3 | [] | no_license | <?php
namespace Tests\Feature;
use Tests\TestCase;
use DateTime;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class rentBikesTest extends TestCase
{
/**
* Test to rent bikes by dates
... | true |
6c7d4664777dfafb6e4da5c11b328ac620db33eb | PHP | pawlowaleks/yii_blog | /common/models/db/BaseArticle.php | UTF-8 | 1,035 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models\db;
use Yii;
/**
* This is the model class for table "article".
*
* @property int $articleId
* @property string $title
* @property string $content
* @property int $userId
* @property string $createdAt
*/
class BaseArticle extends \yii\db\ActiveRecord
{
/**
* {@inheritdo... | true |
fe729b547a706d4b859c181e605d454ff513b155 | PHP | cspray/yape-dbal | /src/AbstractEnumType.php | UTF-8 | 2,894 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Cspray\Yape\Dbal;
use Cspray\Yape\Exception\InvalidArgumentException;
use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Types\ConversionException;
use Doctrine\DBAL\Types\Type;
/**
* An implementation of a Doctrine DBAL Type that encapsulates common functionali... | true |
efc4f7dfb83cf8e5ff543a96eacf7c45bda57de6 | PHP | lijias/web | /WWW/PSD1608/PHP/day09/upload02.php | UTF-8 | 754 | 2.609375 | 3 | [] | no_license | <?php
header('Content-Type:text/html;charset=utf-8');
include 'inc/common.function.php';
echo '<pre>';
print_r($_FILES);
echo '</pre>';
//上传的文件名称
/* echo $_FILES['pic']['name']; */
// 1. 判断上传是否为 0 成功
if($_FILES['pic']['error']==0){
//2.避免上传文件名称冲突,重命名唯一标识文件名称
// 2.1 获得上传文件名称
$filename = $_FILES['pic']['... | true |
23a6f26e5958104b1c7eeaac19bbc0039d48613f | PHP | anton-pribora/ap.admin | /src/components/ApCode/classes/Session/Session.php | UTF-8 | 1,966 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Anton Pribora <anton.pribora@gmail.com>
* @copyright Copyright (c) 2018 Anton Pribora
* @license https://anton-pribora.ru/license/MIT/
*/
namespace ApCode\Session;
class Session
{
private $started;
public function append($path, $value)
{
if ($this->has($path)) {
... | true |
fda2a9edfccdcebfe396259b44af1c1cc8efc206 | PHP | LaunaKay/codingdojoserver | /Quotes/quotes.php | UTF-8 | 1,141 | 2.515625 | 3 | [] | no_license | <?php
session_start();
date_default_timezone_set('America/Los_Angeles');
require_once('new_connection.php');
//================ SET VARIABLES ==================
global $connection;
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Quotes!</title>
<meta name="description" cont... | true |
92fe3f0adb347fa061692930385429b80b8b7b4f | PHP | franksantos/webaluno | /app/Http/Requests/AlunoRequest.php | UTF-8 | 746 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Http\Requests\Request;
class AlunoRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules ... | true |
be40f3cfd5b9485fba29817433deb1829e2821bc | PHP | Irina7Arina7Sillamae/MVC_2_model | /controller/Controller.php | UTF-8 | 1,277 | 2.8125 | 3 | [] | no_license | <?php
class Controller{
//Отрывается стартовая страница и выводит main.php
public static function StartSite(){
include 'view/main.php';
}
//Подключается Model нужно сходить за данными (getBookList)
public static function BookList() {
$booksList = Model::getBookList();
//и только потом отоб... | true |
5435a25fea30d18757b476add980ee649d24d08b | PHP | Santzu-159/dwese | /practica1/cuatro.php | UTF-8 | 1,147 | 2.921875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<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">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sh... | true |
113aaec8a096aee26a2525f363e375d74c1ccc35 | PHP | sebcaillault/nains_mvc | /controller/coreController.php | UTF-8 | 492 | 2.65625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: webuser1801
* Date: 17/05/2018
* Time: 10:37
*/
namespace nains\controller;
class coreController
{
protected $className;
public function showView($name, $variablesShoview)
{
// converti l'array assos en variable (utilisation ok dans ce cas mais faire a... | true |
6787710dcc9628678d417ba982d55a586fa2e73c | PHP | 1995Everton/Arcano | /src/Controllers/Adm/Persistencias/PersistenciaDicas.php | UTF-8 | 3,161 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Arcanos\Enigmas\Controllers\Adm\Persistencias;
use Arcanos\Enigmas\Controllers\Banco;
use Arcanos\Enigmas\Controllers\RequestHandlerInterface;
use Respect\Validation\Exceptions\ValidationException;
use Respect\Validation\Validator as v;
class PersistenciaDicas extends Banco implements RequestHandl... | true |
bbbffc39fcbffcb6491dd8b2e17aed0a5f3859d1 | PHP | tkouleris/CrudPanel | /src/Services/ControllerService.php | UTF-8 | 1,954 | 2.765625 | 3 | [] | no_license | <?php
namespace tkouleris\CrudPanel\Services;
use tkouleris\CrudPanel\File\FileCreator;
use tkouleris\CrudPanel\File\FileDeleter;
use tkouleris\CrudPanel\Repositories\Interfaces\IControllerFile;
class ControllerService
{
protected $file_creator;
protected $R_ControllerFile;
protected $file_deleter;
... | true |
d638ad6ee6b5c219d20c9a461a14dcca66bebc53 | PHP | pavelwebdeveloper/cs313-php | /web/team_activities/team_activity7/welcome_page.php | UTF-8 | 462 | 2.8125 | 3 | [] | no_license | <?php
// Get the database connection file
require("../../library/dbConnection.php");
$db = dbConnection();
// Start the session
session_start();
if(!($_SESSION['loggedin'])){header('Location: sign-in_page.php');}
?>
<!DOCTYPE html>
<html lang="en-us">
<head>
<title>Welcome Page</title>
</head>
<body>
<main>
... | true |
eedf1422c5886d3a351f55aef499f227dd7abfeb | PHP | HasanKarasahin/heryerkaktus | /Views/AbstractView.php | UTF-8 | 435 | 2.90625 | 3 | [] | no_license | <?php
abstract class AbstractView
{
static function getTemplateStatic($data)
{
return $data;
}
abstract function getTemplate($data = null);
static function getTemplateFromFile($fileName, $fileExt = '.html')
{
$fileContent = file_get_contents('assets' . DIRECTORY_SEPARATOR . 's... | true |
e7ad97652f9e864864d3b44e1409808bc37ecee2 | PHP | olasco-ship/emr2 | /includes/category.php | UTF-8 | 1,748 | 2.984375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: FEMI
* Date: 8/18/2017
* Time: 10:25 PM
*/
class Category extends DatabaseObject
{
protected static $table_name = "category";
protected static $db_fields= array('id', 'sync', 'name','created');
public $id;
public $sync;
public $name;
public $create... | true |
265d53138392532901aa4f9d47eca4c02e987ce7 | PHP | mustafaozcelik/school | /repository/studentRepository.php | UTF-8 | 2,815 | 2.890625 | 3 | [] | no_license | <?php
function getAllStudents(){
include("dbconnection.php"); //veritabanını ekliyoruz
//Tüm ögrencilerin listesini çekiyoruz
$sql="SELECT * FROM student";
$stmt=$dbconnection->prepare($sql);
if($stmt){
$stmt->execute();
$result=$stmt->get_resul... | true |
5aed42968f95db688469b25d8337a411ee245f99 | PHP | caiocosta1097/Pops-Web-FTP | /cms/model/DAO/eventosDAO.php | UTF-8 | 4,972 | 3.609375 | 4 | [] | no_license | <?php
class EventoDAO{
//Iniciando a varíavel em null para não haver erro
private $path_local;
//Atributo que será instânciado para fazer a conexão
private $conexao;
//Método construct é chamado assim que a classe é instânciada
public function __construct(){
//Variável que recebe a ... | true |
c3023b7fbcf135b35316678b1d432da72fcb6a1f | PHP | DimitriRomano/FoodLocation | /php/signup.php | UTF-8 | 5,064 | 2.625 | 3 | [] | no_license |
<?php
require 'dbconnect.php';
require 'functions.php';
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
// Load Composer's autoloader
require '../vendor/autoload.php';
if (isset($_POST['submit_signup'])) {
$username = $_POST['username'];
$email = $_POST['email'];... | true |
ccfba51c07a7ff174ba04a4b485a85510da27164 | PHP | AlfinSug/Bakery-Shop | /tokoroti/pegawai.php | UTF-8 | 3,256 | 2.640625 | 3 | [] | no_license | <?php include('conn_pegawai.php');
if (isset($_GET['edit'])) {
$idpgw = $_GET['edit'];
$edit_state = true;
$rec = mysqli_query($db, "SELECT * FROM pegawai WHERE id_pgw=$idpgw");
$record = mysqli_fetch_array($rec);
$name_pgw = $record['nama_pgw'];
$alamatPg... | true |
59cf8b66a5ca8ed8bb50ad8f4b127ac40162b417 | PHP | samdark/email | /src/parser/tokens/Header.php | UTF-8 | 2,231 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @copyright Copyright (c) 2017 Dmitriy Bashkarev
* @license https://github.com/bashkarev/email/blob/master/LICENSE
* @link https://github.com/bashkarev/email#readme
*/
namespace bashkarev\email\parser\tokens;
trait Header
{
/**
* @var bool
*/
protected $allowedHeader = true;
/**
... | true |
3a19dd4b373f496a13c28b4e86d6dedb762d66cd | PHP | bcen/silex-dispatcher | /src/SDispatcher/Common/DeclarativeResourceOption.php | UTF-8 | 2,594 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace SDispatcher\Common;
/**
* Used to read resource option in a more declarative way.
*/
final class DeclarativeResourceOption extends AbstractResourceOption
{
/**
* Used to read private method/property.
* @var \ReflectionObject
*/
private $reflector;
/**
* The target obj... | true |
38cff35bdf83f5821f66d2863d152da75ef33c3e | PHP | andresJ12345/storeGames | /apps/model/juegos.php | UTF-8 | 1,036 | 2.828125 | 3 | [] | no_license | <?php
require_once 'conexion.php';
class Juegos {
static public function agregarJuegos($tabla,$datos){
$stmt = conexion::conectar()->prepare("INSERT INTO $tabla (tituloJuego,descripcion,id_categoria,rutaFoto) VALUES (:tituloJuego,:descripcion,:id_categoria,:rutaFoto)");
$stmt -> bindParam(":tit... | true |
48b1e32374b0c0efa10d926101559b4a7154ef26 | PHP | andres-oderlogica/Nomina | /bin/db/base.php | UTF-8 | 2,042 | 2.546875 | 3 | [] | no_license | <?php
include_once Config::$home_lib.'adodb5'.Config::$ds.'adodb.inc.php';
class base
{
private $server;
private $user;
private $password;
private $database;
private $sql_instruction;
protected $adodb;
public $rs;
function __construct()
{
$this->adodb = ADONewConnection(... | true |
a0d6cf279aeaecd1a1976fd555cc2c366dc6b24c | PHP | bungle-suit/framework | /tests/Import/ExcelReader/SectionBoundaryTest.php | UTF-8 | 5,039 | 2.703125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Bungle\Framework\Tests\Import\ExcelReader;
use Bungle\Framework\Import\ExcelReader\ExcelReader;
use Bungle\Framework\Import\ExcelReader\SectionBoundary;
use Mockery;
use Mockery\Adapter\Phpunit\MockeryTestCase;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
class SectionBoundaryTe... | true |
732ee8515205e3dc82684c5a0ef2ebe86a292082 | PHP | sumenpuyuan/frontEndDemo | /15.河北农业大学实验室宣传小站/lab/DynamicModules/RegisterAndLogin/FenyePage.class.php | UTF-8 | 1,262 | 2.578125 | 3 | [] | no_license | <?php
class FenyePage{
var $pageNow=1;
var $pageCount;
var $pageSize=6;
var $rowCount;
var $navigator;
var $res="";
var $goUrl;
var $condition="";
/**
* @return unknown
*/
public function getNavigator() {
return $this->navigator;
}
/**
* @return unknown
*/
public function getPageCou... | true |
0c9f646fe50bfe23087d1856f43dda035df3080d | PHP | alealclag/alpiges-real-state | /PHP/form_editar_perfil.php | UTF-8 | 2,664 | 2.546875 | 3 | [] | no_license | <?php
session_start();
require_once("gestionarPerfil.php");
require_once("gestionBD.php");
if (!isset($_SESSION['login'])) {
header("Location: form_login.php");
}else{
$conexion=crearConexionBD();
$usuario=informacionUsuario($conexion, $_SESSION['login']);
if (isset($_SESSION["errores"]))
$errores... | true |
79368b843a81040cac27ca178c0ef65387e55075 | PHP | vladlen-beilik/price-aggregator | /app/Http/Client/ResponseToArray.php | UTF-8 | 369 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Client;
use App\Http\Client\Response\HttpResponseInterface;
trait ResponseToArray
{
/**
* @param \App\Http\Client\Response\HttpResponseInterface $response
*
* @return array
*/
public function toArray(HttpResponseInterface $response): array
{
return jso... | true |
e6ecdc92fd820fe0ccef66cd38d5fec2ac165a70 | PHP | locomotivemtl/charcoal-ui | /src/Charcoal/Ui/MenuItem/MenuItemFactory.php | UTF-8 | 608 | 2.578125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Charcoal\Ui\MenuItem;
use Charcoal\Factory\ResolverFactory;
use Charcoal\Ui\MenuItem\MenuItemInterface;
use Charcoal\Ui\MenuItem\GenericMenuItem;
/**
* Menu Item Factory
*/
class MenuItemFactory extends ResolverFactory
{
/**
* @return string
*/
public function baseClass()
{
... | true |
9ade823aec19036ac913f0773471e2577c1b821e | PHP | Salmon42/NDS8-2019-Group-820 | /Project/Web 2FA/lib/LDAP.php | UTF-8 | 10,116 | 2.59375 | 3 | [] | no_license | <?php
/**
*
*/
class LDAP
{
Private $ldap_link;
Private $ldapconfig;
Private $admin_username = "admin";
Private $admin_password = "admin";
function __construct()
{
$this->connect();
}
function __destruct()
{
ldap_close($this->ldap_link);
}
function connect()
{
//cn=readonly,dc=example,dc=org
... | true |
902e8c1d7325a96322560b2764b6eaf2f23abf46 | PHP | yascmf/api | /modules/Common/Models/Article.php | UTF-8 | 2,795 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\Common\Models;
use Illuminate\Database\Eloquent\Model;
/**
* 内容模型
*/
class Article extends Model
{
/**
* @var string
*/
protected $table = 'articles';
/**
* @var string
*/
protected $primaryKey = 'id';
/**
* @var array
*/
protected ... | true |
123736ae7c0646bd054dd1636f85caeef20e47ae | PHP | ascretul/online-store | /online-store/app/Models/Category.php | UTF-8 | 1,286 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use App\Models\Person;
use Illuminate\Database\Eloquent\Model;
class Category extends Model
{
/**
* Indicates if the model should be timestamped.
*
* @var bool
*/
public $timestamps = false;
/**
* The table associated with the model.
*
... | true |
5045dc6ca0600075d5f3ffc304c0290be3b7dd9e | PHP | dandyxu/Ajax-Learning | /ajax_button/favourite.php | UTF-8 | 751 | 2.703125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Wenqian
* Date: 7/17/2017
* Time: 10:19 AM
*/
session_start();
if (!isset($_SESSION['favourites'])) {
$_SESSION['favourites'] = [];
}
function is_ajax_request() {
return isset($_SERVER['HTTP_X_REQUESTED_WITH']) &&
$_SERVER['HTTP_X_REQUESTED_WITH'] == 'XML... | true |
80459954fc474d7acbf3cbca9f21f601949739c5 | PHP | droyenko/SoftServe | /PetCompany/models/PetShop/PetShopModel.php | UTF-8 | 1,542 | 3.15625 | 3 | [] | no_license | <?php
class PetShopModel extends Model
{
private $pets = [];
public function __construct()
{
//change this depending on database you need
parent::__construct();
// $pets = $this->db->convertPetsDbToArray(DBSettings::petShopDbFileName);
$pets = $this->db->convertPetsJsonToArr... | true |
0e3a751ad8a99a4d364b9e8d20aed9c234a78dab | PHP | galile-io/api | /database/migrations/2018_03_09_161839_create_user_activites_table.php | UTF-8 | 884 | 2.59375 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUserActivitesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('activitie... | true |
dfa995eb8f831d6e94f765f883c81ee8d6c0b246 | PHP | phptheme/html | /BaseHtmlHelper.php | UTF-8 | 5,870 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author PhpTheme Dev Team <dev@getphptheme.com>
* @license MIT
* @link http://getphptheme.com
*/
namespace PhpTheme\Html;
abstract class BaseHtmlHelper
{
public static function escape($string, $encoding = 'utf-8', $specialCharsFlags = null)
{
if (!$specialCharsFlags)
... | true |
af5f0e77098591eaa0a9961911e26af8c0af17ea | PHP | SherronL/blog-cakephp | /db/migrations/20200218142834_create_admins.php | UTF-8 | 744 | 2.671875 | 3 | [] | no_license | <?php
use Phinx\Migration\AbstractMigration;
class CreateAdmins extends AbstractMigration
{
public function change()
{
$table = $this->table('admins');
$table->addColumn('username', 'string', [
'default' => null,
'limit' => 255,
'null' => false,
]);
$table->addColumn('password', 'te... | true |
5c66fe74fe33b2a2f5962013d8e178cc4f2a616e | PHP | llqhz/app | /application/index/service/Token.php | UTF-8 | 2,360 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* @Author: .筱怪 llqhz@qq.com
* @Created time: 2018-08-20 14:40
* @Last Modified: 2018-08-20 14:40
* @version v1.0.0
*/
namespace app\index\service;
use app\exception\ProcessException;
use app\library\enum\ScopeEnum;
use think\Cache;
use think\Exception;
use think\Request;
class Token
{
public st... | true |
689ded07476c4ad4b8e7056b94525ae1ae5ea701 | PHP | dragouf/VeloBleuProxy | /system/application/libraries/velobleudatasync.php | UTF-8 | 3,477 | 2.59375 | 3 | [] | no_license | <?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
class velobleudataSync
{
private $CI;
private $mapDb;
private $networks;
private $mapDbKey;
private $jsonUrl;
private $veloBleuDbData;
public $jsonDataLength;
function velobleudataSync()
{
$this->CI =& get_instance();
... | true |
e8fc111b83aa6c1efdfa8c3c302d9712f2913c34 | PHP | alariva/laravel-email-domain-blacklist | /tests/ValidatorTest.php | UTF-8 | 2,612 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests;
use Config;
use Validator;
use Tests\BaseTestCase;
class ValidatorTest extends BaseTestCase
{
/**
* Test it rejects emails with domains that ARE blacklisted by append
* @return void
*/
public function test_rejects_blacklisted_by_append()
{
Config::set('validatio... | true |
d6f6a50f42665858cec6ee9ab5e6a6651e765e53 | PHP | angeliquesvt/fleetfinal | /class/Comments.php | UTF-8 | 2,429 | 2.9375 | 3 | [] | no_license | <?php
class Comments{
private $options = array(
'content_error' => "Vous n'avez pas mis de message",
'parent_error' => "Vous essayez de répondre à un commentaire qui n'existe pas"
);
public $errors = array();
public function __construct($options = []){
$this->options = array_merge($... | true |
3ed9e3955eec199ea5f56bda15d746ebef39f20d | PHP | oliverliuwt/fruitweb | /classes/uploadfile.class.php | UTF-8 | 287 | 2.609375 | 3 | [] | no_license | <?php
class UploadFile {
public function __construct(){
//initialise database
//parent::__construct();
//check if files are being uploaded
if( count($_FILES) > 0 ){
print_r($_FILES);
}
else{
print_r($_FILES["upload"]["error"]);
}
}
}
?> | true |
006f26b2e8996d7ee2262a12db0607d9ebefd74c | PHP | SpikedCola/YouTube-Closed-Captions | /closed-captions.php | UTF-8 | 4,766 | 2.8125 | 3 | [] | no_license | <?php
/**
* Some helper functions to fetch "Closed Captions" for a YouTube video
*
* Normally these are only available to the video creator...
* But there's always a way!
*
* @author Jordan Skoblenick <parkinglotlust@gmail.com> 2014-08-16
*/
/**
* "Main function" - simply call this with a YouTube video I... | true |
c5a0708d3f5c66dc4a3595fbc33499a6be9553ae | PHP | AteitiesIT/phalcon-cli | /tests/Commands/UtilityTask.php | UTF-8 | 1,015 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
use Danzabar\CLI\Tasks\Task;
/**
* The utility task
*
* @package CLI
* @subpackage Test
* @author Dan Cox
*/
class UtilityTask extends Task
{
/**
* The task name
*
* @var string
*/
protected $name = 'utility';
/**
* Description
*
* @var string
*/
pr... | true |
f666771f36ce8ee55a6242874574a4b1cf4e1d71 | PHP | Soporte-Expresarte/Expresarte | /app/View/Components/galeria/CarruselArtistas.php | UTF-8 | 675 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\View\Components\galeria;
use App\Models\Carrusel;
use Illuminate\View\Component;
class CarruselArtistas extends Component
{
/**
* Create a new component instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Get the view / co... | true |
0acfd4f9cf5e4c019ebc7e2f8ef6822115ef15a9 | PHP | reinvanoyen/hector | /src/Hector/Db/QueryBuilder/Set.php | UTF-8 | 431 | 2.625 | 3 | [] | no_license | <?php
namespace Hector\Db\QueryBuilder;
class Set extends QueryPart
{
private $values;
const CONNECTS_WITH = [ 'where', 'orderBy', 'limit', ];
public function __construct($values = [])
{
$this->values = $values;
}
public function build() : String
{
$this->getQuery()->add... | true |
57af42ae81bdf6d05d296189b80befcab4a8e090 | PHP | jpatrick9/CST336 | /labs/lab5a/database.php | UTF-8 | 1,186 | 2.640625 | 3 | [] | no_license | <?php
function getDatabaseConnection() {
//mysql://b1d658c6df74b0:b5716444@us-cdbr-iron-east-05.cleardb.net/heroku_85e92cedc98a377?reconnect=true
// Username: b1d658c6df74b0
// Password: b5716444
// Host: us-cdbr-iron-east-05.cleardb.net
// Database name: heroku_85e92cedc98a377
// Connect t... | true |
5c6ff34600edbbd3db4957f6fd4e466ac2972194 | PHP | terguevarra/terguevarra_php_framework | /php/lib/security.php | UTF-8 | 525 | 2.9375 | 3 | [] | no_license | <?php
class Security{
public function GenerateSalt(){
$length = 100;
$salt = base64_encode(mcrypt_create_iv($length, MCRYPT_DEV_URANDOM));
$salt = preg_replace("/[^A-Za-z0-9 ]/", '', $salt);
$salt = substr($salt, 0, 64);
return $salt;
}
public function HashPassword($... | true |
f85bd916456cb9352262f0b80ef65180ef792985 | PHP | zdanozdan/soteesklep3 | /include/online.inc | UTF-8 | 2,019 | 2.6875 | 3 | [] | no_license | <?php
/**
* Zarzadzanie uzytkwonikami online, sprawzdenie ilosci uzytkwonikow
*
* @author m@sote.pl
* @version $Id: online.inc,v 2.7 2004/12/20 18:02:54 maroslaw Exp $
* @package include
*/
class Online {
var $timeout=600; // ilosc sekund, po ktorej uznajemy uzytkownika ze nie jest online
/**
... | true |
cc1a8f7e7818d37171e56d35930040abdb7fdd01 | PHP | jrivero/monica | /app/Console/Commands/ResetTestDB.php | UTF-8 | 1,151 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use DB;
use Illuminate\Console\Command;
class ResetTestDB extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'monica:resetdb';
/**
* The console command description.
*
*... | true |
8965cf188fe389632a7bc8e238af18180c3954b1 | PHP | vbrovenk/PHP_Final | /Day01/ex08/ft_is_sort.php | UTF-8 | 375 | 2.78125 | 3 | [] | no_license | <?php
function ft_is_sort(array $tab) {
if ($tab != null) {
$temp = $tab;
$temp_rev = $tab;
sort($temp);
rsort($temp_rev);
if ($temp == $tab) {
return true;
}
else if ($temp_rev == $tab) {
return true;
}
... | true |
0a90885f2f92a44fcd5a5dd6907a28dc3df3efe9 | PHP | li2009436276/hnddy-panoedit | /src/Repositories/Contracts/FileInterface.php | UTF-8 | 813 | 2.609375 | 3 | [] | no_license | <?php
namespace Yjtec\PanoEdit\Repositories\Contracts;
interface FileInterface
{
/**
* 添加文件
* @param $data
* @param $appId
* @param $userId
* @param $classifyId
* @param $type
* @param $category
* @param $applyType
* @return mixed
*/
publi... | true |
170d4469826b68da8ef2b7cc7bdfb1837b5e2d1a | PHP | rjw57/findsorguk | /app/forms/AccountUpgradeForm.php | UTF-8 | 3,078 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/** Form for requesting an upgrade for a user's account
* @author Daniel Pett <dpett at britishmuseum.org>
* @copyright (c) 2014 Daniel Pett
* @category Pas
* @package Pas_Form
* @version 1
* @license http://www.gnu.org/licenses/agpl-3.0.txt GNU Affero GPL v3.0
*/
class AccountUpgradeForm extends Pas_... | true |
7f086c621e82387efba51589ed703673277bf091 | PHP | IvanovAlmeida/Pandora | /src/Model/Table/UsersTable.php | UTF-8 | 860 | 2.90625 | 3 | [] | no_license | <?php
namespace App\Model\Table;
use App\Model\Entity\Entity;
use App\Model\Entity\User;
/**
* Class UsersTable
* @package App\Model\Table
*/
class UsersTable extends Table
{
public function __construct()
{
parent::__construct('Users');
}
/**
* @return User[]
*/
public functi... | true |
d593ca61f9a09b1da20ef35f640333225a545520 | PHP | reinos/php-cache-class | /src/Cache/File.php | UTF-8 | 3,398 | 3.03125 | 3 | [] | no_license | <?php
namespace agking\Cache;
/**
* Simple class to deal with File Cache.
* @author Iain Cambridge
* @copyright All rights reserved 2009-2010 (c)
* @license http://backie.org/copyright/bsd-license BSD License
*/
class File implements CacheBase
{
/**
* Returns the cached variable or
* false if it d... | true |
80fffce138e1ec09dbd366e24e1de7342c483a5d | PHP | wolfgangjoebstl/BKSLibrary | /IPSLibrary/app/modules/RemoteAccess/WriteJsonDescription.ips.php | UTF-8 | 1,851 | 2.796875 | 3 | [] | no_license | <?
/*
* This file is part of the IPSLibrary.
*
* The IPSLibrary is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* T... | true |
10715739eef708654a0443647e9a48f80f222693 | PHP | Shri-Anand-Travels/bestflightdeals.co.uk | /app/helper.php | UTF-8 | 2,948 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
if (!function_exists('cabinType')) {
function cabinType($cabin): string
{
return match ($cabin) {
"1" => "First Class",
"2" => "Business",
"3" => "Premium Economy",
"4" => "Economy",
default => "",
};
}
}
if (!function_exist... | true |
584d04de96b8cd59a3444cf0b1f4f2faa0a52e7e | PHP | jacob-grahn/platform-racing-2-server | /vend/socket/Socket.php | UTF-8 | 6,453 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/*
phpSocketDaemon 1.0
Copyright (C) 2006 Chris Chabot <chabotc@xs4all.nl>
See http://www.chabotc.nl/ for more information
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version ... | true |
916744d887ac6fd49a909e773358c43b9a7bf62b | PHP | HiYangZhi/Pinche | /src/Models/Passenger.php | UTF-8 | 1,691 | 2.65625 | 3 | [] | no_license | <?php
namespace ZCJY\Pinche\Models;
use Eloquent as Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class Passenger
* @package App\Models
* @version February 16, 2017, 1:49 am UTC
*/
class Passenger extends Model
{
use SoftDeletes;
public $table = 'passengers';
protected $dates = ['... | true |
4d2341d6f34ce280fc0385f4595b68af7b19ca1e | PHP | cherry-framework/console | /src/Console/Command/Debugger.php | UTF-8 | 2,693 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* The file contains Debugger trait
*
* PHP version 5
*
* @category Library
* @package Cherry
* @author Temuri Takalandze <takalandzet@gmail.com>
* @license https://github.com/cherry-framework/console/blob/master/LICENSE MIT
* @link https://github.com/cherry-framework/console
*/
namespace Ch... | true |