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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e47f0aef8aac8bab736cae771708ee1ee791f7b2 | PHP | eduardofpu/LojaVirtualPHP | /loja/model/Clientes.class.php | UTF-8 | 19,952 | 2.890625 | 3 | [] | no_license | <?php
/**
* Description of Clientes
*
* @author Eduardo
*/
class Clientes extends Conexao {
private $cli_nome,
$cli_sobrenome,
$cli_data_nasc,
$cli_rg,
$cli_cpf,
$cli_ddd,
$cli_fone,
$cli_celular,
$cli_endereco,
... | true |
1719fd82675939ee91c039f8c67a8d8cd495b2dc | PHP | novalrialan/playlist_lagu | /app/Http/Middleware/PlaylistSongMiddleware.php | UTF-8 | 939 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use App\Exceptions\PlaylistSongNotAuthenticatedException;
use Closure;
use App\Model\User;
class PlaylistSongMiddleware
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*... | true |
6bc00c298b20a82fd9a25cdd2881ce0651618927 | PHP | vano20/udemy_oop | /static_modifier.php | UTF-8 | 276 | 2.984375 | 3 | [] | no_license | <?php
/**Class Mobil
*
*/
class Mobil {
static $wheel_count = 4;
static $door_count = 4; //static property
//methods
static function detil_mobil(){
echo Mobil::$wheel_count;
echo Mobil::$door_count;
}
}
// echo Mobil::$door_count;
Mobil::detil_mobil();
?> | true |
b53af66c1446e68ea0e85bbd983a3e3aa25e1772 | PHP | mikhail-leonov/Recipe | /src/Recipe/Interfaces/DestinationFactoryInterface.php | UTF-8 | 683 | 2.9375 | 3 | [] | no_license | <?php
/**
* Recipe - A recipe manager
*
* @author Mikhail Leonov <mikecommon@gmail.com>
* @copyright (c) Mikhail Leonov
* @link https://github.com/mikhail-leonov/recipe
* @license MIT
*/
namespace Recipe\Interfaces;
/**
* This is the "DestinationFactory interface".
*/
interface DestinationF... | true |
9a7c76e97af769c6adceb8432a4f07327adc599b | PHP | abcde090/php-task | /user_upload.php | UTF-8 | 5,603 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
// MySQL connection details
$host = "127.0.0.1";
$username = "root";
$password = "";
$dbname = "myDatabase";
$table = "users";
$conn = new mysqli($host, $username, $password);
echo "Script starting now.\n";
commandControl($host, $username, $password, $conn, $dbname, $table);
// Open a connection to mySQL serv... | true |
42e585cb5f786f904e9471b8ec28af3a5396252d | PHP | liuyu1518/Qyhrpc | /src/Qyhrpc/RPC/Plugins/Forward.php | UTF-8 | 1,295 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Qyhrpc\RPC\Plugins;
use Qyhrpc\RPC\Client;
use Qyhrpc\RPC\Core\ClientContext;
use Qyhrpc\RPC\Core\Context;
class Forward {
public $client;
public $timeout = null;
public function __construct(?array $urilist = null) {
$this->client = new Client($urilist);
}
public function ... | true |
5f996c2eefe81e15e4f5935b54b74c1d8165e2ca | PHP | Meyjan/Engi-s-Cinema | /src/php/ReviewPage.php | UTF-8 | 962 | 2.578125 | 3 | [] | no_license | <?php
require "SqlConnection.php";
require "SqlUtility.php";
// Check browser's cookie
$cookie = "-999";
if (isset($_COOKIE["login_cookie"])) {
$cookie = $_COOKIE["login_cookie"];
} else {
echo -500;
return;
}
// Check the cookie in the database
$conn = openConnection();
$sql = "SELECT id FROM user_tabl... | true |
1a47eb5bddabfca3804b2f00ec31ee5e9d6bd408 | PHP | enumag/phpstan-oneline | /src/OneLineErrorFormatter.php | UTF-8 | 1,320 | 2.625 | 3 | [] | no_license | <?php declare(strict_types = 1);
namespace Grifart\PhpstanOneLine;
use PHPStan\Command\AnalysisResult;
use PHPStan\Command\ErrorFormatter\ErrorFormatter;
use PHPStan\File\RelativePathHelper;
use Symfony\Component\Console\Style\OutputStyle;
class OneLineErrorFormatter implements ErrorFormatter
{
/** @var RelativePat... | true |
4f788121a6147e3270fa70f3f7cec21664fb55c5 | PHP | bcGiR/roommates | /create-exec.php | UTF-8 | 1,079 | 2.671875 | 3 | [] | no_license | <?php
require('dbadapter.php');
require('validate.php');
if (isset($_POST['house_name'])) {
$error = validateCreateHouse();
if (!$error) { // validation successful
$house_name = $_POST['house_name'];
$rent = $_POST['rent'];
$house_password = password_hash($_POST['house_password'], PASS... | true |
30082177d2dcf21cc2994b1fe1cfc3a67533cf23 | PHP | udistrital/migracion | /academicopro/bloque/admin_biblioteca/funcion.class.php | UTF-8 | 2,673 | 2.609375 | 3 | [] | no_license | <?php
/**
* Funcion adminConsultarInscripcionGrupoCoordinador
*
* Esta clase se encarga de crear la logica y mostrar la interfaz de usuario
*
* @package nombrePaquete
* @subpackage nombreSubpaquete
* @author Luis Fernando Torres
* @version 0.0.0.1
* Fecha: 23/06/2011
*/
/**
* Verifica si la vari... | true |
10a4d6f214a777e78e37c20087ceec9c64629cb7 | PHP | shima-rahman/lina | /php/day9/convert_asccii.php | UTF-8 | 187 | 3.078125 | 3 | [] | no_license | <html>
<?php
$string= "fahmida";
$length=strlen($string);
for($i=0;$i<$length;$i++)
{
$message=ord($string{$i})-ord($string)+ord("FAHMIDA");
echo chr($message);
}
?>
| true |
7b92f22071ca235cf85ebe189334a8f9531d17f5 | PHP | tonycool7/working_experience | /listen_to_log.php | UTF-8 | 892 | 2.609375 | 3 | [] | no_license | <?php
//function follow($file)
//{
// $size = 0;
// while (true) {
// clearstatcache();
// $currentSize = filesize($file);
// if ($size == $currentSize) {
// usleep(100);
// continue;
// }
// $fh = fopen($file, "r");
// fseek($fh, $size);
//
// ... | true |
de79c18e74dcd36809ed74400042137aa75fc770 | PHP | tanxu1993/smart_vote | /table/table_smart_token.php | UTF-8 | 997 | 2.53125 | 3 | [] | no_license | <?php
/**
* [smart_token] 2015
* table_smart_token.php
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
class table_smart_token extends discuz_table {
public function __construct() {
$this->_table = 'smart_token';
$this->_pk = 'id';
parent::__construct();
}
publ... | true |
5bb086d6b6acc0bb2514c8b6538be3a1580a8edb | PHP | camilledejoye/ddd | /src/Identity/Exception/InvalidUuidStringException.php | UTF-8 | 522 | 2.96875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace ddd\Identity\Exception;
/**
* Thrown when trying to use a string as an UUID when it is not.
*
* @see \DomainException
* @final
*/
final class InvalidUuidStringException extends \DomainException
{
/**
* {@inheritdoc}
*
* @param string $invalidUuidString... | true |
3df3a3e1bb60434acdd4401aa92e28ab90aaabf3 | PHP | brm-viracachac/brm-estelar-bmw-arpc | /publication/class/ciudades.php | UTF-8 | 850 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
class Ciudades
{
function getCiudadDepartamento($depto){
$CiudadVerDBO = DB_DataObject::Factory('Ciudad');
$CiudadVerDBO->whereAdd("idDepto = '$depto'");
//$CiudadVerDBO->get('2');
$Ciudades = array();
$contador = 0;
$CiudadVerDBO->find();
while($CiudadVerDBO->fetch()){
$Ciudades[$contad... | true |
a5ce37ed7367a941d03d5304f7019183019f70e6 | PHP | piotrpasich/linkbot | /symfony/src/AppBundle/Entity/Link.php | UTF-8 | 4,507 | 2.890625 | 3 | [
"0BSD",
"BSD-3-Clause"
] | permissive | <?php
namespace AppBundle\Entity;
use XTeam\HighFiveSlackBundle\Entity\Channel;
use XTeam\HighFiveSlackBundle\Entity\User;
/**
* Link
*/
class Link
{
/**
* @var int
*/
private $id;
/**
* @var \stdClass
*/
private $user;
/**
* @var string
*/
private $message;
... | true |
542df97ae17081fe8544abbe9db1f202c27022c3 | PHP | exgull/wezomapp | /lib/ParentObject.php | UTF-8 | 3,132 | 2.921875 | 3 | [] | no_license | <?php
require_once 'DataBase.php';
/**
* Created by PhpStorm.
* User: gull
* Date: 07.10.16
* Time: 20:34
*/
class ParentObject
{
public function save($array = []) {
return isset($this->id) ? $this->update($array) : $this->create();
}
protected function create() {
$sql = "INSERT INTO... | true |
b0db57e2d194bc83cee36fc976e13d8448b73dfb | PHP | EmericLevasseur/methode-agile | /login.php | UTF-8 | 1,455 | 2.859375 | 3 | [] | no_license | <?php
session_start();
include("conf/db.php"); ?>
<form method="post" action="log_in.php">
<label for="log-in-email">Email</label>
<input type="email" name="email" id="log-in-email" placeholder="Votre e-mail">
<label for="log-in-password">Mot de passe</label>
<input type="password" name="password" id="log-in-pass... | true |
23a4e9a897b6936142cec4d9d969e6a4f1efe537 | PHP | honeybee/honeybee-agavi-cmf-vendor | /app/lib/Ui/Navigation/NavigationItem.php | UTF-8 | 414 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Honeygavi\Ui\Navigation;
use Honeygavi\Ui\Activity\ActivityInterface;
use Trellis\Common\BaseObject;
class NavigationItem extends BaseObject implements NavigationItemInterface
{
protected $activity;
public function __construct(ActivityInterface $activity)
{
$this->activity = $act... | true |
c93c20bb690f04e452a50f97dc99f706445170a8 | PHP | rubydiao/php | /lecture/14for.php | UTF-8 | 103 | 2.890625 | 3 | [] | no_license | <?php //http://localhost/php/14for.php
for ($i=1; $i<=10; $i++){
echo $i;
echo "<br>";
}
?> | true |
c824488772392916daaf9509b0276023f4491d56 | PHP | atorpos/model-server | /include/LT/Runtime.php | UTF-8 | 1,936 | 2.9375 | 3 | [] | no_license | <?php
namespace LT;
/**
* @property string $scriptDirectory
*/
class Runtime implements \ArrayAccess {
protected $_vars = array();
/**
*
* @staticvar \LT\Runtime $o
* @return \static
*/
public static function current() {
static $o = NULL;
if (is_null($o)) {
... | true |
63e509ef769fb602b0436b776e493d69f8e04831 | PHP | danielzielka/cli-rss-to-csv | /tests/CSVCommandTest.php | UTF-8 | 968 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace DanielZielkaRekrutacjaHRtec\tests\CSVCommandTest;
use PHPUnit\Framework\TestCase;
use DanielZielkaRekrutacjaHRtec\commands\CSVCommand;
use DanielZielkaRekrutacjaHRtec\services\FeedResolver;
use DanielZielkaRekrutacjaHRtec\services\CSVCreator;
use Symfony\Component\Console\Outpu... | true |
c1996547378a2be8a7a91a924a427ac69df0ec20 | PHP | minhnguyen-balance/oro_platform | /vendor/oro/platform/src/Oro/Bundle/BatchBundle/Step/StepInterface.php | UTF-8 | 1,405 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Oro\Bundle\BatchBundle\Step;
use Oro\Bundle\BatchBundle\Entity\StepExecution;
/**
* Batch domain interface representing the configuration of a step. As with the
* Job, a Step is meant to explicitly represent the configuration of a step by
* a developer, but also the ability to execute the step.
*... | true |
b63ebb02977a1fe6da6a687e06b24d0bf37a3fba | PHP | VadyaOleniuk/example | /src/Clear/SecurityBundle/Security/Securable.php | UTF-8 | 768 | 2.578125 | 3 | [] | no_license | <?php
namespace Clear\SecurityBundle\Security;
use Doctrine\ORM\EntityManager;
class Securable
{
protected $manager;
public function __construct(EntityManager $manager)
{
$this->manager = $manager;
}
public function hasAccess($actionId, $roles)
{
if (is_string($roles)) {
... | true |
8905bcf5cdd88560cf42d77fdb90fee91579786a | PHP | MadMikeyB/Meetings | /app/NextStep.php | UTF-8 | 1,631 | 2.609375 | 3 | [] | no_license | <?php
namespace App;
;
class NextStep extends UuidModel
{
protected $fillable = [
'user_id',
'meeting_id',
'description',
'completed_by_date',
];
protected $casts = [
'completed_by_date' => 'datetime',
];
public function meeting() {
return $this->belongsTo(Meeting::class);
}
p... | true |
53c44c89c01b61c86453685769da4b5433689154 | PHP | jkiss/Chuanbang | /protected/components/utils/DbUtils.php | UTF-8 | 451 | 2.78125 | 3 | [] | no_license | <?php
class DbUtils {
public static function execute($sql, $params=array()) {
return Yii::app()->db->createCommand($sql)->execute($params);
}
public static function query($sql, $params=array()) {
$result = array();
$dataReader = Yii::app()->db->createCommand($sql)->query($params);
... | true |
54860f3941a49924348cf365da596d3674c2907e | PHP | gfortino/iwp-w2018 | /Projects/Team1/online_shopping/online_shopping/application/models/functions.php | UTF-8 | 1,864 | 2.78125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
function add($a,$b){
$c=$a+$b;
return $c;
}
/**
*
* 获取图片名称列表
*
* @param str $dir 图片路径
* @return array $photo 图片名称列表
*/
function get_photo_list($dir)
{
if (file_exists($dir)) {
//获取某目录下所有文件、目录名(不包括子目录下文件、目录名)
$handl... | true |
d78a440ac48f1e3878ae04a71db6bd8dbb858547 | PHP | jbaldwin/project_euler | /p049/p49.php | UTF-8 | 1,523 | 3.671875 | 4 | [
"MIT"
] | permissive | <?php
/**
Prime permutations
The arithemetic sequence, 1487, 4817, 8147, in which each of the terms increases by 3330, is unusual in
two ways: (i) each of the three terms are prime, and, (ii) each of the 4-digit numbers are permutations
of one another.
There are no arithemtic sequences made up of 1-, 2-, or 3-digit ... | true |
5d5019e00eea43ca5d9f933b53de2e5471a0bc4e | PHP | neokimu/phprecipe | /02/function.php | UTF-8 | 786 | 4.03125 | 4 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>関数を定義したい</title>
</head>
<body>
<?php
// ユーザー定義関数
function check($subject, $point) {
echo $subject . 'の結果';
if ($point > 75) {
echo '合格です';
} else {
... | true |
fb6b5a78fa463449538c6b4431c913c440d03924 | PHP | ghostegend/practicaProyect | /Shipper.php | UTF-8 | 3,121 | 2.984375 | 3 | [] | no_license | <?php
class Shipper {
private $ID;
private $ShipperID;
private $CompanyName;
private $Phone;
public function __construct() {
$this->ID=0;
$this->CompanyName="";
$this->Phone="";
}
public function getID() {
return $this->ID;
}
public function setID($p... | true |
80860202021210a97692947d39fb1dc2479d66aa | PHP | drublic/TYPO3.extensionmanager | /Classes/Domain/Model/Mirrors.php | UTF-8 | 3,313 | 2.765625 | 3 | [] | no_license | <?php
namespace TYPO3\CMS\Extensionmanager\Domain\Model;
/***************************************************************
* Copyright notice
*
* (c) 2010 Marcus Krause <marcus#exp2010@t3sec.info>
* Steffen Kamper <info@sk-typo3.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The... | true |
484c811e675f0bface20d8c16b1ff458bc7a8ae9 | PHP | bariton3/php-pivotal-tracker-api | /lib/PivotalTracker/Api/Label.php | UTF-8 | 3,022 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace PivotalTracker\Api;
use PivotalTracker\Exception\MissingArgumentException;
/**
* Listing, editing and delete your project's labels.
*
* @link https://www.pivotaltracker.com/help/api/rest/v5#Labels
*
*/
class Label extends AbstractApi
{
/**
* List of the project's labels.
*
*... | true |
1b6250f1230372f13cfe9cd69458a9895ba46599 | PHP | Enrise/Glitch_Lib | /lib/Glitch/Image/Adapter/Gd/Action/DrawEllipse.php | UTF-8 | 2,019 | 2.75 | 3 | [] | no_license | <?php
// require_once 'Zend/Image/Color.php';
// require_once 'Zend/Image/Adapter/Gd/Action/ActionAbstract.php';
class Glitch_Image_Adapter_Gd_Action_DrawEllipse
extends Glitch_Image_Adapter_Gd_Action_ActionAbstract
{
/**
* Draws an ellipse on the handle
*
* @param GD-object $handle The handle ... | true |
de48fc3c3fd9c3d2f63f0a9632946cffe02dc1f1 | PHP | Arendach/shar | /app/Http/Middleware/AuthCheck.php | UTF-8 | 1,791 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\DB;
class AuthCheck
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
... | true |
6560430856c3ae1fb79216b54146e083845c5472 | PHP | snickers54/dblink | /library/dblink_objects/user.php | UTF-8 | 3,007 | 2.734375 | 3 | [] | no_license | <?php
class user
{
private $class = array();
private $extensions = array();
private $planet;
private $alliance;
private $json;
public static $var_json = array("config", "attack", "achievements", "spy", "mission", "planetes_images", 'stats');
private $structure = array('user_id', 'login', 'password',
... | true |
bbac5d2e65944aebffbd6424d2bda11e770bb678 | PHP | JCdotpe/cenpesco | /capacitacion/editar_notas.php | ISO-8859-1 | 9,443 | 2.5625 | 3 | [] | no_license | <?php include ("seguridad.php");
ini_set('max_execution_time', 300);
if($_SESSION["tipo"]==1)
{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text... | true |
41089f0bea89d19109a0dda8a8f51efa1ec9b09f | PHP | cgerling/anitop | /server/src/entity/Anime.php | UTF-8 | 493 | 3 | 3 | [] | no_license | <?php
namespace anitop\entity;
class Anime extends Entity {
public $name;
public $description;
public $studio;
public $publisher;
public $image;
public function __construct(string $name = '', string $description = '', string $studio = '', string $publisher = '', string $image = '') {
$... | true |
6c7341394bc2962e48ded9bbb1526b9ad40f32ae | PHP | Ndu-Systems/mr-concrete-api | /models/Address.php | UTF-8 | 3,403 | 2.953125 | 3 | [] | no_license | <?php
class Address
{
//DB Stuff
private $conn;
public function __construct($db)
{
$this->conn = $db;
}
public function getAddressByOtherId($OtherId)
{
$query = "SELECT * FROM address WHERE OtherId =?";
$stmt = $this->conn->prepare($query);
$stmt->execut... | true |
7b479293ac90cbc355b011de983f0cbc86805116 | PHP | inhere/php-console | /src/IO/Output/StreamOutput.php | UTF-8 | 2,291 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
/**
* The file is part of inhere/console
*
* @author https://github.com/inhere
* @homepage https://github.com/inhere/php-console
* @license https://github.com/inhere/php-console/blob/master/LICENSE
*/
namespace Inhere\Console\IO\Output;
use Inhere\Console\Concern\AbstractOutput... | true |
3e6a05665f11d8f95da642987d3c71f1f9a1ca35 | PHP | juanvilu/siteGESBlue | /newsletter/num008/variables/index.php | UTF-8 | 10,318 | 2.546875 | 3 | [] | no_license | <head>
<title>Uso de variables en el reporteador</title>
<link href="news_general.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="texto">
<h3>Uso de variables en el editor de formatos.</h3>
<p align="right" class="autor"><em>Autor: Roberto Antonio Romero Nájera</em></p>
... | true |
3e213e16a2c88499e4c353f6ab55d9a0f5ce1605 | PHP | dwiaji22/tugas-pemweb | /Pemweb Tugas 6/baca.php | UTF-8 | 640 | 3.03125 | 3 | [] | no_license | <?php
$file = "data.txt";
$data = file_get_contents($file);
$baris = explode("[R]", $data);
echo "<table border=1>";
echo "<tr>";
echo " <td>Nama</td><td>Email</td>";
echo " <td>Phone</td><td>Umur</td><td>Action</td>";
echo "</tr>";
for($i =0; $i<count($baris)-1; $i++) {
$col = explode("|F|", $baris[$i]);
ec... | true |
927ac8ba2eb007304198c62133ac8bf31bb76134 | PHP | astapov-m/laravel-package-wb | /src/Library/Incomes/IncomeRepository.php | UTF-8 | 1,047 | 2.640625 | 3 | [] | no_license | <?php
namespace Astapovm\Wb\Library\Incomes;
use Astapovm\Wb\Library\Interfaces\RepositoryInterface;
use Astapovm\Wb\Library\Traits\RepositoryTrait;
use App\Models\Fbo\WbIncome;
class IncomeRepository implements RepositoryInterface
{
use RepositoryTrait;
private static function checkingAvailability($incomeI... | true |
9942b985f67a57676e906bc876df9b841f8ce894 | PHP | Amoldreamer/mars | /app/Models/WorkshopBalance.php | UTF-8 | 2,021 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use App\Models\Semester;
use App\Models\Workshop;
class WorkshopBalance extends Model
{
public $timestamps = false;
protected $fillable = [
'semester_id',
'workshop_id',
'allocated_... | true |
b97a119de132196881501afc126c94310bf9e83e | PHP | VANSEBROUCK/Arbre_Raphael_VANSEBROUCK | /src/vendor/symfony/src/Symfony/Bundle/DoctrineMongoDBBundle/Validator/Constraints/DoctrineMongoDBUniqueValidator.php | UTF-8 | 4,356 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Bundle\DoctrineMongoDBBundle\Validator\Constra... | true |
ea7d899832cf50eaca9884d984d783df129ede98 | PHP | wikipalco/yetishare | /plugins/wikipal/pluginWikipal.class.php | UTF-8 | 2,345 | 2.65625 | 3 | [] | no_license | <?php
class pluginWikipal extends Plugin
{
public $config = null;
public function __construct()
{
// get the plugin config
include(DOC_ROOT.'/plugins/wikipal/_plugin_config.inc.php');
// load config into the object
$this->config = $pluginConfig;
}
public function... | true |
29b6f30efd4f838bb660bd05c2328abecf297e94 | PHP | avallete/PHPool | /d06/ex01/Vertex.class.php | UTF-8 | 1,889 | 3.390625 | 3 | [] | no_license | <?php
require_once('Color.class.php');
Class Vertex
{
static $verbose = FALSE;
private $_x = 0.0;
private $_y = 0.0;
private $_z = 0.0;
private $_w = 1.0;
private $_color = NULL;
function __get($var){
print "You can't get ".$var.", sorry :'(.\n";
}
function __set($value, $var){
print "We ca... | true |
474fa617a0e2303947d2c4de719899ea80e5627b | PHP | avisota/contao-subscription-recipient | /src/Controller/ButtonController.php | UTF-8 | 2,923 | 2.640625 | 3 | [] | no_license | <?php
/**
* Avisota newsletter and mailing system
* Copyright © 2016 Sven Baumann
*
* PHP version 5
*
* @copyright way.vision 2016
* @author Sven Baumann <baumann.sv@gmail.com>
* @package avisota/contao-subscription-recipient
* @license LGPL-3.0+
* @filesource
*/
namespace Avisota\Contao\Subscri... | true |
53e21df58c4eb4731dafa4559c48b43c4195435b | PHP | DaniloAlmeidaSantos/WinnChay-1 | /includes/Historic.php | UTF-8 | 1,731 | 2.875 | 3 | [] | no_license | <?php
class Historic
{
public function __construct()
{
require_once 'config/DbConnect.php';
// Chamando o método connect da classe Database e inicializando um link de conexão
$this->conn = connect();
}
public function viewHistory(){
$stmt = $this->conn->prepare('SELECT * FROM HI... | true |
3247affb35edd8d83175c2c4866e66f1a59c55b1 | PHP | antwebstudio/yii2-core | /tests/unit/validators/SerializableDataValidatorCest.php | UTF-8 | 3,223 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use ant\validators\SerializableDataValidator;
class SerializableDataValidatorCest
{
public function _before(UnitTester $I)
{
}
public function _after(UnitTester $I)
{
}
// tests
public function testValidateAttributeWhenHasError(UnitTester $I)
{
$model = new Serializa... | true |
9b380ccdff5bb706abc099282f9dfa421a7b5ac4 | PHP | antarus/mystra-pve | /module/Backend/src/Backend/Controller/EvenementsPersonnageController.php | UTF-8 | 6,222 | 2.625 | 3 | [] | no_license | <?php
namespace Backend\Controller;
use Zend\View\Model\ViewModel;
/**
* Controller pour la vue.
*
* @author Antarus
* @project Raid-TracKer
*/
class EvenementsPersonnageController extends \Zend\Mvc\Controller\AbstractActionController
{
public $_servTranslator = null;
public $_table = null;
/**
... | true |
79c6a5bb2a28f53432f7607ec92348c84b442533 | PHP | Jalle19/vagrant-registry-generator | /src/Registry/Manifest/Version.php | UTF-8 | 814 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Jalle19\VagrantRegistryGenerator\Registry\Manifest;
/**
* Class Version
* @package Jalle19\VagrantRegistryGenerator\Registry\Manifest
*/
class Version
{
/**
* @var string
*/
private $version;
/**
* @var Provider[]
*/
private $providers;
/**
* Version... | true |
d2f860343c062ede6c5b551f434b5506334c7b9c | PHP | arasmussen/WebHost | /root/index.php | UTF-8 | 1,020 | 2.734375 | 3 | [] | no_license | <?php
$root = realpath($_SERVER['DOCUMENT_ROOT']);
require_once("$root/../lib/template/PublicPage.php");
class Homepage extends PublicPage {
public function getPageContent() {
return
'<div id="register">' .
'<form method="post" action="javascript:void(0)">' .
'<div id="registerUsername">'... | true |
f169de0532c7963218d2ddf69b75f42a9f259e9e | PHP | raphaborralho/learningvector | /blocks/lvs/biblioteca/view/.svn/text-base/AdapterView.php.svn-base | UTF-8 | 788 | 2.65625 | 3 | [] | no_license | <?php
namespace uab\ifce\lvs\view;
/**
* Adapter para exibição das páginas geradas pelos LVs em qualquer AVA
*
* @category LVs
* @package uab\ifce\lvs\view
* @author Ricky Persivo (rickypaz@gmail.com)
* @version 1.0
*/
interface AdapterView {
/**
* Adiciona um arquivo css
*
* @param string $arqui... | true |
5cf43d59b104c81b73d240fd2e4b4de54c8f9bfc | PHP | avengers5531/db_powon | /src/Dao/RelationshipDAO.php | UTF-8 | 1,859 | 2.953125 | 3 | [] | no_license | <?php
namespace Powon\Dao;
use Powon\Entity\FriendRequest;
use Powon\Entity\Member;
interface RelationshipDAO{
/**
* @param member_from Member: the requesting member
* @param member_to Member: the requested member
* @param rel_type string (single character): the relationship type ('F', 'I', 'E', 'C')... | true |
fe965c6d84a70d8eb7bb5ae757eafd662277c43c | PHP | johncorrelli/planning-center-spotify | /app/Models/Spotify/SpotifyAuthorizationApi.php | UTF-8 | 689 | 2.828125 | 3 | [] | no_license | <?php
namespace App\Models\Spotify;
use App\Models\Api;
class SpotifyAuthorizationApi extends Api
{
/**
* @param string $clientId your spotify app's client id
* @param string $clientSecret your spotify app's client secret
* @param ...$attrs
*/
public function __construct(string $clientId,... | true |
8016582cb339c5738135b18fc79073cbc9f38ba0 | PHP | lijianzwm/Mantra | /Application/Common/Service/MysqlService.class.php | UTF-8 | 11,579 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: lijian
* Date: 2016/4/17
* Time: 11:42
*/
namespace Common\Service;
class MysqlService{
/**
* 获取当日排行榜,如果没有,返回array(0) {}
* @return mixed
*/
public static function getMysqlTodayRanklist(){
$todayDate = DateService::getStrDate();
ret... | true |
db1ee42b7cbf0a52d10ea03d20bff0635aa1cd51 | PHP | Falldanger/NetPeak | /rules/BlackListSymbolsInterface.php | UTF-8 | 188 | 2.625 | 3 | [] | no_license | <?php
namespace rules;
interface BlackListSymbolsInterface
{
const BLACK_LIST = ['<', '</', '>', '=', '+', '[', ']', '{', '}', '^', '%', '$', '#', '^', '*', '(', ')', '\'', "\""];
}
| true |
b539441d83dccc17a9f48631179355888b742d41 | PHP | fayzo/commerce | /RealEstate-master/php/test/login.php | UTF-8 | 1,098 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
$username = $_POST['username'];
$password = $_POST['password'];
if ($username == "" || $password == ""){
if ($username == "" && $password != ""){
echo "Escriba el nombre de usuario.";
} else if ($username != "" && $password == "") {
echo "Escriba la contraseña.";
} else {
echo "Escriba sus cred... | true |
3ad98da96a80401f94955b297ff697d98516119d | PHP | jasny/Q | /tests/DB/MySQL/SQLSplitterTest.php | UTF-8 | 78,742 | 2.734375 | 3 | [] | no_license | <?php
use Q\DB, Q\DB_SQLStatement, Q\DB_MySQL_SQLSplitter;
set_include_path('../library' . PATH_SEPARATOR . get_include_path());
require_once 'PHPUnit/Framework/TestCase.php';
require_once 'Q/DB/MySQL/SQLSplitter.php';
require_once 'Q/DB/SQLStatement.php';
/**
* Test for DB_MySQL_SQLSplitter and modifing DB_SQLStat... | true |
b8a882eeb1bae4c9b66df7f8eb079d80b9c66b21 | PHP | mayankpatel1004/docker-with-php-mysql-phpmyadmin | /web/public/theme/default/underconstruction.php | UTF-8 | 2,149 | 2.53125 | 3 | [] | no_license | <?php
if(isset($_REQUEST['uc']) && $_REQUEST['uc'] == "No") {
$sql = "UPDATE `site_config` SET `config_value` = 'No' WHERE `site_config`.`config_name` = 'SITE_CONSTRUCTION'";
$stmt = $conn->prepare($sql);
$stmt->execute();
setConfigdata();
}
function setConfigdata() {
global $back_session_nam... | true |
7b66c0c5773ce2cff6dc791f89402073a11020e1 | PHP | dtbinh/CS331-SortPractice | /SortCount.php | UTF-8 | 1,082 | 3 | 3 | [] | no_license | <?php
require_once "InsertSort.php";
require_once "MergeSort.php";
require_once "QuickSort.php";
enableKeyCount(true);
// insert | merge | quick1 | quick2 | quick3
if (count($argv) < 3) die("php SortCount.php <mode> <case file>\n");
$mode = $argv[1];
$fname = $argv[2];
$list = explode(",", file_get_contents($fname));... | true |
993776d876197237d43825bf49d438f7544be7b2 | PHP | dansc11/php-checkout-test | /app/Terminal.php | UTF-8 | 1,741 | 3.53125 | 4 | [] | no_license | <?php
namespace App;
class Terminal
{
/**
* @var array
*/
private $basket = [];
/**
* @var ProductPriceCalculator
*/
private $product_price_calculator;
/**
* Terminal constructor.
*/
public function __construct()
{
$this->product... | true |
b9ba42959d13700cd5a3f716f2960250d76a697f | PHP | qiu-jin/phpegg | /framework/driver/cache/Apcu.php | UTF-8 | 1,344 | 2.84375 | 3 | [] | no_license | <?php
namespace framework\driver\cache;
/*
* http://php.net/apcu
*/
class Apcu extends Cache
{
// 字段前缀
protected $prefix;
/*
* 构造函数
*/
public function __construct($config)
{
parent::__construct($config);
$this->prefix = $config['prefix'];
}
/... | true |
70c228b37755b255083a73b18e4eb960a0266f55 | PHP | Malamego/LMS_Encryption | /app/Http/Controllers/ClassesController.php | UTF-8 | 3,609 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests\ClassesRequest;
use App\DataTables\ClassesDataTable;
use App\Models\ClassModel;
class ClassesController extends Controller
{
private $viewPath = 'backend.classes';
/**
* Display a listing of the resource.
*
... | true |
ee88b31afd38b19d504954085e6204affe827069 | PHP | souleymane91/gestionLoyer.com | /src/SMB/LoyerBundle/Controller/PavionController.php | UTF-8 | 7,293 | 2.515625 | 3 | [] | no_license | <?php
//src\SMB\LoyerBundle\Controller\PavionController.php
namespace SMB\LoyerBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Doctrine\Common\Collections\ArrayCollection;
u... | true |
171e05d358d91dfbb8c0e55a11641f809fada64b | PHP | lymslive/expcode | /php/popen.php | UTF-8 | 103 | 2.578125 | 3 | [] | no_license | <?php
$file = popen("/bin/ls", 'r');
while (!feof($file))
{
echo fgets($file);
}
pclose($file);
?>
| true |
257b5637e19ff7c3eeaecea9aae7f4e7fc2f9f67 | PHP | Vlad5421/task_manger_mini | /Models/Model.php | UTF-8 | 628 | 2.796875 | 3 | [] | no_license | <?php
class Model {
protected $pdo;
public function __construct(){
$dsn = 'mysql:dbname=task_bee;host=127.0.0.1;charset=UTF8';
$user = 'pma';
$password = 'pmaPassword';
$opt = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FE... | true |
b1da6f3cbb8ae4886b617bdb38707402050d743e | PHP | jorgitodf/pizzaria | /app/Models/Uf.php | UTF-8 | 1,907 | 2.75 | 3 | [] | no_license | <?php
namespace App\Models;
use Core\BaseModel;
use PDO;
use PDOException;
class Uf extends BaseModel
{
protected $table = "tb_uf";
private $sigla_uf;
private $idUf;
private $uf = array();
/**
* Uf constructor.
* @param $sigla_uf
*/
public function __constru... | true |
97704946ac0bbbe328994b8dc875171a11ca9d97 | PHP | diego-ninja/blackmine | /src/Model/Project/File.php | UTF-8 | 1,186 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Blackmine\Model\Project;
use Blackmine\Model\FetchableInterface;
use Blackmine\Model\Identity;
use Blackmine\Model\User\User;
use Carbon\CarbonImmutable;
/**
* @method setFilename(string $filename): void
* @method setToken(string $token): void
* @method setVersion(Version... | true |
1e34f20dac5d49120a52cb72519360702f63d0db | PHP | Sanchita-12345/APIATO_NEW_PROJECT | /app/Containers/AppSection/Bloguser/Tasks/DeleteBloguserTask.php | UTF-8 | 674 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Containers\AppSection\Bloguser\Tasks;
use App\Containers\AppSection\Bloguser\Data\Repositories\BloguserRepository;
use App\Ship\Exceptions\DeleteResourceFailedException;
use App\Ship\Parents\Tasks\Task;
use Exception;
class DeleteBloguserTask extends Task
{
protected BloguserRepository $repos... | true |
d12a4c9d4316fd678b9176e68e9741e263eca56d | PHP | benetta-cheng/ibm2104-assignment | /staff/schedule_search-copilot.php | UTF-8 | 2,776 | 2.5625 | 3 | [] | no_license | <?php require('validateLogin.php'); ?>
<html>
<head>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" />
<?php require('../head.php');
require('navbar.php'); ?>
<title>Flight Team | Search Co-Pilot</title>
</head>
<body>
<div class="containe... | true |
98eef066c97f6a6834675a30af71e2645e5d8770 | PHP | jiangbajin/insurance | /src/common/InvalidInstanceException.php | UTF-8 | 537 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: 江艺勤
* Date: 2020/10/27
* Time: 14:10
*/
namespace cncn\insurance\common;
class InvalidInstanceException extends \Exception
{
/**
* @var array
*/
public $raw = [];
/**
* InvalidResponseException constructor.
* @param string $message
* @... | true |
a5ee26f2cb14c3a6af98c0bfea23e16ead0df1f0 | PHP | decanus/jukebox | /web/Framework/src/Backends/SQL/PostgreDatabaseBackend.php | UTF-8 | 1,800 | 2.84375 | 3 | [] | no_license | <?php
namespace Jukebox\Framework\Backends
{
class PostgreDatabaseBackend
{
/**
* @var \PDO
*/
private $PDO;
public function __construct(PDO $PDO)
{
$this->PDO = $PDO;
}
public function fetchAll(string $sql, array $parameters = [])... | true |
2d4ae9909834001eeeabf76a4edc23c79b1d0e8a | PHP | JonasDoebertin/php-geofox-gti-client | /src/Response/ListStations.php | UTF-8 | 1,731 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace JdPowered\Geofox\Response;
use JdPowered\Geofox\Data;
use JdPowered\Geofox\Objects\StationListEntry;
class ListStations extends Base
{
/**
* @var string
*/
protected $dataReleaseId;
/**
* @var \JdPowered\Geofox\Objects\StationListEntry[]
*/
protected $stations;
... | true |
779ab6f6931a9739c237dc97805f3da9dc355eeb | PHP | lxdnz254/BIT695_TM4 | /www/includes/helpers.inc.php | UTF-8 | 2,135 | 3.078125 | 3 | [] | no_license | <?php
/* ensure text doesnot get code injection */
function html($text)
{
return htmlspecialchars($text, ENT_QUOTES, 'UTF-8');
}
/* Output html to text */
function htmlout($text)
{
echo html($text);
}
/* Convert from markdown to html */
function markdown2html($text)
{
$text = html($text);
// Convert plain-text... | true |
6e595f80108a1997abc844084effa3b29baf37e3 | PHP | pepesho/apahotel | /blog/app/Http/Controllers/MemberController.php | UTF-8 | 4,237 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Member;
use App\Ledger;
use Illuminate\Http\Request;
class MemberController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
$query = M... | true |
46b8c6656065838d6b2df25a6e9f8e81c96cd801 | PHP | wangwen1220/isweek.cn | /Application/Home/Controller/AllCategorysController.class.php | UTF-8 | 1,272 | 2.515625 | 3 | [] | no_license | <?php
namespace Home\Controller;
use Think\Controller;
// + ---------- ----------
// | 这是所有分类控制器
// | @author tan<admin@163.com>
// + ---------- ----------
class AllCategorysController extends CommonController {
public function __construct() {
parent::__construct ();
$this->assign ( "css_style", "cat... | true |
8e2c74776ab4609c0e6d5baf5e4cc5dc2bb16978 | PHP | jnsjrvs/phpprms | /php-file-01.php | UTF-8 | 138 | 3.015625 | 3 | [] | no_license | <?php
$m = [1, 4, 7, 11, 23, 55];
$s = implode(',', $m);
$f = fopen('php-file-01.txt', 'w');
fwrite($f, $s);
fclose($f);
echo 'ok';
| true |
42868e9556f1d001c21d03e0dcf46d5515768c52 | PHP | reneroboter/gli | /src/App.php | UTF-8 | 1,359 | 2.703125 | 3 | [] | no_license | <?php
namespace reneroboter\gli;
use League\CLImate\CLImate;
use ReflectionException;
use reneroboter\gli\Command\CommandInterface;
use reneroboter\gli\Service\HttpService;
class App
{
/**
* @var CLImate $climate
*/
private $climate;
/**
* @var array
*/
private $config;
publi... | true |
60b5308845d1b28c3040a44e4e41d6904aa77427 | PHP | hmazter/advent-of-code-solutions | /2017/day8/test.php | UTF-8 | 2,693 | 3.09375 | 3 | [] | no_license | <?php
declare(strict_types=1);
require_once './functions.php';
class Day8Test extends \PHPUnit\Framework\TestCase
{
/**
* @test
*/
public function parseInstruction()
{
$result = parseInstruction('b inc 5 if a > 1');
self::assertEquals('b', $result['register']);
self::as... | true |
7df0f915d7602b061fcfc6719308489074b88bde | PHP | msoderblom/ME-CMS | /admin/processing_post.php | UTF-8 | 803 | 2.5625 | 3 | [] | no_license | <?php
$success = true;
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$title = htmlspecialchars($_POST['title']);
$body = $_POST['body'];
$body = '<p>' . preg_replace('#(<br\s*?/?>\s*?){2,}#', '</p>' . "\n" . '<p>', nl2br($body)) . '</p>';
$body = htmlspecialchars($body);
if (isset($_POST['embedded_iframe']) ... | true |
22186caf324369b8f266636b7bc0df19253451a8 | PHP | m4di/founders-network-website | /router.php | UTF-8 | 614 | 3.21875 | 3 | [] | no_license | <?php
class Router {
function __construct($routes) {
/**
* Get the requested uri and search for it against the $routes array,
* displaying the corresponding file if possible
*
* @param array $routes
*/
$uri = isset($_GET['uri']) ? '/' . trim($_GET['uri'], '/') : '/';
foreach ($routes a... | true |
e1caa776a45b9ab90059427a78497212ec706000 | PHP | LuisCabrero/blog-symfony | /src/BlogBundle/Controller/EntryController.php | UTF-8 | 2,034 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace BlogBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;
// Modelos
use BlogBundle\Entity\Entry;
// Formulario
use BlogBundle\Form\EntryType;
class EntryController extends Co... | true |
bf28c59b74aad34a242ef7d13c1f20c913c57870 | PHP | marcoscodnet/matriculados | /classes/com/cpiq/action/cdtregistrations/AddRegistroChequearAction.Class.php | UTF-8 | 1,145 | 2.65625 | 3 | [] | no_license | <?php
/**
* Se chequea si un matriculado está cargado
*
* @author Marcos
* @since 28-10-2013
*
*/
class AddRegistroChequearAction extends CdtAction{
/**
* (non-PHPdoc)
* @see CdtAction::execute();
*/
public function execute(){
$result = "";
try{
$documento = CdtUtils::getParam("docum... | true |
f5874a950781480f239623b0b7a57349f0f959e8 | PHP | khelle/surume | /src/Loop/LoopInterface.php | UTF-8 | 1,958 | 3.078125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace Surume\Loop;
use Surume\Loop\Timer\TimerInterface;
/**
* @event start
* @event stop
*/
interface LoopInterface
{
/**
* Register a listener to be notified when a stream is ready to read.
*
* @param resource $stream
* @param callable $listener
*/
public function addR... | true |
328871358392fbfd4b84bf14c8ca3e4c6d60611b | PHP | linkorb/timeular-client-php | /src/Client.php | UTF-8 | 1,870 | 2.796875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Timeular;
use GuzzleHttp\Client as GuzzleClient;
class Client
{
protected static $baseUrl = 'https://api.timeular.com/api/v2/';
protected $guzzle;
// prevent direct instantiation
protected function __construct()
{
// noop
}
public static function getToken($k... | true |
17da0618836f7bde057fff41c484027f30f75f09 | PHP | morganevlrd/ISCC-2020-J07 | /double-tableaux.php | UTF-8 | 366 | 2.640625 | 3 | [] | no_license | <?php
$panier = array (
array ("T-shirt rouge", 15,50,5),
array ("T-shirt vert", 15.50, 6),
array ("T-Shirt argent", 15.50, 8),
array ("Short bleu", 16.50, 5),
array ("Short vert",19.99,5)
array ("Veste argent", 19.99, 10)
array ("Veste marron", 35,3),
);
function affichage_panier ($panier)... | true |
6c96bc6a5fd8b8479c5d2b0cc5486f71467ee185 | PHP | danter91/Programacion_Web | /Programacion_Web2/clases/bd.class.php | UTF-8 | 2,692 | 2.8125 | 3 | [] | no_license | <?php
//session_start();
// clase para el manejo de la conexion a base de datos
date_default_timezone_set('America/Bogota');
class bd{
function bd(){
$this->pwd="";
$this->usuario="root";
$this->servidor="127.0.0.1";
$this->bd = "palopalito";
$this->conexion="";
$this->error="";
$this->sentencia="";
$... | true |
0e064a90c9f0999c5468f8d6d166fda5393d19dd | PHP | zbierajewski/SupportPress | /user-edit.php | UTF-8 | 4,800 | 2.640625 | 3 | [] | no_license | <?php
include_once( 'init.php' );
// Prevents non-admin from editing other users settings
if ( !$current_user->has_cap( 'supportpressadmin' ) && $current_user->ID != $_GET['uid'] ) {
wp_redirect( $site_url );
exit;
}
include( 'header.php' );
$uid = (int) $_GET['uid'];
$this_user = get_user( $uid );
$message = '';
... | true |
3ee3b5ac5ece1c1fb119bc77327123c0ec714b99 | PHP | omusico/jingbo | /code/admin/application/libraries/ProductsearchService.php | UTF-8 | 7,728 | 2.671875 | 3 | [] | no_license | <?php defined('SYSPATH') OR die('No direct access allowed.');
/**
* 商品搜索Service
*
* @author bin
*/
class ProductsearchService_Core extends DefaultService_Core {
/* 兼容php5.2环境 Start */
private static $instance = NULL;
//路由实例管理实例
private $serv_route_instance = NULL;
// 获取单态实例
... | true |
0f8c1e2ecaffeaca13be89f0872c2e8a404cfb92 | PHP | michaelmeganet/crudphpcustomer | /ccf501/read-customer-info.php | UTF-8 | 975 | 2.625 | 3 | [] | no_license | <?php
include 'header.php';
if (isset($_GET['id'])) {
$customer_info = $customer_obj->view_customer_by_cid($_GET['id']);
} else {
header('Location: index.php');
}
?>
<div class="container " >
<div class="row content">
<a href="index.php" class="button button-purple mt-12 pull-right">View Cu... | true |
23176385eeea01fede7a2df759a0eeb1c4620a95 | PHP | Dcodefrenzy/E-Commerce-Book-App | /www/admin/add_category.php | UTF-8 | 1,345 | 2.640625 | 3 | [] | no_license |
<?php
$page_title ="Add Category";
session_start();
include "include/db.php";
include "include/function.php";
include "include/nav.php";
authentication($_SESSION);
//form validation.
$error= [];
if(array_key_exists('add_category', $_POST)){
if(empty($_POS... | true |
af52441905971df204d1a897f6b2a4d593039f6a | PHP | dangpatrick/foods2 | /index.php | UTF-8 | 2,066 | 3.15625 | 3 | [] | no_license | <?php
//This is my CONTROLLER page
// Turn on error reporting
ini_set('display_errors', 1);
error_reporting(E_ALL);
//Require the auto autoload file
require_once('vendor/autoload.php');
//Create an instance of the Base class
$f3 = Base::instance();
$f3->set('Debug',3);
//Define a default route (home... | true |
8da881832e4eac83a5569b2b6d07f8dd8ee99813 | PHP | desarrollo-bexandy-rodriguez/PHP-POO | /blog/index.php | UTF-8 | 5,959 | 2.578125 | 3 | [] | no_license | <?php
require_once 'class/classConexionBlog.php';
$blogbdd = new BlogBDD;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>..:: Blog de Bexandy Rodríguez ::..</title>
... | true |
2352612f8b4e0512fa42de81970d57b41b28207d | PHP | alexshadie/fns-billchecker | /test/VersionTest.php | UTF-8 | 316 | 2.59375 | 3 | [] | no_license | <?php
namespace alexshadie\fns;
use PHPUnit\Framework\TestCase;
class VersionTest extends TestCase
{
public function testCreate()
{
$v = new Version('1.1.1', 'aaabbbccc');
$this->assertEquals('1.1.1', $v->getVersion());
$this->assertEquals('aaabbbccc', $v->getRevision());
}
}
| true |
6309e77e3791bc786c979fe1afdbc5ca6c1618b1 | PHP | jvilata/wealthmgr | /php/lib/auth/delight-im/db/src/SimpleMeasurement.php | UTF-8 | 1,601 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
/*
* PHP-DB (https://github.com/delight-im/PHP-DB)
* Copyright (c) delight.im (https://www.delight.im/)
* Licensed under the MIT License (https://opensource.org/licenses/MIT)
*/
namespace Delight\Db;
/** Implementation of an individual measurement of a profiler that monitors performance */
final... | true |
18f5e64c3f476b5e9b58370dfc18650483399e76 | PHP | pdfkiwi/php-lib | /src/PdfKiwi.php | UTF-8 | 10,591 | 3.046875 | 3 | [] | no_license | <?php
namespace PdfKiwi;
class PdfKiwi
{
public static $libVersion = '0.4.0';
private static $apiHost = 'https://pdf.kiwi';
private static $apiPort = 443;
private $apiPrefix;
private $userAgent;
private $fields;
private $httpResponseCode;
private $errorNumber;
private $errorMessag... | true |
6ebb1002c62db6f9279987f09e2a6f1635164a59 | PHP | breezi30/red-wechat | /wechat/core/scanin.lib.php | UTF-8 | 2,421 | 2.703125 | 3 | [
"WTFPL"
] | permissive | <?php
namespace LaneWeChat\Core;
include 'lanewechat.php';
/**
* 扫码关注获取客户关系
* User: lane
* Date: 14-10-31
* Time: 下午4:15
* E-mail:
* WebSite:
*/
class Scanin {
/*****************************
* 在扫码关注事件中取得二维码带的场景值$dataNO
*
* @param $type char $sceneid
* @param $type char $oenpid
*
... | true |
fac526237a307dbd6e04b278104d530e2b40be4a | PHP | JMPrestes/PHPXlsSheetMySQLIntegration | /db_connect.php | UTF-8 | 334 | 2.65625 | 3 | [] | no_license | <?php
//Conexão com DB
$servername = "localhost";
$username = "admin";
$password = "insert your connection password here";
$db_name = "jordancrud";
$connect = mysqli_connect($servername, $username, $password, $db_name);
mysqli_set_charset($connect, "utf-8");
if(mysqli_connect_error()):
echo "<h1>Falha na Conexão: ... | true |
11c50ff90f63faa6869b6eafaa30993cd89dcb27 | PHP | nittics1991/Concerto | /_mvc/dev/accessor/TypeCastInterface.php | UTF-8 | 519 | 2.625 | 3 | [] | no_license | <?php
/**
* TypeCastInterface
*
* @version 190516
*/
declare(strict_types=1);
namespace candidate\accessor;
interface TypeCastInterface
{
/**
* set cast定義存在確認|定義取得
*
* @param ?string $name
* @return bool|mixed[]
*/
public function hasSetCastType(?string $name = null);
/**
... | true |