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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
5953dfbf3ddaafb212c28f3d9e742851122fa8fb | PHP | RichardGomer/ensemble-iot | /mod/Schedule/TariffSchedule.php | UTF-8 | 2,224 | 3.203125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Work with energy tariff data
* Periods either have price data, or are set false
* Combining Tariff Schedules allows complex schedules to be built
* e.g./ find the cheapest two hours between midnight and 6am
*
* (new TariffSchedule($priceData))->trim('00:00', '06:00')->cheapest(120);
*
*/
namespac... | true |
1d5548b3b57f4ba67938e3f451ae420174953a7c | PHP | realdevelogic/guzzle-rotating-proxy-subscriber | /src/Interval/RandomTimeInterval.php | UTF-8 | 2,350 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace paslandau\GuzzleRotatingProxySubscriber\Interval;
use paslandau\GuzzleRotatingProxySubscriber\Random\RandomizerInterface;
use paslandau\GuzzleRotatingProxySubscriber\Random\SystemRandomizer;
class RandomTimeInterval extends BaseRandomInterval implements TimeIntervalInterface
{
/**
* @var in... | true |
0f2bed8193ce2b7816143ea9a306a854e246ea1f | PHP | pawel-smolenski/SambaDir | /modules/sambaclient/classes/sambaclient.php | UTF-8 | 954 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class Sambaclient
{
private $programName;
private $username;
private $password;
public function Sambaclient($username, $password)
{
$this->username = $username;
$this->password = $password;
$this->programName = Kohana::$config->load('sambaclient')->get('programName');
}
private function execut... | true |
02d186eacf279e1dcc2154dc380cb9bfc7798f39 | PHP | NitLab/NITOS-administration-tool | /application/controllers/users.php | UTF-8 | 1,561 | 2.515625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require_once(APPPATH.'libraries/nitlab_api.php');
class Users extends CI_Controller {
function __construct()
{
parent::__construct();
$this->api = new NitlabAPI\NitlabAPI();
}
public function index()
{
$this->l... | true |
a1d2ea7aa7f022ae9cf3401dd4247a27ec7d873e | PHP | cnpengwei/tms | /controller/class.common.inc.php | UTF-8 | 1,626 | 2.875 | 3 | [] | no_license | <?php
/**
* This class for execute the DB and other local common operation
*/
class SqlHelper {
public $conn;
public $host="localhost";
public $dbname="TMS";
public $username="root";
public $password="";
function __construct() {
$this->conn=mysql_connect($this->host,$this->username,$this->passwo... | true |
63ef29d3ba1581ec52e2f24de25449276f2c4f2e | PHP | pswisaproject/pswisa40 | /app/helpers/MailerHelper.php | UTF-8 | 1,332 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Helpers;
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
require '../vendor/autoload.php';
class MailerHelper {
public function sendMail($recipient, $subject, $body) {
$mail = new PHPMailer(true);
try {
//Se... | true |
9b3fabb8e4c0eac24442921d8821ee555eb0e806 | PHP | rodjesg/voetbal | /includes/dbconnect.php | UTF-8 | 400 | 2.609375 | 3 | [] | no_license | <?php
// Bij de Windows opgegving is er geen wachtwoord nodig.
$servername = "127.0.0.1";
// Online heb je een andere username & password Diuser & F-ww.
$username = "";
$password = "";
$database = "";
// Create connection
$conn = new mysqli($servername, $username, $password, $database);
// Check connection
if ($con... | true |
0a4dedf67c681f6979d3018a93b11a670e0af637 | PHP | a772336300/GatewayWorker11 | /Applications/YourApp/src/Proto/Proto/E_Equipment_TYPE.php | UTF-8 | 958 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Auto generated from new.proto at 2019-05-27 11:47:10
*
* proto package
*/
namespace Proto {
/**
* E_Equipment_TYPE enum
*/
final class E_Equipment_TYPE
{
const Equipment_none = 0;
const Equipment_IOS = 1;
const Equipment_Android = 2;
const Equipment_Ipad_IOS = 3;
const Equipment_I... | true |
5e8ce6a96c215c6465d68c3e8602fd1bff07379d | PHP | nabilanam/Library-Management-System | /mail/view.php | UTF-8 | 1,403 | 2.640625 | 3 | [] | no_license | <?php
$page_title = 'Mail - View';
require_once __DIR__ . '/../templates/navbar.php';
require_once __DIR__ . '/../functions/Repositories/MailsRepository.php';
if (isset($_GET['mail_id']) && !empty($_GET['mail_id'])) {
$id = $_GET['mail_id'];
$repo = new MailsRepository();
$mail = $repo->findById($id);
}
if ... | true |
60b1a7b95b373eefb9fae86f62bbfcf626c02072 | PHP | mycrazydog/isc | /app/views/backend/OLDlicenses/Controller/LicenseController.php | UTF-8 | 4,288 | 2.640625 | 3 | [] | no_license | <?php
class LicenseController extends BaseController
{
protected $license;
public function __construct(License $license)
{
$this->license = $license;
}
/**
* Returns all the blog posts.
*
* @return View
*/
public function getIndex()
{
// Get ... | true |
fae6f0a6079b950d091a7928549d6fcc3a90f344 | PHP | Nebula5150/Objects-and-Interfaces | /staticVariables.php | UTF-8 | 267 | 3.234375 | 3 | [] | no_license | <?php
class a {
public static $x;
public $y;
public static function display(){
self::$x=1000;
$this->y = 2000;
}
}
$a1 = new a();
$a2 = new a();
$a1::$x=1000;
echo $a1::$x;
echo $a2::$x;
#this should fail
echo a::$y;
?> | true |
f540054db3ee67963aba592c4c9f65be631528c0 | PHP | leanhstu93/fbnv | /frontend/models/Template.php | UTF-8 | 2,807 | 2.53125 | 3 | [] | no_license | <?php
namespace frontend\models;
use Yii;
use yii\data\ActiveDataProvider;
/**
* This is the model class for table "template".
*
* @property int $id
* @property string $name
* @property int $category_id
* @property string|null $link
* @property string|null $seo_name
* @property string|null $desc
* @property... | true |
94081b0f65d2421b80ebfb52b055d21494cf2edb | PHP | chrisvishoot/455_Website | /website/website/resume/add_internal_page_process.php | UTF-8 | 1,692 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Gabe
* Date: 3/9/2016
* Time: 7:21 PM
*/
require_once "../config.php";
if($_SESSION['is_logged'] == True) {
$sql = "SELECT * FROM users WHERE id=" . $_SESSION['user_id'];
$result = $link->query($sql);
if($result) {
$row = $result->fetch_array(MYSQLI_AS... | true |
86777291859a90fd8d06704fe44f2c1700121429 | PHP | mschurr/framework | /src/framework/filesystem/FileLocalization.php | UTF-8 | 1,104 | 3 | 3 | [] | no_license | <?php
/**
* Provides an interface for localizing error messages.
*/
class FileLocalization
{
protected static /*array<String:String>*/ $strings;
protected static /*String*/ $language;
/**
* Returns a formatted language string. The first parameter is the name
* of the template. Additional paramete... | true |
225a56369c3d8b093386c0a4f53634539eafd228 | PHP | olivierphi/Relax | /src/Relax/Params.php | UTF-8 | 4,258 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Relax micro-framework.
*
* (c) Olivier Philippon <https://github.com/DrBenton>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Relax;
class Params implements \ArrayAccess
{
publi... | true |
07cf44de607da7837404a187b066cb0afb8f6c9e | PHP | magnusjt/mongotd | /test/functional/AnomalyTest.php | UTF-8 | 4,270 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
require __DIR__ . '/../../vendor/autoload.php';
date_default_timezone_set('Europe/Oslo');
use Mongotd\Connection;
use Mongotd\Pipeline\Factory;
use Mongotd\Pipeline\Pipeline;
use Mongotd\Storage;
use Mongotd\StorageMiddleware\FilterCounterValues;
use Mongotd\StorageMiddleware\InsertCounterValues;
use Mongotd\Sto... | true |
b8189f992f4fe8ba1821b25bfaeda0759b0f8a64 | PHP | nielssp/jivoo-view | /src/Compile/TextNode.php | UTF-8 | 1,333 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
// Jivoo
// Copyright (c) 2015 Niels Sonnich Poulsen (http://nielssp.dk)
// Licensed under the MIT license.
// See the LICENSE file or http://opensource.org/licenses/MIT for more information.
namespace Jivoo\View\Compile;
/**
* A text node.
*/
class TextNode extends TemplateNode
{
/**
* @var string T... | true |
c39b7a59aae1b8c3a2ac810084615e722db04c79 | PHP | PandaWzg/imking-ecology | /addons/RfExample/common/models/ElasticSearchCurd.php | UTF-8 | 4,223 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace addons\RfExample\common\models;
use Yii;
use yii\behaviors\TimestampBehavior;
use yii\elasticsearch\ActiveRecord;
/**
* Class ElasticSearchCurd
* @package addons\RfExample\common\models
*/
class ElasticSearchCurd extends ActiveRecord
{
public static $currentIndex;
/**
* @return null|o... | true |
e6bce47af81ab76f79c84a3d5266630414c911b8 | PHP | olexkalinichenko/acmp.ru-php | /random_answer..php | UTF-8 | 1,049 | 3 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: sasha
* Date: 11.08.16
* Time: 8:41
* Давай зробимо програму, що відповідає на будь-яке питання. Для цього
* створимо масив з можливими варіантами відповідей, згенеруємо випадкове число
* і візьмемо з масиву елемент з таким номером.
*/
//Відповіді
$answers = array(
1 =... | true |
404fe8c6be80f2247466e4982cd6b60442e6b470 | PHP | spartaksun/smile | /backend/src/LocationBundle/Entity/Country.php | UTF-8 | 625 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by A.Belyakovskiy.
* Date: 8/16/15
* Time: 3:16 PM
*/
namespace LocationBundle\Entity;
use spartaksun\OrientDb\Entity;
use spartaksun\OrientDb\Validators\StringValidator;
/**
* Country entity
* @package LocationBundle\Entity
*
* @property $name
*/
class Country extends Entity
{
/**
... | true |
de1d5015b6be1c6bb7b7c20f1489ad774a1d8a94 | PHP | Silvestra/Silvestra | /src/Silvestra/Component/Media/Image/Cache/ImageCacheInterface.php | UTF-8 | 1,143 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Silvestra package.
*
* (c) Tadas Gliaubicas <tadcka89@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Silvestra\Component\Media\Image\Cache;
/**
* @author Tadas Gliaubica... | true |
0ecde416c789d239ffb4b1d1ebfef6529c1f1ff9 | PHP | eloirobe/eloi-fw | /src/Fw/Components/Response/WebResponse.php | UTF-8 | 985 | 2.859375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Eloi
* Date: 22/6/15
* Time: 18:05
*/
namespace Fw\Components\Response;
class WebResponse {
private $headers;
private $content;
private $template;
function __construct($content, $template)
{
$this->content = $content;
$this->templat... | true |
25c044842fa489f62ac3542e506b4b23dec2f6e1 | PHP | Morebec/primi | /src/handlers/Program.php | UTF-8 | 473 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Smuuf\Primi\Handlers;
use \Smuuf\Primi\Context;
use \Smuuf\Primi\HandlerFactory;
use \Smuuf\Primi\Helpers\SimpleHandler;
use \Smuuf\Primi\Structures\NullValue;
class Program extends SimpleHandler {
public static function handle(array $node, Context $context) {
foreach ($node['nodes'] as $sub) {
... | true |
3ae8dd64ac3e6d4774a03e8ec0a9b28bfdd2a805 | PHP | rosalesjhonnel123/mobile-api | /core/controller.php | UTF-8 | 420 | 2.71875 | 3 | [] | no_license | <?php
class Api_Controller {
public $action;
public $params;
public $id;
public $uri;
public function __construct() {
$this->uri = new Url();
$this->action = isset($_GET['action']) ? $_GET['action'] : '';
$this->id = isset($_GET['id']) ? $_GET['id'] : '';
$this->params = json_decode(file_get_... | true |
d070712af45bd461f530bf272b876afa4b72788b | PHP | mbouclas/mcms-frontEnd | /src/Console/Commands/OptimizeImages.php | UTF-8 | 893 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Mcms\FrontEnd\Console\Commands;
use Mcms\FrontEnd\Services\ImageOptimizer;
use Illuminate\Console\Command;
class OptimizeImages extends Command
{
/**
* @var array
*/
protected $actions = [
];
/**
* The name and signature of the console command.
*
* @var stri... | true |
3b1c9ec622e9f43e1f318b161a1790a00a89b24a | PHP | lassfar/mediexperts | /app/Imports/ClientsImport.php | UTF-8 | 810 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Imports;
use Maatwebsite\Excel\Concerns\WithMultipleSheets;
use Maatwebsite\Excel\Concerns\WithConditionalSheets;
use Maatwebsite\Excel\Concerns\SkipsUnknownSheets;
class ClientsImport implements WithMultipleSheets, SkipsUnknownSheets
{
use WithConditionalSheets;
// MULTIPLE SHEETS
pu... | true |
fbd5555cf814064a5255b1ac7358a9d1335747b5 | PHP | xiayiyongphper/pintuan | /crontab/vendor/react/promise/src/Promise.php | UTF-8 | 12,097 | 2.875 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace React\Promise;
class Promise implements ExtendedPromiseInterface, CancellablePromiseInterface
{
private $canceller;
private $result;
private $handlers = [];
private $progressHandlers = [];
private $requiredCancelRequests = 0;
public function __construct(callable $resolver, c... | true |
c1e2afee5681eda029c2e998c905a2c0c114034e | PHP | max2u/woocommerce3-pointcheckout | /pointcheckout_payment_card/includes/lib/class-pc-payment-service.php | UTF-8 | 8,083 | 2.578125 | 3 | [] | no_license | <?php
class PointCheckout_Card_Payment extends PointCheckout_Card_Parent
{
private static $instance;
private $pcOrder;
private $pcConfig;
private $pcUtils;
public function __construct()
{
parent::__construct();
$this->pcOrder = new PointCheckout_Card_Order();
$this->... | true |
2d976653bd79e6542ffff98b841562a6af6f4eb5 | PHP | rajashri-rajesh-gawas/wtttrackingsystem | /backend/models/TblloginAccess.php | UTF-8 | 1,830 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\models;
use Yii;
/**
* This is the model class for table "tbllogin_access".
*
* @property integer $login_access_id
* @property integer $admin_id
* @property integer $s_id
* @property integer $emp_id
* @property integer $student_id
* @property string $email_id
* @property string $pass... | true |
a4a909e9a0487b1e026888b8ab1ff3f8983a47d1 | PHP | Emerson916/fastParking-integrado | /backend/App/Controller/Precos.php | UTF-8 | 1,162 | 2.640625 | 3 | [] | no_license | <?php
use App\Core\Controller;
class Precos extends Controller{
//Listagem
public function index(){
$precoModel = $this->Model("Preco");
$precos = $precoModel->listarTodos();
echo json_encode($precos, JSON_UNESCAPED_UNICODE);
}
public function store(){
$no... | true |
6a6b6cbfbe27b3cbb702ef301d9c120419629441 | PHP | jfBiswajit/saturn | /public/shop/update_rating.php | UTF-8 | 569 | 2.515625 | 3 | [] | no_license | <?php
if(!isset($_SERVER['HTTP_REFERER'])){
header('location: /');
exit;
}
require $_SERVER["DOCUMENT_ROOT"] . '/app/config/db_config.php';
$proID = $_GET['proid'];
$getRating = $_GET['rating'];
$oldRating = 0;
$sql = "SELECT * FROM products where id = $proID";
$data = $conn->query($sql);
if ... | true |
bcc63d08a7ce013ae5784673363dc929f52a8382 | PHP | GitBsrc/comp353 | /app/Http/Controllers/DMController.php | UTF-8 | 2,561 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\DMMessage;
use App\DMRecipients;
use App\User;
use Illuminate\Support\Facades\Auth;
class DMController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\... | true |
c1391dae416a6759b88c0ddef58d3dfc74ef9b44 | PHP | ljphalen/jinli | /gamehall/upload/files/gameSDK/library/Activity/Service/UserData.php | UTF-8 | 2,899 | 2.6875 | 3 | [] | no_license | <?php
if (!defined('BASE_PATH')) exit('Access Denied!');
/**
*
* @author zhengzw
*
*/
class Activity_Service_UserData {
const ACTIVITY_ID = 'activity_id';
const UUID = 'uuid';
const DATA = 'data';
static $All_FIELDS = array(
self::ACTIVITY_ID,
self::UUID,
self::DATA
);
/**
*
* ... | true |
edb0bc7a675b8d2bd9ab81e3ab4c31bd475efc5f | PHP | pmleveque/walkingtheelderly | /www/classes/viagem.class.php | ISO-8859-1 | 2,744 | 3.0625 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
class viagem {
var $Id_viagem;//identificador da viagem
var $CPF;//valor do CPF que o ID do usuario
var $Data_inicio;// data de inicio de viagem
var $Data_fim;// data de fim da viagem
var $Ci... | true |
e32f95435042039f3ff922bfa81e23b138f7fab4 | PHP | andreeasteriu/preloved | /includes/insert.product.php | UTF-8 | 3,220 | 2.8125 | 3 | [] | no_license | <?php
require_once(__DIR__ . '/db-connect.php');
session_start();
if ($_POST) {
if (empty($_POST['title']) || empty($_POST['description']) || empty($_POST['size']) || empty($_POST['condition']) || empty($_POST['price'])) {
sendErrorMessage('* Please fill in all fields', __LINE__);
}
}
if ($_POST['gen... | true |
ab65c499dee3460ad79053ac864a28b65884d13b | PHP | mishany836/oop | /country/Country.php | UTF-8 | 932 | 3.25 | 3 | [] | no_license | <?php
namespace country;
class Country
{
public $listTown = [];
/**
* Country constructor.
* @param array $listTown
*/
public function __construct()
{
if (!empty($_SESSION['country'])){
foreach ($_SESSION['country'] as $item){
$this->listTown = unserializ... | true |
58da5366e7aef53b3a99b891655e157df3be7b0b | PHP | perelygin/PMIS | /models/VwListOfBRSearch.php | UTF-8 | 3,067 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use yii\base\Model;
use yii\data\ActiveDataProvider;
use app\models\VwListOfBR;
/**
* VwListOfBRSearch represents the model behind the search form of `app\models\VwListOfBR`.
*/
class VwListOfBRSearch extends VwListOfBR
{
/**
* {@inheritdoc}
*/
public $mantis_... | true |
f7e9c5fadb628805ff9dfebe106a625b6e724926 | PHP | Quizer1349/zf_example | /www/library/Core/Email.php | UTF-8 | 1,317 | 2.53125 | 3 | [] | no_license | <?php
class Core_Email {
protected $_config;
public function __construct() {
$this->_config = Zend_Registry::get('config');
}
/**
* Send
*
* @access private
* @param void
* @return void
*/
public function send($params = array()) {
if( empty($this->_config) ) {
$this->_config = Zend_Registr... | true |
0042063c807f5e877ed4c6210d0e76234298f236 | PHP | shamir0xe/php-library | /src/Utils.php | UTF-8 | 1,200 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace shamir0xe\PhpLibrary;
use shamir0xe\PhpLibrary\Str;
use shamir0xe\PhpLibrary\Obj;
class Utils {
public static function toString($value): string {
if (\is_object($value)) {
$value = Obj::toArray($value);
}
if (\is_array($value)) {
$value = json_encod... | true |
2d5b5dc34a3d8a056c54742dfb4f6e83667676cd | PHP | uchikakoi-eishou/iraira-kun | /functions/validation.php | UTF-8 | 271 | 2.53125 | 3 | [] | no_license | <?php
//メールアドレスチェック
function mailcheck($mail){
if(preg_match('/^([a-z0-9\+_\-]+)(\.[a-z0-9\+_\-]+)*@([a-z0-9\-]+\.)+[a-z]{2,6}$/iD', $mail)){
return 'true';
}else{
return 'false';
}
};
| true |
b9dc82879c10029d143ee0afc0434ae2a1924869 | PHP | xiaohuasheng/jaeger-php | /src/Jaeger/Config.php | UTF-8 | 3,236 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Jaeger;
use Jaeger\Reporter\RemoteReporter;
use Jaeger\Reporter\Reporter;
use Jaeger\Transport\TransportUdp;
use OpenTracing\NoopTracer;
use Jaeger\Sampler\Sampler;
use Jaeger\Sampler\ConstSampler;
use Jaeger\Propagator\JaegerPropagator;
use Jaeger\Propagator\ZipkinPropagator;
class Config {
pri... | true |
7967a91066795a11e884d1bf27192a4312bb5319 | PHP | BogdanBrizhaty/college-final-project | /www/App/Model/FeedbackModel.php | UTF-8 | 652 | 2.75 | 3 | [] | no_license | <?php
require_once('DAL/UserRepository.php');
class FeedbackModel extends BaseModel
{
function __construct()
{
parent::__construct(new UserRepository(Connection::GerInstance()->GetConnection()));
}
function SendMail($post)
{
var_dump($post);
$msg = htmlspecialchars(trim($post['M... | true |
38de02fc2f95460a1295ae580f0929af75e666e2 | PHP | btbtbtmaki/google_sheet_processing | /googlesheetprocessing.php | UTF-8 | 3,871 | 2.78125 | 3 | [] | no_license | <?php
require __DIR__ . '/vendor/autoload.php';
/**
* Returns an authorized API client.
* @return Google_Client the authorized client object
*/
function getClient()
{
$client = new Google_Client();
$client->setApplicationName('Google Sheets API PHP Quickstart');
$client->setScopes(Google_Service_Sheets:... | true |
0f2a128b01b13bf1e2b7da78ae47f8a1b9a764a6 | PHP | David-Dodge/SWN-faction-turn-sim | /Asset.class.php | UTF-8 | 1,698 | 3.0625 | 3 | [
"Unlicense"
] | permissive | <?php
require_once("DefendRule.class.php");
class Asset
{
public $objOwner;
public $strName;
public $strAttackerStat = NULL;
public $strDefenderStat = NULL;
public $intHp;
private $strAttackRoll;
private $strDefendRoll;
public $arrStats;
public function __construct($objOwner, $strName, $intHpOverride = NU... | true |
21c61d0fea69e8e6de146714e287be2703bcddbe | PHP | koshuang/expression | /src/Constraint/Contains.php | UTF-8 | 1,610 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the webmozart/expression package.
*
* (c) Bernhard Schussek <bschussek@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Webmozart\Expression\Constraint;
use Webmozart\Expressio... | true |
8e9877fa25a46fcc1a5b64eee25164ab81f39afc | PHP | Kirin56/tracker | /Mailer/Google.php | UTF-8 | 1,693 | 2.921875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: kirin
* Date: 12/25/20
* Time: 10:27 PM
*/
namespace Mailer;
use Mailer\Interfaces\Mailer;
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
/**
* Class Google
* @package Mailer
*/
class Google implements Mailer
{
/**
* @var PHPMailer
*/
... | true |
9ec2277ac8f111af42ef3b46e5e72d252c40b4de | PHP | nktankta/TECH-BASE | /Mission_4-7.php | UTF-8 | 1,847 | 3.0625 | 3 | [] | no_license | <?php
require("./access_keys.php");
$id = 1;
$sql = 'SELECT * FROM test WHERE id=:id ';
$stmt = $pdo->prepare($sql); // ←差し替えるパラメータを含めて記述したSQLを準備し、
$stmt->bindParam(':id', $id, PDO::PARAM_INT); // ←その差し替えるパラメータの値を指定してから、
$stmt->execute(); // ←SQLを実行する。
$results = $s... | true |
3f3995ab0440017885aefa8604b800ba7827dc7f | PHP | mrcoco/ilias_E-learning | /Modules/Test/classes/class.ilTestStatistics.php | UTF-8 | 2,950 | 2.5625 | 3 | [] | no_license | <?php
/*
+-----------------------------------------------------------------------------+
| ILIAS open source |
+-----------------------------------------------------------------------------+
| Copyright (c) 1998-2001 ILIAS open source, University of Cologne ... | true |
69a9801b02e040ac4621464c4da7f95bad45a55d | PHP | richarthurs/Smart-Lock-Demo | /esp/dbtest.php | UTF-8 | 637 | 2.625 | 3 | [] | no_license | <?php
$servername = "";
$username = "";
$password = "";
$dbname = "";
// Create connection
$conn = mysql_connect($servername, $username, $password);
if(! $conn )
{
die('Could not connect: ' . mysql_error());
}
/*
$created_date = date("Y-m-d H:i:s");
$sql = "INSERT INTO $lock(date)VALUES('$created_date')";
$result =... | true |
b7bcce98048dcb65d44b25f867280e11c9c1a0e4 | PHP | JeyaMahes/GSB_Android | /src/GsbAndroidBundle/Entity/Visiteur.php | UTF-8 | 1,654 | 2.53125 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace GsbAndroidBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Visiteur
*
* @ORM\Table(name="Visiteur")
* @ORM\Entity(repositoryClass="GsbAndroidBundle\Repository\VisiteurRepository")
*/
class Visiteur implements \JsonSerializable
{
/**
* @var string
*
* @ORM\Column(name="vis... | true |
9bf07a18292487f747c483f481cdee180761a05c | PHP | andres-sumihe/recipe-app-api | /models/recipe.php | UTF-8 | 2,172 | 3.328125 | 3 | [] | no_license | <?php
class Recipe{
// database connection and table name
private $conn;
private $table_name = "tbl_recipe";
// object properties
public $recipe_id;
public $user_id;
public $category_id;
public $recipe_name;
public $picture_recipe_url... | true |
0d09c437aee7a7f72b33ad8aa118736973e50141 | PHP | akash-patel/BetweenTheLines | /deletereservation.php | UTF-8 | 1,030 | 2.546875 | 3 | [] | no_license | <?php
// Initialize session
session_start();
// Include database connection settings
include('config.inc');
$_SESSION['error'] = NULL;
$reservationid = $_POST['reservationID'];
$username = $_SESSION['username'];
$query = "SELECT * FROM reservations WHERE reservationid = '$reservationid'";
$result = mysql... | true |
111cf97b8205a1a3905282bdf1a23733a6b189af | PHP | steffengy/zephir | /Library/MethodCallWarmUp.php | UTF-8 | 1,599 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/*
+--------------------------------------------------------------------------+
| Zephir Language |
+--------------------------------------------------------------------------+
| Copyright (c) 2013-2016 Zephir Team and contributors ... | true |
fb309fa89e3c340dd6565d3f39ad81f6c52ecfb0 | PHP | Morphinof/flashkick | /src/Entity/Character.php | UTF-8 | 1,341 | 2.671875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Flashkick\Entity;
use Doctrine\ORM\Mapping as ORM;
use Flashkick\Traits\EntityTrait;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="Flashkick\Repository\CharacterRepository")
* @ORM\Table(name="`character`")
* @ORM\HasLifecycleCa... | true |
fab126b3852e026c579c30720c1815e667166ec7 | PHP | gongmingge/iot-sdk | /src/Ty/HomeClient.php | UTF-8 | 4,527 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace IotSpace\Ty;
use IotSpace\Support\HttpMethod;
/**
* 家庭管理
* https://developer.tuya.com/cn/docs/cloud/smart-home?id=K95zu08mbwztc
* @package IotSpace\Ty
*/
class HomeClient extends BaseClient
{
/**
* 创建家庭
* @param string $uid 涂鸦用户
* @param string $name
* @param array $rooms... | true |
b67af4f81369bceeb57fd6ac2d40aaa03394de08 | PHP | Colocust/im | /server/swoole/Task.php | UTF-8 | 919 | 2.640625 | 3 | [] | no_license | <?php
namespace swoole;
use db\Message;
use db\RedisType;
use db\Room;
use tiny\Redis;
class Task {
//发送消息
public function sendMessage($ws, $data) {
$messageId = $data->id;
$senderUid = $data->senderUid;
$receiveUid = $data->receiveUid;
$createAt = $data->createAt;
$message = $data->message... | true |
5f1872b9e31be0704db99efb7cf3b43a700f344e | PHP | dimono777/tsplugin | /widgets/base/widget.php | UTF-8 | 5,130 | 2.6875 | 3 | [] | no_license | <?php
namespace tradersoft\widgets\base;
use tradersoft\model\Media_Queue;
/**
* Base widget.
* @author Alexandr Tomenko <alexandr.tomenko@tstechpro.com>
*/
abstract class Widget extends \WP_Widget
{
/** @var Media_Queue */
protected $_mediaFiles;
/**
* @param string $id_base
* @param strin... | true |
5ac076d7cf356aa25c44c4f415387ff3448590b8 | PHP | codersjgec/jolitesfb | /app/Facebook/Repositories/UserRepositoryInterface.php | UTF-8 | 1,311 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Facebook\Repositories;
interface UserRepositoryInterface {
/**
* Get logged in user
*
* @param $id
* @return \Illuminate\Database\Eloquent\Collection|\User
*/
public function getUser($id);
/**
* Get user by id
*
* @param $id
* @return \Illum... | true |
71f301fae08e01d498335053051bded33e370015 | PHP | clcross/AppliedNetworking2019 | /mysqlphp/task3.php | UTF-8 | 1,459 | 3.125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Task 3</title>
</head>
<body>
<?php
$servername = "localhost";
$username = "root";
... | true |
31b8e66673191f8cf715fb199b074202eeffc4cc | PHP | theodo/SendGridMailerBundle | /Factory/SendGridEmailFactory.php | UTF-8 | 1,643 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Theodo\SendGridMailerBundle\Factory;
use SendGrid\Email;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
/**
* class SendGridEmailFactory
*
* @author Reynald Mandel <reynaldm@theodo.fr>
*/
class SendGridEmailFactory
{
/**
... | true |
05876408e08c91545840f5f28b78a057af6b207b | PHP | MrMihas/CV | /prflo/mail/feedback.php | UTF-8 | 1,487 | 2.625 | 3 | [] | no_license | <?php
if (empty($_POST['userName'])) {
header( "refresh:4;url=/" );
echo 'Ви не ввели ім\'я';
} elseif (empty($_POST['userEmail'])) {
header( "refresh:4;url=/" );
echo 'Ви не ввели електронну адресу';
}
elseif (empty($_POST['userText'])) {
header( "refresh:4;url=/" );
echo '
<div>
Напишіть у повідомленн... | true |
464159a4e41ecf960c94086fe957057e216a42bc | PHP | miuramo/cutycapt_server | /info.php | UTF-8 | 481 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
date_default_timezone_set('Asia/Tokyo');
header("Content-type: text/plain");
$i = filter_input(INPUT_GET, 'i', FILTER_SANITIZE_URL );
if (!isset($i) || strlen($i)<5 || substr($i,0,1)==='/' || substr($i,0,1)==='.' ){
echo "image path invalid\n";
echo "example: https://cutycapt.tobata.asia/info.php?i=img/_075... | true |
78da3216d2dcdc354ba742a5fc2c9230180c0f8f | PHP | JulianThijssen/MySQL | /index.php | UTF-8 | 2,584 | 3.03125 | 3 | [] | no_license | <!-- Basic search engine -->
<!-- Julian Thijssen & Bas Verhaar -->
<!-- 10461329 & 10177914 -->
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<?php
$servername = "localhost";
$username = "root";
$password = "password";
$dbname = "zoekmachines";
$query = $_GET['query'];
$jaar... | true |
24489c2b497e89ed95584e66fc52253d9da683b3 | PHP | nil-natal/APIAgenda | /agendaTelefonica/agenda_app/administrativo.php | UTF-8 | 1,396 | 2.546875 | 3 | [] | no_license | <?php
session_start();
echo 'Ola ' . $_SESSION['usuarioNome'];
?>
<!DOCTYPE html>
<html>
<head>
<title>Agenda - Lista</title>
<link href="css/bootstrap.css" rel="stylesheet">
</head>
<body>
<table class="table table-striped">
<thead>
<tr>
<th scope="col">Nome</th>
<th scope="co... | true |
53c8c760d7240b3ac77b7c07c1940efd5196c69c | PHP | underflip/shredindex-backend | /plugins/nocio/headstart/classes/Schema.php | UTF-8 | 1,100 | 2.703125 | 3 | [] | no_license | <?php
namespace Nocio\Headstart\Classes;
use Cms\Classes\Theme;
use Nocio\Headstart\Models\Settings;
class Schema extends Theme
{
/**
* Returns the absolute theme path.
* @param string $dirName Optional theme directory. Defaults to $this->getDirName()
* @return string
*/
public functio... | true |
0f1d227a5075a286dbc56beb475bf580531031e6 | PHP | SaadEddinHassania/forneeds | /app/Http/Controllers/ConfigController.php | UTF-8 | 3,702 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\DataTables\ConfigDataTable;
use App\Http\Requests;
use App\Http\Requests\CreateConfigRequest;
use App\Http\Requests\UpdateConfigRequest;
use App\Repositories\ConfigRepository;
use App\Repositories\UserRepository;
use Flash;
use InfyOm\Generator\Controller\AppBaseControlle... | true |
73c644953d3e3a218bc3398285db196b30eb232d | PHP | cloudprinter/sc-downloader | /functions.php | UTF-8 | 1,217 | 2.578125 | 3 | [] | no_license | <?php
/**
Resolve soundcloud URL to its track-ID
**/
function resolve_link($link)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.soundcloud.com/resolve?url=".$link."&_status_format=json&client_id=b45b1aa10f1ac2941910a7f0d10f8e28&app_version=5367f3cb");
curl_setopt($ch, CURLOPT_HTTPGET, true);
curl... | true |
1a6c3d1ffe0dd7c574c94e65bd8864c06b032dcc | PHP | amagdy529/Industry_Workers_PlayGround | /craftsmen/industries/list-industry.php | UTF-8 | 1,962 | 2.59375 | 3 | [] | no_license | <?php
// require_once "../header.php";
include "../admin-sidebar.php";
//fetching data in descending order (lastest entry first)
//$result = mysql_query("SELECT * FROM users ORDER BY id DESC"); // mysql_query is deprecated
$result = mysqli_query($global_mysqli, "SELECT * FROM industries ORDER BY industry_no DESC"); //... | true |
f9b1b34bf5790a81ba01a007d653cc3928e4fd43 | PHP | tchirktema-zz/php-ddd | /src/EventLogger/Domain/Bus/Event/EventLogEventSubscriber.php | UTF-8 | 741 | 2.734375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Cal\EventLogger\Domain\Bus\Event;
use Cal\EventLogger\Domain\EventLog;
use Cal\EventLogger\Repository\EventLoggerRepository;
use Cal\Shared\Domain\Bus\Event\Event;
use Cal\Shared\Domain\Bus\Event\EventSubscriber;
class EventLogEventSubscriber implements EventSubscriber
{
... | true |
29843fcecb2b561b1f05fb5be270805cd4162eee | PHP | jeanpul/maintenance-blueportail | /lib/BluePHP/GUI/Anchor.inc | UTF-8 | 720 | 3.296875 | 3 | [
"Apache-2.0"
] | permissive | <?php
include_once("BluePHP/GUI/Component.inc");
/**
* \class Anchor
* html href encapsulation renderable
*/
class Anchor implements Component
{
private $anchor = null;
/**
* Build the anchor string
* \param $pagename url file location for the href
* \param $label text displayed for the a tag
* \p... | true |
a88f7ba09928b836af967d07e1a03ffec5fb53d2 | PHP | saloob/Scalastica | /charting/animations/AnimationsCollection.php | UTF-8 | 3,790 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/**
* AnimationsCollection class
*
* Description: Animations Collection
*
* @author
* @copyright (c) 1995-2010 by Steema Software SL. All Rights Reserved. <info@steema.com>
* @version 1.0
* @package TeeChartPHP
* @subpackage animations
* @link http://www.steema.com
*/
class AnimationsC... | true |
bbe931b848af694020381c44f38330c1af2fa226 | PHP | Jlouvet22/php | /Exo2/index.php | UTF-8 | 360 | 2.90625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Exo2</title>
</head>
<body>
<!-- Écrire un programme qui écrit 500 fois « Je ne dois pas oublier de signer la feuille de présence. »-->
<?php
$a = 1;
while ($a <= 500) {
echo 'Je ne dois pas oublier de signer la feuille de présence.</br>';
... | true |
b72fb000a7400b8d55950eaa03fcb0e791c12632 | PHP | hedii/url-normalizer | /src/UrlNormalizerInterface.php | UTF-8 | 296 | 2.875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Hedii\UrlNormalizer;
use League\Uri\Http;
interface UrlNormalizerInterface
{
/**
* Normalize a given http uri.
*
* @param \League\Uri\Http $uri
* @return string
*/
public static function normalize(Http $uri): string;
}
| true |
75c9676f4409d3f2c067add36958f34cb6f5b27a | PHP | darthsithius/vlibrary | /zzzzz.php | UTF-8 | 867 | 2.65625 | 3 | [] | no_license | <?php
$sql=("SELECT gid,title FROM game,owns WHERE owns.uid='$m' AND (owns.gid=game.gid)");
if ($result=mysqli_query($conn,$sql))
{
// Fetch one and one row
while ($row=mysqli_fetch_row($result))
{
//$sql1="select path from imager where gid='$row[0]'";
... | true |
54654483d687fe5eba18748b77af86f551675755 | PHP | ericbutera/phpblogbattleaxe | /lib/library/baxe/Header/Pingback.php | UTF-8 | 560 | 3.015625 | 3 | [] | no_license | <?php
/**
* This will construct a pingback header.
*
* header('X-Pingback: http://example.com/xmlrpc');
*/
class baxe_Header_Pingback extends baxe_Header_Abstract {
const KEY = 'X-Pingback';
/**
* @var string
*/
private $url;
/**
* ctor
*
* @param string $url Pingback ser... | true |
266b3ebd2a6f6a6ad2facaae5b8cdd06b7a20863 | PHP | comtrident/ATT_APIPlatform_SampleApps | /RESTFul/AAB/PHP/app1/lib/AAB/ContactsResultSet.php | UTF-8 | 4,642 | 2.59375 | 3 | [] | no_license | <?php
namespace Att\Api\AAB;
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/**
* AAB Library
*
* PHP version 5.4+
*
* LICENSE: Licensed by AT&T under the 'Software Development Kit Tools
* Agreement.' 2014.
* TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTIONS:
* http://developer.att... | true |
033676b46eeae7897ccc4faaa5a807e6f8c443fd | PHP | IDuncan23/powerball-number-generator | /handles/set_numbers.php | UTF-8 | 4,500 | 2.703125 | 3 | [] | no_license | <?php
/*error_reporting(E_ALL);
ini_set('display_errors', 1);*/
require '../core.inc.php';
require './db_connect.php';
require '../class_lib.php';
//Setting and retrieving numbers for the #1 Powerball lottery set
$numberSetOne = new numbers();
$numberSetOne->set_whiteballs();
$numberSetOne->set_powerball();
$number... | true |
ef372561dab5ea381cd889e0a90670bf5d9fdab3 | PHP | guoyu07/stato-svn | /trunk/model/test/callbacks.test.php | UTF-8 | 1,366 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
class FakeRecord extends SObservable
{
public $value = 0;
public $beforeValue = Null;
public $afterValue = Null;
public $association = Null;
public function __construct()
{
$this->association = new FakeAssoc();
$this->addCallback($this->association, 'beforeSave', 'inc... | true |
14d5a5807419c7307379344707596507fd45a44c | PHP | feliking/senavex-integration | /src/tabla/TransaccionFirmada.php | UTF-8 | 2,530 | 2.546875 | 3 | [] | no_license | <?php
include_once(PATH_BASE . DS . 'config' . DS . 'Db.php');
//control de acceso
defined('_ACCESO') or die('Acceso restringido');
class TransaccionFirmada extends Db {
const TABLE = 'transaccion_firmada';
/*
public static $RELATIONS = array
(
'seguridad.evento' => array(self:: BELONGS_... | true |
f6f6f36367339ad0609e2a6e85fc8fc614c12b60 | PHP | ageremia/se26605 | /Lab4/models/corps.php | UTF-8 | 2,632 | 2.78125 | 3 | [] | no_license | <?php
function get_Corps($db) {
$sql = "Select * From corps";
$results = $db->query($sql);
return $results;
}
//function for asc and dsc
function ASC_List($db, $direction, $col) {
$sql = "Select * From corps order by $col $direction";
$results = $db->query($sql);
return $results;
}
//get corp... | true |
8a3e6674e391eb1be2c9cd656988bd46c4f428d0 | PHP | arafat-cdr/final-arafat-framework | /vendor/core/views/viewSupport.php | UTF-8 | 1,079 | 3.015625 | 3 | [] | no_license | <?php
function view($view_file, $variables = array(), $print = true)
{
# We are setting the Absulate Path here
# Using Our Predefine Variables ....
$filePath = VIEW_PATH."/".$view_file;
$output = NULL;
if( file_exists( $filePath ) ){
// ----------------------------------------------
... | true |
60268e92ab0aa7d27229a352c76bb97325cfb067 | PHP | mirovit/ionic-platform-sdk | /src/Endpoints/Traits/ListsResource.php | UTF-8 | 476 | 2.5625 | 3 | [] | no_license | <?php
namespace Mirovit\IonicPlatformSDK\Endpoints\Traits;
use Mirovit\IonicPlatformSDK\Response\Response;
trait ListsResource
{
/**
* Get all from resource.
*
* @param array $query query parameters of list request
* @return Response
*/
public function all(array $query = [])
{
... | true |
0fe19e6e6066bdf1d382bb2643acd974416f3b3b | PHP | AntoninLefevre/ProjetTutore | /classes/Category.class.php | UTF-8 | 14,113 | 3 | 3 | [] | no_license | <?php
/**
*
* Code skeleton generated by dia-uml2php5 plugin
* written by KDO kdo@zpmag.com
*/
class Category {
/**
*
* @var int
* @access public
*/
public $idCategory;
/**
*
* @var String
* @access public
*/
public $lblCategory;
/**
*
* @var int
* @access public
*/
public $idCa... | true |
37bafa92886b48360e0ead19818466aaf66078e7 | PHP | moy/unix-training | /gen-exam/php/private/stats.php | UTF-8 | 4,865 | 2.65625 | 3 | [] | no_license | <?php
define('_VALID_INCLUDE', TRUE);
chdir('..');
include_once './inc/common.php';
include_once './inc/authentication.php';
if ($mode == 'demo')
die("No stat available in demo mode");
exam_connect_maybe();
$line = get_exam_info($subject);
$count=$line["count"];
$points=$line["points"];
isset($subject) or die("FA... | true |
66c0a770db6f79b42b9d13dff7723f82bc7b38ea | PHP | jangmarker/we2 | /framework/tests/AppTest.php | UTF-8 | 1,303 | 2.578125 | 3 | [] | no_license | <?php
namespace framework\tests;
require_once("../Framework.php");
use framework\App;
use framework\Middleware;
class AppTest extends \PHPUnit_Framework_TestCase {
private $app;
function setUp() {
$this->app = new App();
}
/**
* @dataProvider data_requests
*/
function test_... | true |
932a4c0fa32e4af6874d71b7f1daa94f51cf63d8 | PHP | JustMaoshu/Web | /codoon/web/data/DB.php | UTF-8 | 585 | 2.90625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: 52968
* Date: 2016/12/1
* Time: 21:27
*/
class DB
{
private static $instance = null;
private static $sqlite ;
private function __construct(){}
public static function getInstance(){
if(self::$instance==null){
self::$instance = new DB();
... | true |
797871f027d070d33661de67c0ceeb3d774490c5 | PHP | lordcase/beforg | /namefix/fix.php | UTF-8 | 2,078 | 2.8125 | 3 | [] | no_license | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>FIX</title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
<meta http-equiv="Content... | true |
7d2f0663fe81e484fd942e4de703997d94a10812 | PHP | octalmage/wib | /php-7.3.0/ext/pdo_mysql/tests/bug46292.phpt | UTF-8 | 1,900 | 2.765625 | 3 | [
"BSD-4-Clause-UC",
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"TCL",
"ISC",
"Zlib",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"blessing",
"MIT"
] | permissive | --TEST--
Bug #46292 (PDO::setFetchMode() shouldn't requires the 2nd arg when using FETCH_CLASSTYPE)
--SKIPIF--
<?php
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc');
require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
MySQLPDOTest::skip();
?>
--FILE--
<?php
require_once(... | true |
f70835518916501c936f637b663992aa4b446d96 | PHP | darthjee/ccaa | /site/inc/bd_class.php | ISO-8859-1 | 6,215 | 2.96875 | 3 | [] | no_license | <?php
/**
* @file bd_class.php
* Classe de banco de dados @ref BDClass
*/
// no direct access
defined('_JEXEC') or die('Acesso Restrito');
?>
<?php
/**
* @brief Classe Banco de Dados
*
* Toda a comunicao com o banco de dados passa
* atraves deste objeto.
* A configuracao deste objeto exige que ele seja
* ins... | true |
ebc5f5132c4bde809a92f7126dfee5d44f0c8129 | PHP | hvhdevelop/Codegym-Module-2-PHP-hoviethung | /thuc_hanh/Stack.php | UTF-8 | 1,457 | 3.75 | 4 | [] | no_license | <?php
class Stack {
private $data = [];
private $limit = 5;
//push: đưa vào
public function push( $element ){
if( !$this->isFull() ){
array_unshift( $this->data, $element );
}else{
throw new Exception('Hộp đầy rồi !');
}
}
//pop: lấy ra
... | true |
c7774a6f463e7eda3bf3a06bbabdd1ec0f725937 | PHP | AgelxNash/modx-evo-database | /src/Interfaces/DatabaseInterface.php | UTF-8 | 3,258 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php namespace AgelxNash\Modx\Evo\Database\Interfaces;
use AgelxNash\Modx\Evo\Database\Exceptions;
interface DatabaseInterface extends ProxyInterface
{
/**
* @return mixed
*/
public function getDriver();
/**
* @param string|DriverInterface $driver
* @return DriverInterface
* @th... | true |
2b2b6eb9def0179360786a1a13fea5dd38726b33 | PHP | DAVIDPABON173/Sicatsem | /app/model/DAO/model.php | UTF-8 | 2,595 | 3.078125 | 3 | [] | no_license | <?php
/**
* Clase utilitaria para la comunicación con la base de datos.
* Esta clase será extendida por todos los modelos.
*/
class Model extends mysqli
{
/**
* Datos de conexion
*/
private $db_host ;
private $db_user ;
private $db_pass ;
private $db_name ;
private $connection;
... | true |
360bccbc1d91dc98975111dd548e0ef6fe7abe51 | PHP | lilac-gb/marketplace | /src/common/services/AdService.php | UTF-8 | 704 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace common\services;
use common\models\Ad;
use common\models\Setting;
use Yii;
class AdService
{
public static function sendNotificationEmail(Ad $model)
{
$link = Yii::$app->params['domainFrontend'] . $model->getUrl();
$publish_ad_email = Setting::getValue('publish_... | true |
70345beadfa87453650c03814cbcae4b0b00c387 | PHP | hpie/hpie | /hpseb-pension/import-pension.php | UTF-8 | 3,691 | 2.546875 | 3 | [] | no_license | <?php
include("include/header.php");
?>
<body>
<?php
include("include/links.php");
?>
<br /> <br />
<form enctype="multipart/form-data" method="post">
<table border="1" width="40%" align="center">
<tr >
<td colspan="2" align="center"><strong>Import HPSEB Pension CSV file</strong></td>
</tr>
<tr>
<t... | true |
07ad1b582ca9ddee6539690817fdb29257115c36 | PHP | mashiroalexis/LexiPHP | /app/code/middleware/autologin.php | UTF-8 | 240 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
Class Autologin {
/**
* Autologin Users
*/
public function __construct() {
$acct = Core::getModel("account/account");
if( $acct->isAuth() ) {
header("location: " . Core::getBaseUrl() . "dashboard");
exit();
}
}
} | true |
0cf3143d2db2c38f6af1faae068d8cb7cccc3479 | PHP | douglasdods/Sorteio-Loteria | /index.php | UTF-8 | 3,079 | 3.109375 | 3 | [] | no_license | <?php
/**
*
*/
class Loteria
{
private $dezenas;
private $resultados;
private $total_jogos;
private $jogos;
function __construct($dezenas, $total_jogos)
{
if($this->setAtributos('dezenas', $dezenas))
$this->setAtributos('total_jogos', $total_jogos);
else
return 'Valor informado para... | true |
6ff7744755387f143dc9708060f86ad44fb89b7e | PHP | danwdart/form | /src/Dandart/Form/Interface/AddElementInterface.php | UTF-8 | 212 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Dandart\Form\Interface;
interface AddElementInterface
{
/**
* Adds an element
*
* @return Dandart\Form;
* @author Dan Dart
**/
public function addElement(ElementAbstract $objElement);
} | true |
15de65199f270907491a99c687bd17e9f9602cd3 | PHP | S7tH/OPC_Projet8 | /tests/AppBundle/Controller/UserControllerTest.php | UTF-8 | 6,908 | 2.59375 | 3 | [] | no_license | <?php
namespace Tests\AppBundle\Controller;
use AppBundle\Entity\User;
use AppBundle\Controller\UserController;
class UserControllerTest extends AbstractControllerTest
{
public function testUserListpageIsUp()
{
/*call the request method with 2 parameters
1/ the http method 2/ the uri what we ... | true |
a26092a57ffb463f332f8f40e2506c5938e81a95 | PHP | bramvangrimberge/hq_kiosk | /views/event/index.php | UTF-8 | 3,903 | 2.5625 | 3 | [] | no_license | <?php require_once '../layout/header.php'; ?>
<?php
$service = new \Bram\DBConnection();
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$eventId = !empty($_POST['deleteEvent']) ? $_POST['deleteEvent'] : null;
if ($eventId != null) {
$service->deleteEvent($eventId);
}
}
//after delete event post t... | true |
11839988ff34feaaa67a7c86420a6929190e9f18 | PHP | sallousmane07/Esebatec_siteWeb | /config/Noppal.php | UTF-8 | 2,452 | 3.078125 | 3 | [] | no_license | <?php
namespace config;
class Noppal{
private static $tabVars=[];
//recuperation des routes dans le fichier json routes.json
private static function getRoutes(){
$json=file_get_contents("config/routes.json");
return json_decode($json);
}
//point d'entrée de notre applicat... | true |