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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e9fe925a1a141e725f4c0afcd4dafb56357c60e5 | PHP | prokawsar/sheba-api | /migrations/20200927184533_fix_treatment_table_field.php | UTF-8 | 890 | 2.609375 | 3 | [] | no_license | <?php
use Phpmig\Migration\Migration;
class FixTreatmentTableField extends Migration
{
/**
* Do the migration
*/
public function up()
{
$sql = "ALTER TABLE `treatments`
DROP FOREIGN KEY `treatments_remedies_fk`;
ALTER TABLE `treatments`
ADD COLUMN `powe... | true |
4a348377f1ccbfba268595a168b60dc4b80e57c9 | PHP | elegos/PHP-object-transmapper-validator | /src/Transmapper.php | UTF-8 | 13,752 | 2.515625 | 3 | [] | no_license | <?php
namespace GiacomoFurlan\ObjectTransmapperValidator;
use Doctrine\Common\Annotations\Reader;
use Exception;
use GiacomoFurlan\ObjectTransmapperValidator\Annotation\Validation\Validate;
use GiacomoFurlan\ObjectTransmapperValidator\Dto\PropertyInfo;
use GiacomoFurlan\ObjectTransmapperValidator\Model\MappedModel;
u... | true |
e02bb47384fdf98ee2dbd9232508441a19b84159 | PHP | macielbombonato/docker-chamilo | /1.11.2/chamilo-lms-1.11.2/vendor/toin0u/digitalocean/src/DigitalOcean/CLI/SSHKeys/AddCommand.php | UTF-8 | 1,953 | 2.765625 | 3 | [
"GPL-3.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* This file is part of the DigitalOcean library.
*
* (c) Antoine Corcy <contact@sbin.dk>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace DigitalOcean\CLI\SSHKeys;
use Symfony\Component\Console\Input\InputArgu... | true |
1ebc2cad4ec9b8bdc888b80ac68266cd96e84b3a | PHP | grobmeier/piwi | /piwi/lib/piwi/page-processing/ResourcesManager.class.php | UTF-8 | 1,607 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Manages the localized labels.
*/
class ResourcesManager {
/** Array of DOMXPath Documents used to search for labels. */
private static $resources = null;
/**
* Looks up the localized text for the given key.
* If no translation is found the key itself is returned.
* @param string $key The key to... | true |
bac37d52a27e307253fe989fc2ddac4ebd74696c | PHP | daisukean/weather_to_slack | /weather_to_slack.php | UTF-8 | 2,893 | 2.53125 | 3 | [] | no_license | <?php if($_POST){
// init
require('class-JPCity.php');
$city = new JP_City();
$jp_week = array('日', '月', '火', '水', '木', '金', '土');
// remake input data
$str = array_values(array_filter(preg_split('/[ ]/u', $_POST['text'])));
if(($key = array_search('天気', $str)) !== false){
// get available city list
$city_l... | true |
41c4b81d9b2045c34202a7a6b07ca60ec241f32d | PHP | Skpd/mu | /src/MuServer/Protocol/Season097/ServerClient/StatsInfo.php | UTF-8 | 7,694 | 2.609375 | 3 | [] | no_license | <?php
namespace MuServer\Protocol\Season097\ServerClient;
use MuServer\Entity\Character;
class StatsInfo extends AbstractPacket
{
protected $class = 0xC3;
protected $code = 0xF3;
protected $subCode = 0x03;
private $x = 0x8F;
private $y = 0x77;
private $mapNumber = 0;
private $direction =... | true |
980058d179804cab333449566de231bd2825dacc | PHP | 995933447/php-server-network-protocol | /examples/websocket/src/Frame.php | UTF-8 | 5,049 | 2.734375 | 3 | [] | no_license | <?php
namespace Bobby\Websocket;
class Frame
{
const MIN_FRAME_HEX_LENGTH = 12;
public $finWith3Rsv;
public $opcode;
public $isMasked;
public $payloadLen = 0;
public $maskingKey = [];
public $payloadData = '';
public $buff;
protected static $receives = [];
protected static $p... | true |
27cbdbe7c3f2be07e20499196f46b16967b6ac66 | PHP | mopristas/elasticTesting | /bin/benchmark.php | UTF-8 | 1,061 | 2.703125 | 3 | [] | no_license | <?php
require_once 'elasticWrapper.php';
require_once 'sqlWrapper.php';
$elastic = new ElasticWrapper();
$sql = new SqlWrapper();
//$time_start = microtime(true);
//$elastic->addData();
//echo 'elastic adding data: ' . number_format(microtime(true) - $time_start, 3) . PHP_EOL;
//$time_start = microtime(true);
//$sq... | true |
90731330509edddcd316a497e9b87cac33e5ffbd | PHP | gonzaloruizalonso/appmusic | /models/procesar_model.php | UTF-8 | 2,334 | 2.625 | 3 | [] | no_license | <?php
//Funcion que crea un Invoice y retorna su id
function crearInvoice($conn){
$sql="SELECT (max(InvoiceID)+1) as i from Invoice";
$result = mysqli_query($conn, $sql);
$fila = mysqli_fetch_assoc($result);
$invoiceID = $fila['i'];
$custIDAux=$_SESSION['CustomerID'];
$sql3 = "SELECT SYSDATE() as ... | true |
404dcf42846585adae750c952df77f40fb81329d | PHP | Wellyp/Tubes_Progweb | /cek_login.php | UTF-8 | 1,223 | 2.546875 | 3 | [] | no_license | <?php
//
include "config/config.php";
function anti_injection($data){
$filter = mysql_real_escape_string(stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES))));
return $filter;
}
$user = anti_injection($_POST['user']);
$password = anti_injection(md5($_POST['password']));
// pastikan username dan pas... | true |
37ad5c32860025ffa44bfc402b230558095e54e6 | PHP | fredrickwampamba/full-calendar-php-ajax | /events.php | UTF-8 | 499 | 2.71875 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
// List of events
$json = array();
// Query that retrieves events
$request = "SELECT * FROM events ORDER BY id";
// connection to the database
try {
$bdd = new PDO('mysql:host=localhost;dbname=fullcalendar', 'root', '');
} catch (Exception $e) {
exit('Unable to connect to database.');
}
// Execute the q... | true |
34908bcbbe65c80367536bb64bb0769fb5de4478 | PHP | ninnemana/php_snippets | /test.php | UTF-8 | 606 | 3.046875 | 3 | [] | no_license | <?php
// XML Example
print("<h3>XML Example</h3>");
$doc = new DOMDocument();
$doc->load("http://api.curthitch.biz/AJAX_CURT.aspx?action=GetYear&mount=Rear%20Mount&dataType=XML");
$years = $doc->getElementsByTagName("VehicleYear");
foreach($years as $year){
print($year->nodeValue."<br />");
}
// JSON Example
pr... | true |
2ce914abb1a1b83a42bf22fb039ab40df510e74d | PHP | lubaixiao/wxapp | /wxapp/app/dao/Conn.php | UTF-8 | 687 | 2.75 | 3 | [] | no_license | <?php
appLogs("Conn加载");
/**
* Description of conn
* 获取数据库pdo对象类
* @author kinglu
*/
class Conn {
private $pdo = null;
public function getPdo() {
$db_conf=$GLOBALS['db_conf'];
try {
$mysalset = "mysql:host={$db_conf['host']};port={$db_conf['port']};dbname={$db_conf['d... | true |
ad0181c192af4c06a06eb64d9d23f7a2b84a55d4 | PHP | OliverW98/COMP3000 | /GymBuddy/src/cycle.php | UTF-8 | 2,348 | 3.15625 | 3 | [] | no_license | <?php
class cycle extends workout
{
private $distance;
private $elevation;
private $speed;
private $averageWatts;
private $caloriesBurnt;
public function __construct($id, $title, $date, $duration, $distance, $elevation, $notes, $imageName)
{
$this->workoutID = $id;
$this-... | true |
82173ffb65b382a2af402c0bd4cf057b0cea5ad4 | PHP | ryota1026/oneline_bbs | /bbs.php | UTF-8 | 7,899 | 2.625 | 3 | [] | no_license | <?php
// ここにDBに登録する処理を記述する
// データベースへの接続
$dsn = 'mysql:dbname=oneline_bbs;host=localhost';
$user = 'root';
$password='';
// ※以下はサンプルなので、自身のサーバー情報を設定してください。
// dbnameをロリポップのデータベース名に、hostをロリポップのサーバーに変更
// $dsn = 'mysql:dbname=LAA0793008-onelinebbs;host=mysql103.phy.lolipop.lan';
// // userをロリポップのユーザ... | true |
33dd41895503cba24d0e5e01208f24215ffaba14 | PHP | Drupal-8/drupal8_example | /src/Controller/UserInfoController.php | UTF-8 | 1,471 | 2.703125 | 3 | [] | no_license | <?php
/**
* @file
* Contains \Drupal\example\Controller\UserInfoController.
*/
namespace Drupal\example\Controller;
use Drupal\Core\Controller\ControllerBase;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Drupal\Core\Session\AccountInterface;
/**
* Example page controller.
*/
class UserInfoC... | true |
5960595800ad8c09ce8ea002f41b0b0875bdf283 | PHP | 7csn/chaser-stream | /src/traits/Context.php | UTF-8 | 1,124 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace chaser\stream\traits;
use chaser\stream\interfaces\part\ContextInterface;
/**
* 流资源上下文特征
*
* @package chaser\stream\traits
*
* @see ContextInterface
*/
trait Context
{
/**
* 资源流上下文配置
*
* @var array[]
*/
protected array $contextOptions = [];
... | true |
691d1687b8f3396285c4ab7a7c36c653a52b501a | PHP | nikslor/tvb_csv2vcf | /CsvIterator.class.php | UTF-8 | 4,499 | 3.53125 | 4 | [
"MIT"
] | permissive | <?php
/**
* Iterator to easily handle CSV rows
*
* @author Damian Senn <damian.senn@adfinis-sygroup.ch>
*/
class CsvIterator implements Iterator {
/**
* Represents the current line in $this->handle
*
* @var int
*/
private $position = 0;
/**
* Defines the maximal length of a line
*
* @var int... | true |
fff11cc6fb51c5d422d91ac5212201e31713b67d | PHP | marieflorence/projectdccp | /app/Repositories/ProfilRepository.php | UTF-8 | 641 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Models\Profil;
use InfyOm\Generator\Common\BaseRepository;
/**
* Class ProfilRepository
* @package App\Repositories
* @version July 24, 2018, 6:12 pm UTC
*
* @method Profil findWithoutFail($id, $columns = ['*'])
* @method Profil find($id, $columns = ['*'])
* @method P... | true |
6b816fcfea5283bc5335dbaf782277b1e46c3c02 | PHP | microsoftgraph/msgraph-beta-sdk-php | /src/Generated/Models/OnPremisesDirectorySynchronization.php | UTF-8 | 3,973 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace Microsoft\Graph\Beta\Generated\Models;
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
class OnPremisesDirectorySynchronization extends Entity implements Parsable
{
... | true |
83ef6559293c9e5b7be1fd2f919c62d042a59c52 | PHP | dipinkp1993/Ci4contriutions | /app/Controllers/Image.php | UTF-8 | 2,204 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Controllers;
class Image extends BaseController
{
public function index()
{
helper(['form','image']);
$request = \Config\Services::request();
$data=[];
if($request->getMethod()=="post")
{
$rules=[
'theFile'=>[
'rules'=>'uploaded[theFile.0]|is_image[theFile]',
... | true |
d528fc51e18aafa0bb18e66d213b986978b61390 | PHP | luigif/WsdlToPhp | /samples/serviceobjects-fast-weather/Get/WMOID/SOFastWeatherTypeGetWeatherByWMOID.php | UTF-8 | 1,425 | 2.640625 | 3 | [] | no_license | <?php
/**
* Class file for SOFastWeatherTypeGetWeatherByWMOID
* @date 08/07/2012
*/
/**
* Class SOFastWeatherTypeGetWeatherByWMOID
* @date 08/07/2012
*/
class SOFastWeatherTypeGetWeatherByWMOID extends SOFastWeatherWsdlClass
{
/**
* The WMOID
* Meta informations :
* - minOccurs : 0
* - maxOccurs : 1
... | true |
fb911b37a113b25a5f065bd617c05d7d470d6de6 | PHP | DivanteLtd/pimcore-enrichment-progress | /src/EnrichmentProgress/Handler/BlockHandler.php | UTF-8 | 2,766 | 2.546875 | 3 | [] | no_license | <?php
/**
* @category enrichment-progress
* @date 20/09/2018 13:46
* @author Korneliusz Kirsz <kkirsz@divante.co>
* @copyright Copyright (c) 2018 Divante Ltd. (https://divante.co/)
*/
declare(strict_types=1);
namespace EnrichmentProgressBundle\EnrichmentProgress\Handler;
use EnrichmentProgressB... | true |
ce165161cd58aab2de6459be2358ae0f1c09928e | PHP | Benitorax/ocproject5 | /framework/Security/User/UserInterface.php | UTF-8 | 607 | 3.0625 | 3 | [] | no_license | <?php
namespace Framework\Security\User;
/**
* Represents the interface that all user classes must implement.
*/
interface UserInterface
{
/**
* Returns an identifier.
*
* @return mixed;
*/
public function getId();
/**
* Returns the roles granted to the user: ['user', 'admin']
... | true |
e4fe4ee45b67af044390952e85d0947497fa1477 | PHP | bludit/bludit | /bl-kernel/helpers/dom.class.php | UTF-8 | 604 | 2.84375 | 3 | [
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | <?php defined('BLUDIT') or die('Bludit CMS.');
class DOM {
public static function getFirstImage($content)
{
// Disable warning
libxml_use_internal_errors(true);
$dom = new DOMDocument();
$dom->loadHTML('<meta http-equiv="content-type" content="text/html; charset=utf-8">'.$content);
$finder = new DomXPath(... | true |
ac0632d7e53ae32498cd02206eed58246ddddf75 | PHP | concord-consortium/data-science-games | /gamePrototypes/php/getBARTYdata.php | UTF-8 | 6,329 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
/**
This php script feeds BART data, stored in MySQL, to a DSG Data Interactive.
The interactive itself has to create a URL and a DATA string to give to the jQuery $.ajax method.
The data string has POST variables and their values.
This file parses those variables, assembles a MySQL query, and s... | true |
988a5762ca7618466cb6f4ea937fdc410351eb20 | PHP | Nikita-C47/gb | /database/migrations/2020_03_09_213544_add_rows_count_to_users_table.php | UTF-8 | 1,000 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Класс, представляющий миграцию добавления столбца количества выводимых записей настраницу в таблицу пользователей.
*/
class AddRowsCountToUsersTable extends Migration
{
/**
... | true |
c49bf64d4cb89ecd5f51f945c1d4a23f009ba1f0 | PHP | felipe1234-dev/jquery-like-php-dom | /examples/example_append_prepend.php | UTF-8 | 359 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
include "path/webparser.php";
$doc = new WebParser();
$doc->loadHTML('
<div id="append"></div>
<br/>
<div id="prepend"></div>
');
$i = 0;
while ($i < 5) {
$i++;
$doc->Q("#append")->append("<p id='".$i."'>".$i."</p>");
}
$j = 0;
while ($j < 5) {
$j++;
$doc->Q("#prepend")->prepend("<p id='".... | true |
ef813caf9092208830f571db45a7740aa15aee3e | PHP | Maciker/DWES | /06_Tarea/Parte2/user_wsdl.php | UTF-8 | 1,680 | 3.015625 | 3 | [] | no_license | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
<!-- Desarrollo Web en Entorno Servidor
Tema 6: Servicios SOAP
Tarea 6: user.php
@author: Iker Macaya Faber -->
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>DWES: Tar... | true |
414f87309621a15f654cc2b0589c137bcacae832 | PHP | mhmohon/daily-recipe | /dashboard/view_category.php | UTF-8 | 3,588 | 2.59375 | 3 | [] | no_license | <?php include "inc/dashboardHeader.php"; ?>
<!-- Dashboard Sidebar -->
<?php include "inc/dashboardSidebar.php"; ?>
<!-- Content Wrapper. Contains page content -->
<div class="content-wrapper">
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>View Category List</h1>
</sec... | true |
9c617b3dbde8caa6cebae8c309bdadab62fa4268 | PHP | McDibou/projet_catalogue | /model/admin/article/category.article.admin.model.php | UTF-8 | 1,356 | 2.765625 | 3 | [] | no_license | <?php
/**
* select all category order by name
* @param mysqli|false $db
* @return bool|mysqli_result
*/
function readCategory($db)
{
return mysqli_query($db, "SELECT * FROM `catalog.category` ORDER BY `name_category` ASC");
}
/**
* select all category with a article
* @param number $id
* @param mysqli|fals... | true |
0b3b0e8aa819ede4294cd849602c6d2f4a63f030 | PHP | welpons/med-dev-service | /src/MedicalDevices/Application/Service/Validation/Validator.php | UTF-8 | 3,449 | 2.875 | 3 | [] | no_license | <?php
/*
* Copyright (C) 2017 Welpons <welpons@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
*... | true |
65e491f5668ef3dfc589dc2feeacf57749cd07a6 | PHP | akaramanec/boto | /app/Rules/OrderCountRule.php | UTF-8 | 607 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Rules;
use Illuminate\Contracts\Validation\Rule;
class OrderCountRule implements Rule
{
public $product;
public function __construct($product)
{
$this->product = $product;
}
public function passes($attribute, $value)
{
if ($this->product->count >= $value)... | true |
96f63c44aa69a18a415672c91001fc4c203cb5e6 | PHP | s2taras/testEngineWithNestedSet | /src/task1/Controller/FrontController.php | UTF-8 | 772 | 2.921875 | 3 | [] | no_license | <?php
namespace Task1\Controller;
class FrontController
{
/** @var LoginController */
protected $controller;
/**
* FrontController constructor.
*/
public function __construct()
{
$this->controller = new LoginController;
}
/**
* @param array $parameters
*/
... | true |
b3f2217e2532485ea7d916f8af8d3d48abd3f23a | PHP | pseudoanime/Design-Patterns | /src/Template/Sub.php | UTF-8 | 540 | 3.34375 | 3 | [] | no_license | <?php namespace Template;
abstract class Sub
{
public function make()
{
return $this->layBread()
->addLettuce()
->addToppings()
->addSauces();
}
public function layBread()
{
print("laying bread,");
return $this;
}
public functio... | true |
ba1b640b9d92a578312f9dcb88747e69484431cb | PHP | Felixnguyen8980/PHP-09 | /MiniProject/session7-php-mysql-cart/cart.php | UTF-8 | 1,902 | 2.8125 | 3 | [] | no_license | <?php include 'connect.php';
$carts = $_SESSION['cart'];
$listProductCartID = "(";
$countCart = count($_SESSION['cart']);
$i = 1;
foreach ($carts as $key => $value) {
$listProductCartID.=$key;
if($i < $countCart){
$listProductCartID.=",";
}
$i++;
}
$listProductCartID .= ")";
//get product on cart
... | true |
7b555dfd73805cf2b5cd1ff39edea71d36cc7169 | PHP | lichtner/notorm_connection | /Connection.php | UTF-8 | 1,678 | 2.796875 | 3 | [] | no_license | <?php
use Nette\Diagnostics\Debugger;
/**
* Service for NotORM and PDO connection
*
* @package NotORM
* @author Marek Lichtner <marek@licht.sk>
* @license license.txt MIT
* @version 1.0
*
*/
class Connection /*extends \Nette\DI\Container*/ {
/**
* Create PDO connection
*
* @param string|array $dsn cou... | true |
a36c8c24714cc12dc130ccc6a0c0a40dc87cc5c8 | PHP | EscoreBu/metrics-bot | /vendor/rafw/spec/helpers/ArrayHelperSpec.php | UTF-8 | 3,352 | 3.015625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright 2009 Wilker Lucio <wilkerlucio@gmail.com>
*
* 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-2.0
*
* Unless requi... | true |
570c93e5b9ca1f08c9d47fd356afca760b5d00a5 | PHP | afpa-mx2017/afpa-bay | /view/genre-list.php | UTF-8 | 240 | 2.5625 | 3 | [] | no_license | <select name="genre">
<?php
include('model/dao/GenreDAO.php');
$genres = GenreDAO::findAll();
foreach ($genres as $genre) {
echo '<option value="'.$genre['id'].'">'.$genre['nom'].'</option>';
}
?>
</select>
| true |
b237ee908a899cdc7f38c9bda9e72946c05bfe39 | PHP | enduser/WebHemi | /wh_application/src/WebHemi/Acl/Rule/Entity.php | UTF-8 | 2,617 | 2.609375 | 3 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | <?php
/**
*
* WebHemi
*
* PHP version 5.6
*
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://webhemi.gixx-web.com/license/new-bsd
* If you did not receive a... | true |
5fcf0ea38061e5ea4ac2e89c3892ce9156a49bda | PHP | marcvifi10/Curso-PHP-y-MySQL | /16 - BDD MySQL/49 - Consultas preparadas Evitando inyeccion SQL/resultados_paises.php | UTF-8 | 1,715 | 2.921875 | 3 | [] | no_license | <html>
<head>
<meta charset="utf-8">
<title>Consultas preparadas</title>
</head>
<body>
<?php
$pais=$_GET["buscar"];
//Guardamos el nombre del host en una variable
$db_host="localhost";
//Guardamos el nombre de la base de datos en una variable
$db_name="pruebas";
//Guardamos el no... | true |
8e439193e3c4d6166331fb78bc42a080bee19cf8 | PHP | fmasa/php-dvd | /tests/DVD/Storage/AbstractStorageTest.php | UTF-8 | 1,288 | 2.671875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | <?php
namespace DVD\Storage;
use DVD\DVDException;
use Exception;
use org\bovigo\vfs\vfsStream;
use Traversable;
/**
* Test integration of PHPDVD with PHPUnit.
*/
class AbstractStorageTest extends \PHPUnit_Framework_TestCase
{
protected $handle;
protected $filePath;
protected $storage;
public func... | true |
f918d540d2e00df8d592ccca4cc656edafad052f | PHP | davidmares/pruebas | /directorio/contacto-ver.tpl.php | UTF-8 | 1,844 | 2.78125 | 3 | [] | no_license | <?php
/**
* Imprimir datos de contacto según permisos y condiciones establecidas
*
* Varible:
* $contacto
*
*/
?>
<div class='contacto'>
<?php if(isset($contacto->nombre_completo)): ?>
<h3>Nombre Completo: <strong> <?php print $contacto->nombre_completo; ?> </strong> </h3>
<?php endif; ?>
<?php if(isset... | true |
0d04c89111bbe230aec765f17074cb770a6f7e80 | PHP | jgswift/restructr | /src/CollectionEntity.php | UTF-8 | 319 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace restructr {
abstract class CollectionEntity extends Entity implements Interfaces\Collection {
use Traits\CollectionEntity;
/**
* Collection class name defined on a per class basis
* @var string
*/
public static $COLLECTION_CLASS;
}
}
| true |
320af6fb8cc1cf86d4d02ffb398dea3f8277cfe9 | PHP | andrebian-solucoes-web/zf-base | /module/BaseApplication/src/Filter/RemoveQuotes.php | UTF-8 | 629 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: andrebian - Andre Cardoso https://github.com/andrebian
* Date: 07/09/18
* Time: 11:06
*/
namespace BaseApplication\Filter;
use Zend\Filter\FilterInterface;
/**
* Class ClearQuotes
* @package BaseApplication\Filter
*/
class RemoveQuotes implements FilterInterface
{
... | true |
ef351438197381853013f9af341a5b8cff58dd83 | PHP | fashionweb/moraso | /application/cli/scripts/Installation.php | UTF-8 | 686 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Andreas Kummer, w3concepts AG
* @copyright Copyright © 2011, w3concepts AG
*/
class Cli_Installation extends Aitsu_Cli_Script_Abstract {
protected function _main() {
include_once APPLICATION_PATH . '/adm/scripts/Installation/Setup.php';
$response = 'START';
$counter = 1;
while ... | true |
fcb577a5aae31999ddfeca2060ee750a17747087 | PHP | tan136929780/demo1 | /vendor/hisune/echarts-php/src/Doc/IDE/Dataset.php | UTF-8 | 4,715 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by Hisune EchartsPHP AutoGenerate.
* @author: Hisune <hi@hisune.com>
*/
namespace Hisune\EchartsPHP\Doc\IDE;
use Hisune\EchartsPHP\Property;
/**
* @property array|array $source
* 原始数据。一般来说,原始数据表达的是二维表。可以用如下这些格式表达二维表:
* 二维数组,其中第一行/列可以给出 维度名,也可以不给出,直接就是数据:
* [
* [product,... | true |
6fe68d0a5fa36b00d77bdaa88a796e51f0732275 | PHP | aayushisahuets/Captcha_task | /classes/class-captcha.php | UTF-8 | 2,517 | 3.0625 | 3 | [] | no_license | <?php
require_once "config.php";
/**
* This class will handle the captcha
* related operations
*/
class captcha{
public function __construct(){
}
public function generate(){
/*// require_once "views/form-view.php";
randomNum();
$captcha_image = imagecreatetruecolor(120, 45);... | true |
0ae12f5fb6d06e6ebd9247282da7d8c03cd26c38 | PHP | cheich/AwesomeDataLists | /test/decode.php | UTF-8 | 1,500 | 2.765625 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>AwesomeDataLists - DataStructure</title>
</head>
<body>
<pre><?php
require '../src/Data.php';
require '../src/DataException.php';
require '../src/DataTypeInterface.php';
require '../src/DataTypeArray.php';
require '../s... | true |
2b3fb6986ca3286a8dec40958bcd8c903d61914d | PHP | evang522/duolingo-competition-api | /src/Infrastructure/Domain/Competition/Repository/CompetitionRepository.php | UTF-8 | 3,102 | 2.53125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Infrastructure\Domain\Competition\Repository;
use App\Domain\Competition\Entity\Competition;
use App\Domain\Competition\Entity\CompetitionId;
use App\Domain\Competition\Entity\Host;
use App\Domain\Competition\Entity\HostId;
use App\Domain\Competition\Exception\Competition... | true |
413bff793fcb2cf14c1b8d44de1ce42ffec9ada7 | PHP | BlenderCN-Org/learning | /Projects - Old htdocs folder/[Want to Keep But Probably Useless]/[Code]/php-pwd-functions.php | UTF-8 | 10,743 | 2.640625 | 3 | [] | no_license | <!-- http://en.wikipedia.org/wiki/Tiger_%28cryptography%29 -->
<!-- Oh, and in your en_crypt() function, put the salt behind the password. This makes brute forcing harder, or better said, it slows it down. Which is a good thing. -->
<!-- Notes
https://en.wiktionary.org/wiki/XOR#English
Salt is a generic term referri... | true |
17445962279e13183c4207c00a7226c41acac1e4 | PHP | The-Graphe-A-Design-Studio/Transportation-Web | /processing/curd_dashboard.php | UTF-8 | 16,174 | 2.53125 | 3 | [] | no_license | <?php
include('../session.php');
$connect = new PDO("mysql:host=$hostName; dbname=$dbName", $userName, $password);
if(isset($_POST["action"]))
{
$query = "select * from cust_order where or_default = 1";
$month = $year = '';
if(!empty($_POST["month"]))
{
$q... | true |
746d4cd430fcb03e60f674ffba621bcd0129584f | PHP | labadi0/Music-Libary | /Chanson.php | UTF-8 | 3,132 | 2.6875 | 3 | [] | no_license | <?php
/**
* @author TAREK
*
*/
class Chanson
{
public $nom_chanson;
public $style_chanson;
public $duree_chanson;
public $date_ajoute;
public $image_chanson;
public $nom_album;
function __construct($nom_chanson,$style_chanson,$duree_chanson,$date_ajoute,$image_chanson,$nom_album) {... | true |
c3fa21d4b952c5928abb62972d28e25bf95c69b2 | PHP | gentritshahini/newco-php | /api/products/sales.php | UTF-8 | 1,691 | 2.796875 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
$method = $_SERVER['REQUEST_METHOD'];
if ($method != 'GET') {
http_response_code(400);
echo json_encode(
array("message" => "Method ". $method ." not supported.")
... | true |
bb8fe588e0d70e637cca199f4c006cef9aea2828 | PHP | wokaerhenshen/php | /day7/lab7/index.php | UTF-8 | 1,458 | 2.625 | 3 | [] | no_license |
<?php
ob_start();
session_start();
?>
<html>
<head>
<title>SSD Lab07 - Login / Registration System</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<style>label{ background-color:#eee;width:150px; display:inline-block;}</style>
</head>
<body>
<h1>SSD Lab07 - Login / Registration System</h1>
<?... | true |
8186c3069e8e549bbee9421b4fd628f4b54edb50 | PHP | stanislav-janu/smart-emailing-v3 | /src/Exceptions/PropertyRequiredException.php | UTF-8 | 834 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace SmartEmailing\v3\Exceptions;
use Exception;
class PropertyRequiredException extends \LogicException
{
/**
* Throws PropertyRequiredException if $condition is false
*
* @param string $propertyName
* @param boolean $condition
* @param string|null $customMessage
... | true |
c93f242bcef382023dd3142124480a1056a6b1f5 | PHP | rizkiaprilan/cnet_laravel_basic | /app/Http/Controllers/FacultyController.php | UTF-8 | 2,088 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Faculty;
class FacultyController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
public function index()
{
$title = 'List Faculty';
$data = Faculty::all();
... | true |
51ae4d1b61e75b35a5978a5343fb83507004be98 | PHP | user66924/web_tech_proj | /register.php | UTF-8 | 4,760 | 2.703125 | 3 | [] | no_license | <?php
session_start();
require_once './functions.php';
$userLogin = '';
$userName = '';
$userPasw = '';
$userPaswC = '';
$userMail = '';
if (!(isset($_POST['regFrm']) && $_POST['regFrm'] = 'y')) {
header('Location:index.php');
//exit();
}
if (isset($_POST['userLogin']))
$userLogin = mys... | true |
c40ad1a4212cd25e2c01d47a268bd2346d528d78 | PHP | jrschwarz/Site-Manager | /index.php | UTF-8 | 17,920 | 2.53125 | 3 | [] | no_license | <?php
require_once './php/login.php';
$query="SELECT sites.id, sites.category, sites.description, sites.url, sites.dev_url, sites.notes, sites.name AS site_name, cms_types.name, cms_types.id AS cms_id, categories.name AS category, categories.id AS cats_id
FROM sites
LEFT JOIN cms_types
ON sites.cms=cms_types.id... | true |
96ff8d670e41cb063202c76d4ebd7bafcb3bdb10 | PHP | mcabreradev/laravel-vue-example | /app/Models/OficinaVirtual/Conexion.php | UTF-8 | 1,766 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Models\OficinaVirtual;
use App\Models\AppModel;
use Illuminate\Database\Eloquent\SoftDeletes;
class Conexion extends AppModel
{
/**
* The connection name for the model.
*
* @var string
*/
protected $connection = 'pgsql';
/**
* The table associated with the mo... | true |
3b565a022663cc1de5d1dff51e6736d2588bdfc9 | PHP | maxxyPhp/fifagoal | /fuel/app/classes/controller/gestion.php | UTF-8 | 3,092 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
class Controller_Gestion extends \Controller
{
/**
* Verif Autorisation
* Vérifie que l'utilisateur est connecté et est un admin
*/
public function verifAutorisation (){
if (!\Auth::check() || !\Auth::member(6)){
\Response::redirect('/');
}
}
/**
* View
* Prépare la vue à afficher
*
* @... | true |
3da86011498d078dd6c20618117f18eb55d78f38 | PHP | xAzoom/phpexercises | /007/src/Events/WalletEvent.php | UTF-8 | 416 | 2.859375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: moren
* Date: 19.04.2018
* Time: 01:35
*/
namespace Events;
abstract class WalletEvent
{
protected $time;
/**
* WalletEvent constructor.
* @param $time
*/
public function __construct()
{
$this->time = time();
}
/**
* ... | true |
d8dbc97d8576efe301ef11cd17daa8cdcc7a27fb | PHP | chu121su12/framework | /cr/ext/nunomaduro/termwind/src/Functions.php | UTF-8 | 1,889 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/*declare(strict_types=1);*/
namespace Termwind;
use Closure;
use Symfony\Component\Console\Output\OutputInterface;
use Termwind\Repositories\Styles as StyleRepository;
use Termwind\ValueObjects\Style;
use Termwind\ValueObjects\Styles;
if (! function_exists('Termwind\renderUsing')) {
/**
* Sets the r... | true |
6caa92c2f8886d53caa7acab0ff04f3ce685a111 | PHP | luisascastro13/agora | /src/app/model/Usuario.class.php | UTF-8 | 1,513 | 3.28125 | 3 | [] | no_license | <?php
class Usuario {
protected $login, $nome;
public $listaNucleo = array();
protected $listaComentario = array();
function __construct($login, $nome, $nucleo, $comentario){
$this->login = $login;
$this->nome = $nome;
// $this->listaNucleo.push($nucleo);
// $this->listaComentario.push($comentario);
}
... | true |
757382b637db13ea95e10a18cf3d842cbf4b6d22 | PHP | cooperaj/php-coverage-path-fixer | /src/Service/CoverageLoader.php | UTF-8 | 685 | 2.65625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace CoveragePathFixer\Service;
use SebastianBergmann\CodeCoverage\CodeCoverage;
class CoverageLoader
{
/**
* @param string $file
* @return CodeCoverage
* @throws \Exception
*/
public function loadCoverage(string $file): CodeCoverage
{
/**
... | true |
012e280318cfdeba530afcd5281330c7d37b9155 | PHP | alankarmore/depl | /database/migrations/2016_08_20_173353_create_seo_management_table.php | UTF-8 | 731 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSeoManagementTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('seo_management',function(Blueprint $table){
... | true |
b1386cf59ad17dd0dbd548de613af124e88658e1 | PHP | konfirm/php-isoflag | /test/Unit/ReadmeSamplesTest.php | UTF-8 | 980 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
use PHPUnit\Framework\TestCase;
use Konfirm\ISOFlag\Flag;
class ReadmeSamplesTest extends TestCase
{
public function testFlagFactory() {
$flag = Flag::ES();
$this->assertEquals($flag, Flag::es());
$this->assertTrue($flag == new Flag('ES'));
$this->assertFalse($flag === new F... | true |
e8e942aa97b60880f708bf566248571017a6a094 | PHP | mrthanhthang/hoangphat | /module/Admin/src/Admin/Model/Customer.php | UTF-8 | 1,250 | 2.9375 | 3 | [] | no_license | <?php
namespace Admin\Model;
class Customer
{
public $id;
public $username;
public $password;
public $fullname;
public $address;
public $email;
public $tel;
public $date_created;
public $type;
public $status;
public function exchangeArray($data)
{
$this-... | true |
60675a4795938a401ea6acf033127fd0783cb5c6 | PHP | tanglihon/CodeIgniter | /src/Row.php | UTF-8 | 11,469 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace SimpleCrud;
use SimpleCrud\Scheme\Scheme;
/**
* Stores the data of an table row.
*/
class Row extends AbstractRow
{
private $values = [];
private $relations = [];
private $changed = false;
/**
* {@inheritdoc}
*/
public function __construct(Table $table)
{
... | true |
1682fc651d00efdaa1b9ef6d8ab493c22c1f6b3c | PHP | jorge198977/ayahuaska | /intranet/funciones/procesainicia.php | UTF-8 | 4,406 | 2.765625 | 3 | [] | no_license | <?php
include("mysql/conecta.php");
/**
* Determina si la hora de referencia queda dentro del rango horario dado
*
* - Todas las horas son cadenas en formato HH:MM (o HH:MM:SS)
* - El rango es cerrado y de tipo 9:00-14:00 o 23:00-6:00
* - Compara con la hora actual si no se indica lo contrario
*/
... | true |
897af64e2f33963c19b1a52f75dd71d1e57054e3 | PHP | owenwattimena/sipelaju-web | /helper/Token.php | UTF-8 | 516 | 3.125 | 3 | [] | no_license | <?php
class Token{
private $apiKey;
private static $secretKey = "secretKey";
public static function key()
{
$secretKey = "secretKey";
// Generates a random string of ten digits
$salt = mt_rand();
// Computes the signature by hashing the salt with the secret key a... | true |
6db555d27c4a378f30b5f1af1e5c0e85d4c02bfb | PHP | batecsw/PHP_Exercises | /day_4/Function_Exercise_1.php | UTF-8 | 6,454 | 4.125 | 4 | [] | no_license | <form method="get">
Input two numbers
<input type=number name=num1 />
<input type=number name=num2 />
<input type=submit name=sub value=submit />
</form>
<?php
echo '<hr>';
echo '<p style="font-weight: 900"> EXERCISE 1 </p>';
echo '4 x 2 = ' . multiply() . '<br>';
echo '12 x 6 = ' . multiply(12, 6) . '<br>';
if(... | true |
483ec3e65a6752acd1799501996af48f02fab8dd | PHP | phpdevilboys/test | /application/modules/news/plugin.php | UTF-8 | 1,025 | 2.609375 | 3 | [] | no_license | <?php defined('BASEPATH') OR exit('No direct script access allowed');
class News_plugin extends Plugin
{
function show_news()
{
$result = "<ul>";
$limit = $this->attribute('limit', 5);
$order_by = $this->attribute('order-by', 'created_at');
$order_dir = $this->attribute('order-dir', $this->attribute('order'... | true |
d8c21fd02f999a22bcd965fe4e56a488eb6d2be4 | PHP | ThreePeple/xjqjsjpgldjkkuiloojjloj | /common/models/helpers.php | GB18030 | 1,027 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: milon517
* Date: 2015/9/29
* Time: 10:43
*/
namespace common\models;
use Yii;
class helpers
{
/**
* IPõ豸
* @param $ip
*/
public static function getAreaByIpRules($ip)
{
if(empty($ip))
{
return '';
... | true |
ef711e8ff61dc32bb17d501dd3b67f638b048dba | PHP | derricksmith/phpvulhunter | /visitors/IncludeVisitor.class.php | UTF-8 | 325 | 2.671875 | 3 | [] | no_license | <?php
use PhpParser\Node;
/**
* used to traverse the auxiliary class containing the node
* @author Exploit
*/
class IncludeVisitor extends PhpParser\NodeVisitorAbstract{
public $strings = array() ;
public function leaveNode(Node $node){
array_push($this->strings, NodeUtils::getNodeStringName($node)) ;
}
... | true |
f897b017a3c65301823321853eb3865d334e87c1 | PHP | marin-zaimov/4475project | /application/protected/extensions/FileHelper.php | UTF-8 | 3,584 | 2.875 | 3 | [] | no_license | <?php
class FileHelper
{
public static function getCSVLength($filepath)
{
$handle = fopen($filepath,"r");
$counter = 0;
do {
if ($data[0]) {
$counter += 1;
}
} while ($data = fgetcsv($handle));
return $counter;
}
public static function downloadArrayAsCsv($filename, $da... | true |
07ea2cbd96ab6af49465a23998466980935780ca | PHP | abas/septi-upload-files | /posting.php | UTF-8 | 719 | 2.59375 | 3 | [] | no_license | <?php include('php/connect.php');
$judul = $_POST['judul'];
$dana = $_POST['dana'];
$deskripsi = $_POST['deskripsi'];
$user = $_POST['user'];
$filename = $_FILES['image']['name'];
$getDir = $_FILES['image']['tmp_name'];
$sql = "INSERT INTO post".
"(judul,dana,deskripsi,image,user) ".
"VALUE".
... | true |
00ad1acdd2d35fb28af41136ad14f4ee36586f44 | PHP | Collinsboss18/Fashion-Twick | /admin/inc/actions/getsubcat.php | UTF-8 | 481 | 2.5625 | 3 | [] | no_license | <?php
include('../database/config.php');
if (!empty($_POST["catId"])) {
$id = intval($_POST['catId']);
$query = "SELECT * FROM `subcategory` WHERE `categoryid`='$id'";
$result= select_query($query);
?>
<option value="">Select Subcategory</option>
<?php
while ($row = mysqli_fetch_array($resu... | true |
84dfb9d79c027e98af9ba60941d0f8264228e3d7 | PHP | Umair-Ansari/TeachersWallet | /includes/MeetingManagement/GetData.php | UTF-8 | 841 | 2.65625 | 3 | [] | no_license | <?php
if(session_id() == '') {
session_start();
}
require_once("../database.php");
class GetData
{
Private $m_id;
Private $Result;
function __construct()
{
$this->m_id = $_POST['m_id'];
}
public function Get()
{
global $database;
$query = "SELECT * FROM meeting WHERE... | true |
86d1cb0841df4aa1dc872ebcbab23ba923352031 | PHP | gigid526/advent.of.code.day07 | /first.php | UTF-8 | 1,104 | 2.953125 | 3 | [] | no_license | <?php
$steps = [];
$rules = array_map(function ($rule) use (&$steps) {
$matches = [];
preg_match('/Step ([A-Z]+) must be finished before step ([A-Z]+) can begin\./', $rule, $matches);
$steps[$matches[1]] = isset($steps[$matches[1]]) ? $steps[$matches[1]] : 0;
$steps[$matches[2]] = isset($steps[$matches[... | true |
e05ff761493a4e110fba0617472b1502e86f0ec0 | PHP | polarisnet/ifes-docker | /code/core/framework/libs/mysql.class.php | UTF-8 | 5,794 | 2.9375 | 3 | [] | no_license | <?php
class MySQL{
var $connection;
var $queryResult;
var $lastQuery;
var $record = array();
//Constructor
function MySQL($host, $user, $pass, $port){
$this->connection = @mysqli_connect($host, $user, $pass, "", $port);
}
//Connect with database
function connect($db){
mysqli_query($this->... | true |
c19087f0c2afefabf225a81223dfe1df9e96f434 | PHP | amirhs712/nope | /tests/NopeTest.php | UTF-8 | 5,010 | 2.625 | 3 | [
"MIT"
] | permissive | <?php /** @noinspection DuplicatedCode */
/** @noinspection ClassConstantCanBeUsedInspection */
namespace Tests;
use Amirhs712\RuleBuilder\Nope;
use Carbon\Carbon;
use Illuminate\Validation\Rule;
use Illuminate\Validation\Rules\RequiredIf;
use PhpParser\Node\Stmt\Nop;
use RuntimeException;
use stdClass;
class Nope... | true |
fa4a041dc7db13fb1be7ac8db309a624f1767e2d | PHP | m3lissaeg/egresadosUTPLaravel | /egresadosLaravel/app/Providers/AuthServiceProvider.php | UTF-8 | 1,510 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies ... | true |
7cc479ee572675172891e19b10cfc2a0fce44f1d | PHP | evgeny-barinov/installment_calculator | /calculator/InstallmentCalculationStrategy.php | UTF-8 | 177 | 2.71875 | 3 | [] | no_license | <?php
namespace Insly\CarCalculator;
interface InstallmentCalculationStrategy
{
public function makePayments(float $price): array;
public function getCount(): int;
} | true |
54154858222089eada31c6a10a2105314cc177e9 | PHP | itm/concrete5-packages | /itm_courses/helpers/itm_courses.php | UTF-8 | 1,929 | 2.8125 | 3 | [] | no_license | <?php
defined('C5_EXECUTE') or die("Access Denied.");
define('ITM_COURSES_LDAP_PREFIX', 'ldap:');
/**
* Helper class for the concrete5 itm_thesis package.
*/
class ItmCoursesHelper
{
/**
* Checks whether a given name is a LDAP uid or not. This depends on the
* thesis specific assumption that the name begins w... | true |
f36364bf0597d3f113b137df7f2ffb6b8f2dc7ca | PHP | AleksandrStanov1984/kino | /backend/services/schedules/ChangeSchedulePriceDto.php | UTF-8 | 390 | 2.734375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: anton
* Date: 06.03.19
* Time: 11:13
*/
namespace backend\services\schedules;
class ChangeSchedulePriceDto
{
public $price1;
public $price2;
public $price3;
public function __construct($price1, $price2, $price3)
{
$this->price1 = $price1;
... | true |
01f1390f967d597cd3d4667652efe4d83244ec21 | PHP | TPei/WebPresentationTool | /src/db/objects/slideElements/UnorderedListElement.php | UTF-8 | 867 | 2.890625 | 3 | [] | no_license | <?php
/**
* @author Thomas Peikert
*/
namespace db\objects\slideElements;
use SimpleXMLElement;
class UnorderedListElement extends ListElement {
const Type = 'ulistelement';
public function __construct() {
parent::__construct(self::Type);
}
public function toXml(SimpleXM... | true |
63b8ce36fd1e5668bb76a0b776f8a0876f4fdf3b | PHP | ishiahirake/leetcode | /php/src/0106_construct_binary_tree_from_inorder_and_postorder_traversal.php | UTF-8 | 947 | 3.703125 | 4 | [] | no_license | <?php
/**
* 106. Construct Binary Tree from Inorder and Postorder Traversal.
*
* @see https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/
* @see https://leetcode.com/explore/learn/card/data-structure-tree/133/conclusion/942/
*/
class Solution
{
/**
* @param int[] $in... | true |
0c63cb64a56a95e11fe6d8d55baf25ae0e9c3dc9 | PHP | Erwin2371/bits-and-bytes | /Customer+Seller/PHP/Seller(login).php | UTF-8 | 1,677 | 2.625 | 3 | [] | no_license | <?php
include("../PHP/conn.php");
if(isset($_POST["Login"]))
{
$Username=mysqli_real_escape_string($con, $_POST["Username"]);
$Password=mysqli_real_escape_string($con, $_POST["Password"]);
try {
$sql ="SELECT `SellerID`, `ShopName`, `Status` FROM seller where BINARY `Username`= ? AND BINARY `Pass... | true |
2edef956b89043bdc85387a2c25c8b907098375a | PHP | laurenshoogendijk/musicplayer | /server/prepare_db.php | UTF-8 | 3,111 | 2.71875 | 3 | [] | no_license | <?php
session_start();
include 'db_resources.php';
//check if visitor is server.
if(!$_SESSION['isserver'] == 1) {
header("location:../client/client.php");
}
//get the winning song from votetable and save it in the session and in the currentsong table.
//$query_mostvotes = 'SELECT * FROM ' . $votetable ... | true |
cceab68fbf24d031b71f9a4a562fef8e1d4323ac | PHP | DustinHartzler/PharmToTable | /wp-content/plugins/learndash-hub/src/traits/time.php | UTF-8 | 1,059 | 3.09375 | 3 | [] | no_license | <?php
namespace Hub\Traits;
/**
* Manipulate the time.
*/
trait Time {
/**
* Sync the timezone from a normal date time string and a date time string with timezone.
*
* @param string $time The normal date time string.
* @param string $time_with_tz The date time string with timezone.
*
* @r... | true |
642a5f90d3c60878fc639f6df371d4f677226ec3 | PHP | RickardPedersen/Grupp-I-PHP-login | /views/logged_in_view.php | UTF-8 | 1,698 | 2.8125 | 3 | [] | no_license | <?php
session_start();
include __DIR__ . '/../classes/logged_in_view_class.php';
$loggedInUser = new classes\LoggedInClass();
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Logged in view</title>
<link rel="stylesheet"
href="https://maxcdn.bootst... | true |
3b582d51d0ad4b8c9b1d2d821763ab379a1ebf36 | PHP | welingtonmir/Damiana | /Damiana_PHP/api/produtosbd.php | UTF-8 | 685 | 2.5625 | 3 | [] | no_license | <?php
require ("./conexaobd.php");
header("Access-Control-Allow-Origin:*");
header("Content-type: application/json");
$sql = "SELECT * FROM produtos";
$resultado = query($sql);
$produtos = [];
while($rows = mysqli_fetch_assoc($resultado)){
$produtos[] =... | true |
37a5a41b4c0c4a271c351684fbf7a11557c65f5f | PHP | lksodin/php_misc | /Curl.class.php | UTF-8 | 14,547 | 2.984375 | 3 | [] | no_license | <?php
class Curl
{
const DEFAULT_USER_AGENT = 'curl';
//const DEFAULT_CONTENT_TYPE = 'application/json; charset=utf-8';
//const COOKIE_TMP_DIR = '/tmp/';
#Todo: to object
public $response = null;
public $error = null;
private $_opts = array();
private $_headers = array();
private $... | true |
46228b8e2376f56e28ee271ae2ccc65288cc702a | PHP | BCLibraries/softwaretracker | /scripts/optionallusers.php | UTF-8 | 645 | 2.8125 | 3 | [] | no_license | <?php
function optionAllUsers(){
require_once 'makedbconnection.php';
$connection = makeDBConnection(DB_HOST, DB_ADMIN, DB_ADMIN_PASSWORD, DB_NAME);
$sql = "SELECT username FROM users ORDER BY username ASC;";
$result = $connection->query($sql);
$dom = new DOMDocument;
while ($... | true |
e29b5b39092799b971d66bcf884d6af8ef120436 | PHP | Mina-R-Meshriky/eloquent | /src/Fields/Relations/Polymorphic.php | UTF-8 | 2,002 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright 2021 Cloud Creativity Limited
*
* 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-2.0
*
* Unless required by applicable la... | true |
e95eb0a9e4d5140295f392982fb99edb298e31a8 | PHP | maimake/largen | /src/Console/Commands/FacadeCommand.php | UTF-8 | 861 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Maimake\Largen\Console\Commands;
class FacadeCommand extends GeneratorCommand
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'largen:facade
{name : Facade Name}
{--service= : Service name}';
/**
* The con... | true |
8081f971df38dde0c2af9540fbd065f29984874b | PHP | robmat/samplebator | /dartliga_php/LVP/fretLocationById.php | UTF-8 | 1,347 | 2.53125 | 3 | [] | no_license | <?php
/*
* file fretLocation.php
* purpose returns csv array of selected locations
* param loc_id - location id 1..x
* full 0/1
* test fretLocationById.php?vlid=3&full=1
* fretLocation.php -> returns all
*/
foreach ($_GET as $secvalue) {
if (eregi("<[^>]*script*\... | true |
b5fd74c4bcda6be60b0e5c1d12927589d9f750c1 | PHP | maherAshori/ilanlou | /src/Controller/PointsController.php | UTF-8 | 6,083 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Controller;
use App\Controller\AppController;
use App\Model\Entity\Classroom;
use App\Model\Entity\StudentClassroom;
use App\Model\Entity\StudentPoint;
/**
* Points Controller
*
* @property \App\Model\Table\PointsTable $Points
* @property StudentPoint StudentPoint
* @property StudentClassroo... | true |
2105dd7e1cb9b23568de336b4cfdb05ba538175f | PHP | rsleeper1/theuntoldjourney | /loadstage1-easyquestions.php | UTF-8 | 3,866 | 3.078125 | 3 | [] | no_license | <!-- The loadstage PHP files are run after the user selects one of the options on the current stage they are on.
These files are the service layer for the application. All of them are pretty much the same except for the type of
questions that are produced and the text that is displayed when a player gets a question ... | true |