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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
d93896dda9f1ba504c978f8ccb86e51ed6c071e4 | PHP | appstract-software/magento-adapter | /Api/Data/ProductsSearchResultsInterface.php | UTF-8 | 1,144 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Appstractsoftware\MagentoAdapter\Api\Data;
interface ProductsSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface
{
/**
* Get attributes list.
*
* @return \Magento\Catalog\Api\Data\ProductInterface[]
*/
public function getItems();
/**
* Set ... | true |
cbaa1fbe4843f808687838dcad01c75c9ae106a4 | PHP | jonolsson/Saturday | /api/model.php | UTF-8 | 1,269 | 2.9375 | 3 | [] | no_license | <?php
class api_model {
public $created_at = null;
public $updated_at = null;
public $errors = null;
protected $values = array();
function __construct($params=null) {
$this->created_at = date("Y-m-d H:m:i");
$this->updated_at = date("Y-m-d H:m:i");
$this->errors = new A... | true |
cf25b5377dc62d41e2e551e2e27e3035c9b39887 | PHP | bitcrystal/bitcoinexchange-final-beta | /functions_main.php | UTF-8 | 6,103 | 2.515625 | 3 | [] | no_license | <?php
require_once('coins.php');
$GLOBALS['cp']=$my_coins->coins_names_prefix;
$GLOBALS['cp_count']=count($my_coins->coins_names_prefix);
function getTradeId($i=0, $trade_account=true)
{
if($trade_account)
$i=0;
return $GLOBALS['cp'][0+$i]."_".$GLOBALS['cp'][1+$i]."_".$GLOBALS['cp'][2+$i];
}
function security($valu... | true |
9f55a0306df60f35d82c24ca27a3cf62850c4072 | PHP | JoaoRivera/humphries | /src/Utility/helpers.php | UTF-8 | 1,916 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
if (! function_exists('env')) {
/**
* Gets the value of an environment variable. Supports boolean, empty and null.
*
* @param string $key
* @param mixed $default
*
* @return mixed
*/
function env($key, $default = null)
{
$value = getenv($key);
... | true |
8a98e6f99e364d5e0b44fdd4b9d307be5e7efb99 | PHP | acnm/acnm.org.br | /Application/Models/People.php | UTF-8 | 1,689 | 2.734375 | 3 | [] | no_license | <?php
namespace Application\Models;
class People extends Model_base {
public $id;
public $name;
public $photo;
public $birth;
public $address;
public $phone;
public $cell;
public $scholl_name;
public $mother_name;
public $cpf;
public $public_school;
public $graduation;... | true |
7f199d4b9df0c37ae02a1051e5ccb3b52af2eb2e | PHP | ilyak30/pinta | /view_cat.php | WINDOWS-1251 | 1,764 | 2.6875 | 3 | [] | no_license | <?php include("blocks/db.php");
if (isset($_GET['id'])) {$id=$_GET['id'];} else {$id=1;}
$result=mysql_query("select id,title,text,date,view from data where id='$id'", $db);
if (!$result)
{echo "<p> . : </p>";
exit(mysql_error());}
if (mysql_num_rows($result)>0)
{$myrow2=mysql_fetch_array($result);
$vi... | true |
c1a85a91e32d378e91dad19dff35412b0604a064 | PHP | ZeynepNurDilek/sakai_attendance | /course/s_courses.php | UTF-8 | 336 | 2.515625 | 3 | [] | no_license | <html>
<head>
<title></title>
</head>
<body>
<?php
session_start();
include_once 'db_functions.php';
$db = new DB_Functions();
$result = $db->getStudentCourses($_SESSION["userId"]);
while($row= mysql_fetch_array($result)){
echo $row["NAME"]. " ". $row["DATE"] ."<br>";
}
echo $_SESSION["userId"];
?>
... | true |
2d659038cb556e5852a02d37f92ebdf6e7b1fd04 | PHP | HanshenWang586/Summer2016 | /Module/includes/classes/class_AdLocation.php | UTF-8 | 890 | 2.921875 | 3 | [] | no_license | <?php
class AdLocation {
public function __construct($location_id = '') {
if (ctype_digit($location_id)) {
$db = new DatabaseQuery;
$rs = $db->execute('SELECT *
FROM ads_locations
WHERE location_id = '.$location_id);
$this->setData($rs->getRow());
}
}
public function setData($data) {
... | true |
881c8880154a734873b073646650de2f82cb505f | PHP | risyasin/s3t-skeleton | /app/src/Utils/Service.php | UTF-8 | 13,471 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* PHP version 7
*
* Created at 22/03/16 12:33 by yas
*
* @category Base
* @package App\Utils
* @author Yasin inat <risyasin@gmail.com>
* @license Apache 2.0
* @link https://www.evrima.net/slim3
*/
namespace App\Utils;
/**
* Class Service
*
* @category Base
* @package App\Utils
* @aut... | true |
2c8b8075842f473a849d2775d6a4a1843315fad9 | PHP | Codappix/search_core | /Classes/Connection/Elasticsearch/Connection.php | UTF-8 | 2,386 | 2.515625 | 3 | [] | no_license | <?php
namespace Codappix\SearchCore\Connection\Elasticsearch;
/*
* Copyright (C) 2016 Daniel Siepmann <coding@daniel-siepmann.de>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either ... | true |
d56004619d6a538df826d523565920bd944901db | PHP | SoftDeMagazin/gestiune | /app/include/models/natura_tranzactiei.php | UTF-8 | 733 | 2.578125 | 3 | [] | no_license | <?php
class NaturaTranzactiei extends Model
{
var $tbl="natura_tranzactie";
var $_relations = array(
);
var $_defaultForm = array(
);
function getByCod($cod) {
$this -> fromString("where cod = '$cod'");
}
function select_copil($selected=0) {
$nr_r = count($this);
$out = '<select name="natura_tra... | true |
7ddab7205b680e900983f481156ceb2119be342a | PHP | mishamur/localhost | /localhost/api/application/Application.php | UTF-8 | 1,505 | 2.796875 | 3 | [] | no_license | <?php
require_once('db/DB.php');
require_once('user/User.php');
class Application {
function __construct(){
$db = new DB();
$this->user = new User($db);
}
//User // User // User
public function login($params) {
if($params['login'] && $params['passwo... | true |
c446722fede0d4a23102efa73f435248fe9ca507 | PHP | mAsT3RpEE/BLW | /src/Model/MIME/AcceptRanges.php | UTF-8 | 3,101 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* AcceptRanges.php | Apr 8, 2014
*
* @filesource
* @license MIT
* @copyright Copyright (c) 2013-2018, mAsT3RpEE's Zone
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
/**
*
* @package BLW\MIME
* @version GIT: 0.2.0
* @author Wal... | true |
d2ac5e55bf49f893b12b439e88af10134cf2f027 | PHP | maynagashev/leetcode | /strings/1768-merge-strings-alternately/merge-strings.php | UTF-8 | 700 | 3.703125 | 4 | [] | no_license | <?php
class Solution {
/**
* @param String $word1
* @param String $word2
* @return String
*/
function mergeAlternately($word1, $word2) {
$w1 = str_split($word1);
$res = '';
$len1 = strlen($word1);
$len2 = strlen($word2);
$maxLen = max($len1, $len2);... | true |
b7d3655142f11b95e64d3fb127ad2c6c2a8debc1 | PHP | ArekPastuszka/coyote | /app/Services/Guest.php | UTF-8 | 1,978 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
namespace Coyote\Services;
use Coyote\Repositories\Contracts\GuestRepositoryInterface as GuestRepository;
class Guest
{
/**
* @var GuestRepository
*/
private $guest;
/**
* @var string
*/
private $guestId;
/**
* Default value is null. It means we have to retrieve s... | true |
562df2ea709e8a5fadbf4983e989e7b9759a4c91 | PHP | kereker/sample | /ajax/sample.php | UTF-8 | 558 | 2.640625 | 3 | [] | no_license | <?php
// JSONにする
header('Content-Type: application/json; charset=UTF-8');
$response = [];
// 仮にPOSTの値が何もなければ不正リクエストとして返却
if (empty($_POST)) {
$response[] = ['error' => '不正リクエストです', 'status' => 405];
echo json_encode($response, JSON_UNESCAPED_SLASHES |JSON_UNESCAPED_UNICODE);
exit();
}
// もらっ... | true |
7b9bff5ecc5a1c1cb2f1e7a055ab64ef77ff9e29 | PHP | vladmorgan876/libraryV21 | /app/Http/Controllers/ApiBooksController.php | UTF-8 | 6,293 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class ApiBooksController extends Controller
{
/**
* @OA\Get(
* path="/books",
* tags={"Library"},
* summary="Get list of books from data base",
* ope... | true |
c6798e71912f7b9311a4be9d814178cb91961c24 | PHP | AstarotHart/NotaApp | /pages/getDocentesGrupo.php | UTF-8 | 709 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
include('dbconfig.php');
include('class.user.php');
echo "Accion " . $_REQUEST['action'];
$action = $_REQUEST['action'];
$docentes = new USER();
if($action=="showAll")
{
$docentes = $docentes->Read_docente();
}
else
{
$docentes = $docentes->Read_docente_sede($action);
}
?>
<?php
if... | true |
389baf70ddead45cef7da70d579c1884869771cb | PHP | stefangrund/PersonalAPI | /modules/statuses/statuses_def.php | UTF-8 | 3,226 | 2.71875 | 3 | [] | no_license | <?php
/*
* Module: Statuses
* Gets your latest status updates from Twitter and adds them to the database.
*/
// Define Table / SQL statements for columns
function statuses_table() {
$table = array('papi_type_statuses',"
id INT AUTO_INCREMENT primary key NOT NULL,
date DATETIME NOT NULL,
status TEXT NOT NUL... | true |
d99d2f149110d5b1bdc38edc96ec4fa04b3ae98d | PHP | koziu84/ppiw | /content/_sklep/libraries/FotoJobs.php | UTF-8 | 9,408 | 2.609375 | 3 | [] | no_license | <?php
/**
* FotoJobs - zmiany fotografii
* @author zdzislaw zawada <zdzislaw.zawada@ox.pl>
* @access public
* @version 0.0.8
* @require FileJobs
* @require Trash
* @date 2005-09-14 08:20:49
*/
class FotoJobs extends FileJobs
{
var $iThumbX = 100;
var $iThumbY = 100;
var $iQuality... | true |
b7299e8ec04d5a80cd784506ca297a9bdc1e4934 | PHP | alexeyzf/asr | /billing/application/default/models/.svn/text-base/InnerDocumentModel.php.svn-base | UTF-8 | 2,990 | 2.65625 | 3 | [] | no_license | <?php
/**
* Documents
*
* @author tsalik
*/
require_once 'BaseModel.php';
require_once 'InnerDocumentFileModel.php';
class InnerDocument extends BaseModel
{
protected $_name = 'documents';
protected $_sequence = 'documents_seq';
public function getIdAndNameByOwner($owner)
{
$sql = "
... | true |
764e20b8dc1646ea753e3ff2b91ed4de0ae94a27 | PHP | dev-ian-o/ccsapp | /includes/requests/request-scrores.php | UTF-8 | 2,185 | 2.578125 | 3 | [] | no_license | <?php include('../classes/ScreeningRegistration.php');?>
<?php include('../classes/Scores.php');?>
<?php
//form name here ----------v
if(isset($_POST['next']))
{
if(!isset($_POST['filter']))
$reg = ScreeningRegistration::findByNext($_POST);
else
$reg = ScreeningRegistration::findByNext($_POST,true);
$... | true |
15fd484468ad267e68f490df2f34e2a7d343f388 | PHP | Neunerlei/container-delegate | /Classes/Instantiator/FactoryGeneratorInterface.php | UTF-8 | 2,019 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Copyright 2020 Martin Neundorfer (Neunerlei)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | true |
26959ae55c84fb77f971afcc40351866c9a3688e | PHP | tanyatt02/PHP | /DZ28/tests/ProductTest.php | UTF-8 | 3,008 | 2.578125 | 3 | [] | no_license | <?php
use app\models\entities\Product;
use PHPUnit\Framework\TestCase;
class ProductTest extends TestCase
{
protected $product;
protected function setUp():void
{
$this->product = new Product ();
}
protected function tearDown():void
{
$this->product = NULL;
}
... | true |
4cf24cdee73bbbb0595709bedc5deeafd04cf56e | PHP | e-walker74/xabina | /protected/models/users/contacts/data/Social.php | UTF-8 | 2,223 | 2.5625 | 3 | [] | no_license | <?php
/**
* The followings are the available model relations:
* @property Users_Contacts_Data_Social $contact
*/
class Users_Contacts_Data_Social extends Users_Contacts_Data_Model
{
public static $socials = array(
'fb' => 'Facebook',
//'google' => 'Google+',
'linkedin' => 'LinkedIn',
... | true |
bd80523ccf7d2eea128cb82166e59d8173cd3493 | PHP | protonet/website | /public/fileadmin/template/libs/renderChars.php | UTF-8 | 336 | 2.625 | 3 | [] | no_license | <?php
class user_renderChars {
var $cObj; // The backReference to the mother cObj object set at call time
/**
* Call it from a USER cObject with 'userFunc = user_randomImage->main_randomImage'
*/
function main($content, $conf) {
$titleParsed = str_replace(' ', '-', $conf['title']);
return $titlePa... | true |
08cb24b81a629419d8a7a7cfdae5ebdbc545f76b | PHP | vukanac/mvc-behat-phpunit | /tests/UserTest.php | UTF-8 | 3,301 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace Notepads\Tests\PHPUnit;
use Notepads\Models\User;
/**
* Class UserTests
* @package Notepads\Tests
*/
class UserTests extends BaseTestClass
{
public function testUserConstructorSetsTheCorrectData()
{
$userId = 1;
$username = "testuser1";
$password = "testpassword1";
... | true |
c11f794874ce28662bc3e3fab5fc470adb355f2e | PHP | MikhailUA/masterpos | /app/Http/Controllers/CustomerController.php | UTF-8 | 832 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Customer;
use Illuminate\Http\Request;
class CustomerController extends Controller
{
public function __construct() {
$this->middleware('auth');
}
public function index(Request $request) {
$customers = $request->user()->customers;
... | true |
1a0d0ddd53177c68f992adc8518097d62f90bda9 | PHP | wonderkun/CTF_web | /web500-6/www/vendor/cakephp/cakephp/src/Database/Log/LoggingStatement.php | UTF-8 | 4,194 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
* Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
*
* Licensed under The MIT License
* For full copyright and license information, please see the LICENSE.txt
* Redistributions of files must retain the above copyr... | true |
525f70d8fb95c4698e0a85ff69c1114d28103cd0 | PHP | Warepro/Integrador-WEB-2 | /recibir.php | UTF-8 | 946 | 2.546875 | 3 | [] | no_license | <?php
session_start();
$usuario1 = "alpaxnatural";
$servidor = "localhost";
$basededatos = "alpaxnatural";
if(isset($_POST['enviar'])){
$usuario=$_POST['usuario'];
$contra=$_POST['contra'];
$correo=$_POST['correo'];
$conexion = mysqli_connect( $servidor, $usuario1, "dc3be9bbb") or die ("No se ha podido conec... | true |
e657802f3683b9933cf728e903bb75b5f7825e87 | PHP | wikimedia/mediawiki-extensions-Video | /includes/Video.hooks.php | UTF-8 | 13,520 | 2.8125 | 3 | [] | no_license | <?php
use MediaWiki\MediaWikiServices;
use MediaWiki\Page\ProperPageIdentity;
use MediaWiki\Permissions\Authority;
/**
* Class that contains all Video extension's hooked functions.
* All functions are naturally public and static (what were you expecting?).
*
* @file
* @ingroup Extensions
*/
class VideoHooks {
... | true |
0b4b76cf1e2b77f86dcf2129a5cac4df07fd1b9a | PHP | eulogix/libs-domotics | /src/Eulogix/Lib/HikTools/email/Alert.php | UTF-8 | 2,029 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Eulogix\Lib package.
*
* (c) Eulogix <http://www.eulogix.com/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Eulogix\Lib\HikTools\email;
/**
* Parses and represents as an object a... | true |
31b49a1b097e3226aadde3f2e45e4b237d23eaa6 | PHP | 4ndersonGarcia/PWEB1 | /LISTA 1/ex1/ex2atualizado/soma.php | UTF-8 | 81 | 2.53125 | 3 | [] | no_license | <?php
$soma = array_sum($_GET);
echo ($soma > 20 ? $soma += 8 : $soma -=5);
?> | true |
934c16d23e7358df2018769c8c4db40e32550211 | PHP | PraktikumWebDasar41-02/modul6-musyahid | /registrasi.php | UTF-8 | 2,778 | 2.75 | 3 | [] | no_license | <?php
$koneksi = mysqli_connect("localhost","root","","mahasiswa");
$errorNma = "";
$errorNim = "";
if (isset($_POST["kirim"])) {
$nama = $_POST["nama"];
if (strlen($_POST['nama']) > 35) {
$errorNma = "Nama Tidak Boleh lebih dari 35";
}
$nim = $_POST["nim"];
if (!is_numeric($nim)) {
... | true |
0d180a919f95ee449f00308237a09c3581fc561d | PHP | concrete5-community/acme | /src/Entity/CertificateDomain.php | UTF-8 | 2,539 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Acme\Entity;
defined('C5_EXECUTE') or die('Access Denied.');
/**
* Joins a Certificate instance with the associated Domain instances.
*
* @Doctrine\ORM\Mapping\Entity
* @Doctrine\ORM\Mapping\Table(
* name="AcmeCertificatesDomains",
* options={"comment":"Domains associated to every certi... | true |
aa6811aed52e3ea8a1badadf18d994c745521306 | PHP | giovictor/greenville | /editborrowerprofile.php | UTF-8 | 735 | 2.53125 | 3 | [] | no_license | <?php
session_start();
require "dbconnect.php";
if(isset($_POST['lastname']) && isset($_POST['firstname']) && isset($_POST['mi']) && isset($_POST['contactnumber'])) {
$lastname = ucwords($_POST['lastname']);
$firstname = ucwords($_POST['firstname']);
$mi = $_POST['mi'];
$contactnumber = $_POST['contactnumber'];
$b... | true |
51a2f245fd414349a30558bf3e46d254de72492d | PHP | fabnicolas/videogaze-BE | /compose_chunks.php | UTF-8 | 3,175 | 2.578125 | 3 | [] | no_license | <?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, PATCH, PUT, DELETE, OPTIONS');
header('Access-Control-Allow-Headers: Origin, Content-Type, X-Auth-Token');
$config = require ("./config.php");
include ("./include/functions.php");
include ("./lib/uploader.class.php");
$c... | true |
4e914a47a592e309f82c13a22b73bd3a4781c877 | PHP | asmodeusta/asmodeusta | /usf/core/Base/Factories/ConfigHandlerStaticFactory.php | UTF-8 | 2,080 | 2.921875 | 3 | [] | no_license | <?php
namespace Usf\Base\Factories;
use Usf\Base\Interfaces\StaticFactoryInterface;
use Usf\Base\ConfigHandler;
use Usf\Base\EmptyConfigHandler;
/**
* Class ConfigHandlerFactory
* @package Usf\Core\Components\Factories
*/
class ConfigHandlerStaticFactory implements StaticFactoryInterface
{
/**
* List of ... | true |
762d570e3f642a52c0698b26232d0f71134eb85f | PHP | nfanaian/powerline-inspector | /controllers/apiController/userController.php | UTF-8 | 1,197 | 2.75 | 3 | [] | no_license | <?php
require_once('controllers/Controller.php');
/**
* API: User Controller
* This controller takes care of gathering user information
* And returning JSON with requested information
*/
class UserController extends Controller
{
public function __construct()
{
require_once("models/api/User.php");
... | true |
c419b1c39e954b9f571761e33ff88c61e0af4cdc | PHP | P79N6A/hd | /cms/app/models/Site.php | UTF-8 | 5,761 | 2.515625 | 3 | [] | no_license | <?php
use Phalcon\Mvc\Model\MetaData;
use Phalcon\Db\Column;
class Site extends Model {
const PAGE_SIZE = 50;
public function getSource() {
return 'site';
}
/**
* @param string $appid
* @return mixed
*/
public static function getByAppId($appid){
$key = D::memKey('S... | true |
42f86b27ca607d6bbaf52c282f83369afc306cdf | PHP | dmz9/insales-api | /src/Api/PaymentGateway/PaymentGatewayResponse.php | UTF-8 | 587 | 2.515625 | 3 | [] | no_license | <?php
namespace InsalesApi\Api\PaymentGateway;
use InsalesApi\Api\AbstractResponse;
use InsalesApi\Api\PaymentGateway\Partial\PaymentDeliveryVariant;
class PaymentGatewayResponse extends AbstractResponse
{
public $created_at;
public $id;
public $margin;
public $position;
public $type;
public $updated_at;
publ... | true |
a51a2abab7541caa32d950e9dce8d8429ed2db4d | PHP | garagepoort/BiblioMania | /app/service/randomfacts/RandomFactsService.php | UTF-8 | 5,424 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
class RandomFactsService
{
/** @var BookRepository $bookRepository */
private $bookRepository;
public function __construct()
{
$this->bookRepository = App::make('BookRepository');
}
public function getRandomFacts($userId){
$facts = array();
array_push($facts, $this->getBookReadYearFact('book.read... | true |
af28498cc5471c2a87f33063b485caa77471690d | PHP | JeanAcunaAlvarez/PHP-developer | /api/index.php | UTF-8 | 5,545 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
require 'Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$app = new \Slim\Slim();
$app->get('/', function () use($app) {
$cadena = file_get_contents('employees.json');
$listEmp = json_decode($cadena);
echo '<table border="0">
<tr>
<td><h1>Lista de Empleados</h1></td>
... | true |
c60eabdb860ea9e58f233485dc321152bbab1f23 | PHP | NAONAOx1126/clay_plugins | /clay_content/modules/Advertise/List.php | UTF-8 | 1,336 | 2.625 | 3 | [] | no_license | <?php
/**
* ### Content.Advertise.List
* 広告のリストを取得する。
* @param type 抽出するカテゴリのタイプ(指定しない場合は全タイプから抽出)
* @param result 結果を設定する配列のキーワード
*/
class Content_Advertise_List extends Clay_Plugin_Module{
function execute($params){
// ローダーの初期化
$loader = new Clay_Plugin("Content");
$loader->LoadSetting();
// 並べ替え順序が指... | true |
f48134c45d0bbb1c795a932a87a1777a26ccda81 | PHP | bldr-io/bldr | /src/Exception/TaskRuntimeException.php | UTF-8 | 628 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of bldr
*
* (c) Aaron Scherer <aequasi@gmail.com>
*
* This source file is subject to the license that is bundled
* with this source code in the file LICENSE
*/
namespace Bldr\Exception;
/**
* @author Aaron Scherer <aequasi@gmail.com>
*/
class TaskRuntimeException extends BldrEx... | true |
6ffc7abf4901f4f1b3e6632b6bf41e5bcfd1730c | PHP | EfrainGarcia29/HERMES | /dao/estadosDAO.php | UTF-8 | 2,030 | 2.640625 | 3 | [] | no_license | <?php
require_once('../database/conexion.php');
require_once('../model/estados.php');
/**
*
*/
class estadosDAO
{
// public function alllocalidad(){
// $db = Db::conectar();
// $localidad = [];
// $local = $db->query("SELECT * FROM localidades as lc");
// foreach ($local->fetchAll() as $lo) {
// $l=... | true |
5df6797abe98c1f128a4aed2000cbccd97c669b9 | PHP | fzh6630/ContraceptiveDT | /db_setup.php | UTF-8 | 4,898 | 2.5625 | 3 | [] | no_license | <?
echo "<br /><br /><br /><br />";
// Extend the SQLite3 class and change the __construct parameters
class MyDB extends SQLite3 {
function __construct() {
$this->open('mysqlitedb1.db');
}
}
// Use open method to initialize the DB
$db = new MyDB();
if (!$db) {
echo $db->lastErrorMsg();
}
if (isset($_POST['init... | true |
8becbe709eb4c16700e86f41ea597247060199e2 | PHP | nitrictech/php-sdk | /src/Nitric/Api/Secrets/SecretValue.php | UTF-8 | 1,435 | 2.84375 | 3 | [
"Apache-2.0",
"BSD-3-Clause",
"MIT"
] | permissive | <?php
/**
* Copyright 2021 Nitric Technologies Pty Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by ap... | true |
362b3d453ea0a7090e366a9837afdbf3a50fbc5c | PHP | ymas086/paymentchallenge | /index.php | UTF-8 | 5,404 | 2.546875 | 3 | [] | no_license | <html>
<head>
<?php
//sudo service mysql start
define('__ROOT__', dirname(dirname(__FILE__)));
//require_once(__ROOT__.'/config.php');
function getpayments(){
//get scheduled payments from db and display on home page
$dbhost = "db4free.net:3306";
$dbuser = "yusufms";
... | true |
42cfbaf50aba25dbaff152233b2ce9922ebb913a | PHP | falushko/symfony_fresh_release | /src/AppBundle/Entity/Model.php | UTF-8 | 926 | 2.59375 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity()
* @ORM\Table(name="models")
*/
class Model
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @ORM\Column(type="string", length=1000)... | true |
7f611ed029f8955f4072dd63c987d86e6eaaeb4c | PHP | Daria-Nagornova/laravel-project | /app/Models/Comment.php | UTF-8 | 719 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
class Comment extends Model
{
use HasFactory;
protected $fillable = ['text', 'post_id', 'user_id'];
public static function sav... | true |
44f897a1ddd64d7f6ba805098dfe121ecb5ae8f6 | PHP | anonymous-php/containers | /src/SettableContainerInterface.php | UTF-8 | 444 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace Anonymous\Containers;
use Psr\Container\ContainerExceptionInterface;
/**
* Interface defines method set
* @package Anonymous\Containers
* @author Anonymous PHP Developer <anonym.php@gmail.com>
*/
interface SettableContainerInterface
{
/**
* Sets the value to the container
* @param... | true |
25e514aa4b079b3ca0d6d481e2e3400e5123b7eb | PHP | jenwsn/universalbuy | /xampp/htdocs/application/models/Post_model.php | UTF-8 | 631 | 2.59375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class Post_model extends CI_Model{
public function __construct() {
parent::__construct();
}
public function post_item($file_path) {
$this->load->helper('array');
$this->load->library('session');
$six_digit_random_number = mt_rand(100000, 999999);
$path = implode(',',$file_path );
$data = array(
'prod... | true |
71904abd2fd94d2d0458504be8df179a495ba17a | PHP | jpmb0816/ITEC100-Midterm | /register.php | UTF-8 | 8,996 | 3.015625 | 3 | [] | no_license | <?php
// Website Title
include_once('website_config.php');
// Page Title
$pageTitle = 'Register';
// Initialize the session
session_start();
if ((isset($_SESSION['loggedin']) && $_SESSION['loggedin'] === true) && (isset($_SESSION['authenticated']) && $_SESSION['authenticated'] === true)) {
// Check if the user i... | true |
4411167e7665030ef3d441a79284934d42e2d1d3 | PHP | djungowski/frapi | /src/frapi/custom/Action/User_login.php | UTF-8 | 5,333 | 2.890625 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
use Score11\Frapi as Score11;
require_once CUSTOM_MODEL . DIRECTORY_SEPARATOR . 'Config.php';
require_once CUSTOM_MODEL . DIRECTORY_SEPARATOR . 'Database.php';
/**
* Action User_login
*
* Login the User
*
* @link http://getfrapi.com
* @author Frapi <frapi@getfrapi.com>
* @link /user/login
*/
class Ac... | true |
02cf7a3e9edf534f6ab5d7ae4b76e1f45f9846fb | PHP | ayoubmanie/RADEETA_BackEnd | /App/Backend/Lib/HTTPRequest.php | UTF-8 | 688 | 2.703125 | 3 | [] | no_license | <?php
namespace Lib;
class HTTPRequest extends ApplicationComponent
{
public function method()
{
return $_SERVER['REQUEST_METHOD'];
}
public function postData($key)
{
return isset($_POST[$key]) ? $_POST[$key] : null;
}
public function postExists($key)
{
retur... | true |
a7999497ba229853ff2545506812a449cd52f1f2 | PHP | 10yun/php-wechat | /src/weixin_gzh/GzhReply.php | UTF-8 | 17,116 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace shiyunSdk\weixin_gzh;
/**
* 【ctocode】 微信 - 微信自动回复类
* ============================================================================
* @author 作者 ctocode-zhw
* @version 版本 v5.7.1.20210514
* @copyright 版权所有 2015-2027,并保留所有权利。
* @link 网站地址 https://www.... | true |
26da6ce0110bbe72bad490cdca058841e0c687c2 | PHP | raymundo-erika/WEB-2-Project-Bakery-Storefront | /php/getFirstSize.php | UTF-8 | 491 | 2.578125 | 3 | [] | no_license | <?php
$xml = new DOMDocument();
$xml->load("../xml/products.xml");
$productID = $_GET["productID"];
$products = $xml->getElementsByTagName("product");
foreach($products as $product) {
if ($product->getAttribute("prodID") ==$productID) {
$size_price = $product->getElementsByTagName("size_... | true |
ffee1b8e122f30347ed55e140671357e775de082 | PHP | Snowball1020/DatabaseTest | /DataBase2/pro2index.php | UTF-8 | 1,636 | 2.71875 | 3 | [] | no_license | <?php
require 'pro2db.php';
$sql = 'SELECT * FROM members';
$statement = $db -> prepare($sql);
$statement -> execute();
$members = $statement->fetchAll(PDO::FETCH_OBJ);
?>
<?php require 'pro2header.php'; ?>
<br/>
<div class = "card-header">
<h2>Welcome to our databese!</h2>
... | true |
8b738fcc7aeca74c4bb51327a32374ba94cedf15 | PHP | raufabr/Location-based-music-player | /Server/register.php | UTF-8 | 1,990 | 3.046875 | 3 | [] | no_license | <?php
require_once('config.php');
//class to register users to database once they login to soundclass with dissertation app.
class Register{
function regUser($userID){
global $con;
$query= "INSERT IGNORE INTO `userID` (`ScID`) VALUES ('$userID')";
$result = mysqli_query($con, $query);
//if a u... | true |
3215c79163c7f22f80f20e87a8dc1ead877ba08c | PHP | mcArtemev/RedesignSC3 | /framework/shape/form/checkbox.php | UTF-8 | 1,547 | 2.796875 | 3 | [] | no_license | <?
namespace framework\shape\form;
use framework\dom\node;
class checkbox extends node
{
protected $_name = '';
protected $_value = false;
protected $_readonly = false;
public function __construct()
{
parent::__construct('input', false);
$this->getAttributes()->addAttr('type'... | true |
ddc80253b8421a9bab66363a571703b0c6effa03 | PHP | saurabhshukla123/Work | /new one 15-2-19/updated/volunteer_overseas/controllers/home.php | UTF-8 | 630 | 2.59375 | 3 | [] | no_license | <?php
class Home extends BaseController {
/**
* @author Tatvasoft
* Default method of Home controller and load header,main content,footer view.
*
*/
public function index() {
$this->load_view('header');
$this->load_model('CategoryModel');
... | true |
517e0eb7fc0350aaaffb89a15433dc84927c0f5c | PHP | dstramousov/picup | /application/libraries/up_cssmanager.php | UTF-8 | 1,623 | 2.765625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed 1');
/**
* @author
* @copyright
* @license
* @link
* @since Version 0.1
* @filesource
*/
// ------------------------------------------------------------------------
/**
*
* @subpackage Core
* @category CSS_Manager
* @author
... | true |
85fc49c366538c7588683705e1c578160621dec0 | PHP | KuzyT/halfdream | /src/General/Traits/HasRequired.php | UTF-8 | 970 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: kuzyt
* Date: 28.03.2019
*/
namespace KuzyT\Halfdream\General\Traits;
/**
* Trait HasRequired.
* Works with Options.
* @package KuzyT\Halfdream\General\Traits
*/
trait HasRequired
{
use HasOptions;
public static $constRequired = 'required';
/**
* @pa... | true |
7b3b8e9e89e4102434960b09ead2d0558e6a388c | PHP | EraYaN/RoosterEngine | /Leiden/tidy-docs.php | UTF-8 | 406 | 2.84375 | 3 | [] | no_license | <?php
$tidy = new tidy;
$config = $tidy->getConfig();
ksort($config);
foreach ($config as $opt => $val) {
if (!$doc = $tidy->getOptDoc($opt))
$doc = 'no documentation available!';
$val = ($tidy->getOpt($opt) === true) ? 'true' : $val;
$val = ($tidy->getOpt($opt) === false) ? 'false' : $val;
... | true |
f699546441a8113e23e34c1e5518f2a68bbf89ba | PHP | sajeebmahamed/php---basic | /32.php | UTF-8 | 167 | 2.609375 | 3 | [] | no_license | <!-- Write a PHP program to check whether a number is an Armstrong number or not. Return true if the number is Armstrong otherwise return false. -->
<?php
?> | true |
139755f1ad1e5a1cad7b55b53c245adcf7dfbd24 | PHP | lxngoddess5321/PHP-iCocos | /算法必备/常见算法题整理/66-moving_count/MovingCount.php | UTF-8 | 1,155 | 2.96875 | 3 | [] | no_license | <?php
function movingCount($threshold, $rows, $cols)
{
// write code here
$q = new SplQueue();
if($threshold <= 0 || $rows * $cols == 0){
return 0;
}
$q->push([0,0]);
$v = [];
$v[0][0] = 1;
$cnt = 0;
while(!$q->isEmpty()){
$t = $q->shift();
$cnt ++;
$... | true |
ceca1fb72a2220e3b16375c752974dd680535818 | PHP | silverfoxy/PHPDebloating | /web/phpMyAdmin-4.8.0.1-all-languages/libraries/classes/SystemDatabase.php | UTF-8 | 3,928 | 2.953125 | 3 | [
"GPL-2.0-only",
"GPL-2.0-or-later",
"Apache-2.0"
] | permissive | <?php
/* vim: set expandtab sw=4 ts=4 sts=4: */
/**
* hold PhpMyAdmin\SystemDatabase class
*
* @package PhpMyAdmin
*/
namespace PhpMyAdmin;
use PhpMyAdmin\DatabaseInterface;
use PhpMyAdmin\Relation;
use PhpMyAdmin\Util;
/**
* Class SystemDatabase
*
* @package PhpMyAdmin
*/
class SystemDatabase
{
/**
... | true |
88f03b7c066d96d53d7c9392666df58ad984d00c | PHP | PPredrag/Centrohem | /classes/cartDetails.php | UTF-8 | 445 | 2.75 | 3 | [] | no_license | <?php
include'connect.php';
// sta se nalzi u upitu
class Korpa{
public function korpaSadrzaj($conn){
session_start();
$sessionId = session_id();
$query ="SELECT robaid FROM orders WHERE sessionid = '$sessionId'";
$res = array();
$rw = $conn->query($query);
while($resData = mysqli_fetch_assoc($rw)){... | true |
016949f639e8f053924245ed4efd82b5a1b7a97a | PHP | DoritosKoutz/plugins-internet | /pastas/webstats/pages/leaderboard.php | UTF-8 | 2,518 | 2.65625 | 3 | [] | no_license | <?php
//require_once( '../db_con.php' );
$per_page = 50;
$p = mysql_real_escape_string(addslashes($_GET['p']));
$sort = mysql_real_escape_string(addslashes($_GET['sort']));
$mode = $_GET['mode'];
if(trim($sort) == "")
$sort = 'total_points';
if($mode == "raw"){
$per_page = 1000000000000000;
}
$sql = 'SELECT ... | true |
7ed8c899c32453f6eef647e824da35e45aace1b1 | PHP | biduletruck/jean-forteroche | /Core/Lib/App.php | UTF-8 | 2,225 | 2.859375 | 3 | [] | no_license | <?php
namespace Core\Lib;
use Core\Lib\Auth\Auth;
use Core\Lib\Auth\Session;
use Core\Lib\Router\RequestFactory;
use Core\Lib\Router\Router;
use Core\Lib\Router\RouteException\NotFoundException;
class App {
/**
* @var Router
*/
private $router;
/**
* @var RequestFactory
*/
pr... | true |
e3fa391dbb58fa50a70a1480c52bf8b3b196eb4f | PHP | chuajose/centralita | /application/controllers/api/CallCtl.php | UTF-8 | 6,388 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php defined('BASEPATH') OR exit('No direct script access allowed');
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
require APPPATH . '/controllers/api/Api.php';
/**
* CRUD for extensions
*
* This is an example of a few basic extension interaction methods you could use
* a... | true |
291b0f48aefbfc86c5fd3209182efe0a30d316a7 | PHP | nicostreri/ir-url | /app/Http/Middleware/ShortUrlMiddleware.php | UTF-8 | 605 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use Closure;
use Helpers;
class ShortUrlMiddleware
{
/**
* Run the request filter.
* Check if urlshort exist.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Cl... | true |
c36a5699df199119d773d609911b312f98840292 | PHP | Miguel-Lucena/SuperClear | /database/migrations/2020_09_10_031334_create_providers_table.php | UTF-8 | 954 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateProvidersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('providers', f... | true |
0b92ed243ed8f96c259055483372c2190f3e3733 | PHP | Saaze/core | /src/Collections/CollectionParser.php | UTF-8 | 368 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Saaze\Collections;
use Symfony\Component\Yaml\Yaml;
use Saaze\Interfaces\CollectionParserInterface;
class CollectionParser implements CollectionParserInterface
{
/**
* @param string $filePath
* @return array
*/
public function parseCollection($filePath)
{
return Yam... | true |
208097af410f2c6e6e35352089562fc4c42a234f | PHP | Mr-Method/switcher-core | /examples/database_info.php | UTF-8 | 1,454 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
require __DIR__ . "/../vendor/autoload.php";
$reader = new \SwitcherCore\Config\Reader(__DIR__ . "/../configs");
$modules = $reader->readModulesConfig();
$moduleData = [];
foreach ($modules as $module) {
$moduleData[$module->getName()] = [
'descr' => $module->getDescr(),
'arguments' => $mod... | true |
401bce8513ca1998d4e3d4a260057a33b6d929a7 | PHP | darki73/PlexMediaManager | /volumes/backend/database/migrations/2019_10_07_192015_create_indexers_torrent_links_table.php | UTF-8 | 799 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
/**
* Class CreateIndexersTorrentLinksTable
*/
class CreateIndexersTorrentLinksTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
pub... | true |
01442906164cb158995bd7b0fdff358bcf908fdf | PHP | 2001228oladipo/RGUsports | /team_manager/operations/register.php | UTF-8 | 1,806 | 2.65625 | 3 | [] | no_license | <?php
session_start();
require "../../database/database.php";
if($_SERVER["REQUEST_METHOD"] == "POST") {
if (!filter_var($_POST["email"], FILTER_VALIDATE_EMAIL)) {
$_SESSION['fail'] = 'Invalid email address';
header("location: ../signup.php");
die();
}
i... | true |
379b53645afe812526ea653cd676d7ac48f39dc4 | PHP | dalissongabriel/stu-symfony-api | /src/Helper/Factorys/EspecialidadeFactory.php | UTF-8 | 1,095 | 2.921875 | 3 | [] | no_license | <?php
namespace App\Helper\Factorys;
use App\Entity\Especialidade;
use App\Helper\Exceptions\EntityFactoryException;
use Symfony\Component\HttpFoundation\Exception\BadRequestException;
use Symfony\Component\HttpFoundation\Response;
class EspecialidadeFactory implements EntidadeFactoryInterface
{
public functi... | true |
b37b5b1d0e0b55c988edff4cd3ea7e257d80e336 | PHP | BialekM/training | /Eagles/Rezidue/AdamNowak/brudnopis.php | UTF-8 | 5,131 | 2.984375 | 3 | [] | no_license | <?php
public function execute()
{
$this->openFile();
$this->endLineCharDelete();
$this->getFileContent();
$this->variablesInMethods();
// foreach ($this->arrayFromFile as $lol) {
// echo '<br>' . $lol;
// }
echo '<br>'.$this->PrepMethodSceleton;
}... | true |
247bb332cce46c6fdb2704d0bb2116ee4cc2b75e | PHP | CesarGuzmanLopez/QuimicaUAM | /Quimica/app/q_db_pks.php | UTF-8 | 1,275 | 2.671875 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id_pks
* @property int $id_reference
* @property int $ID
* @property string $Site
* @property string $Tipo_Exp_teo
* @property float $Value
* @property int $ID_Alta
* @property string $Description
* @property User $user
* @pr... | true |
9375ee93f236567d890c7d974b1b2bdc84e2b85b | PHP | sibosendteam/bignumbers | /tests/Decimal/DecimalFromStringTest.php | UTF-8 | 4,223 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
use Sibosend\BigNumbers\Decimal as Decimal;
use PHPUnit\Framework\TestCase;
date_default_timezone_set('UTC');
class DecimalFromStringTest extends TestCase
{
public function testNegativeSimpleString()
{
$n1 = Decimal::create('-1');
$n2 = Decimal::create('-1.0');
$this->assertTru... | true |
0bf02c6f81bc8a441444cb2a0598ad632bc3c57c | PHP | Omrani-Mahmoud/CrowdFunding-BackEnd | /src/AppBundle/Repository/UserRepository.php | UTF-8 | 588 | 2.515625 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace AppBundle\Repository;
/**
* UserRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class UserRepository extends \Doctrine\ORM\EntityRepository
{
public function getNbClick($id){
$conn = $this->getEntityManager()->getConnecti... | true |
08efda8dda9930041787fb8f2ca5ac4c8944c819 | PHP | Shruubi/5eQuickMonster | /tools/process_traits.php | UTF-8 | 800 | 2.921875 | 3 | [] | no_license | <?php
define('TRAITS_REF_FILE_PATH', __DIR__ . '/../resources/references/traits.txt');
$fp = fopen(TRAITS_REF_FILE_PATH, 'r');
$buffer = [];
if($fp) {
while(($line = trim(fgets($fp))) !== false) {
if(feof($fp)) { break; }
$len = strlen($line);
for($i = $len - 1; $i > -1; $i--) {
if($line[$i] === "(") {
... | true |
0a10017d805cdc640e757f911f71e5d29e01acc1 | PHP | petersokol4/TaskMag | /build/resources/src/scripts/updateComment.php | UTF-8 | 1,692 | 2.828125 | 3 | [] | no_license | <?php
session_start();
require_once(__DIR__ . "/../controllers/CommentController.php");
$commentController = new CommentController();
if (isset($_POST["idComment"]) && isset($_SESSION["user"]["id"])) {
// errors array
$messages = array();
//check inputs length
// check if inputs are empty -> add ... | true |
3e5745eeb837089da1127f39117ca5b55a698357 | PHP | silktide/syringe | /src/ContainerBuilder.php | UTF-8 | 4,521 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Silktide\Syringe;
use Pimple\Container;
use ProxyManager\Factory\LazyLoadingValueHolderFactory;
class ContainerBuilder
{
/**
* Default class name for the container
*/
const DEFAULT_CONTAINER_CLASS = Container::class;
private $lazyLoadingValueHolderFactory;
public function ... | true |
67b353aca41b708fb997c96bcb184fa024066dec | PHP | carlhuth/jphp | /jphp-core/tests/resources/type_hinting/array.php | UTF-8 | 286 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | --TEST--
Test array type hinting
--FILE--
<?php
function test(array $x, array $y){
}
test(array(), 1);
--EXPECTF--
Recoverable error: Argument 2 passed to test() must be of the type array, integer given, called in %s on line 7, position %d and defined in %s on line 3, position %d
| true |
f6f9b1f15be67fe7c47ccf3060491886d7308d05 | PHP | MarkoLazovic15/WebAplication | /VozniPark/modeli/VozaciModel.php | UTF-8 | 2,533 | 3.09375 | 3 | [] | no_license | <?php
class VozaciModel{
private $data;
private $bp;
function __construct(DatabaseConn &$dbc){
$this->bp = $dbc->getConnection();
$this->data = array();
}
public function getAllDrivers():array{
$rezultat = mysqli_query($this->bp,
"SELECT... | true |
6c34056ff6d5dca39fa202130631c190093473ba | PHP | DvLucas/Practico_NOE | /database/seeds/UsersTableSeeder.php | UTF-8 | 490 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use App\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\Hash;
class UsersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$users = [
['name' => 'admin', 'surname' => 'admin','password' ... | true |
b6df8ccc19d12cd8cdd2001d3a56a459c1fa80b4 | PHP | mariafmr/aplicativo | /app/Http/Functions.php | UTF-8 | 897 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
function getTypeArray(){
$a =
[
'0' => 'Amenazas de tipo natural',
'1' => 'Amenazas de tipo antropico',
'2' => 'Amenazas de tipo ambiental',
'3' => 'otra',
];
return $a;
}
function getSubTypeArray(){
$b =
[
'0' => 'Amenazas de tipo tecnológicas ',
... | true |
b2942566f85d5e40e20b18f1796836e8d16d8d07 | PHP | mtoensing/remove-links-and-urls-from-comments | /remove-links-and-urls-from-comments.php | UTF-8 | 1,639 | 2.640625 | 3 | [] | no_license | <?php
/*
Plugin Name: Remove links and URLs from comment text
Plugin URI: https://marc.tv
Description: A simple plugin that removes all urls from Wordpress comments after 30 days.
Version: 1.9
Author: MarcDK
Author URI: https://marc.tv
GitHub Plugin URI: mtoensing/remove-links-and-urls-from-comments
*/
const DELAY = '... | true |
7104c664e552164aab40756b9f75bc9906fa0fed | PHP | cedricvasset/phppart7exe5 | /indexCtrl.php | UTF-8 | 1,369 | 3.125 | 3 | [] | no_license | <?php
/* SI firstname existe ,si il n est pas vide,et que la regex est ok,on crée la variable avec sa concatenation.
Si firstname exite et la regex n 'est pas ok,on crée un message d erreur.
SI le champs et vide on crée un autre message d erreur.' */
if (isset($_POST['firstname']))
{
if (!empty($_POST['firstna... | true |
e778f6e7c5b8d0ebc459cda825f67263416621c6 | PHP | mrtesla007/Telegram-bot-php | /HBOT/TelegramSpecial/Input/Upline.php | UTF-8 | 2,478 | 2.59375 | 3 | [] | no_license | <?php
namespace HBOT\TelegramSpecial\Input;
use HBOT\DB\Database;
use HBOT\TelegramSpecial\Systemic\States;
use HBOT\TelegramSpecial\Input\Error;
use HBOT\TelegramAPI\TelegramMain;
use HBOT\TelegramAPI\Methods\SendMessage;
class Upline
{
private $curComm;
private $chat_id;
function __cons... | true |
187c8743d30afccb727648d7a330dd2e680b37f1 | PHP | MerimaCisija/Webstore | /WT - Projektni zadatak 4/Web Server/DobaviNovosti.php | UTF-8 | 941 | 2.921875 | 3 | [] | no_license | <?php
$novosti = array();
$brojac = 0;
$konekcija = new mysqli("localhost", "root", "", "eboutique");
$konekcija->set_charset("utf8");
if ($konekcija->connect_error) {
die("Nemoguće se povezati sa bazom!" . $konekcija->connect_error);
}
if ($_GET["id"] === "*")
{
$sql = "SELECT * FROM novosti n";
$rezulta... | true |
371e498a2d55e0d5654303c9f91f0d12a9ab4548 | PHP | chusmanhaider/carrius | /Dashboard/signUpDealer.php | UTF-8 | 2,085 | 2.515625 | 3 | [] | no_license | <?php
require_once '../db_connect.php';
if($_POST)
{
// Basic Information
$d_firstName = mysqli_real_escape_string($connect, $_POST['fname']);
$firstName = trim(preg_replace('/\s+/', ' ', $d_firstName));
$d_lastName = mysqli_real_escape_string($connect, $_POST['lname']);
$lastName = trim(preg_replace('... | true |
3b5431eae28d5bf0cf5de4ba441a2590e4600035 | PHP | jkulak/hhbd-website | /app/application/models/Rating/Api.php | UTF-8 | 981 | 2.65625 | 3 | [] | no_license | <?php
/**
* Album Api
*
* @author Kuba
* @version $Id$
* @copyright __MyCompanyName__, 12 October, 2010
* @package hhbd
**/
// extends Api
class Model_Rating_Api extends Jkl_Model_Api
{
static private $_instance;
/**
* Singleton instance
*
* @return Model_Rating_Api
*/
public static fun... | true |
2f89a3c7ec8089a8da1f762c013a31442bceeffc | PHP | mario-deluna/Tattoo | /src/Token.php | UTF-8 | 2,090 | 3.6875 | 4 | [
"MIT"
] | permissive | <?php namespace Tattoo;
/**
* Tattoo token
**
* @package Tattoo
* @copyright 2015 Mario Döring
*/
class Token
{
/**
* The type of this token
*
* @var string
*/
public $type = null;
/**
* The value of this token
*
* @var int
*/
public ... | true |
82384de77995c27064abe91011325099562b9f12 | PHP | vanikaipsandy982/KP_Kompetensi_Mahasiswa | /database/seeders/Pengelompokan.php | UTF-8 | 1,041 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use phpDocumentor\Reflection\Types\Nullable;
class Pengelompokan extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$data=[
[
'nama_kelompok'=>'tes... | true |
e7ba683094e36cdf94e5b1a4aaa474b0b2251934 | PHP | byLeander/AutoSmelter | /src/byLeander/AutoSmelter/Main.php | UTF-8 | 1,667 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace byLeander\AutoSmelter;
use pocketmine\event\block\BlockBreakEvent;
use pocketmine\plugin\PluginBase;
use pocketmine\Server;
use pocketmine\item\Item;
use pocketmine\block\Block;
use pocketmine\Player;
use pocketmine\inventory\Inventory;
use pocketmine\event\Listener;
use pocketmine\math\Vector3;
use p... | true |
4152ed0adf9d2411e6049008e5c7e3a2a794041b | PHP | helsingborg-stad/algolia-index | /source/php/Index.Test.php | UTF-8 | 4,248 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
use \AlgoliaIndex\Index as Index;
class IndexTest extends WP_UnitTestCase
{
private $targetTestClass = null;
public function set_up()
{
$this->targetTestClass = new Index(false);
}
public function invokeMethod(&$object, $methodName, array $parameters = array())
{
$reflection = new \Re... | true |