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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ac9b73afc2101f3dc8ad201174da2082b50538f8 | PHP | Shekharv/cumula-core | /Cumula/Components/Stash/Stash.php | UTF-8 | 7,075 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Cumula\Components\Stash;
use \Cumula\Base\Component as BaseComponent;
use \Cumula\Autoloader as Autoloader;
/**
* Stash Component
* @package Cumula
* @author Craig Gardner <craig@seabourneconsulting.com>
**/
class Stash extends BaseComponent
{
/**
* Properties
*/
/**
* Table of stashes and... | true |
3031347110b18812f30b2886b18ff6b19e10b8d0 | PHP | gemafajar09/ayo_hijrah | /admin/CRUD/modul_kategori/merek.php | UTF-8 | 11,526 | 2.59375 | 3 | [] | no_license | <?php
if (isset($_GET['aksi'])) {
$aksi = $_GET['aksi'];
switch ($aksi) {
case "tambahmerek":
if (isset($_POST['save'])) {
// upload logo
// ambil data file
// $namaFile = $_FILES['logo']['name'];
// $namaSementara = $_FILES['logo']['tmp_name'];
// tentukan lokas... | true |
943c01e3f108d6966459976f3587530b1b5c5dec | PHP | roadiz/core-bundle | /src/Security/Authorization/Voter/RealmVoter.php | UTF-8 | 3,336 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace RZ\Roadiz\CoreBundle\Security\Authorization\Voter;
use RZ\Roadiz\CoreBundle\Entity\Realm;
use RZ\Roadiz\CoreBundle\Model\RealmInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Com... | true |
b5e4ddabc3d500c205b30d0977d8942d7cbcc53f | PHP | vhniii/php_alused | /form/ruumala.php | UTF-8 | 314 | 2.796875 | 3 | [] | no_license | <?php
$pii = 3.14;
$r = $_GET['r'];
$h = $_GET['h'];
$Kera = 4/3 * $pii * $r*$r*$r;
$Koonuse_pp = $pii * ($r*$r);
$Koonus = $Koonuse_pp * $h * 1/3;
$Silinder = $pii * ($r*$r) * $h;
echo 'Kera ruumala on: '.$Kera.'<br>';
echo 'Koonuse ruumala on: '.$Koonus.'<br>';
echo 'Silindri ruumala on: '.$Silinder.'<br>'; | true |
7b4a618d0c11c15bb7f0e8531b18a09ef3da6cc0 | PHP | BaranovArtyom/my_ciframe | /PHP/video32/json.php | UTF-8 | 398 | 2.671875 | 3 | [] | no_license | <?php
echo '<h1> JSON </h1>';
$arr = [
'fio' => 'Иванов Степан',
'age' => '33' ,
'vk_url' => 'https://vk.com',
'learn' => ['HTML', 'CSS', 'PHP']
];
echo json_encode($arr, JSON_UNESCAPED_UNICODE,JSON_UNESCAPED_SLASHES);
//json_decode(json)
$json = '{"people":"Sodorov","address":"Lenina 236",... | true |
902e3c4e6618aca3206c685b9ffbb3e24f5a72f4 | PHP | etcgroup/text-prizm | /src/server/views/codebrowser.php | UTF-8 | 3,915 | 2.71875 | 3 | [] | no_license | <?php
/**
* Renders a table of example messages with context, for a specific code.
*/
/**
* Generates a link to a modified code examples view.
*
* @param string $label The link label
* @param string $which The type of example list to show
* @param int $code_id The code id to show examples for
* @param int $num... | true |
081b68c77d99d70a1e5f18bf38af7ee94112da5c | PHP | akeebismail/kibb-school-api | /database/migrations/2018_03_11_160420_create_class_results_table.php | UTF-8 | 934 | 2.6875 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateClassResultsTable extends Migration
{
/**
* Run the migrations.
* class results
* <p>
* results to contain student_id, subject code, result obtained... | true |
733806494416937e7e27abac0e4e1b7760f2dc68 | PHP | OninoDominik/HTMLCSS | /ConnexionBdd/class_licencie.php | UTF-8 | 506 | 2.859375 | 3 | [] | no_license | <?php
/**
*
*/
class Licencie
{
var $id ='';
var $tbl = "licencie";
function __construct($id)
{
if ($id=='new')
{
$db = new Database();
$this->id=$db->insertNew($this->tbl);
}
else if (is_int($id)){
$this->id=$id;
}
}
function set($champs,$value){
$db = new Database();
$db->revise(... | true |
fd4d74f94d3f70a142a7c8eb9c25dedd0a85b914 | PHP | Sanjay55/smartsmith | /CsvToArray.php | UTF-8 | 1,367 | 3.53125 | 4 | [] | no_license |
<?php
/**
* Convert a CSV file into an associated array.
* The first row should contain the array keys.
*
* Example: echo '<pre>';
print_r(csv_to_array('myCSVFile.csv'));
echo '</pre>';
*
* @param string $filename Path to the CSV file
* @param string $header_exist If the first line is header or not
... | true |
dae9e173e431134e43db410824013ae273cbccec | PHP | Cerdic/spip-zone-plugins | /prestashop_api/trunk/prestashop_api_fonctions.php | UTF-8 | 6,238 | 2.546875 | 3 | [] | no_license | <?php
/**
* Fonctions utiles au plugin Webservice Prestashop
*
* @plugin Webservice Prestashop
* @copyright 2017
* @author Matthieu Marcillaud
* @licence GNU/GPL
* @package SPIP\Wsps\Fonctions
*/
if (!defined('_ECRIRE_INC_VERSION')) {
return;
}
// charger les fonctions pour le compilateur SPIP... | true |
f436411a625ce685081ac44e53baf7ebfffa53a6 | PHP | thermonuclear/city_call | /app/db/Database.php | UTF-8 | 1,756 | 3.203125 | 3 | [] | no_license | <?php
namespace Db;
use PDOException;
use PDO;
class Database
{
public string $host = 'mysql';
public string $dbname = 'app';
public string $table = 'products';
public string $user = 'app';
public string $pass = 'app';
public $db;
public function __construct() {
try {
... | true |
948d60ca28b63ae16b61d4ce7e529e831895a0c4 | PHP | ed-project/ed-project | /application/modules/main/models/Categories_model.php | UTF-8 | 2,243 | 2.828125 | 3 | [] | no_license | <?php
/**
* Модель для управления категориями
*
* @author Mihairu <mis507@yandex.ru>
* @version 1.0
* @package controllers
*/
defined('BASEPATH') OR exit('No direct script access allowed');
class Categories_model extends CI_Model {
public function getAllCategories($module = "news") {
return $this->db->get_wh... | true |
1326ede8939073c4cf522c6386daa96b805b180f | PHP | Xdiad47/QR_College_Student_Attendance_Management_System | /qr.php | UTF-8 | 1,206 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
final class BarcodeQR {
const API_CHART_URL = "http://chart.apis.google.com/chart";
private $_data;
public function bookmark($url = null) {
$this->_data = "{$url}";
}
public function content($type = null, $size = null, $content = null) {
$this->_data = "CNTS:TYPE:{$type};LNG:{$size};BODY:{$con... | true |
9ed5cd20198f12b0d30765fdfbbffaa50ca277b7 | PHP | miguelCasvas/phoneup.api | /app/Models/ConsultaPersonalizada.php | UTF-8 | 5,616 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Scope;
class ConsultaPersonalizada implements Scope
{
const PALABRAS_RESERVADAS = ['fields', 'sort', 'embebed', 'offset', 'limit'];
/**
* @var
*/
priva... | true |
258df7264a0839ed204560709cae45d05d8a3fbc | PHP | ilyaidea/ilya-CMS | /app/Library/Authenticates/Auth.php | UTF-8 | 2,246 | 2.734375 | 3 | [] | no_license | <?php
/**
* Summary File Auth
*
* Description File Auth
*
* ILYA CMS Created by ILYA-IDEA Company.
* @author Ali Mansoori
* Date: 7/30/2018
* Time: 6:30 PM
* @version 1.0.0
* @copyright Copyright (c) 2017-2018, ILYA-IDEA Company
*/
namespace Lib\Authenticates;
use Phalcon\Mvc\User\Component;
use Ilya\Models... | true |
416b885d5506edf1a92caee84ac11a4fd6d83d90 | PHP | louiealmeda/FOGS | /php/menu-driver.php | UTF-8 | 5,835 | 2.515625 | 3 | [] | no_license | <?php
/////reports menu//////
function SaveGradeSettings()
{
$_POST['Component'] = json_encode($_POST['Component']);
ExecuteQuery("UPDATE Subject SET Base = {$_POST['Base']}, Component = '{$_POST['Component']}' WHERE SubjectID = {$_SESSION['SubjectID']}");
return LoadSubject();
}
function EditGradeSettings()
{... | true |
0764fd2b2b80a1d34f708aae9e45cc8ed81abbb1 | PHP | t-ichi324/sesame | /lib/DB/Libs/Entity/_ABS_Entity.php | UTF-8 | 461 | 2.625 | 3 | [] | no_license | <?php
namespace DB\Libs\Entity;
abstract class _ABS_Entity extends \IEntity{
protected static function __CR_TB(array $arr){
$s = "CREATE TABLE ".static::TABLE()."(";
foreach($arr as $k => $v){
if(empty($v)){ $v = "TEXT"; }
$s .= $k." ".$v.",";
}
$s.= "collatio... | true |
2e6d6ebcb8fbcdbea51f2007a6a9e6d0cb03d9d9 | PHP | Arame27/Examen_PHH2 | /Gestion des étudiants/views/security/register.html.php | UTF-8 | 13,171 | 2.65625 | 3 | [] | no_license | <?php
use ism\lib\Session;
use ism\lib\Role;
use ism\lib\Validator;
$mat=Validator::generateRandomString();
//verification des erreur de session
$array_error = [];
if (Session::keyExist("array_error")) {
//recuperation des erreur de la session dans la variable local
$array_error = Session::getSession("array_e... | true |
406008e0454c98b0283d36c432ed1d224130c097 | PHP | chan201/Tutor_Dashboard | /database/seeds/LocationsTableSeeder.php | UTF-8 | 4,370 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Aham\Models\SQL\Country;
use Aham\Models\SQL\State;
use Aham\Models\SQL\City;
use Aham\Models\SQL\Locality;
use Aham\Models\SQL\Location;
use Aham\Models\SQL\DayType;
use Aham\Models\SQL\LocationCalendar;
use Aham\Models\SQL\Classroom;
use Aham\Models\SQL\ClassroomSlot;
use A... | true |
2629a5f64354132335fabc3d41ac1bf62139a17c | PHP | nishigori/tddbc_tokyo_1.7_for_PHP_testCode | /wiki_engine/WikiEngine.php | UTF-8 | 1,162 | 3.328125 | 3 | [] | no_license | <?php
class WikiEngine
{
const HEADER_MAX_LEVEL = 6;
const HEADER_PATTERN = '/^(=+) .+ (=+)$/';
public function toHtml($input)
{
if (!is_string($input)) {
$error_message = 'Argumrnt is not string type';
throw new InvalidArgumentException($error_message);
}
... | true |
154f3addf25c8aabaede8090a0d6c11b6ee4742a | PHP | AjayKarki/kunyo-api-sampling | /Modules/Application/Http/Rules/CheckOldPassword.php | UTF-8 | 409 | 2.515625 | 3 | [] | no_license | <?php
namespace Modules\Application\Http\Rules;
use Illuminate\Contracts\Validation\Rule;
class CheckOldPassword implements Rule
{
public function passes($attribute, $value): bool
{
return \Hash::check($value, optional(auth()->user())->password);
}
public function message(): string
{
... | true |
a6866b038c4831cee4de2aa5259ea57d2cd9f4cd | PHP | mhedengren/PHP-shopping-cart | /partials/array_db.php | UTF-8 | 315 | 3.0625 | 3 | [] | no_license | <?php
include 'database_connection.php';
//Fetching the products from database.
$statement = $pdo->prepare("SELECT * FROM all_products");
//Execute it
$statement->execute();
//And fetch every row that it returns. $products is now an Associative array
$all_products = $statement->fetchAll(PDO::FETCH_ASSOC);
?> | true |
a472e6fe863f758e3ecb198daadb263191f489e6 | PHP | xetra-development/bible | /verse.php | UTF-8 | 528 | 2.59375 | 3 | [] | no_license | <?php
if($_POST && !empty($_POST["verse"]) && !empty($_POST["book"])) {
?>
<!DOCTYPE html>
<html>
<head>
<title>Bible | ExplosiveNight</title>
</head>
<body>
<p><strong><?php echo htmlspecialchars(ucwords($_POST["book"])); ?></strong> <?php echo file_get_contents("http://labs.bible.org/api/?passage=".ur... | true |
7ab378822353fa5669d9c98c5c206000d0a32554 | PHP | twonex21/hr2.0-github-prvt | /core/lib/smarty/plugins/function.secure_link.php | UTF-8 | 1,254 | 2.515625 | 3 | [] | no_license | <?php
function smarty_function_secure_link($params, &$smarty){
$output = "";
$linkName = $params['linkName'];
$linkValue = $params['linkValue'];
$linkType = $params['linkType'];
$class1 = $params['class1'];
$class2 = $params['class2'];
$permission = $params['permission'];
switch ($linkT... | true |
2b448429cf80a52493048cb078067b42e07a4cc4 | PHP | Shashwat986/IITK-Authenticated-Survey | /inpage.php | UTF-8 | 951 | 2.53125 | 3 | [] | no_license | <?php session_start(); ?>
<html>
<head><title>Survey</title></head>
<body>
<?php
// If the session variables haven't been set.
if (!isset($_SESSION["auth"]) || $_SESSION["auth"]!="true" || !isset($_SESSION["username"]))
{
echo "Login Error";
exit();
}
$username = htmlentities($_SESSION["username"]);
echo "Welcom... | true |
31c4c08682536445e083dcc1e0c6125775244747 | PHP | alex-mrc92/evaluacion | /assets/functions/contribuyentes/contribuyentes_update.php | UTF-8 | 1,828 | 2.546875 | 3 | [] | no_license | <?php
/**
* Script encargado de actualizar los datos del contribuyente
* @method POST
* @return string
* @author Alejandro Mirsha Rojas Calvo
* @author alikey01@gmail.com
*
*/
error_reporting(E_WARNING | E_ERROR);
date_default_timezone_set('America/Mexico_City');
require_once '../connection/functi... | true |
c719e4844affae2cd9e33df45c8f8ec0cc55226b | PHP | JohnathonKoster/collector | /src/Utils/Analyzer/Visitors/TraitUsedVisitor.php | UTF-8 | 620 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace Collector\Utils\Analyzer\Visitors;
use PhpParser\Node;
use PhpParser\Node\Name;
use PhpParser\Node\Expr\TraitUse;
use PhpParser\NodeVisitorAbstract;
class TraitUsedVisitor extends NodeVisitorAbstract
{
/**
* A list of traits discovered by the visitor.
*
* @var array
*/
protected $traitsUs... | true |
9fc227c584851d4c736c175d17b0bee463203111 | PHP | afazou/demo | /kefu-client/tests/LoginTest.php | UTF-8 | 5,725 | 2.59375 | 3 | [] | no_license | <?php
use PHPUnit_Framework_TestCase as TestCase;
use PHPUnit_Extensions_Database_TestCase_Trait as DatabaseTestCaseTrait;
use PHPUnit_Extensions_Database_DataSet_ArrayDataSet as DatabaseArrayDataSet;
use \Kefu\Lib\Login;
use \Kefu\Lib\Exception as KfException;
class LoginTest extends TestCase
{
use Databas... | true |
10fc9f9f294dc144b2f1cc989b6b0c90cb71adce | PHP | blindacre/typeframe-kernel | /source/classes/Bam/Json.php | UTF-8 | 1,736 | 3.25 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
BAM JSON class
requires requestIsAjax() and Typeframe::Redirect()
*/
class Bam_Json
{ /*
constants and variables
*/
const FAILURE = -1;
const NO_DATA = 0;
const SUCCESS = 1;
/*
private static functions
*/
private static function _addRedirectToData($data, $redirect)
{
if (!is_null($redire... | true |
c6e7ce240ca17a3be3b06fc856c051f2797c1d37 | PHP | pablit07/Rent2Haul | /httpdocs/garrett-work/reviews.php | UTF-8 | 5,768 | 2.859375 | 3 | [] | no_license | <?php include('includes/top.php'); ?>
<?php
$limit = 10;
$adjacents = 3;
/* Get Count. */
$query = "SELECT * FROM ".TBL_REVIEW."";
$total_pages = mysql_query($query);
$total_pagesc = mysql_num_rows($total_pages);
$total_pages = $total_pagesc;
/* Get Count. */
$targetpage = "reviews.php";
$page ... | true |
3f756c0296231f71649e028653bfde221205fe9a | PHP | julie-oh/homepg | /html/board/board_write2.php | UTF-8 | 4,939 | 2.671875 | 3 | [] | no_license | <?php
// 게시판 코드 답지
// 날짜정보를 현지 시간에 맞춘다
// date()함수를 사용하기 앞서 필요한 작업이다
date_default_timezone_set('Asia/Seoul');
header('Content-type text/html; charset=utf-8');
// 이 두 파일은 반드시 필요한 파일이기 때문에 include 보다는 require가 맞다
// include는 해당 파일을 가져오는게 실패하면 무시하지만
// require는 프로그램이 죽어버리기 때문이다.
require_once("../sessi... | true |
c1a41316f8f80cbd653099dba2a6a1a388bd6e7f | PHP | ucassh/joeapi | /src/CommentFactory.php | UTF-8 | 771 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Joe;
class CommentFactory
{
/**
* @param array $fields
* @return Comment
*/
public static function create(array $fields)
{
$comment = new Comment;
return $comment->setContentId($fields['id'])
->setDate(new \DateTime($fields['data']))
-... | true |
2c7291f988b95f27988db3d4106974afd011de5c | PHP | hasanbasri2307/test_pricebook | /2.php | UTF-8 | 2,118 | 3.71875 | 4 | [] | no_license | <?php
/*
e = empty space
w = wall
a = archer
*/
class ArcherGame {
private $room;
private $archers;
private $wall;
private $dimension = [];
private $temp = [];
public function __construct($dimension){
$this->dimension = $dimension;
//
for($i=0;$i<$dimension;$i++){
for($j=0;$j<$dimension;$j++){
... | true |
ae5045ceb506085300819819071addd2ca7037f9 | PHP | gfonseca/phpfcm | /src/FCMClient.php | UTF-8 | 4,475 | 2.828125 | 3 | [] | no_license | <?php
namespace PHPFCM;
use GuzzleHttp\Pool;
use GuzzleHttp\Client;
use GuzzleHttp\Promise;
/**
* FCMClient works as an facade for the rest of the whole lib
* @author Georgio Barbosa da Fonseca <georgio.barbosa@gmail.com>
*/
class FCMClient
{
/**
* the FCM uri
*/
const END_POINT = "https://fcm.google... | true |
295cb5d03dd34bbfb11d0fe7717ec829609559bf | PHP | yuanhy585/drill | /app/Http/Controllers/PostController.php | UTF-8 | 2,025 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Post;
use Illuminate\Http\Request;
use App\Http\Requests;
use Illuminate\Support\Facades\DB;
class PostController extends Controller
{
public function index(Request $request)
{
$inputs = $request->has('select')?json_decode($request->input('select'),true)... | true |
104efe5ae7a3fc90525b08a8b139fc57f3b1e804 | PHP | hayatzsala/WebProject | /contact.php | UTF-8 | 1,716 | 3.09375 | 3 | [] | no_license | <?php
<<<<<<< HEAD
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "oceanstars";
if (isset($_POST['name'])&&isset($_POST['email'])&&isset($_POST['message'])){
$name= $_POST['name'];
$email= $_POST['email'];
$message= $_POST['message'];
}
... | true |
66de7b4c4fdde049052a5fc5f80ab0791230ec6a | PHP | ubermichael/pkppln-44 | /src/Entity/TermOfUseHistory.php | UTF-8 | 2,888 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* (c) 2021 Michael Joyce <mjoyce@sfu.ca>
* This source file is subject to the GPL v2, bundled
* with this source code in the file LICENSE.
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Nines\UtilBundle\Entity\AbstractEntity;
/**
* TermOfUseHistory.
*
* @ORM\... | true |
7772f8d9254c7215d2967f0006e33e43f195d4c4 | PHP | raptor419/swara | /web/graphs/QVizualisationGoogleGraph.class.php | UTF-8 | 20,576 | 2.734375 | 3 | [] | no_license | <?php
/**
* Wrapper for Google Visualisation API
* Visualisation Class
*
* wraps all Google Visualisation Types dynamically and
* in a generic way
*
* holds common functions for API to generate Javascript source code
*
* @author Thomas Sch�fer
* @since 2008-06-29
*
*/
class QVizua... | true |
5dddfc693416331ce4295710d2c2858115cfe4b6 | PHP | styu/jungle-adventures | /security/prob3-elephant/auth.php | UTF-8 | 1,014 | 2.609375 | 3 | [] | no_license | <?php
session_start();
require("../util.php");
function print_auth_error() {
echo "Username or password was incorrect<br />";
echo link_to("login.php", "Back to login");
}
if (empty($_POST["username"]) || empty($_POST["password"])) {
print_auth_error();
} else {
require("../db.php");
$user = mysql_r... | true |
f06a5279f40c5486060cee1d70303a70de047892 | PHP | sincerusx/Laravel-Boilerplate | /app/Support/helpers.php | UTF-8 | 604 | 2.859375 | 3 | [] | no_license | <?php
if(false === function_exists('pretty')) {
function pretty($expression, $die = false){
if(env('APP_ENV') !== 'production'){
echo '<pre>'; print_r($expression); echo '</pre>';
if(true === $die)
die();
}
}
}
if(false === function_exists('pd')) {
function pd($expression, $die = false){
if(false =... | true |
171ba7054928a1813473d825bc3a011a186adaa5 | PHP | nassimtoumi/PROJETWEB | /ghaith/model/Utilisateur.php | UTF-8 | 837 | 2.953125 | 3 | [] | no_license |
<?php
/**
*
*/
class Utilisateur
{
public $username;
public $email;
public $password;
public $role;
function __construct($username,$email,$password,$role)
{
$this->username=$username;
$this->email=$email;
$this->password=$password;
$this->role=$role;
}
fun... | true |
41118163e7a400841de5bb6e70c9785fb684ae2b | PHP | TanzimIbthesam/PHP--All-in-One- | /formvald/AJAX/getpost/suggestions.php | UTF-8 | 381 | 2.828125 | 3 | [] | no_license | <?php
$existingNames=array("Daniel","Denis","Danny","Jane");
if(isset($_POST['suggestions'])){
$name=$_POST["suggestions"];
if(!empty($name)){
foreach($existingNames as $existingName){
if(strpos($existingName,$name)!==false){
echo $existingName;
... | true |
b046fc4d93afa9ee7232d76ecbb20c77c632ade0 | PHP | itcyborg/tusafiri.co.ke | /functions/paginator.inc | UTF-8 | 936 | 3.078125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: itcyb
* Date: 7/8/2017
* Time: 9:22 PM
*/
class paginator
{
private $_data;
private $_limit;
private $_page;
private $_total;
private $_query;
/**
* paginator constructor.
* @param $_data
* @param $_limit
* @param $_page
* ... | true |
894822ef88a4946161c0bec863ebddaf61a2db1e | PHP | hong304/ching | /database/seeds/NutritionsSeeder.php | UTF-8 | 1,903 | 2.703125 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class NutritionsSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::transaction(function() {
$old_nutritions = DB::connection('old')->select('SELECT * FROM recipe_nutritions ORDER ... | true |
8b0a5ccd95ae6d7dd52a24f32442550a287bae1b | PHP | dogado-group/json-api-server | /src/RequestHandler/NoResourceModificationTrait.php | UTF-8 | 793 | 2.5625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Dogado\JsonApi\Server\RequestHandler;
use Dogado\JsonApi\Exception\JsonApi\NotAllowedException;
use Dogado\JsonApi\Model\Request\RequestInterface;
use Dogado\JsonApi\Model\Response\ResponseInterface;
trait NoResourceModificationTrait
{
/**
* @throws NotAllowedExcept... | true |
058cd4af048b222c66e8f8c40d12eba27aa9aa37 | PHP | davekok/parser | /tests/KeyTest.php | UTF-8 | 2,929 | 2.859375 | 3 | [
"Unlicense"
] | permissive | <?php
declare(strict_types=1);
namespace davekok\parser\tests;
use PHPUnit\Framework\TestCase;
use davekok\parser\Key;
use davekok\parser\ParserException;
/**
* @covers \davekok\parser\Key::createKey
*/
class KeyTest extends TestCase
{
public function testCreateKeyNoNegativeNumbers(): void
{
$this... | true |
27a337d1c3b5b52f74ecef1ef0677218a7b63ed7 | PHP | nashi2603/php_kadai | /filewrite.php | UTF-8 | 1,281 | 3.375 | 3 | [] | no_license | <!-- filewrite.php -->
<?php
$msg = "";
$filename = 'test.dat';
if (isset($_POST['MSG'])) {
$msg = $_POST['MSG'];
}
// 投稿データの加工
var_dump($msg);
// データの保存
// ファイルを開く
// 'a' は追記
// 'w'は上書き
$fp = fopen($filename, 'w');
// 開いたファイルにデータを書き込み
fwrite($f... | true |
1dc1ffd86dea8d67d5de7e70fe37a21d78dbdaa2 | PHP | kc2732/TTceshi | /pages/workout.php | UTF-8 | 5,899 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: PC
* Date: 2016/6/4
* Time: 3:34
*/
include '../parts/head.php';
include '../parts/top-bar.php';
/**
*Value Point
**/
$hostname = 'localhost';
$uname = 'chenkun';
$pwd = 'chenkun';
$mysql = mysql_connect($hostname,$uname,$pwd);
mysql_select_db('tangyisheng',$mysql);
session... | true |
ce105547d35682d156844298e88febac07360bf2 | PHP | Skrypnykov/codifun-courses | /6.PHP/3/index.php | UTF-8 | 727 | 3.3125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Script 3</title>
</head>
<body>
<?php
/* Начинаю комментарий на несколько строк,
ниже определены несколько переменных */
$name="Анна";
... | true |
53f30173dfed06f86d93643f5beeeb4d4c027094 | PHP | Ricardols72/PHP-Danki | /PHP-Danki/conceitos_basicos/referencia1.php | UTF-8 | 3,053 | 3.671875 | 4 | [] | no_license | <?php
echo '############################### <br />';
echo '# Declaração de váriáveis # <br />';
echo '############################### <br />';
$nome = 'Ricardo';
echo 'Meu nome é <br />';
echo $nome;
$nome = 'Pedro';
echo '<br />';
echo 'Meu nome é <br />';
echo $nome;
... | true |
16031d0689604c1c13e90e377752f3d062251489 | PHP | angelotrujillo21/pymefast | /app/Helpers/view.php | UTF-8 | 15,345 | 2.65625 | 3 | [] | no_license | <?php
/*
* Helpers, as the name suggests, help you with tasks.
* Each helper file is simply a collection of functions in a particular category.
*/
/**
* @param $paths
* @param $data
* @return mixed
*
* Extends the View by loading another file relative the base Views Path.
*/
function extend_view($paths, $data... | true |
b75a3928cb48537c2770b63cd59eac31647455a4 | PHP | ramanamaharshi/wg | /store/store.class.php | UTF-8 | 3,474 | 2.828125 | 3 | [] | no_license | <?php
class Store {
public static function vSave ($sUrl, $bPreload) {
$sCookieJar = self::sCreateCookieJar();
$sResponse = self::sCurl($sUrl, $sCookieJar);
$sResponse = self::sCurl($sUrl, $sCookieJar);
ODT::vExit($sResponse);
}
public static function sWrite ($sUrl, $sContent) {
... | true |
fc2ad14721f3f1134d7195fb84b6016f5f14ad80 | PHP | antoninecer/bookofsins | /sinner.php | UTF-8 | 5,942 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
include('session.php');
$_SESSION['id_hrisnik'] = $_GET['id'];
$_SESSION['volano'] = $_SERVER['HTTP_REFERER'];
$error = "Přidání hříchu";
$sql = "SELECT popis from hrichy order by nazev";
$stupnice = $db->query($sql);
$hrich = array();
$i = 0;
while($hr = mysqli_fetch_array($stupnice))
{
$hrich[$i... | true |
10d531b6178e8c2e8f44036a1e13f17dea69e83c | PHP | huxiaohe/api-framework | /app/models/AbstractModels/AbstractBrand.php | UTF-8 | 1,785 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace AbstractModels;
abstract class AbstractBrand extends \ModelBase
{
/**
*
* @var integer
*/
public $brand_id;
/**
*
* @var string
*/
public $brand_name;
/**
*
* @var string
*/
public $brand_logo;
/**
*
* @var string
... | true |
af87c7742f41f6749e289abf848e4b5a25add4e7 | PHP | splitice/php-lua-serialize | /src/Splitice/Lua/LuaSerialize.php | UTF-8 | 1,058 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace Splitice\Lua;
class LuaSerialize
{
private static function is_assoc($array)
{
return (bool)count(array_filter(array_keys($array), 'is_string')) && array_keys($array) !== range(0, count($array) - 1);
}
function serialize($value, $strict = false)
{
if (is_object($value)) {
$valu... | true |
647b8f458f52983a14494c110973e42b542e8ab7 | PHP | cosnicsTHLU/cosnics | /src/Chamilo/Libraries/Authentication/Platform/PlatformAuthentication.php | UTF-8 | 2,168 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Chamilo\Libraries\Authentication\Platform;
use Chamilo\Core\User\Storage\DataClass\User;
use Chamilo\Libraries\Architecture\Interfaces\ChangeablePassword;
use Chamilo\Libraries\Architecture\Interfaces\ChangeableUsername;
use Chamilo\Libraries\Authentication\AuthenticationException;
use Chamilo\Librarie... | true |
c4b661e6c7ee0ea572d250c75fb5b1ca7607f197 | PHP | bjeavons/zxcvbn-php | /src/Math/Impl/AbstractBinomialProvider.php | UTF-8 | 635 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace ZxcvbnPhp\Math\Impl;
use ZxcvbnPhp\Math\BinomialProvider;
abstract class AbstractBinomialProvider implements BinomialProvider
{
public function binom(int $n, int $k): float
{
if ($k < 0 || $n < 0) {
throw new \DomainException("n and k must be non-... | true |
88f71a1aa468ff88ae1ce74bb0c9bf8837f3342c | PHP | BrunaNoemi/PHP | /03_variaveis_constantes/03_variaveis_variaveis.php | UTF-8 | 91 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
$name = 'Felipe';
$$name = 'Bruna';
echo $name;
echo "\n";
echo $Felipe;
echo "\n"; | true |
0f1b443ca1610f6fa29fea9e831989fe81c5ed11 | PHP | korbinzhao/korbin | /Admin/Lib/Action/PositionAction.class.php | GB18030 | 5,132 | 2.515625 | 3 | [] | no_license | <?php
class PositionAction extends Action{
public function index(){
/*
import('ORG.Util.Page');// ҳ
$count = $->count();// ѯҪܼ¼
$Page = new Page($count, 10);// ʵҳ ܼ¼
$Page->setConfig('header', 'ƪ');//ж
$Page->setConfig('prev', "<");//һҳ
$Page->setConfig('next', '>');//һҳ
$Page->s... | true |
cbeca8ccecab38320abd8e994af6921185a4eb05 | PHP | mojdeeeeeh/taskProjet | /app/Task.php | UTF-8 | 1,002 | 2.796875 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Task extends Model
{
protected $fillable = [
'title', 'body', 'start_date', 'finish_date', 'user_id'
];
/**
* Change start_date format
*
* @param <type> $date The date
*
* @return <type> The sta... | true |
cec8e07fb675a54d2fd672ff1a40605dbefff5b8 | PHP | raul0115/RESTfulAPI | /app/Vehiculo.php | UTF-8 | 764 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Vehiculo extends Model{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'vehiculos';
/**
* The primary key for the model. Por defecto es incremental
*
* @var string
*... | true |
c43f110b9e1c63b6bd93949164225a14ab64cfe3 | PHP | mohitsingh-github/sendmekey | /merger.php | UTF-8 | 1,265 | 2.546875 | 3 | [] | no_license | <!DOCTYPE html>
<HTML>
<HEAD>
<TITLE>Merger</TITLE>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</HEAD>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" cr... | true |
aadf6a9521a5f42bd7ed2e92a37019616165f483 | PHP | sztyup/lauth | /src/LAuth/Entities/User.php | UTF-8 | 2,423 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Sztyup\LAuth\Entities;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Sztyup\LAuth\UserInterface;
/**
* @ORM\MappedSuperclass
*/
class User implements UserInterface
{
/**
* @var int
*
* @ORM\Column(type="integer")
... | true |
b6d5bde02a898517e5bbc9821cddfa91c4f9b989 | PHP | yeqingyang/phpmailertest | /class.filehandler.php | UTF-8 | 833 | 2.890625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: liupengzhan
* Date: 2017/6/8
* Time: 22:40
*/
class FileHandler
{
public static function readCsv($filePath)
{
$file = fopen($filePath, 'r');
//忽略第一行
fgetcsv($file);
$goods_list = array();
while ($data = fgetcsv($file)) { //每次读... | true |
4e23773952d1171d3d87d3bbf84fd9f1b99b4e7c | PHP | ArticoEstudio/appBuilder | /alterTables.php | UTF-8 | 2,340 | 2.671875 | 3 | [] | no_license | <?php
/**
* RECORRE LAS TABLAS DE LA BASE DE DATOS $db
* Y EJECUTA SOBRE ELLAS TODAS LAS QUERYS DEFININAS
* EN EL ARRAY $querys
*
* SI SE RECIBE UN VALOR DISTINTO DE '*' EN $_GET['t'] LAS QUERYS SE
* EJECUTARAN SOLO EN ESE TABLA, SI EL VALOR ES '*' SE EJECUTARAN
* EN TODAS LAS TABLAS
*/
$db = $_GET['db'];
$t... | true |
135bb8e4e99cd3e58021cf14d6d8746a109ef1f6 | PHP | xfanwu/Uvatar | /app/controllers/ApiController.php | UTF-8 | 2,145 | 2.53125 | 3 | [
"WTFPL"
] | permissive | <?php
# NOTHING MODIFIED HERE
class ApiController extends Controller
{
/**
* @return show api page
*/
public function show()
{
return View::make('api');
}
/**
* response a image with params
*
* @param $md5 hashed email address
* @param $size image size
... | true |
ca8aab01f2a9cf8dc0a113cb644ff52a70bcf79f | PHP | nowisesys/uup-auth | /source/UUP/Authentication/Validator/LdapBindValidator.php | UTF-8 | 2,299 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright (C) 2014-2015 Anders Lövgren (Nowise Systems/Uppsala University).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-... | true |
6d348d893f7526d49b6e0ceda34ad5c37413fe17 | PHP | alexkuk/laravel_test | /tests/Cf/ApiTest.php | UTF-8 | 13,903 | 2.625 | 3 | [] | no_license | <?php
class ApiTest extends TestCase {
public function testMain()
{
$this->_testAvailability();
$this->_testHttpAuthProtection();
$this->_testEmptyPost();
$this->_testInvalidJson();
$this->_testTransactionCreateSomeParametersMissing();
$this->_testTransactionCre... | true |
b107e7a8df97d0bfe59adce1029923eada299b2d | PHP | ciberch/php-sdk | /src/facebookApp.php | UTF-8 | 6,653 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Class which allows you to invoke methods available on a per app basis
* such as the management of real-time updates.
*
* @author mciberch
*/
class FacebookApp extends Facebook {
protected $appAcessToken = 0;
/**
* Initialize a Facebook Application.
*
* The configuration:
* - appId: ... | true |
c17f775f4c1bbe91d44a312ec6a8f208a47d2d0c | PHP | Schyzofrania/Mini-Agence | /recapitulatif.php | UTF-8 | 2,459 | 2.578125 | 3 | [] | no_license | <?php
session_start();
// var_dump($_POST);
$choixIsOk = isset($_POST["choix"]) && !empty($_POST["choix"]);
$nbrpersIsOk = isset($_POST["nbrpers"]) && !empty($_POST["nbrpers"]);
if(!$choixIsOk || !$nbrpersIsOk){
header("location: agence.php");
exit();
}
$_SESSION["choix"] = $_POST["choix"];
$_SESSION["nbrpers"... | true |
a5526afa99747f280cedfacb19f1935bf94c80d1 | PHP | iftekharahmedshimul/iftekharahmedshimul.github.io | /backup/cs275_proj1/formprocessor.php | UTF-8 | 2,890 | 2.9375 | 3 | [] | no_license | <?php
/*
include("header.php");
echo "Here's the database table we're using: <br />";
echo "<img src=\"trainer-db.png\"></img>";
echo "<br />You entered: ";
print_r($_POST);
include("footer.php");
*/
$error = 0;
if(empty($_POST[TRAINER_FNAME])){
$error = 1;
} else if(empty($_POST[AGE]) || ($_POST[AGE] < 1) || ($_... | true |
184e0ad57c51fbddfd840258d6b11fba29230d90 | PHP | JoseRamonBarreras/bookatable | /application/libraries/messagetype/Button.php | UTF-8 | 1,225 | 2.578125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
Class Button{
public function url($url, $title)
{
$button_url = array(
'type' => 'web_url',
'url' => $url,
'title' => $title
);
return $button_url;
}
public function url_webview($url, $title, $height)
{
$button_url = array... | true |
f8536ca56fa8650dec9396a617796d4aa7644eb1 | PHP | piemo35/tavola-pitagorica-php | /primariaX.php | UTF-8 | 587 | 3.484375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<body>
<h1> Sostituisco i valori della diaginale primaria con una X </h1>
<table border=1 cellpadding=5>
<?php
$limite=10;
for($riga=1; $riga <= $limite; $riga++)
{
echo '<tr>';
for($colonna=1;$colonna<=$limite;$colonna++)
{
if($rig... | true |
f626edbbbce5f417099932bd9bb9161350a0668e | PHP | kubalk/VESRIMS | /Vista/Vista/db/db.php | UTF-8 | 395 | 2.890625 | 3 | [] | no_license | <?php
class VistaDB
{
private $conn = null;
private $dsn = 'mysql:host=localhost;dbname=mydb';
private $user = 'root';
private $password = 'PrknBys8Hl';
function __construct()
{
$this->conn = new PDO($this->dsn, $this->user, $this->password);
$this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTI... | true |
bd05cf0c0fa428940e2592e835f73d1139c3c8b7 | PHP | hhcszgd/phpOfPublic | /admin/include/functions.php | UTF-8 | 1,202 | 2.609375 | 3 | [] | no_license | <?php
/*******************************连接数据库函数****************************************/
function getLink($db_host,$db_user,$db_pwd,$db_name)
{
// //连接MySQL数据库
// $link = mysql_connect($db_host,$db_user,$db_pwd);
// if(!$link)
// {
// echo "<li>连接MySQL出错了,请检查数据库配置信息!</li>";
// exit();
// ... | true |
a791ae147b26787764cea4a0269c1fdcc8bcfc95 | PHP | abdulfh/LaraveLogMonitoring | /app/Helpers/Tail.php | UTF-8 | 2,842 | 3.203125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Helpers;
class Tail {
/**
* Location of the log file we're tailing
* @var string
*/
private $log = "";
public function __construct($log, $defaultUpdateTime = 2000, $maxSizeToLoad = 2097152) {
$this->log = $log;
$th... | true |
6b012ed121e9333bfe30477f32eaa3fdd9e86258 | PHP | Wicloz/UniversityWebsite | /app/classes/Input.php | UTF-8 | 1,437 | 3.140625 | 3 | [] | no_license | <?php
class Input {
public static function exists ($type = 'any') {
switch ($type) {
case 'post':
return !empty($_POST);
break;
case 'get':
return !empty($_GET);
break;
case 'any':
retu... | true |
a7d14e7368596ffed5d79d6a2b2323483b7e3e91 | PHP | yash12pixel/gym_portal.github.io | /yash17/Chat/chat/database_connection.php | UTF-8 | 3,295 | 2.6875 | 3 | [
"CC-BY-4.0",
"CC-BY-3.0"
] | permissive | <?php
require_once('RSA_CLASS.php');
$connect = new PDO("mysql:host=localhost;dbname=chat", "root", "");
date_default_timezone_set('Asia/Kolkata');
function fetch_user_last_activity($user_id, $connect)
{
$query = "
SELECT * FROM login_details
WHERE user_id = '$user_id'
ORDER BY last_activity DESC
LIMIT 1
";... | true |
6cb5c0e635fc0140486d5ea4489c84e9212245ac | PHP | saphir88/Geekwizz | /src/Model/Token.php | UTF-8 | 2,080 | 2.671875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: thomas
* Date: 21/04/18
* Time: 16:05
*/
namespace Model;
/**
* Class Token
* @package Model
*/
class Token
{
private $id;
private $validation;
private $mail;
private $genre;
private $tranche_age;
private $id_resultat;
private $confirmkey;
... | true |
ddbd8494d9073b62aa320afcdba1462eb0fb0a7d | PHP | ChenSee/ss-panel-v3-mod_Uim-alipay-wxpay | /app/Services/Slim.php | UTF-8 | 742 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use Slim\App;
use Zeuxisoo\Whoops\Provider\Slim\WhoopsMiddleware;
/***
* The slim documents: http://www.slimframework.com/docs/objects/router.html
*/
class Slim
{
public $app;
public function newApp()
{
// config
$debug = false;
if (defined('DEBUG'... | true |
a838a4b2c9730709a5ab5a9db8704664a335352e | PHP | marscore/hhvm | /hphp/test/slow/string/165.php | UTF-8 | 690 | 3.234375 | 3 | [
"Zend-2.0",
"PHP-3.01",
"MIT"
] | permissive | <?php
function test($a, $b) {
$buf = 'hello';
foreach ($a as $v) {
$buf .= $v . ';';
foreach ($b as $w) {
$buf .= $w;
}
}
var_dump($buf);
}
function test2($a, $b) {
$buf = 'hello';
foreach ($a as $v) {
$buf .= $v . ';';
foreach ($b as $w) {
$buf .= $w;
}
echo $buf;
... | true |
259083eca270e8d33e14c7f76f381d44c4ecffc9 | PHP | ajie62/savate_massingienne | /src/Repository/LicenseRepository.php | UTF-8 | 760 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: jeromebutel
* Date: 05/02/2018
* Time: 23:49
*/
namespace App\Repository;
use App\Entity\User;
use Doctrine\ORM\EntityRepository;
class LicenseRepository extends EntityRepository
{
/**
* Get the user's last license
*
* @param User $user
* @return ... | true |
0136431c5369b43bbbd70bd210200b0a43159447 | PHP | PhillipOdendaal/Hallo | /forms/LoginForm.php | UTF-8 | 2,045 | 2.875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\forms\site;
use app\models\SRCUser;
use Exception;
use Yii;
use yii\base\Model;
/**
* LoginForm is the model behind the login form.
*/
class LoginForm extends Model {
public $username;
public $password;
public $rememberMe = true;
private $_user = false;
/**
* @return ... | true |
bc399d47ece4deb35e0055c024b519c96b2fc028 | PHP | Jeroeny/gitlab-api | /tests/unit/Api/ProjectNamespacesTest.php | UTF-8 | 908 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Gitlab\Tests\Api;
use Gitlab\Api\ProjectNamespaces;
final class ProjectNamespacesTest extends TestCase
{
/** @var ProjectNamespaces */
protected $api;
/**
* @test
*/
public function shouldGetAllNamespaces(): void
{
$expectedArray = [
... | true |
18a0940fe09ae1e1a2d67d4718c3e82f106c3bb8 | PHP | ArtemYurov/moysklad | /src/MoySklad.php | UTF-8 | 1,866 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace MoySklad;
use MoySklad\Components\Http\MoySkladHttpClient;
use MoySklad\Registers\EntityRegistry;
class MoySklad{
/**
* @var MoySkladHttpClient
*/
private $client;
/**
* @var string
*/
private $hashCode;
/**
* @var MoySklad[]
*/
private static ... | true |
fa1b32a13d82baeada66bde2e2670d34e1689af9 | PHP | naemtl/PHPwebforum | /project.php | UTF-8 | 9,744 | 2.78125 | 3 | [] | no_license | <?php
date_default_timezone_set('EST');
session_cache_limiter(false);
session_start();
require_once 'vendor/autoload.php';
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
// create a log channel
$log = new Logger('main');
$log->pushHandler(new StreamHandler('logs/everything.log', Logger::DEBUG));
$log->push... | true |
89a37be60080a4494f16a2838ab41e8bffd3d51c | PHP | icepoke/swooleyaf | /libs_frame/DesignPatterns/Singletons/YacSingleton.php | UTF-8 | 604 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* 本地服务器缓存单例类
* User: 姜伟
* Date: 2017/3/5 0005
* Time: 12:28
*/
namespace DesignPatterns\Singletons;
use SyTrait\SingletonTrait;
class YacSingleton
{
use SingletonTrait;
/**
* @var \Yac
*/
private $conn = null;
private function __construct()
{
$this->conn = new \Y... | true |
1b4d6a5e591ae3e5bebdc640f75d43fc33c45135 | PHP | rhubba4863/CS_313-php | /Week6/Find_Semester_Seasons_by_Student_Name.php | UTF-8 | 3,566 | 2.515625 | 3 | [] | no_license | <?php
//PAGE WITH THE QUESTIONS
// http://www.w3schools.com/php/php_sessions.asp
error_reporting (E_ALL ^ E_NOTICE);
session_start();
//header('Location: Week3AssignmentResultsAttempt2.php');
/*if($_SESSION["voted"] == "completed")
{
echo "hi man";
//http://ccm.net/faq/9296-php-redirect-to-another-page-redirect-hea... | true |
ec086800c6407f0e782a3502b3716755741633ad | PHP | Trendymen/Trendymen | /TestFiles/fopen test.php | UTF-8 | 165 | 2.78125 | 3 | [] | no_license | <?php include 'header.php';?>
<?php
$file=fopen('test.txt','r');
while(!feof($file))
{
echo fgetc($file). "<br>";
}
echo filetype('test.txt');
fclose($file);
?> | true |
78c746b8da59d1ad676c30747958ea54fce016b8 | PHP | webroru/smartlock | /App/Providers/Beds24/Client/ClientV1.php | UTF-8 | 2,013 | 2.796875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Providers\Beds24\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\RequestOptions;
class ClientV1 implements Beds24ClientInterface
{
private const HOST = 'https://api.beds24.com';
private const DATA_TYPE = 'json';
private string $apiKey;
private str... | true |
42af789522dd2a88e4e6addb65a823864bb554d1 | PHP | phacility/phabricator | /src/applications/transactions/controller/PhabricatorApplicationTransactionController.php | UTF-8 | 802 | 2.59375 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
abstract class PhabricatorApplicationTransactionController
extends PhabricatorController {
protected function guessCancelURI(
PhabricatorUser $viewer,
PhabricatorApplicationTransaction $xaction) {
// Take an educated guess at the URI where the transactions appear so we
// can send the cance... | true |
1957b55a690ea00537b2461aa07b3e4b3591acd7 | PHP | sorin-popescu/ddd_training | /Application/ReceiptCommandHandler.php | UTF-8 | 2,322 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: sorin.popescu
* Date: 26/09/2017
* Time: 15:11
*/
namespace Application;
use Command\IssueReceipt;
use Command\RefundReceipt;
use Domain\Entity\Receipt;
use Domain\Event\ReceiptIssued;
use Domain\Repository\Receipts;
use Domain\ValueObject\IssueDate;
use Domain\ValueObje... | true |
23787cae5efc2393527119c94767dc92a3f4ffe6 | PHP | busaev/s3 | /src/AppBundle/Conversion/DescriptionConverter.php | UTF-8 | 2,568 | 2.84375 | 3 | [] | no_license | <?php
namespace AppBundle\Conversion;
use Doctrine\Common\Annotations\Reader;
use Doctrine\Common\Annotations\AnnotationReader;
class DescriptionConverter
{
private $reader;
private $annotationClass = 'AppBundle\\Annotations\\Description';
public function __construct(Reader $reader)
{
$this-... | true |
7f89611b320e7db9da6c5eda52133545be4609d7 | PHP | Michael-i/easyswoole-read-write-sub-table | /src/Read/VerticalSubQuery.php | UTF-8 | 9,947 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: 林育成
* Date: 2023/1/6
* Time: 9:40
*/
namespace EasyswooleYc\ReadWriteSubTable\Read;
use App\DAO\BaseDAO;
abstract class VerticalSubQuery extends BaseDAO
{
/** @var string 主表表名 */
protected static $mainTableName;
/** @var array 分表配置 */
protected $subClass ... | true |
ea9333deac1d380161c0ab170196f7208527cbfa | PHP | ufec/TDR | /database/migrations/20210616003557_user.php | UTF-8 | 3,138 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
use Phinx\Db\Adapter\MysqlAdapter;
use think\migration\Migrator;
use think\migration\db\Column;
class User extends Migrator
{
/**
* Change Method.
*
* Write your reversible migrations using this method.
*
* More information on writing migrations is available here:
* http://docs... | true |
d706063fab35d2df556296b6a4f2cd084b37f4bb | PHP | BitBlank/php-sdk | /bapp_php_sdk.php | UTF-8 | 3,708 | 2.796875 | 3 | [] | no_license | <?php
namespace bapp;
/**
* $bapp = new BappPhpSdk('your_app_key', 'your_app_secret');
* Class BappPhpSdk
* @package bapp
*/
class BappPhpSdk
{
public $BASE_URL = "https://bapi.app";
protected $appKey = '';
protected $appSecret = '';
public function __construct()
{
$param = func_get_a... | true |
d426e94adb96ab53f9f5fb8bacb107cb0e28fec7 | PHP | ununik/biathlet | /Controllers/Log/profilUpdate/en.php | UTF-8 | 2,897 | 2.59375 | 3 | [] | no_license | <?php
$html->addToJs(URL_PATH . '/js/profilUpdate.js');
$inactiveStepsPersonal = '';
$inactiveStepsLogin = 'inactiveSteps';
$err = array();
$firstname = $user->_firstname;
$lastname = $user->_lastname;
$mail = $user->getMail();
$login = $user->getLogin();
$gender = $user->_gender;
$countryId = $user->_countryId;
if (... | true |
5c8bbfd5fa435785684225e480bc3a8916606b0f | PHP | xiaobudongzhang/lib | /book/phpcookbook/rest/headfun.php | UTF-8 | 482 | 2.640625 | 3 | [] | no_license | <?php
class test {
public function head($ch, $data) {
//var_dump($ch);
print_r($data);
// file_put_contents ( 'E:\head.log', $data );
}
}
/* function testhead(){
echo "test";
} */
$url = 'http://www.so.com/';
$test = new test ();
$ch = curl_init ( $url );
curl_setopt($ch, CURLOPT_HEADER, true);
curl_setopt ... | true |
064050dc951abdf2916ec2be6480805046fd9424 | PHP | Aboliero/framework | /classes/components/Autoloader.php | UTF-8 | 739 | 2.734375 | 3 | [] | no_license | <?php
namespace components;
use UserPanelWidget;
class Autoloader extends \Component
{
public function getFileName($className)
{
if ($className == UserPanelWidget::class) {
return PROJECT_ROOT . '/widgets/UserPanel/' . $className . '.php';
}
return PROJECT_ROOT . '/classes... | true |
275f1a675484a24b1c60095ba041813ee642fb1f | PHP | Unikalx/slots2 | /games/twinSpin/src/#models/moneyManager.php | UTF-8 | 1,188 | 3.125 | 3 | [] | no_license | <?php
require_once "logger.php";
class MoneyManager
{
public $denominationStandard = 50;
public $denominations;
public $denominationsWins;
public $betLevels;
public $log;
public function __construct()
{
$this->denominationsWins = [
50 => 100,
20 => 40,
... | true |