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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
08ada47248c4a0059c33f92cece8f08da5d264b7 | PHP | konordo/menu_position | /plugins/menu_position.language.inc | UTF-8 | 2,686 | 2.78125 | 3 | [] | no_license | <?php
/**
* @file
* Provides the "Language" rule plugin for the Menu Position module.
*/
/**
* Checks if the language matches the global language.
*
* @param $variables
* An array containing each of the variables saved in the database necessary
* to evaluate this condition of the rule.
* @return
* TRUE... | true |
b5fc3f680544ad018ebb0c9a05339c586373286b | PHP | ollie/donkey | /src/App/Router.php | UTF-8 | 843 | 3.125 | 3 | [] | no_license | <?php
namespace App;
class Router
{
const GET = 'GET';
const POST = 'POST';
protected $_routes = array(
self::GET => array(),
self::POST => array(),
);
public function get($path, $string)
{
$this->route($path, $string, self::GET);
}
public function post($path, $string)
{
$this-... | true |
081695778928bc3facce77be5eb93a8abfacf2e6 | PHP | Asokio/projetsymfonyiutmmi | /sauzea_cv/src/AppBundle/Entity/Loisirs.php | UTF-8 | 784 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
use Doctrine\ORM\Mapping as ORM;
namespace AppBundle\Entity;
/**
* @ORM\Entity @ORM\Table(name="products")
* @ApiResource
**/
class Loisirs {
/**
* @Id
* @Column(type="integer")
* @GeneratedValue
*/
protected $id;
/**
* @Column(type="string")
*/
private $name;
... | true |
36186f96da13e6d7df3433b1905161f2595a35f8 | PHP | localfr/uberall-bundle | /src/Entity/UberallResponse/UserResponse.php | UTF-8 | 1,132 | 2.6875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Localfr\UberallBundle\Entity\UberallResponse;
use Localfr\UberallBundle\Entity\User;
class UserResponse
{
use UberallResponseTrait;
/**
* @return UserObjectResponse|null
*/
public function getResponse(): ?UserObjectResponse
{
return $this->response;
}
/**
... | true |
46206867ee80574929456bd038db08c64c6aff6d | PHP | brandonceja/TAP | /load-shirts.php | UTF-8 | 1,443 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
include("include/dbh.inc.php");
$title = mysqli_real_escape_string($conn, $_POST['name']);
$description = mysqli_real_escape_string($conn, $_POST['description']);
$price = mysqli_real_escape_string($conn, $_POST['price']);
$id = $_POST["id"];
$file_tmp = $_FILES["file_image"]["tmp_name"];
$filename = $_... | true |
9ea36b06b7b0e5886e5f1d5b978ecc3551b30f28 | PHP | mrakhaf/SBD2_CRUD_Akademik | /mahasiswa/cetak_data_mahasiswa.php | UTF-8 | 1,106 | 2.546875 | 3 | [] | no_license | <?php
use Dompdf\Dompdf;
require 'functions_mahasiswa.php';
require_once "../dompdf/autoload.inc.php";
$dompdf = new Dompdf();
$mahasiswa = query("SELECT * FROM mahasiswa");
$html = '<center><h3>Data Mahasiswa</h3></center><hr/><br/>';
$html .= '<table border="1" width="100%">
... | true |
dc95a308cada595c004ce017201efba37541f87f | PHP | krazzer/kikcms | /src/Objects/CmsMenuItem.php | UTF-8 | 2,222 | 3.328125 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace KikCMS\Objects;
/**
* Value Object for a CMS menu item
*/
class CmsMenuItem
{
/** @var string */
private string $id;
/** @var string */
private string $route;
/** @var string */
private string $label;
/** @var bool */
private bool $targetBl... | true |
a4f9b517b15e2db2a562e9dd20ebd1cd85d56251 | PHP | mmirsch/he_tools1 | /lib/sixcms/class.curl.php | UTF-8 | 4,437 | 2.890625 | 3 | [] | no_license | <?php
class cURL {
/*
* @author Keith Kurson (delusions@gmail.com)
* @date September 09, 2006
* @version 1.0
*/
/*
* Headers
*/
var $headers;
/*
* User Agent
*/
var $user_agent;
/*
* Compression
*/
var $compression;
/*
* Cookie File
... | true |
2d3e9330c74392f434a751ea09d05df6a83e1c1f | PHP | e-kikai/newsystems | /models/Catalog.php | UTF-8 | 15,763 | 2.859375 | 3 | [] | no_license | <?php
/**
* catalogsテーブルモデルクラス
*
* @access public
* @author 川端洋平
* @version 0.0.2
* @since 2012/04/19
*/
class Catalog extends Zend_Db_Table_Abstract
{
protected $_name = 'catalogs';
// テンプレート候補一覧
private $_templates = array('list', 'image_l');
// フィルタ条件
protected $_filter = array('rules' =... | true |
dd1598285320b74e20c41fc68ea479ab2f746854 | PHP | MyParcelCOM/opencart-plugin | /upload/system/library/myparcel_vendor/vendor/myparcelcom/api-sdk/src/Utils/DistanceUtils.php | UTF-8 | 1,505 | 3.25 | 3 | [] | no_license | <?php
namespace MyParcelCom\ApiSdk\Utils;
use MyParcelCom\ApiSdk\Exceptions\ConversionException;
class DistanceUtils
{
const UNIT_KILOMETER = 'kilometers';
const UNIT_METER = 'meters';
const UNIT_MILE = 'miles';
const UNIT_FOOT = 'feet';
/** @var array */
private static $unitConversion = [
... | true |
c0884d8e2e26cd8b40e0a944bc2bf0031c8dce76 | PHP | hypeJunction/Elgg3-hypePostAdmin | /classes/hypeJunction/PostAdmin/SavePostSchema.php | UTF-8 | 631 | 2.609375 | 3 | [] | no_license | <?php
namespace hypeJunction\PostAdmin;
use Elgg\BadRequestException;
use Elgg\Request;
use Http\Client\Curl\ResponseBuilder;
class SavePostSchema {
/**
* Save menu
*
* @param Request $request Request
*
* @return ResponseBuilder
*/
public function __invoke(Request $request) {
$name = $request->getP... | true |
7aad0b1e489a7f63e52f5d8cfb5ce74d7e887134 | PHP | dchap/cecs491php | /lib/data_query/query_builder_visitor.php | UTF-8 | 8,391 | 2.875 | 3 | [] | no_license | <?php
namespace Lib\Data_Query
{
use Lib\Error\Exception_Handler as ExceptionHandler;
use Config\Constants\Query as QueryConstants;
use Config\Database\Mysqli_Connection as MysqliConnect;
class Query_Builder_Visitor
{
/**
*
* @param array $queryString $_GET array
... | true |
9c27999444c5866969e194f7d2017e56c709cf86 | PHP | uditrahul/cs345 | /rahul_09012320/assgn1/register.php | UTF-8 | 462 | 2.5625 | 3 | [] | no_license | <?php
$roll_no=$_REQUEST['roll_no'];
$name=$_REQUEST['name'];
$password=$_REQUEST['password'];
$register=$roll_no.",".$name.",".$password."\n";
$log=fopen("register.txt","a") or die("Failed to open the stream");
while(!flock($log,LOCK_EX)){
}
fwrite($log,$register);
fclose($log);
echo "Successfully Registere... | true |
d8932874fdaa1eab7b2d891a15bcd64814c7aa55 | PHP | FulvioPirazzi/Cyclopeer | /srcbike.php | UTF-8 | 19,039 | 2.59375 | 3 | [] | no_license |
<?php
function srcBike($servername, $username, $password, $dbname, $message) {
echo "share bike ...\n";
$User_Id = $message['from']['id'];
if (isset($message['text'])){
$text = $message['text'];
$txt = $message['text'];
}
else
$txt = "";
$answer = "3 You said ".$txt." default reply ";
// chec... | true |
a8917fedee906604c108dbfa50e338da8292bad1 | PHP | ojaha065/simplePHPLoginSystem | /config/config.php | UTF-8 | 3,036 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/*
Simple registration and login system
https://github.com/ojaha065/simplePHPLoginSystem
(C) Jani Haiko, 2019
*/
// Also use similar setting in config.js to disable UI-elements.
$disableUserSelfRegistration = false;
// Make sure to also use same values in config.js. O... | true |
bb6bc440687392c4beb4eb391da579ff5f9911b6 | PHP | ridi/pay-backend | /src/Library/Validation/ApiSecretValidator.php | UTF-8 | 1,239 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace RidiPay\Library\Validation;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Validator\Constraints\Uuid;
use Symfony\Component\Validator\Validation;
class ApiSecretValidator
{
public const HEADER_API_KEY = 'Api-Key';
public const HEADER_SECRET_KEY =... | true |
0f4c8b9fe70e0cd036ca32004666b3466bba1b56 | PHP | justexpla/laravel-demo-eshop | /app/Http/Middleware/WithLeftMenu.php | UTF-8 | 1,914 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use App\Menus\Shop\Left\BaseLeftMenu;
use App\Repositories\Shop\CategoriesRepository;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
use Illuminate\View\View;
use function Symfony\Component\Translation\t;
/**
* Middleware includes left-menu on page. View n... | true |
eeff91c719e9f1dbb53ed92712182de620db0d5e | PHP | Nico-CG/leMode | /lemode/core/database/QueryBuilder.php | UTF-8 | 1,323 | 3.203125 | 3 | [] | no_license | <?php
class QueryBuilder {
protected $pdo;
public function __construct($pdo){
$this->pdo = $pdo;
}
public function selectAll($table){
$statement = $this->pdo->prepare("select * from {$table}");
$statement->execute();
return $statement->fetchAll(PDO::FETCH_CLASS);
}
... | true |
a3722ab3911d029aa8c5fc7bcd1b0205e14831f6 | PHP | wrong-about-everything/tindergram | /src/Infrastructure/Http/Request/Url.php | UTF-8 | 258 | 2.921875 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace TG\Infrastructure\Http\Request;
abstract class Url
{
abstract public function value(): string;
final public function equals(Url $url): bool
{
return $this->value() === $url->value();
}
}
| true |
5838e77a321a9019b5bd94a0e4f0d552e87e93e2 | PHP | HarisSaran/SoccerTeamProject | /pages/functions/saveTeam.php | UTF-8 | 3,146 | 2.90625 | 3 | [] | no_license | <?php
// save the team to the database
function saveTeamToDatabase($connection){
$teamName=(isset($_POST["teamName"]))? $_POST["teamName"]:null;
$teamRank=(isset($_POST["teamRank"]))? $_POST["teamRank"]:null;
$teamAddress=(isset($_POST["teamAddress"]))? $_POST["teamAddress"]:nu... | true |
83ba363103f473689ee260bd9f478529a96d7fe3 | PHP | simonduerr/stu3 | /src/Module/Maintenance/MapCycle.php | UTF-8 | 1,445 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Stu\Module\Maintenance;
use Stu\Lib\DbInterface;
use Stu\Orm\Repository\MapRepositoryInterface;
use User;
use UserData;
final class MapCycle implements MaintenanceHandlerInterface
{
private $db;
private $mapRepository;
public function __construct(
DbInterface $db,
MapRep... | true |
0328f01c292f45797d8caeb035d78be33caec067 | PHP | EmmanuelMess/TDD2018 | /tests/TestTiposCarta.php | UTF-8 | 554 | 2.609375 | 3 | [] | no_license | <?php
namespace TDD;
use PHPUnit\Framework\TestCase;
class TestTiposCarta extends TestCase {
public function testHash() {
$hashArr = [TiposCarta::hash(TiposCarta::E_ORO),
TiposCarta::hash(TiposCarta::E_COPA),
TiposCarta::hash(TiposCarta::E_ESPADA),
TiposCarta::hash(TiposCarta::E_BASTO),
TiposCarta::h... | true |
399364371cd4f8ed6a8502c09c2fa749a3bf868a | PHP | dwiansyah06/pemesanan_brg | /tambah_user.php | UTF-8 | 4,209 | 2.71875 | 3 | [] | no_license | <?php
if(session_id() == '' || !isset($_SESSION)){session_start();}
if(!isset($_SESSION["username"])) {
header("location:index.php");
} elseif ($_SESSION["level2"] != "superadmin") {
header("location:404.php");
}
include 'config.php';
include 'header.php';
if(isset($_POST['submit'])){
$username = $_P... | true |
13df60290f2be0c6553eb4f6d272d3e0a941a4d4 | PHP | daitaso/LittleTuber | /database/migrations/2019_06_24_132545_create_channels_table.php | UTF-8 | 1,053 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateChannelsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('channels', fun... | true |
769eb837f80e7dbbf2013b503acc395bcd6067b8 | PHP | pooooooon/SteadFast-Generation | /src/GeneratorRemake/normal/biome/snowy/IcePlainsSpikesBiome.php | UTF-8 | 4,623 | 2.703125 | 3 | [] | no_license | <?php
namespace GeneratorRemake\normal\biome\snowy;
use GeneratorRemake\normal\biome\FreezedBiome;
use GeneratorRemake\normal\biome\SnowyBiome;
use GeneratorRemake\populator\Populator;
use pocketmine\block\Block;
use pocketmine\level\ChunkManager;
use pocketmine\level\format\FullChunk;
use pocketmine\utils\Random;
... | true |
45a3359877f70e8426fa18dcf47550eea7695aeb | PHP | Unice-SIL/syllabus | /src/Syllabus/Constant/ActivityType.php | UTF-8 | 280 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Syllabus\Constant;
/**
* Class ActivityType
* @package App\Syllabus\Constant
*/
final class ActivityType
{
const ACTIVITY = 'activity';
const EVALUATION = 'evaluation';
const TYPES = [
self::ACTIVITY,
self::EVALUATION
];
} | true |
d9e06641d13dbed2f0baaef73cd9c94b9eef2527 | PHP | shauno/assess-test | /app/src/Books/BooksController.php | UTF-8 | 2,186 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Books;
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
use \Slim\Views\PhpRenderer;
class BooksController
{
public function index(Request $request, Response $response)
{
// Get all the books to show
$ch = curl_i... | true |
afc470a47f300c655097ae2ef67ea274eb3509cc | PHP | eiwuert/Myrepo | /vendorapi_www_root/vendorapi_staging/releases/RELEASE_20100624/commercial.vendorapi.edataserver.com/code/VendorAPI/Actions/LoginLock.php | UTF-8 | 4,082 | 2.703125 | 3 | [] | no_license | <?php
/**
* Returns transations for a given application
*
* @author Randy Klepetko andy.klepetko@clearlakeholdings.com
*/
class VendorAPI_Actions_LoginLock extends VendorAPI_Actions_Base
{
protected $application_factory;
protected $factory;
protected $login_lock;
public function __construct(
VendorAPI_ID... | true |
72bb84b3fd5fa6193a0ee4125ee2382fbf42a57b | PHP | tdinatale/code-samples | /hideEmails.class.php | UTF-8 | 3,657 | 2.8125 | 3 | [] | no_license | <?php
require_once 'functions.php';
/**
* Use this class to find and replace instances of email addresses with a link to the contact form with a token of who to email.
* This will help protect against email harvesting that will lead to spam.
*/
define('URL_BASE', (SANDBOX) ? 'https://dev.example.com' : 'htt... | true |
bf20189e013b15d78efe9cb2bf30df49b79b0f2a | PHP | zhangbeyourself/cookie | /cookie-login.php | UTF-8 | 1,628 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ZC
* Date: 2018-3-7
* Time: 12:03
*/
$username=$_POST['username'];
$password=$_POST['password'];
@$auto=$_POST['auto'];
//1.初步验证用户名和密码是否为空,不为空继续进行,为空则跳转回登录页面
if ($_POST['username']==''||$_POST['password']==''){
echo"<script>alert('用户名和密码不能为空!');window.locati... | true |
771a55c3777d4f69ff14e3477a0f5ebfb5d24cb7 | PHP | wtfranco22/FAI-1513FiDrive | /control/control.php | UTF-8 | 6,334 | 3.59375 | 4 | [] | no_license | <?php
class control
{
public function prueba()
{
return "Este viaja al acción1.php, crea objeto, y viaja al control.php verificando los datos del index";
}
public function verNumero($datos)
{
$numero = $datos['numero'];
if ($numero < 0) {
$res = "El número es ... | true |
bb905a30fd347caa4135f9c53b3722aeacec4cdf | PHP | kumilingus/SellCloudMusic | /kernel/class.transformer.php | UTF-8 | 1,205 | 3.046875 | 3 | [] | no_license | <?php
abstract class Transformer {
const XML_VERSION = '1.0';
const XML_ENCODING = 'UTF-8';
public function __construct($param = array()) {
foreach ($param as $var => $val) {
$this->$var = $val;
}
}
public function toJSON() {
return json_encode($this);
}
... | true |
bfd40c234835a0dad060fffd61f70f41fad3a9fe | PHP | KristjanGunn/VefforritunLokavek | /Verkefni_Loka/API/cache.php | UTF-8 | 330 | 3.34375 | 3 | [] | no_license | <?php
/**
* The interface those who use our caching know, real simple, you can set a value
* for a key or get a value from a key.
*/
interface ICache
{
public function get($key);
public function set($key, $value);
}
class Cache implements ICache
{
public function get($key)
{
}
public function set($key, $valu... | true |
935e11153eb0321fee23c926f12947edcf63bcf2 | PHP | Billy5Knox/sadaatrials | /pages/login.php | UTF-8 | 9,895 | 2.578125 | 3 | [] | no_license | <?php
session_start();
require_once '../process/dbconnect.php';
// Check connection
if ($dbconn->connect_error) {
die("Connection failed: " . $dbconn->connect_error);
exit;
}
/*
if (isset($_SESSION['userSession'])!="") {
header("Location: ../index.php");
... | true |
788d83ed7f81bf0be5454bf53f1373160b74f494 | PHP | justxiaot/myphptest | /Test/Animal.php | UTF-8 | 411 | 3.28125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2014/12/23
* Time: 10:59
*/
namespace Test;
class Animal {
private $weight;
public function __construct()
{
$this->weight = 0;
echo "I am an animal <br/>";
}
public function getWeight()
{
return $this... | true |
f6cd167380af314e1a3e9c3d861e80a8b00fd09d | PHP | trak2018z/Facelike-tr | /account/adminsettingscheck.php | UTF-8 | 695 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | <?php
//Pobranie danych
if(!isset($_POST['zmienna']) || !isset($_POST['wartosc']) || !isset($_POST['wartoscMin']) || !isset($_POST['wartoscMax'])) {
echo'Nie przesłano zmiennych "zmienna", "wartosc", "wartoscMin" i "wartoscMax"<br />';
}
else {
$zmienna = $_POST['zmienna'];
$wartosc = $_POST['wartosc'];
$wa... | true |
6a6a5e46fa1e6b5f72da4b123e1f7cc95a9160cd | PHP | Saint-Cyr/Iregister | /tests/AppBundle/Controller/DefaultControllerTest.php | UTF-8 | 1,561 | 2.515625 | 3 | [] | no_license | <?php
namespace Tests\AppBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
public function testIndex()
{
$client = static::createClient();
$crawler = $client->request('GET', '/');
$this->assertEquals(200, $clien... | true |
49d107d3070fd649da9e2b71f7aa089083db64c5 | PHP | arima-ryunosuke/php-validator | /tests/Test/UnitTest/chmonos/Condition/FileTypeTest.php | UTF-8 | 3,281 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace ryunosuke\Test\UnitTest\chmonos\Condition;
use ryunosuke\chmonos\Condition\FileType;
class FileTypeTest extends \ryunosuke\Test\AbstractUnitTestCase
{
function test_valid()
{
$dir = __DIR__ . '/_files/';
// jpg のみ受けつける
$types = [
'JPG' => 'jpg'
];
... | true |
89fb54925c9d7c2cfd8e540f1aae694d2e0cde4d | PHP | enkaypeter/TravelHub | /app/Http/Controllers/UssdController.php | UTF-8 | 5,290 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Ussd;
class UssdController extends Controller
{
public function show(){
$ussd = new Ussd;
$parties = array(1 => "ACCORD", 2 => "AAC", 3 => "ACPN", 4 => "ADC", 5 => "APC", 6 => "APGA",
7 => "GDPN", 8 => "FDP", 9 => "PDP", 10 => "PPN", 1... | true |
2f40d028373b85b5142be15677e19caf5b33a922 | PHP | IzumiShaka-desu/garden | /service/kebunkuwebservice/app/Controllers/Fruits.php | UTF-8 | 1,745 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Controllers;
use CodeIgniter\RESTful\ResourceController;
class Fruits extends ResourceController{
protected $format='json';
protected $modelName='App\Models\Fruit_model';
function index(){
return $this->respond($this->model->findAll(),200);
}
pu... | true |
ef24ce3fc2129769d017702e7d4461e5ee95cc47 | PHP | Vanessa-SC/actdoc | /php/getFormatoProgramaInstitucional.php | UTF-8 | 4,951 | 2.890625 | 3 | [] | no_license | <?php
// Librería y archivo de conexión
require_once "../XLSX/PHPWord_0.17/autoload.php";
include_once 'conexion.php';
// LLamado a la plantilla
$template_word = '../XLSX/plantillaProgramaInstitucional.docx';
// Instancias de creación
$templateProcessor = new \PhpOffice\PhpWord\TemplateProcessor($template_word);
// ... | true |
b514173b3c9812e97985a0ff2b8f43ccd250d94f | PHP | phpno1/algorithm | /src/Judge/Isograms.php | UTF-8 | 767 | 3.4375 | 3 | [] | no_license | <?php
/**
* @package Phpno1\Algorithm\Judge
* @author Yaha <1143990204@qq.com>
* @link https://blog.flyaha.top
*/
namespace Phpno1\Algorithm\Judge;
/**
* Class Isograms
*
* @package Phpno1\Algorithm\Judge
*
* 等值线(如果存在相同字母则返回false)
*
* @category
* @author Yaha <1143990204@qq.com>... | true |
f8dc3453a70104646305fa48f3250c82b05f0474 | PHP | Hiroshii-m/WebPhisic | /WebPhisic/mypage.php | UTF-8 | 7,846 | 2.546875 | 3 | [] | no_license | <?php
require('function.php');
debug('「「「「「「「「「「「「「「「「「「「「「「「「「「「「「「「');
debug(' 「 マイページ 」');
debug('「「「「「「「「「「「「「「「「「「「「「「「「「「「「「「「');
require('auth.php');
// 折れ線グラフ描画に必要なライブラリ
require_once('jpgraph-4.3.4/src/jpgraph.php');
require_once('jpgraph-4.3.4/src/jpgraph_line.php');
require_once('jpgraph-4.3.4/src/jpgraph... | true |
8f93f22283600d40c51e61327dffbeb38be860ce | PHP | royalterra/agoriad | /Apertium.php | UTF-8 | 9,923 | 2.78125 | 3 | [
"MIT",
"MIT-0"
] | permissive | <?php
class Apertium {
public $instroot = '';
public $bindir = '';
public $srcroot = '';
public $pair = '';
public $direction = '';
public $revision = '';
public $pipeline;
public $encoding;
public $ldpath;
public $options;
public $text = '';
// construct object and collect information about... | true |
76333f5554f7c2595c1af258f040c6c33881733b | PHP | Stasy/bugTrackingSystem | /bugTrackingSystem/handlers/login.php | UTF-8 | 1,730 | 2.578125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
</head>
<body>
<?php
session_start();
include '../baseClasses/UserModel.php';
include '../../configurations/roboBugConfig.php';
include 'addRow.php';
if($_POST['user_pass']=='' || $_POST['user_name']=='')
... | true |
0fa9963ad45bc87af2d33b479684b89c9635d64e | PHP | eaglexpf/RocQrCode | /RocQrCode.php | UTF-8 | 1,028 | 3.140625 | 3 | [] | no_license | <?php
namespace RocQrCode;
require_once __DIR__."/vendor/phpqrcode/phpqrcode.php";
class RocQrCode{
/**
* @param $text 要生成的内容
* @param $outfile 是否生成文件,不生成文件的话直接将图片返回,否则需要给出存放图片的路径(默认为否)
* @param $level 容错率,可传递的值为L(0)(QR_ECLEVEL_L,7%),M(1)(QR_ECLEVEL_M,15%),Q(2)(QR_ECLEVEL_Q,25%),H(3)(QR_ECLEVEL_H,30%)
* @para... | true |
dd49ded9282bbdf4efa42e390c0b2af52530ab2e | PHP | usmanjdn93/shifa-test | /app/Http/Controllers/PatientsController.php | UTF-8 | 3,697 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Requests\PatientRequest;
use App\Patient;
use Illuminate\Contracts\View\Factory;
use Illuminate\Http\RedirectResponse;
use Illuminate\View\View;
use Yajra\DataTables\DataTables;
class PatientsController extends Controller
{
/**
* Display a listing of the re... | true |
c5507cf0e8c9363d63c777dc92fe7e1bdadcd919 | PHP | MelvDouc/pipot.github.io | /controllers/MessageController.php | UTF-8 | 1,419 | 2.578125 | 3 | [] | no_license | <?php
namespace app\controllers;
use app\core\Application;
use app\core\Request;
use app\core\Controller;
use app\models\DirectMessage;
use app\models\User;
class MessageController extends Controller
{
public function myMessages(Request $req)
{
if (!($user = $this->getSessionUser()))
return $this->redi... | true |
9a3673ddf2ab457807aba0b184090e8df4745380 | PHP | kwatanabex/aquarium | /lib/AQ/Manager.php | EUC-JP | 1,800 | 2.640625 | 3 | [] | no_license | <?php
/**
* DB饹
*/
SyL_Loader::lib('DB');
/**
* DBǡ饹
*/
SyL_Loader::lib('DB.Dao');
SyL_Loader::lib('DB.Dao.Table');
/**
* AQUARIMޥ͡㥯饹
*
* @package SyL
* @author Koki Watanabe <k.watanabe@syl.jp>
* @copyright 2006-2007 k.watanabe
* @license http://www.opensource.org/licenses/lgpl-license.php
* @versio... | true |
fe10691a3354795b2b814e9a366cf8a9625a11eb | PHP | hbalagtas/bikeusagetracker | /database/seeds/BikesTableSeeder.php | UTF-8 | 599 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class BikesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$b = new Bike;
$b->name = 'Orma';
$b->notes = 'My birthday gift and the one that got me started into cycling';... | true |
63b00938558ce1b0b8141bcaeb751a95aa81aaee | PHP | grupaStatki/graStatki | /statkiSerwer/whoseMove.php | UTF-8 | 1,667 | 2.78125 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "statki";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$playerID = $_POST["playerID"];
$game... | true |
5f3aaadd20a3585afef76f267d347c3c3723865e | PHP | philipbkemp/docker-php-env | /code/index.php | UTF-8 | 1,343 | 2.921875 | 3 | [] | no_license | <?php
var_dump("Welcome to the house of fun");
print "<hr />";
$driver = new mysqli_driver();
$driver->report_mode = MYSQLI_REPORT_STRICT | MYSQLI_REPORT_ERROR;
function get($setting) {
try {
$db = new mysqli("dpe-mysql", "root", "", "testschema" );
$get = $db->prepare("SELECT * FROM test WHERE id = ?");
$get... | true |
c9f5ceeb9498e25bc2c3d649f04f45193c6cf7d1 | PHP | ggjacob/Hospital-CRM | /application/entities/App/Entity/Meeting.php | UTF-8 | 1,605 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Entity;
/**
* @Entity
* @Table(name="meetings")
*/
class Meeting extends \App\Entity
{
/**
* @ManyToOne(targetEntity="Doctor", inversedBy="meetings", fetch="LAZY")
*/
protected $doctor;
/**
* @ManyToOne(targetEntity="Patient", inversedBy="meetings", fetch="LAZY")... | true |
edfb42fb78175e83dc3d456999458bb60895fd0f | PHP | ajie62/P3_OC | /controleurs/AboutController.php | UTF-8 | 218 | 2.578125 | 3 | [] | no_license | <?php
class AboutController extends Controller {
public function execute() {
$aboutDescription = $this->aboutManager->getDescription();
$viewAbout = new ViewAbout($aboutDescription);
$viewAbout->display();
}
} | true |
60ec364ea26d5babfa236f64281bad4a2c1b87be | PHP | estvoyage/ticTacToe | /src/board/recipient.php | UTF-8 | 352 | 2.71875 | 3 | [] | no_license | <?php namespace estvoyage\ticTacToe\board;
use estvoyage\ticTacToe\{ board, symbol, coordinate };
interface recipient
{
function ticTacToeBoardIs(board $board);
function invalidCoordinateForTicTacToeSymbol(coordinate $coordinate, symbol $symbol) :void;
function overlapCoordinateForTicTacToeSymbol(coordinate $coord... | true |
586d7bc5aa9f0e8548524063a9ba3f3a1eca68b1 | PHP | trungnh/lifepos | /application/helpers/currency_helper.php | UTF-8 | 461 | 2.828125 | 3 | [] | no_license | <?php
function to_currency($number) {
$CI =& get_instance();
$currency_symbol = $CI->config->item('currency_symbol') ? $CI->config->item('currency_symbol') : 'đ';
if($number >= 0) {
return number_format($number, 0, '.', ',').$currency_symbol;
}
else {
return '-'.number_format(abs($nu... | true |
0b5c6845cef0bed77ba33b252485f223ae5e639b | PHP | NeuralNoise/ConnActiv | /android/register.php | UTF-8 | 2,544 | 2.59375 | 3 | [] | no_license | <?php
//get the mysql_connect function
mysql_select_db("connactiv") or die(mysql_error());
include("../views/functions/config.php");
if(!$_POST['username'] || !$_POST['password'] || !$_POST['confirm']) {
echo 'You did not fill one of the required fields: email, password, or confirm password.';
}
//check to... | true |
2bf3cc0710d590ecf3bea0faa71dd2b78d1651f1 | PHP | boualimed/supla-cloud | /src/AppBundle/Doctrine/Types/BinaryType.php | UTF-8 | 1,509 | 2.59375 | 3 | [] | no_license | <?php
/*
src/AppBundle/Doctrine/Types\Binary.php
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 2
of the License, or (at your option) any later version.
This program is distrib... | true |
0b19c8d81398dd86b5f40df987efc2b6e501ccb6 | PHP | ManojKiranA/Lyra | /src/Dashboards/Cards/Card.php | UTF-8 | 470 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace SertxuDeveloper\Lyra\Dashboards\Cards;
abstract class Card {
protected $title;
protected $icon;
protected $class = "col-12 col-lg col-xl";
protected $component = "card-simple";
protected function value() {
return 1;
}
public function get() {
return [
"title" => $this->ti... | true |
dd091def8dcd99c94c408daf45fa6c8ad56985e3 | PHP | pianoyue/First-Cadres | /app/Common/Common.php | UTF-8 | 1,250 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Common;
class Common{
/**
* 格式化成功返回值
* @param $content array | string | object 返回值数据
* @param $massage string 返回值信息
* @return \Illuminate\Http\JsonResponse
*/
public static function sprintSuccessResult($content, $massage = '获取成功'){
$data = [
'co... | true |
e163e0c717a2eef6220927dfbe7c9d3d020a03a4 | PHP | dominiccliff/entreprenity2 | /api/services/userIDBasedServices.php | UTF-8 | 41,233 | 2.53125 | 3 | [] | no_license | <?php
//Function to fetch a user's currency
function fetchUserCurrency($userid,$voffClientID)
{
//SELECT location_info.id,location_info.location_desc,location_info.currency
//FROM entrp_login
//LEFT JOIN client_profile ON client_profile.clientid=entrp_login.clientid
//LEFT JOIN location_info ON location_info.id=c... | true |
db63a961fd6a5b33fec100dc5357dd3be21a00de | PHP | shadiakiki1986/yolo-bear-server | /var/www/api/get.php | UTF-8 | 7,602 | 2.75 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin: *");
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
/*
Returns a selected yolo-bear tournament
Usage:
CLI
php get.php 'safra 2014'
php get.php 'test tour... | true |
776575074575d89504af93e0a28ac45dfa019537 | PHP | froq/froq-database | /src/query/QueryParam.php | UTF-8 | 2,464 | 2.921875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Copyright (c) 2015 · Kerem Güneş
* Apache License 2.0 · http://github.com/froq/froq-database
*/
declare(strict_types=1);
namespace froq\database\query;
use froq\common\interface\Arrayable;
/**
* A class, for using as a single param in query params.
*
* @package froq\database\query
* @object froq\... | true |
5ca108c06781f90b337588dabfe641dd480b3d38 | PHP | WeiYH1998/MIUI | /src/suning/server/getGoodsData.php | UTF-8 | 616 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | <?php
# 01-先连接数据库
$db = mysqli_connect("127.0.0.1","root","","miui");
# 获取参数
$page = ($_REQUEST["page"] -1 ) * 20;
$type = $_REQUEST["sortType"];
# 02-查询获取数据库所有的数据
if($type == 0)
{
$sql = "SELECT * FROM goods LIMIT $page, 20";
}elseif($type == 1){
$sql = "SELECT * FROM goods ORDER BY price DESC LIMIT $page, 20";
... | true |
8d50b100708eb241ac47e7a1f58a2f9754db72ab | PHP | kovalevich/top9 | /application/forms/City.php | UTF-8 | 711 | 2.515625 | 3 | [] | no_license | <?php
class Application_Form_City extends Application_Form_Form
{
public function init()
{
// указываем имя формы
$this->setName('city');
$this->setMethod('post');
$name = new Zend_Form_Element_Text('name');
$name->setLabel('b')
->setRequired(true)
->addFilter('StripTags')
... | true |
f11c3f70afaf42ab44f69a3b53d59e6e438079e1 | PHP | appf-anu/phis-webapp | /controllers/InfrastructureController.php | UTF-8 | 4,171 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
//******************************************************************************
// InfrastructureController.php
// SILEX-PHIS
// Copyright © INRA 2018
// Creation date: 21 Aug, 2018
// Contact: morgane.vidal@inra.fr, vincent.migot@inra.fr, anne.tireau@inra.fr, pascal.neveu@... | true |
a10c168c5ff31cae4236dcef78ede5b3c7c26fd9 | PHP | yoyoyokz/php | /numrows.php | UTF-8 | 366 | 2.6875 | 3 | [] | no_license | <?php
try{
require_once 'config.php';
$sql="SELECT * FROM employe";
$result=$db->query($sql);
$count=$result->rowCount();
$errorinfo=$db->errorInfo();
if (isset($errorinfo[2])) {
$error=$errorinfo[2];
}
}
catch(Exception $e){
$error=$e->getMessage();
}
if(isset($error))
{
echo "Errors ".$error;
}
echo "T... | true |
99045592d75f02a15c1a412b843544411683e846 | PHP | Mustafa232/e_commerce | /app/Help/dbHelper.php | UTF-8 | 846 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
// define
use \App\Setting as setting;
use \App\Contact as contact;
use \App\Order as order;
// functions
if (! function_exists('getSettings')) {
function getSettings($name='site_title')
{
$setting = setting::where('name', $name)->first();
return $setting == null ? $name : $setting->real_value;
}
}
if (... | true |
6112d11e55f0db645672b24ebede924dea3d8c99 | PHP | Rafa-custodio/Fontes-PHP | /Converter Datas utilizando PHP/teste3.php | UTF-8 | 760 | 2.765625 | 3 | [] | no_license | <?php
require('converter.php');
?>
<!DOCTYPE html>
<html>
<head>
<title>Teste 3</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
</head>
<body>
<div class="container">
<form method="post" action="#!">
<label>Digite uma data e... | true |
cd224eea04c752f8bb663452b65d10be9be86b7d | PHP | richhaho/ligapi2 | /src/Repository/Query/ListFilterSetFragment.php | UTF-8 | 677 | 2.640625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Repository\Query;
use App\Api\Dto\FilterDto;
use Doctrine\ORM\QueryBuilder;
class ListFilterSetFragment implements ListFilterFragment
{
public function supports(FilterDto $filterDto): bool
{
return $filterDto->filterType === 'set';
}
p... | true |
19afdba28ec352ab88e36477954622de8c1cbda5 | PHP | thijskaspers/craft-reducer | /reducer/ReducerPlugin.php | UTF-8 | 1,332 | 2.640625 | 3 | [] | no_license | <?php
namespace Craft;
class ReducerPlugin extends BasePlugin
{
public $uid;
public function getName()
{
return Craft::t('Reducer');
}
public function getVersion()
{
return '1.0.3';
}
public function getDeveloper()
{
return 'Pixel&Code';
}
public function getDeveloperUrl()
{
return 'http://www... | true |
6eb9c2280b07dbb999f888254f11565fa360e9fd | PHP | rdas6313/Minion-Framework | /app/models/catlist.php | UTF-8 | 1,451 | 2.828125 | 3 | [] | no_license | <?php
/**
* Catlist Model
*/
class catlist extends modelsupport
{
function __construct(){
$db_soft = 'mysql';
$host = 'localhost';
$dbname = 'mini';
$username = 'root';
$password = '';
parent::__construct($db_soft,$host,$dbname,$username,$password);
}
public function postcat($id){
$table1 = 't... | true |
309c5067abc5e603aa3fde6b983b9eddcbaeca2b | PHP | StefanBeader/waffle | /app/Traits/SelectOptions.php | UTF-8 | 453 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Traits;
trait SelectOptions {
public static function selectOptions()
{
$options = [];
static::all()->each(function ($el) use (&$options) {
return $options[$el->id] = ucwords($el->name);
});
uasort($options, function ($a, $b) {
if ($a... | true |
3343dc885d7bd08055d79221f0839a53fa1b513f | PHP | resslerruntime2/AzuraCast | /src/Entity/ApiKey.php | UTF-8 | 1,391 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace App\Entity;
use App\Security\SplitToken;
use Doctrine\ORM\Mapping as ORM;
use JsonSerializable;
use Stringable;
#[
Attributes\Auditable,
ORM\Table(name: 'api_keys'),
ORM\Entity(readOnly: true)
]
class ApiKey implements JsonSerializable, Stringable
{
use Trait... | true |
b7f71e8601f6f85bb45062cfd08660ba4799f110 | PHP | dkbay/godus-web | /app/Http/Controllers/MessageController.php | UTF-8 | 1,416 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Message;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class MessageController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}
... | true |
bf11c5961cf9ebc2a1282a2a18b3dcb6f10ef3d2 | PHP | colinodell/aoc-downloader | /src/Downloader.php | UTF-8 | 1,655 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace ColinODell\AOCDownloader;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Cookie\CookieJar;
use GuzzleHttp\Cookie\SetCookie;
use League\HTMLToMarkdown\HtmlConverter;
use League\HTMLToMarkdown\HtmlConverterInterface;
use Symfony\Component\DomCrawler\Crawl... | true |
1bfde11834c9c3b1e78852e850e7afe03b5f8cd7 | PHP | dongnanyanhai/fnx103 | /core/lib/file_upload.class.php | UTF-8 | 5,377 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* file_upload class file
*/
if (!defined('IN_FINECMS')) exit();
class file_upload extends Fn_base {
/**
* 文件大小
*
* @var integer
*/
protected $limit_size;
/**
* 文件名字
*
* @var string
*/
protected $file_name;
/**
* 文件类型
*
* @var string
*/
protected $l... | true |
e6cdf730ec1f84468a77d2469af4decf9f8149b1 | PHP | mykolmias/acmenewsbundle | /src/Acme/NewsBundle/Repository/NewsRepository.php | UTF-8 | 2,843 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Acme\NewsBundle\Repository;
use Acme\NewsBundle\Entity\News;
use Doctrine\ORM\EntityRepository;
class NewsRepository extends EntityRepository
{
/**
* Возвращает кол-во опубликованных новостей в БД
*
* @return int
*/
public function countPublishedNews(): int
{
r... | true |
cc54f6b6bc9c99330ce1ea9a87e4b0f52fdad85b | PHP | rakafaProg/theschool | /templates/card.php | UTF-8 | 1,285 | 2.640625 | 3 | [
"MIT"
] | permissive |
<!-- This template recives an array named $params:
For example:
[
'image-url' => 'url',
'name' => 'name',
'meta' => 'meta',
'description' => ['1' , '2'],
'buttons' => [
[
'color' => 'green',
'href' => 'url',
... | true |
97129077468c8eb605395a41d85ce5b4ec6daf15 | PHP | ChrisB9/wordvault | /src/Domain/Word/WordModel.php | UTF-8 | 919 | 3.03125 | 3 | [] | no_license | <?php
namespace cbenco\Domain\Word;
class WordModel
{
private $id;
private $word;
private $description;
/**
* @param integer $id
*/
public function setId($id)
{
$this->id = $id;
return $this;
}
/**
* @return integer
*/
public function getId($id)
... | true |
ddd53b076539c40edf1ccf96439360f97c94e2b6 | PHP | mauricejoway24/dryforms | /app/Repositories/Contracts/BaseRepository.php | UTF-8 | 519 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Contracts;
use Illuminate\Database\Eloquent\Model;
class BaseRepository implements Repository
{
private $model;
public function __construct(Model $model)
{
$this->model = $model;
}
public function getList(array $params, int $page, int $perPage, ?array $wi... | true |
cebf9dffb07cbcb9bd2553b7d89d93eccfc68788 | PHP | tiexinliu/develop | /models/Images.php | UTF-8 | 1,291 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "{{%images}}".
*
* @property string $image_id
* @property string $thumb_url
* @property string $original_url
* @property string $large_url
*/
class Images extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public s... | true |
426f174bbced3bf2d89d57e7af1a4be7349efbea | PHP | grahamcracker/Argos | /functions/time.func.php | UTF-8 | 2,641 | 3.328125 | 3 | [
"MIT"
] | permissive | <?php
function time_is($time,$seconds=false){
$format = $seconds ? "g:i:s A" : "g:i A";
$yesterday_is = date('d', mktime(0, 0, 0, date("m") , date("d") - 1, date("Y")));
$today_is = date('d', time());
$relative_time = date($format,$time);
$day_of = date("d",$time);
if($day_of==$today_is)
{
$day_strin... | true |
92725f09cee3c0afea3a51f608ea1d2ed60904b4 | PHP | Webador/SlmQueue | /src/Worker/Event/WorkerEventInterface.php | UTF-8 | 546 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace SlmQueue\Worker\Event;
use SlmQueue\Worker\WorkerInterface;
interface WorkerEventInterface
{
/**
* Various events you can subscribe to
*/
public const EVENT_BOOTSTRAP = 'bootstrap';
public const EVENT_FINISH = 'finish';
public const EVENT_PROCESS_QUEUE = 'process.... | true |
c995c878f99e569f92e06239ac3c3145dd3b9761 | PHP | sendimarvin/PracticalProgrammingAutomatedTutor | /Programming Assignment Autograder/account/createAccount.php | UTF-8 | 1,120 | 2.71875 | 3 | [] | no_license | <?php
require_once('connect.php');
$email = $_POST["email"];
$fName = $_POST["fName"];
$sName = $_POST["sName"];
$password = $_POST["password"];
$role = "student";
if($email !==null & $fName !==null & $sName !==null & $password !==null){
$sql= "INSERT INTO `user` (`emai... | true |
a5bac52fbfa866ce5ee03d845b5836190c90786b | PHP | suruabiye/whiteboard | /partials/_post.php | UTF-8 | 690 | 2.515625 | 3 | [] | no_license | <?php
/**
* The main blog post template.
* In here you can customize what's shown with Conditionals tags (like 'if(is_single())').
*/
?>
<article role="article">
<header>
<h1>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
... | true |
6a4d610bd56721ede4ec24cf56100be36e6b4511 | PHP | justice-oj/frontend | /common/components/queue/BasicRabbitMQProducer.php | UTF-8 | 1,686 | 2.71875 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace common\components\queue;
use PhpAmqpLib\Channel\AMQPChannel;
use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Message\AMQPMessage;
class BasicRabbitMQProducer {
public $host = 'localhost';
public $port = 5672;
public $user = 'justice';
public $password = 'justice';
p... | true |
2c608b95de88b379f0fd7d5168c7b301d3058de3 | PHP | tappleby/laravel-oauth2-server | /src/Tappleby/OAuth2/Storage/AuthorizationCodeStorage.php | UTF-8 | 1,337 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace Tappleby\OAuth2\Storage;
class AuthorizationCodeStorage implements \OAuth2\Storage\AuthorizationCodeInterface {
/** @var \Tappleby\OAuth2\Repositories\AuthorizationCodeRepositoryInterface */
protected $repo;
function __construct($repo)
{
$this->repo = $repo;
}
public function get... | true |
21979b2b8773c36a9236b0d77934715bded808c1 | PHP | CS340PizzaShop/pizza-shop | /php/order_status.php | UTF-8 | 3,856 | 2.546875 | 3 | [] | no_license | <?php
include "connect.php";
?>
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Fatima's Pizzeria - order page</title>
<link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Montserrat&display... | true |
ccb9d0f4635202813219c8aaf36a0e6c7a064d64 | PHP | kimsyversen/api-for-conference | /app/Uninett/Eloquent/StatisticUris/StatisticUriRepository.php | UTF-8 | 247 | 2.734375 | 3 | [] | no_license | <?php namespace Uninett\Eloquent\StatisticUris;
class StatisticUriRepository {
public function find($uri) {
return StatisticUri::where('name', '=', $uri)->first();
}
public function create($data){
return StatisticUri::create($data);
}
} | true |
277933b3708331e951dfcc8ff289f5bc17d2375d | PHP | azielazny/danzet-rest | /src/Danzet/Routes/Cars.php | UTF-8 | 11,803 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: arek50
* Date: 08.02.2018
* Time: 21:22
*/
use \Danzet\Libs\JwtAuth as JwtAuth;
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
$app->group('/cars', function () {
$this->get('', function (Request $request,... | true |
59edff65900224d01b0cd9ed44f2421ba3b777d2 | PHP | sillsdev/web-languageforge | /src/Api/Model/Shared/CommentModel.php | UTF-8 | 578 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Api\Model\Shared;
use Api\Model\Shared\Mapper\Id;
use Api\Model\Shared\Mapper\IdReference;
class CommentModel
{
public function __construct()
{
$this->id = new Id();
$this->dateCreated = new \DateTime();
$this->dateEdited = new \DateTime();
$this->userRef = new... | true |
ef3965e1afeb60540d2807ab6266193b5b367cb8 | PHP | achsaurav/wat2020 | /insertRecord.php | UTF-8 | 842 | 3.0625 | 3 | [] | no_license | <?php
//Make connection to database
include('connection.php');
//if(isset($_POST['submit'])){
//Gather from $_POST[]all the data submitted and store in variables
$fname = $_POST['firstName'];
$lname = $_POST['lastName'];
$email = $_POST['email'];
$pass = $_P... | true |
eaba53b051bca3af73a5891df3928171bfb6ab9e | PHP | pasinducw/scs-1203-take-home-1 | /laravel-project-for-migrations/database/migrations/2018_06_25_152011_company_sessions_view.php | UTF-8 | 1,123 | 2.53125 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CompanySessionsView extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
DB::statement("CREATE VIEW com... | true |
07ed977d8bf56ff480386b0b2077257e37d1d081 | PHP | akashpadhiyar/php-json-api | /api-add.php | UTF-8 | 988 | 2.515625 | 3 | [] | no_license | <?php
$connection = mysqli_connect("localhost", "root", "", "db_aptutorials") or die(mysqli_connect_error());
$response = array();
if (isset($_POST['st_name']) && isset($_POST['st_email']) && isset($_POST['st_mobileno'])) {
$st_name = mysqli_real_escape_string($connection,$_POST['st_name']);
$st_email = mysql... | true |
1d6bdead4c7bac7e9c46b40f39736f351eb683c5 | PHP | ronny515/Battle-cats-site | /func/function.php | UTF-8 | 14,667 | 2.921875 | 3 | [] | no_license | <?
include('./config.inc.php');
//運行時間
if( !isset($time_start) )
$time_start = microtime(true);
//echo $time_start."s start";
$daytime = date('YmdHis');//隨時間改變的數
//判斷在哪一頁
//global $file;
//$file=(basename(__FILE__,".php"));
$file=(basename($_SERVER['PHP_SELF'],".php"));
function menu_where($page) {
globa... | true |
fd84ac38e4de7552c9e76c5dceb3f1ef13cb4eec | PHP | FlyCorp/bradesco | /src/Entities/Endereco.php | UTF-8 | 2,163 | 2.671875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: railam.ribeiro
* Date: 08/08/20
* Time: 18:01
*/
namespace FlyCorp\Bradesco\Entities;
use FlyCorp\Bradesco\Traits\Arrayble;
/**
* Class Endereco
* @package FlyCorp\Bradesco\Entities
*/
class Endereco
{
use Arrayble;
/**
* @var
*/
private $cep;
/**
* @var
... | true |
12adf264e28892b976d68ef3fb68914fed2d298d | PHP | hramose/jeux | /tests/Unit/GameModelTest.php | UTF-8 | 2,460 | 2.71875 | 3 | [] | no_license | <?php
namespace Tests\Unit;
use Tests\TestCase;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
use App\Game;
class GameModelTest extends TestCase
{
protected $game;
/**
* A basic test example.
*
* @return void
*/
public function setup... | true |
25b56bacf716f3ef01a9500ed664ff2521b5f37f | PHP | sarthaksavvy/redis-visits | /src/Trending.php | UTF-8 | 1,361 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Bitfumes\Visits;
use Illuminate\Support\Facades\Redis;
class Trending
{
public $key;
public function forKey($key = null)
{
$this->key = $key;
return $this;
}
public function get()
{
return array_map('json_decode', Redis::zrevrange($this->key, 0, 4));
... | true |
4a896bf06971fe2eac2838afbbd09257fc457c8a | PHP | WillZWL/shop | /application/libraries/DtoPSR4/FestiveItemDto.php | UTF-8 | 1,652 | 2.8125 | 3 | [] | no_license | <?php
class FestiveItemDto
{
private $order;
private $prod_name;
private $quantity;
private $price;
private $website_status;
private $website_quantity;
private $sku;
private $image_file_ext;
public function setOrder($order)
{
$this->order = $order;
}
public func... | true |