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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e24ea8acde120473e7b4fbe83b289ad3d5c99075 | PHP | waqaskamran/ecash_aalm | /www/ecash_root/server/module/reporting/daily_cash_pdf.php | UTF-8 | 39,172 | 2.65625 | 3 | [] | no_license | <?php
/**
* @package reporting
*
* @copyright Copyright © 2006 The Selling Source, Inc.
*
* @version $Revision$
*/
/**
* Generates the pdf of the daily cash report.
*
* <b>Revision History:</b>
* <ul>
* <li><b>2007-10-23 - mlively</b><br>
* The vertical margin has been changed from 36 to 2... | true |
ed25b886651064b1e2fac86e87bc179db6bcfb0c | PHP | Unicen-Tuari/fgallazzi | /controller/categoria_controller.php | UTF-8 | 7,066 | 2.71875 | 3 | [] | no_license | <?php
include_once "controller_class.php";
include_once "paginador_controller.php";
include_once "model/categoria_model.php";
include_once "view/categoria_view.php";
/**
* HomeController
*
*/
class CategoriaController extends Controller
{
/**
* Constructor
* */
function __construct()
{
... | true |
5677e954b5d3bf1fc4e69b70c62d21569d5fa1aa | PHP | fetus-hina/stat.ink | /models/GearConfiguration.php | UTF-8 | 3,330 | 2.609375 | 3 | [
"MIT",
"BSD-3-Clause",
"CC-BY-4.0"
] | permissive | <?php
/**
* @copyright Copyright (C) 2015-2021 AIZAWA Hina
* @license https://github.com/fetus-hina/stat.ink/blob/master/LICENSE MIT
* @author AIZAWA Hina <hina@fetus.jp>
*/
namespace app\models;
use yii\db\ActiveQuery;
use yii\db\ActiveRecord;
use function array_map;
use function base64_encode;
use function co... | true |
db6745864e3a857e0433f04741bb8e51eda3a885 | PHP | sciice/platform | /src/Service/PermissionService.php | UTF-8 | 2,020 | 2.5625 | 3 | [] | no_license | <?php
namespace Platform\Service;
use Illuminate\Http\Request;
use Platform\Model\Permission;
use Platform\Contracts\PlatformService;
use Platform\Resources\PermissionResource;
use Platform\Support\PlatformServiceTrait;
class PermissionService implements PlatformService
{
use PlatformServiceTrait;
/**
... | true |
20e619d3446640d07895f320376aaf3ba2786559 | PHP | MuindiKelvin/HospitalSampleSite | /records1.php | UTF-8 | 1,584 | 2.796875 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "Patients";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
$sql = "SELE... | true |
999ebc3f00c492c6bdcc2a8a37113b19f95137c3 | PHP | JuanCarlosO/ST | /model/BienesModel.php | UTF-8 | 25,045 | 2.546875 | 3 | [] | no_license | <?php
require_once 'conection.php';
require_once 'anexgrid.php';
header('Content-Type: text/html; charset=UTF-8');
setlocale(LC_ALL, "es_ES");
class BienesModel extends Conection
{
protected $sql;
protected $stmt;
public $result;
public function getGrupos()
{
try {
$this->sql = " SELECT * FROM grupos ";
... | true |
ab64dd839278d45d7d4804fedb4d0c67a0fcc963 | PHP | Stolz/php-stubs | /res/php/ncurses/functions/ncurses-killchar.php | UTF-8 | 162 | 2.5625 | 3 | [
"Apache-2.0",
"CC-BY-3.0"
] | permissive | <?php
/**
* Returns current line kill character
*
* @phpstub
*
* @return string Returns the kill character, as a string.
*/
function ncurses_killchar()
{
} | true |
379b084d22c7d08f810df908366924d216ddf075 | PHP | DaveRandom/Pack | /src/Compilation/Unpack/RootBlock.php | UTF-8 | 418 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace DaveRandom\Pack\Compilation\Unpack;
final class RootBlock extends Block
{
public function compile(int $indentation, int $increment): string
{
$result = parent::compile($indentation, $increment);
foreach ($this->codeElements as $element) {
$... | true |
cea25255c1b3b8caf6568d829c91495f69d6e62d | PHP | haleemasadiya12/online-plant-shopping | /pregister.php | UTF-8 | 1,283 | 2.6875 | 3 | [] | no_license | <?php
require('config.php');
if(!empty($_POST))
{
$msg="";
if(empty($_POST['username']) || empty($_POST['mail']) || empty($_POST['phone'])||empty($_POST['password'])||empty($_POST['cpwd']) )
{
$msg="<li><h1>PLEASE FILL ALL DETAILS!!!!!<h1>";
}
if($_POST['password']!=$_POST['cpwd'])... | true |
cac14888dfea406ac54a74ec67f29b87358a0554 | PHP | phpbee/phpbee | /packages/eventlogs/handler.module.php | UTF-8 | 4,609 | 2.515625 | 3 | [] | no_license | <?php
class eventlog_handler extends gs_handler {
private static function get_roles() {
$person=person();
//$roles=array_keys($person->get_roles());
$roles=$person->get_roles();
if(!$roles) $roles=array('system'=>new gs_null(GS_NULL_XML));
return $roles;
}
private static function get_classname($rec) {... | true |
158861ada26916f2c1a676bd5145ba82f096050e | PHP | jyotijha11/htdocs | /array/index5.php | UTF-8 | 285 | 3.234375 | 3 | [] | no_license | <?php
$ar = array (1,2,3,8,5,6);
$arr = array (1,2,5,4,5,6);
echo $ar[3]. "<br>" .$arr[2];
echo "<br>";
$re= $ar[3]+$arr[2];
echo $re;
echo "<br>";
array_push($ar, $re);
print_r($ar);
foreach ($ar as $jyoti => $value) {
if($jyoti == 2){
$ar[2] = $re;
}
}
print_r($ar);
?> | true |
46e833ed02619a565bf66d14db7e63de28ada485 | PHP | ridho008/olshop | /application/libraries/Pelanggan_login.php | UTF-8 | 1,371 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* proses login
*/
class Pelanggan_login
{
protected $ci;
function __construct()
{
$this->ci =& get_instance();
$this->ci->load->model('Auth_m');
}
public function login($email, $password)
{
$cek = $this->ci->Auth_m->login_pelangg... | true |
f0406ed8e2a2528c66fa1a8fba35799bb17e57cf | PHP | renatinhotsw/selectitemcake | /cake/app/Controller/PostsController.php | UTF-8 | 2,333 | 2.5625 | 3 | [] | no_license | <?php
App::uses('AppController', 'Controller');
class PostsController extends AppController{
public $helpers = array ('Html','Form','Flash');
public $components = array('Flash');
public function initialize(){
parent::initialize();
$this->loadModel('Posts');
}
public function beforeRender(){
uns... | true |
a22006ca63a236eac8bc95257c5ba9f423a4258d | PHP | sms516/quiz | /app/models/ClubMembershipStream.php | UTF-8 | 987 | 2.625 | 3 | [] | no_license | <?php
namespace App\models;
use Illuminate\Database\Eloquent\Model;
class ClubMembershipStream extends Model
{
protected $table = 'club_membership_stream';
protected $primaryKey ='club_membership_stream_id';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fi... | true |
6be680d792a60fb0a7c5912fd91876f9a7c5ea8d | PHP | taktv6/promPHPWeathermap | /promPHPWeathermap.php | UTF-8 | 1,381 | 2.671875 | 3 | [] | no_license | <?php
// Pluggable datasource for PHP Weathermap 0.9
// - return a static value
// TARGET static:10M
// TARGET static:2M:256K
class WeatherMapDataSource_prometheus extends WeatherMapDataSource {
function Recognise($targetstring)
{
if( preg_match("/^prometheus:.*$/", $targetstring) )
{
return TRUE;
}
els... | true |
7dbdfd5fe10543385de15c00c2e0318f676e134a | PHP | connorhu/khvpos | /VPos/SignatureProvider.php | UTF-8 | 3,279 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace KHTools\VPos;
class SignatureProvider
{
private string $privateKeyPath;
private string $privateKeyPassphrase;
private $privateKey;
public function __construct(string $privateKeyPath, string $privateKeyPassphrase = '', bool $lazyKeyload = true)
{
... | true |
f10731752f9b3456201bf7274420d4b184ab91e5 | PHP | intfrr/DocConnect | /favorites.php | UTF-8 | 595 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
include_once 'head.php'
include_once 'login.php';
$favoritesResult makeQuery("SELECT * FROM favorites WHERE username='$user'");
$numFavorites = mysql_num_rows($favoritesResult);
echo "<br /><h3>Your Favorites</h3><br />";
echo "<ul class='searchResults'>";
while ($numFavorites > 0)
{
$favoritesRow = mysql_f... | true |
c84f2fe3e92aec5a8d72eae6b72f2b0b95839792 | PHP | KevinMaikath/Fruits-CRUD-API | /app/Fruit.php | UTF-8 | 1,021 | 3.078125 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Fruit extends Model
{
protected $table = 'fruits';
protected $fillable = [
'name',
'size',
'colour'
];
public const SIZES = [
'S' => 'SMALL',
'M' => 'MEDIUM',
'L' => 'LARGE'
];
... | true |
b4a2609ec88eb28a8b49554a643cfdf214433245 | PHP | VutheaKorms/realestate | /database/migrations/2017_06_13_092128_create_properties_table.php | UTF-8 | 2,247 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePropertiesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('properties',... | true |
f4f2eea39ae5400bf780319b678e11c2c242a246 | PHP | caseycs/ing-toshl-sync | /src/TransactionHasher/Legacy2.php | UTF-8 | 536 | 2.546875 | 3 | [] | no_license | <?php
namespace Ing2Toshl\TransactionHasher;
use Ing2Toshl\IngTransaction;
class Legacy2 implements TransactionHasherInterface
{
public function name()
{
return 'commentStartHash';
}
public function isLegacy()
{
return true;
}
public function hash(IngTransaction $ingTrans... | true |
26ce1af988dc1d7889b958aaca80c2a0b26079cd | PHP | jpnut/laravel-typescript-codegen | /src/RouteUrlGenerator.php | UTF-8 | 3,112 | 2.875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace JPNut\CodeGen;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Illuminate\Routing\UrlGenerator;
class RouteUrlGenerator
{
/**
* The URL generator instance.
*
* @var \Illuminate\Routing\UrlGenerator
*/
protected UrlGenerator $url;
/**
* Create a new Ro... | true |
13b0cb67f71a1eb25a304204c01fb32d50b3ccb8 | PHP | JustAHappyKid/php-spare-parts | /src/test/web-browser.php | UTF-8 | 3,825 | 2.78125 | 3 | [] | no_license | <?php
namespace SpareParts\Test;
require_once dirname(dirname(__FILE__)) . '/web-client/web-browser.php';
use \Exception, \Closure, \SpareParts\WebClient\WebBrowser, \SpareParts\HTTP;
/**
* This sub-class of WebBrowser (and, in turn, HttpClient) is for testing purposes.
* It's not only used for testing the functi... | true |
a66b96285e3cbb44a0e69e20f287fb89bec5a6cb | PHP | merq312/laravel-blog | /app/Models/Post.php | UTF-8 | 1,073 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Post extends Model
{
use HasFactory;
// Mass Assignment Vulnerabilities: You may either
// blacklist fields
// protected $guarded = ['id'];
// whitelist fields
/... | true |
6ea622f15f0aa11a3fb4fef79985b6abe9610e52 | PHP | sagebind/flarum-nntp-server | /src/Document.php | UTF-8 | 3,038 | 2.921875 | 3 | [] | no_license | <?php
namespace coderstephen\flarum\nntpServer;
use ArrayAccess;
use Countable;
use Iterator;
use IteratorAggregate;
/**
* Simple JSON API document wrapper.
*/
class Document implements ArrayAccess, Countable, IteratorAggregate
{
private $document;
public function __construct($document)
{
$this... | true |
7b02463102f4ebfb3810fc74c1b46e0897537446 | PHP | QLAFOURCADE/EcedIn_web | /Projet Web/server_connexion.php | UTF-8 | 638 | 2.796875 | 3 | [] | no_license | <?php
function connect_and_select_db()
{
$server = '127.0.0.1'; // database server
$username = 'root'; // Database username
$pwd = ''; // Database password
$dbname = 'ecebond'; // Database name
$conn = mysqli_connect($server, $username, $pwd, $dbname);
if (!$conn) {
ec... | true |
7a5c480acea7aff4aac1e5ba7fdd35f047820a35 | PHP | vadimrostok/shepi | /protected/models/Album.php | UTF-8 | 3,537 | 2.71875 | 3 | [] | no_license | <?php
class Album extends CActiveRecord
{
public $id;
public $title;
public $status_id;
public $created_at;
public $comment;
public $main_picture_id;
public function tableName()
{
return 'albums';
}
public static function model($className=__CLASS__)
{
retur... | true |
8e35e668bb339e078e086841a26495b013bc19f8 | PHP | dbalabka/php-enumeration | /examples/Enum/Rectangle.php | UTF-8 | 432 | 3.265625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Dbalabka\Enumeration\Examples\Enum;
use Dbalabka\Enumeration\Examples\Struct\Point;
final class Rectangle extends Shape
{
private Point $pointA;
private Point $pointB;
public function __invoke(Point $pointA, Point $pointB)
{
$rectangle = new static();... | true |
a91382cfa4b0d8b02e71994da45e823ccc4767ec | PHP | AbDi-FaEv/old-esqsites | /sf_app/lib/form/base/BaseWebsiteAttributeForm.class.php | UTF-8 | 4,378 | 2.625 | 3 | [] | no_license | <?php
/**
* WebsiteAttribute form base class.
*
* @method WebsiteAttribute getObject() Returns the current form's model object
*
* @package esqsites123
* @subpackage form
* @author Your name here
*/
abstract class BaseWebsiteAttributeForm extends BaseFormPropel
{
public function setup()
{
$this-... | true |
ae394bd164c978c5732edec6cf83039ffd403b91 | PHP | wangfengfly/swoole_chatroom | /Log.php | UTF-8 | 1,261 | 3.25 | 3 | [] | no_license | <?php
class Log {
public static $LEVEL = 0;
private static $instance;
private $dir;
private $filename;
const LEVEL_INFO = 0;
const LEVEL_DEBUG = 1;
const LEVEL_WARN = 2;
const LEVEL_ERR = 3;
const LOG_LEVEL = [
'info' => self::LEVEL_INFO,
'debug' => self::LEVEL_DEBU... | true |
b7c66c29b03e3f7abaef1fd541e84f7f15ff8c49 | PHP | argentinaluiz/psic-1 | /app/Http/Requests/ResearchRequest.php | UTF-8 | 798 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class ResearchRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get t... | true |
9ebd54663e24a3086d5ef979bc95c7368717e38f | PHP | atiksoftware/php.api.dailymotion | /DailymotionVideo.php | UTF-8 | 467 | 2.65625 | 3 | [] | no_license | <?php
class DailymotionVideo
{
function get_data($id){
return file_get_contents("http://www.dailymotion.com/embed/video/". $id);
}
function Info($id){
$data = $this->get_data($id);
preg_match("/var config =(.*?)\}\;/", $data, $matches);
$data = $matches[1]."}";
$data = json_decode($data,true... | true |
bdd1242b3e3cb205eeef72105b6efa98882dc855 | PHP | mpalmier/PrestaChope-4 | /page/connexion/ControllerConnexion.php | UTF-8 | 835 | 2.53125 | 3 | [] | no_license | <?php
include_once('DAO/UserDAO.php');
include_once('DTO/UserDTO.php');
class ControllerConnexion {
public static function includeView(){
include_once("connexion.php");
}
public static function authenticate($identifiant, $mdp)
{
$auth = true;
$mdp = sha1($mdp);
$Users ... | true |
c1cc0d5b25659e2dfbed07b9deffa0e3d702fbcc | PHP | PedroMartinDelCampo/pockup | /app/Endpoint.php | UTF-8 | 653 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace Pockup;
class Endpoint {
const BASE_URL = 'api/';
public $url;
public $method;
public $signature;
private static $all = [];
public static function all()
{
return collect(self::$all)->map(function($endpoint) {
$endpoint->url = url(self::BASE_URL . $endpoint->url);
return $endpoint;
... | true |
dbd7e445865309fb14b75736d92453642e28436d | PHP | cscfa/DataGridBundle | /Twig/Extension/PaginatorExtension.php | UTF-8 | 5,719 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is a part of CSCFA datagrid project.
*
* The datagrid project is a symfony bundle written in php
* with Symfony2 framework.
*
* PHP version 5.5
*
* @category Twig extension
* @package CscfaDataGridBundle
* @author Matthieu VALLANCE <matthieu.vallance@cscfa.fr>
* @license http://o... | true |
152cff8d85a0614a72856474daaf81a80ee92e23 | PHP | WilliamCorr/bookproject | /src/ProductRepository.php | UTF-8 | 3,426 | 3.109375 | 3 | [] | no_license | <?php
namespace Itb;
class ProductRepository
{
private $connection;
//private $description;
public function __construct()
{
//this needs to be turned on and off for testing
//require '../setup/setup_database.php';
$db2 = new Database();
$this->... | true |
3c15116c858ba92810bb2d04783b9dfdd919721d | PHP | joalcapa/Fundamentary | /src/DataBase/Newler.php | UTF-8 | 2,036 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Joalcapa\Fundamentary\Database;
class Newler {
private $driverDB;
public function __construct($driverDB) {
$this->driverDB = $driverDB;
$this->driverDB->connect();
}
public function user($model, $parameter, $parameterString) {
return $this->driver... | true |
9357511783bd93ba116d04c8b6631ab640a2ec5d | PHP | DiegoElgart/twilio-whatsapp-app | /vendor/input.php | UTF-8 | 3,000 | 3.046875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Testing for using HTML in same project</title>
</head>
<body>
<?php
//Initializes autoload, C... | true |
3be9be44acbabe8ee99cebce0f1f58084218e298 | PHP | shawndparkes/eecs448-lab4 | /multitable.php | UTF-8 | 358 | 3.28125 | 3 | [] | no_license | <?php
echo "<table>";
echo "<tr><td></td>";
for($z = 1; $z <= 100; $z++)
{
echo "<td>" . $z . "</td>";
}
echo "</tr><tr>";
for($y = 1; $y <= 100; $y++)
{
echo "<td>" . $y . "</td>";
for($x = 1; $x <= 100; $x++)
{
$a = $x * $y;
echo "<td>" . $a . "</td>";
}
echo "</t... | true |
0ec0e8ef0a0dc578928df976cc5c279de1cd4c04 | PHP | lanzrein/coms309projectISU | /JohanPersonnal/PHP/message_edit.php | UTF-8 | 432 | 2.5625 | 3 | [] | no_license | <?php
include 'database_helper.php';
/**
* Created by PhpStorm.
* User: johan
* Date: 13.10.2017
* Time: 17:02
*/
$playerID = $_GET["playerID"];
$newMessage = $_GET["newMessage"];
if(empty($newMessage)){
die("ERR");
}
$conn = connectToDB();
$sql = "update Player p set p.Message = $newMessage
where p... | true |
6728cd52269718622e40e2efda567c0245c4a692 | PHP | iqiangzi/www | /tw_new/application/vdao_admin/model/Cons_model.php | UTF-8 | 5,947 | 2.53125 | 3 | [] | no_license | <?php
class Cons_model extends TW_Model
{
public function __construct()
{
parent:: __construct();
}
/************************************* 分类列表 *************************************/
/**
* [get_cate_showlist 获取所有分类信息]
* @return [array] [返回查询到的所有分类信息]
*/
public function... | true |
08eb59420089137c8a057f6c9d0dd3755577b6cf | PHP | evalue-com/ilios | /src/Ilios/CoreBundle/Entity/ProgramYearInterface.php | UTF-8 | 2,083 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Ilios\CoreBundle\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Ilios\CoreBundle\Traits\ArchivableEntityInterface;
use Ilios\CoreBundle\Traits\CategorizableEntityInterface;
use Ilios\CoreBundle\Traits\IdentifiableEntityInterface;
use Ilios\Cor... | true |
fb1576600c8df9fec3517aace287b0aa904bcbdd | PHP | Fisrt-wolf/jpush-api-php-client | /jpush/PushClient.php | UTF-8 | 771 | 2.640625 | 3 | [] | no_license | <?php
include_once "NativeHttpClient.php";
/**
* 推送逻辑类
* @author xiezefan@126.com
*
*/
class PushClient {
private $PUSH_API_URL = "https://api.jpush.cn/v3/push";
public function sendPush($payload, $autoCode) {
$data_string = json_encode($payload->toJSON());
$header = array('Authorization:... | true |
786e861d0ac4f1aa28c815edf656b2714101f11a | PHP | hanying0820/Map | /php/getLights.php | UTF-8 | 917 | 2.71875 | 3 | [] | no_license | <?php
include_once('db_vars.inc');
$link = new mysqli($DB_SERVER, $DB_USER, $DB_PASS, $DB_NAME);
if ($link->connect_error) {
die("Connection failed:".$link->connect_error);
exit();
}
mysqli_query($link, 'SET NAMES utf8');
$query = "SELECT * FROM trafficlight";
$lights = array();
$result = mysqli_query($link... | true |
8f63b635580fc1baf23a49e3695c06cef2f39e82 | PHP | offloc/offloc-prism | /src/Offloc/Prism/Domain/Model/Route/Header.php | UTF-8 | 1,094 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is a part of offloc/prism.
*
* (c) Offloc Incorporated
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Offloc\Prism\Domain\Model\Route;
/**
* Defines the Header model
*
* @author Beau Simensen <... | true |
9ec45b9a3b5c1174166f3175d3e567e9a1bfcfa9 | PHP | fbiztk110/CodePath_globitek_registration | /public/register.php | UTF-8 | 3,958 | 3.03125 | 3 | [
"Apache-2.0"
] | permissive | <?php
require_once('../private/initialize.php');
// Set default values for all variables the page needs.
$firstName = $lastName = $eMail = $userName = "";
// if this is a POST request, process the form
// Hint: private/functions.php can help
$errors = [];
if(is_post_request()){
// Confirm that POST va... | true |
c6280e10bd9b31ff0bb0c981ee506df4654f8d4b | PHP | tr00per92/SoftUni-Projects | /PHP-Projects/OOP-Hotel-Reservation-System/EReservationException.class.php | UTF-8 | 178 | 2.75 | 3 | [] | no_license | <?php
class EReservationException extends Exception
{
public function __construct()
{
parent::__construct("The room is reserved for that period!", 101);
}
} | true |
ee3530877a46b8e05e17c3c98c7a7677d2df09d9 | PHP | jpnut/extended-laravel-auth | /src/Token.php | UTF-8 | 804 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace JPNut\ExtendedAuth;
use Illuminate\Database\Eloquent\Model;
use JPNut\ExtendedAuth\Contracts\Tokenable as TokenableInterface;
use JPNut\ExtendedAuth\Tokenable;
class Token extends Model implements TokenableInterface
{
use Tokenable;
const UPDATED_AT = null;
/**
* The attributes that a... | true |
edab65de79736c36525235eecfee7be6e1a7c248 | PHP | gevannmullins/address_book | /System/MVC/View.php | UTF-8 | 173 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace MVC;
class View
{
public static function render($viewPath, $message)
{
extract($message);
include VIEWS . "$viewPath.php";
}
}
| true |
a54b18cf706f7006896595650ebc11d607c1af07 | PHP | daftpunked2016/mod03 | /protected/modules/trainers/components/ChapterStorage.php | UTF-8 | 1,497 | 3.25 | 3 | [] | no_license | <?php
class ChapterStorage {
/**
*
* @var array
*
* key = chapter_id & value = chapter name
*/
public static $chapters;
/**
*
* @var ChapterStorage instance
*
*/
private static $instance;
public static function setup()
{
if (!static::$instance) {
static:... | true |
e68245d086e8c07b7478bd1c23fce5f7951a55fb | PHP | adelf/laravel.su | /app/Http/Middleware/VersionSelector.php | UTF-8 | 3,193 | 2.53125 | 3 | [] | no_license | <?php
/**
* This file is part of laravel.su package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace App\Http\Middleware;
use App\Model\FrameworkVersion;
use App\Model\Repository\FrameworkVersio... | true |
773eb747f8552334d8739d7a04864ab0267980ce | PHP | AdamLutka/PhpWndb | /examples/wordNet.php | UTF-8 | 443 | 2.515625 | 3 | [] | no_license | <?php
declare(strict_types=1);
use AL\PhpWndb\DiContainerFactory;
use AL\PhpWndb\WordNet;
require_once(__DIR__ . '/../vendor/autoload.php');
$containerFactory = new DiContainerFactory();
$container = $containerFactory->createContainer();
/** @var WordNet */
$wordNet = $container->get(WordNet::class);
$synsets = $w... | true |
409aba1414a23bf6e08eec61e0505d2270145356 | PHP | thugthink/HackThisSite-Old | /application/views/bootstrap/lecture/edit.php | UTF-8 | 1,168 | 2.609375 | 3 | [] | no_license | <?php if (!empty($valid) && $valid): ?>
<div class="page-header"><h1>Edit Lecture</h1></div>
<form class="well form-horizontal" action="<?php echo Url::format('lecture/edit/' . $post['_id'] . '/save'); ?>" method="post">
<label>Title: </label>
<input type="text" name="title" value="<?php echo $post['title']; ?... | true |
21e4f23bc0e9e4d93efe8d08823f854b58462480 | PHP | kvdvadim/test_task | /Components/Router.php | UTF-8 | 1,780 | 2.5625 | 3 | [] | no_license | <?php
class Router{
private $routes;
public function __construct(){
//$routesPath=ROOT.'/config/routes.php';
$this->routes=include(ROOT.'/config/routes.php');
}
private function getURI(){
if(!empty($_SERVER['REQUEST_URI'])){
return trim($_SERVER[... | true |
58a4fe24d11749bd198dc493194002cb40795026 | PHP | drdplusinfo/tables | /src/Measurements/Time/Time.php | UTF-8 | 6,484 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace DrdPlus\Tables\Measurements\Time;
use DrdPlus\Codes\Units\TimeUnitCode;
use DrdPlus\Tables\Measurements\MeasurementWithBonus;
use DrdPlus\Tables\Measurements\Partials\AbstractMeasurement;
use Granam\Integer\Tools\ToInteger;
use Granam\Scalar\Tools\ToString;
use Granam\String... | true |
71de1de9f2bf4aab0826b9d42d9b7fe4a47e3ddc | PHP | brooktran/smd | /protected/service/DomainService.php | UTF-8 | 597 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by JetBrains PhpStorm.
* User: Laojiu
* Date: 13-11-5
* Time: 下午5:29
* To change this template use File | Settings | File Templates.
*/
class DomainService extends AbstractService{
/**
* Returns the static model.
* @return DomainService the static model class
*... | true |
b1fc3cf2578bafa20631a2dd0b5b24b494a6cb7a | PHP | Leadersoftoday/website | /src/LoT/Application/Config/Loader/Yaml.php | UTF-8 | 320 | 2.53125 | 3 | [] | no_license | <?php
namespace LoT\Application\Config\Loader;
use Symfony\Component\Yaml\Yaml as Parser;
class Yaml implements LoaderInterface
{
/**
* @param string $filename
* @return array
*/
public function loadFromFile($filename)
{
return Parser::parse(file_get_contents($filename));
}
}
| true |
3893f6e72261acd9fbcc0a66ca4c80462ab40b0c | PHP | lfboaventura/gravarEValidarUrl | /app/Traits/ToastrTrait.php | UTF-8 | 1,121 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Traits;
use TJGazel\Toastr\Facades\Toastr;
trait ToastrTrait
{
public function messageValidator($validator = null, $time = 5000){
$message = null;
foreach ($validator as $key => $value) {
$message = $message . '<p>* ' . $value . '</p> ';
}
$this->me... | true |
8cab10ea4cf26dcbe00c350c15895fc8da8358d6 | PHP | nonodev96/iFridge | /app/Libraries/MyCustomClass.php | UTF-8 | 185 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Libraries;
class MyCustomClass
{
public function __constructor()
{
}
public function sayHi()
{
return "Hello World!";
}
}
| true |
81808e11f539fbb21e4208bc490776e3344ab6cd | PHP | vl25/TelegramTools | /common/Helpers/madeline/vendor/amphp/mysql/src/ConnectionConfig.php | UTF-8 | 4,170 | 2.671875 | 3 | [] | no_license | <?php
namespace Amp\Mysql;
use Amp\Socket\ConnectContext;
use Amp\Sql\ConnectionConfig as SqlConnectionConfig;
final class ConnectionConfig extends SqlConnectionConfig
{
const DEFAULT_PORT = 3306;
const BIN_CHARSET = 45;
// utf8mb4_general_ci
const KEY_MAP = ['hostname' => 'host', 'username' => 'user'... | true |
fd7eaf1d07ee6650d7437f481fa0868abeaea040 | PHP | NemanjaaP/It255-Projekat | /it255/functions.php | UTF-8 | 18,602 | 2.765625 | 3 | [] | no_license | <?php
include("config.php");
if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
die();
}
// ------------------------------------------------- LOGOVANJE I REGISTRACIJA -------------------------------------------------------
function checkIfLoggedIn(){
global $conn;
if(isset($_SERVER['HTTP_TOKEN'])){
... | true |
bb79cbbcb008431b23dcdf576f0521375fa876fa | PHP | 2019Ganjil-PemrogramanBerbasisWeb/tugas2-web-database | /insert.php | UTF-8 | 1,947 | 2.8125 | 3 | [] | no_license | <?php
$name = $_POST['name'];
$email = $_POST['email'];
$pass = $_POST['pass'];
$re_pass = $_POST['re_pass'];
if (!empty($name) || !empty($email) || !empty($pass) || !empty($re_pass)) {
$host = "localhost";
$dbUsername = "root";
$dbPassword = "";
$dbname = "kospin";
//create connection
... | true |
b2c8653521a4725353de97c90de2150aa3bf8cd7 | PHP | william-wqq/winwin | /app/Scopes/PlayerScope.php | UTF-8 | 750 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: wugang
* Date: 2017/4/8
* Time: 下午2:53
*/
namespace App\Scopes;
use Illuminate\Database\Eloquent\Scope;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
class PlayerScope implements Scope
{
public function apply(Builder $builder, Mode... | true |
b043b41aefe6267ed6dceca65b357351a0793372 | PHP | dalianasser931/New-Task | /handleshopping.php | UTF-8 | 4,464 | 2.625 | 3 | [] | no_license | <?php include('inc/head.php'); ?>
<?php
$quantity1 = $_POST['quantity1'];
$quantity2 = $_POST['quantity2'];
$quantity3 = $_POST['quantity3'];
$quantity4 = $_POST['quantity4'];
$price1 = $_POST['price1'];
$price2 = $_POST['price2'];
$price3 = $_POST['price3'];
$price4 = $_POST['price4'];
$currency = $_POST['currency'];... | true |
b75bef783b637dea5df94ffc32bd9e7522933343 | PHP | chpxwdd/corportal | /module/Geo/src/Geo/Entity/Country.php | UTF-8 | 3,672 | 2.5625 | 3 | [] | no_license | <?php
namespace Geo\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="geo_country")
* @ORM\Entity(repositoryClass="\Geo\Repository\Country")
*/
class Country {
/**
*
* @ORM\Id
* @ORM\Column(type="integer", name="id")
* @ORM\GeneratedValue(str... | true |
6f671d458c2e906bba4aa0af50773c17ad21920f | PHP | sanjaygithub-94/shopping-cart | /app/Http/Controllers/ShoppingController.php | UTF-8 | 2,161 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Services\ShoppingService;
use App\Models\Product;
use App\Models\Cart;
use App\Models\Order;
use Illuminate\Http\Request;
use Session;
use Auth;
class ShoppingController extends Controller
{
protected $shoppingService;
public function __construct(ShoppingService ... | true |
149bc1c740443628fe76428418f2a04a6f5eae7f | PHP | Arif46/laravel_lumen_crud | /app/Http/Controllers/v1/UserController.php | UTF-8 | 2,353 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\v1;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\User;
class UserController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
... | true |
4057e7bb12cc367cd6f69785da9159de9287c37d | PHP | rshiva/MyDocuments | /01-notes-programming /08-php/12-network-and-web-service/XML/read-element-and-attribute/index.php | UTF-8 | 730 | 3.3125 | 3 | [] | no_license | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<?php
$xml = simplexml_load_file("bo... | true |
b870771a9e44dfc2542a8d9a7565197611faa53b | PHP | abdibogor/Abdifatah-Abdilahi | /01_Barashada Aasaasiga php Afsomali/15_Lesson11 Comparison Operators/operators.php | UTF-8 | 862 | 3.359375 | 3 | [] | no_license | <!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Abdibogoreh</title>
</head>
<body>
<?php
$a = 10;
$b = 4;
if ($a == $b) {
echo "$a wuxuu le eg yahay $b";
}else{
echo "$a ma le eka $b <br />";
}
if ($a < $b){
echo "$a wuu k... | true |
59d451e4f9bed900e22c947936ea2c845db8fd09 | PHP | raezon/Restaurant-Management | /Restaurant-Management/Types_food_action.php | UTF-8 | 2,316 | 2.515625 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html>
<head>
<title></title>
<style type="text/css">
</style>
</head>
<body>
</body>
</html>
<?php
//action.php
if(isset($_POST["action"]))
{
$connect = mysqli_connect("localhost", "root", "", "tutorial");
if($_POST["action"] == "fetch")
{
$query = "SELECT * FROM type ORDE... | true |
9f4af4dbadcad39ca634dbbfec74cec16e56a0a9 | PHP | bryhardt/grcpool | /models/GrcPool/Boinc/Account/User.php | UTF-8 | 1,928 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/* ***********************************************************************
THIS FILE WAS CREATED AUTOMATICALLY BY PHP MODEL/OBJECT CREATOR
MANUAL MODIFICATIONS WILL BE AUTOMATICALLY OVERWRITTEN
************************************************************************ */
abstract class GrcPool_Boinc_Account_User_MO... | true |
c92e1c7848fc569094ccb916840c41fee3170228 | PHP | Matl21/sistema_pruebas_tecnicas | /controllers/UsuariosController.php | UTF-8 | 894 | 2.671875 | 3 | [] | no_license | <?php
require_once('./models/UsuariosModel.php');
class UsuariosController {
private $model;
public function __construct() {
$this->model = new UsuariosModel();
}
public function create( $datos = array() ) {
return $this->model->create($datos);
}
public function read() {
return $thi... | true |
1688199634d18257dac796b82828cf27596d74a9 | PHP | tiepnguyen1610/FirstProject | /app/Cart.php | UTF-8 | 1,675 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
class Cart
{
public $items = [];
public $totalPrice = 0;
public $totalQuantity = 0;
public function __construct()
{
$this->items = session('cart') ? session('cart') : [];
$this->totalPrice = $this->getTotal_Price();
$this->totalQuantity = $this->getTotal_Quantity();
}
/**
* add a... | true |
f0ab6a52b2459db89441febef116fc8614a54af3 | PHP | sabinsharma/MentorHub | /MentorHub/Model/TopicsDetail.php | UTF-8 | 1,191 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: sharm
* Date: 4/04/2017
* Time: 3:18 PM
*/
class TopicsDetail
{
public $topic_id;
public $reply;
public $active;
public $replied_by;
/**
* @return mixed
*/
public function getTopicId()
{
return $this->topic_id;
}
/**
... | true |
2cf0df5980525b46a77f6f90225b57caeadfeb36 | PHP | cristianoferr/projetos | /web/NovoEntityManager/include/modulos/main_page/main_page_assist.php | UTF-8 | 7,584 | 2.59375 | 3 | [] | no_license | <?php
/*
* Essa classe é responsável por mostrar detalhes na tela principal
*/
class MainPageAssist {
private $arrSubColumn;
private $arrFeaturette;
function __construct() {//coberto
$this->arrSubColumn = array();
$this->arrFeaturette = array();
$this->iniciaSubColumn();
... | true |
745ba6d34efc588e146cb4cb459218d9d6bc0c42 | PHP | elasa/barcode | /app/Http/Controllers/PacienteController.php | UTF-8 | 2,744 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Paciente;
class PacienteController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$pacientes = Paciente::orderBy('id','D... | true |
7486ff37d38b66e84a0a6f561b588d3e3c712372 | PHP | xp-framework/rest | /src/test/php/webservices/rest/unittest/ExecutionTest.class.php | UTF-8 | 3,122 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php namespace webservices\rest\unittest;
use unittest\TestCase;
use webservices\rest\Endpoint;
use webservices\rest\RestRequest;
use webservices\rest\RestException;
use io\streams\MemoryInputStream;
use peer\http\HttpConstants;
use lang\Type;
use lang\ClassLoader;
class ExecutionTest extends TestCase {
private $f... | true |
3895784b97621c652cd8ed13a3c9c9bbca70ff16 | PHP | kaistaerk/hcaptcha-bundle | /Exception/BadAnswerFromHCaptchaException.php | UTF-8 | 538 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace MeteoConcept\HCaptchaBundle\Exception;
/**
* An exception representing a bad answer from the hCaptcha API
* (either no response, or HTTP code !== 200, or response body not looking like the specification, etc.)
*/
class BadAnswerFromHCaptchaException extends \RuntimeException
{
/**
* @brief... | true |
0deffe0044d02136cdb53ac01e59d936358aad2a | PHP | AppStateESS/nomination | /class/exception/PermissionException.php | UTF-8 | 346 | 2.59375 | 3 | [] | no_license | <?php
namespace nomination\exception;
/**
* PermissionException
*
* This right here is a permission exception.
*
* @author Robert Bost <bostrt at tux dot appstate dot edu>
*/
class PermissionException extends NominationException
{
public function __construct($message, $code = 0)
{
parent::__const... | true |
6c76a4d1b2fb8d29ace88069b7e14be79ca71558 | PHP | Imsaho/ddd-workshops | /src-ddd/Query/Sort/NullSort.php | UTF-8 | 361 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace TSwiackiewicz\DDD\Query\Sort;
/**
* Class NullSort
* @package TSwiackiewicz\DDD\Query\Sort
*/
class NullSort extends Sort
{
private const ORDER_NO_SORT = '';
/**
* NullSort constructor.
*/
final public function __construct()
{
parent::__co... | true |
572351fd27d1abde89f69397d9139dbe50b23989 | PHP | DigitalFeonix/aoc2018 | /Day 25/Vector4.php | UTF-8 | 570 | 3.703125 | 4 | [] | no_license | <?php
class Vector4
{
public $x;
public $y;
public $z;
public $w;
function __construct(int $x = 0, int $y = 0, int $z = 0, int $w = 0)
{
$this->x = $x;
$this->y = $y;
$this->z = $z;
$this->w = $w;
}
public function distTo(Vector4 $other)
{
r... | true |
cfd14fd797a082975cee06c403ece3672cb07884 | PHP | NiharRan/discount | /application/models/Restaurant_Model.php | UTF-8 | 9,048 | 2.65625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class Restaurant_Model extends CI_Model
{
private $table = 'restaurants'; // restaurant table
function __construct()
{
parent::__construct();
$this->load->model('user_model');
$this->load->model('tag_model');
$this->load->model('... | true |
f9d5e5fc6420631c2973bf9bcb6997c66211d16f | PHP | esasby/cmsgate-core | /src/esas/cmsgate/hro/accordions/AccordionTabHRO_v1.php | UTF-8 | 3,015 | 2.609375 | 3 | [] | no_license | <?php
namespace esas\cmsgate\hro\accordions;
use esas\cmsgate\utils\htmlbuilder\Attributes as attribute;
use esas\cmsgate\utils\htmlbuilder\Elements as element;
class AccordionTabHRO_v1 implements AccordionTabHRO
{
protected $key;
protected $header;
protected $body;
/**
* @var boolean
*/
... | true |
ac6ac3852ae4ee395b6793fe0e4a21487be22d19 | PHP | Diego-Brocanelli/documentacao-processo-mentoria | /reunioes/progressos/Iniciante/Desafios/imc.php | UTF-8 | 2,279 | 2.53125 | 3 | [
"MIT"
] | permissive | <!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://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.3/css/bootstrap.min.css">
<tit... | true |
26bcb18a17b4ab1427dd8d1ee665765539a2631d | PHP | ShuoTheOne/WP3Beadando | /application/controllers/Buildings.php | UTF-8 | 6,643 | 2.515625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Buildings
*
* @author csaba
*/
class Buildings extends CI_Controller{
//put your code here
pub... | true |
2f9f0f78b12fe6b95433fabce0596fa16767a8fd | PHP | nulpunkt/php-self-organizing-list | /src/Nulpunkt/SAList/CountList.php | UTF-8 | 1,237 | 3.46875 | 3 | [] | no_license | <?php
namespace Nulpunkt\SAList;
/**
* Count list implementation
* Every element has a count of how many times it has been
* access. The most access item is in the front
**/
class CountList extends SAList
{
/**
* Given a callback, which returns true or false,
* find an element which the callback retu... | true |
63c9748564c1ab94c96c337458623fe1af6ea17f | PHP | mixartemev/yii2-modules-dynamic_properties | /migrations/m160929_112918_create_object_type_table.php | UTF-8 | 838 | 2.765625 | 3 | [] | no_license | <?php
use yii\db\Migration;
/**
* Handles the creation for table `object_type`.
*/
class m160929_112918_create_object_type_table extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->createTable('object_type', [
'id' => $this->primaryKey(),
'nam... | true |
8a89c11a21640c9b0cff95ba77255944537756de | PHP | oleg-melnic/laravel-doctrine-crud-inheritance | /app/Crud/Inheritance/Inheritance.php | UTF-8 | 4,660 | 2.9375 | 3 | [] | no_license | <?php
namespace App\Crud\Inheritance;
use App\Crud\CrudInterface;
use App\Crud\Inheritance\Exception\DomainLogic;
use App\Crud\Inheritance\Exception\InvalidArgument;
use LaravelDoctrine\ORM\Facades\EntityManager;
/**
* Class Inheritance
*/
class Inheritance extends ResolverAbstract
{
/**
* Registered strat... | true |
e2e51b1b501d45b3beb447809c76fdd02a4479cf | PHP | Ethernot/SMS | /showLogs.php | UTF-8 | 680 | 2.671875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title> Switch management Software </title>
</head>
<body>
<h1> Logs: </h1>
<br>
<?php
if (file_exists("logs")) {
if ($handle = opendir('logs/')) {
while (false !== ($entry = readdir($handle))) {
if ($entry != "." && $entry... | true |
039ebb0bf343ea213451aa51ea38ce7bbf0877a3 | PHP | mjau-mjau/x3 | /app/auth.inc.php | UTF-8 | 1,889 | 2.578125 | 3 | [] | no_license | <?php
Class BasicAuth {
//
private function server($var) {
return isset($_SERVER[$var]) && !empty($_SERVER[$var]) ? $_SERVER[$var] : false;
}
private function prop($arr, $val, $default = false) {
return isset($arr[$val]) && !empty($arr[$val]) ? $arr[$val] : $default;
}
// construct
function __c... | true |
01f18a02fb57841072697127283e0015ad143014 | PHP | abnoba12/codeSnippets | /Programming Languages/PHP/notification.php | UTF-8 | 631 | 2.765625 | 3 | [] | no_license | <?php
//Came orgionally from the CBORD project file \inc\notify.php
//This uses a series of session variables to display messages in the header.
//** One time message display.
if (isset($_SESSION['singleMessage']) && !empty($_SESSION['singleMessage'])) {
echo '<div id="notification"><h3>';
echo $_SESSION['sing... | true |
1addb2e33153734c93a9e566836792b772a5d2de | PHP | HabibRayan/online-exam-system | /_ide_helper_models.php | UTF-8 | 7,245 | 2.515625 | 3 | [] | no_license | <?php
// @formatter:off
/**
* A helper file for your Eloquent Models
* Copy the phpDocs from this file to the correct Model,
* And remove them from this file, to prevent double declarations.
*
* @author Barry vd. Heuvel <barryvdh@gmail.com>
*/
namespace App\Models{
/**
* App\Models\Category
*
* @property in... | true |
8a127ae75814934df449666fd65e08927e7ebbbb | PHP | M4R7iNP/aether | /src/Console/Kernel.php | UTF-8 | 1,792 | 2.546875 | 3 | [] | no_license | <?php
namespace Aether\Console;
use Aether\Aether;
use BadMethodCallException;
use Illuminate\Contracts\Events\Dispatcher;
use Illuminate\Contracts\Console\Kernel as KernelContract;
class Kernel implements KernelContract
{
/**
* @var \Aether\Aether
*/
protected $aether;
/**
* @var \Illumi... | true |
24ad746d77a5bb43b56e3f340f484e931d7dfd14 | PHP | Qronicle/advent-of-code-2019 | /day14/part2.php | UTF-8 | 6,251 | 3.09375 | 3 | [] | no_license | <?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
$start = microtime(true);
// Parse input to reaction formulas array
$input = file_get_contents('input.txt');
$formulas = stringToFormulas($input);
$oreAmount = 1000000000000;
// Let a NanoFactory create some fuel!
$nanoFactory = new NanoFactory($formulas);
... | true |
e079dba13e373f4e5470237f1fa9b67234e0d07e | PHP | 17480837/translatewiki | /groups/FUDforum/Suggester.php | UTF-8 | 526 | 3.078125 | 3 | [] | no_license | <?php
/**
* @author Siebrand Mazeland
* @author Justin Du
* @license GPL-2.0+
*/
class FudForumSuggester implements InsertablesSuggester {
public function getInsertables( $text ) {
$insertables = [];
// Variables like {VAR: <string>}
$matches = [];
preg_match_all(
'/{VAR: [^}]+}/',
$text,
$match... | true |
094ffdd5bbf6755aeaddc56a4b642102c4966cb9 | PHP | nestor1610/control_de_notas | /app/Nota.php | UTF-8 | 688 | 2.546875 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Nota extends Model
{
protected $fillable = ['nota', 'lapso'];
/*
indicamos una relacion de muchos a muchos con el modelo alumnos
ya que de esta forma se usaran los metodos de laravel para acceder a
los datos relacionadoes
*/
p... | true |
980945136d1d09e103f9061820f0c4b4ad0d2222 | PHP | philwebkronus/PeGS-3.0-NEW | /VMS/protected/models/CouponBatchModel.php | UTF-8 | 15,924 | 2.578125 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of CouponBatchModel
*
* @author elperez
*/
class CouponBatchModel {
public function getActiveCouponBatch($couponBatchTable, $voucherCode){
$query = "SELECT Status, Amount, Date... | true |
3e59a4271319403a69998da08eade365ae4da960 | PHP | andrianavalonaravalison/dadah_phpoo | /01-bases/bases.php | UTF-8 | 29,617 | 3.84375 | 4 | [] | no_license |
<style>
body {
margin-bottom: 400px;
}
h2 {
border-top : 1px solid navy;
border-bottom: 1px solid navy;
color: navy;
}
</style>
<?php
// ----------------------------------
echo '<h2> Les balises PHP </h2>';
// ----------------------------------
?>
<?php
// pour ouvrir un passage e... | true |
c56c96834ce1904413289b8d2ec0a7f95acc68fa | PHP | ShrutiTN/registration-system | /php/dashboard.php | UTF-8 | 1,005 | 2.6875 | 3 | [] | no_license | <?php
if(isset($_GET['msg'])){
echo "<h6 style='color:red;'>".$_GET['msg']."</h6>";
}
include("includes/dbconnect.php");
$status="";
echo "Welcome To DashBoard<br/><br/><br/>";
$sql = "select * from usertable";
$result = mysqli_query($conn, $sql);
echo "<table>";
echo "<tr><th>ID</th><th>First Name</t... | true |
b717c47e10d242d852f7f320572d96a5407d8f18 | PHP | Chantouch/cam-market-place | /app/Model/Tag.php | UTF-8 | 1,933 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Model;
use Cviebrock\EloquentSluggable\Sluggable;
use Illuminate\Database\Eloquent\Model;
use Vinkla\Hashids\Facades\Hashids;
class Tag extends Model
{
use Sluggable;
protected $appends = ['hashid'];
protected $fillable = ['tags', 'taggable_id', 'taggable_type'];
//=============... | true |
6fb0a192fd59d9ee89b3b3646e1df4039f960b5b | PHP | nghuy4567/WAD-PHP-20-2019 | /BT/BT2-3.php | UTF-8 | 808 | 3.21875 | 3 | [] | no_license | <?php
echo "<br>";
$thu=2;//gán giá trị cho biến.
if($thu =2){
echo "Thu 2";
}else if ($thu = 3){
echo "Thu 3";
}else if ($thu = 4){
echo "Thu 4";
}else if ($thu = 5){
echo "Thu 5";
}else if ($thu = 6){
echo "Thu 6";
}else if ($thu = 7){
echo "Thu 7";
}else{
echo "Chu N... | true |