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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
15d619e017d86b8557855366caca3c3a17a90259 | PHP | deadkash/samcms | /core/Image.php | UTF-8 | 6,556 | 2.859375 | 3 | [] | no_license | <?php
/**
* Изображения
*
* @project SamCMS
* @package Core
* @author Kash
* @date 15.06.13
* @copyright Copyright (c) 2013, Kash <deadkash@gmail.com>
*/
class Image extends Core {
/** Константы типов изображений */
const TYPE_GIF = 1;
const TYPE_JPEG = 2;
const TYPE_PNG = 3;
/**
* П... | true |
0da9c7e01e0438e6030783246ca5395a76c1187e | PHP | EuricoMazivila/SIGE_Secundaria | /Codigos_Sem_Laravel/Sige_versao_01/Dao/processa_candidato_a.php | UTF-8 | 8,145 | 2.828125 | 3 | [] | no_license | <?php
session_start();
//Para busca sem refresh da escola
if(isset($_POST['buscaescola'])){
busca();
}
//Insercao de Novo Candidato
if(isset($_POST['registar'])){
if(($_POST['nome']) && ($_POST['apelido']) &&
($_POST['datanasc']) && ($_POST['sexo'])
&... | true |
cce0f28d681cedb898d590f4464183dcf048f2fe | PHP | orignx/utility | /src/object/Container.php | UTF-8 | 327 | 2.65625 | 3 | [] | no_license | <?php
namespace orignx\utility\object;
class Container extends \ArrayObject
{
private $type;
public $data;
protected $counter;
public function __construct($type)
{
$this->type = $type;
$this->data = [];
}
public function getType()
{
$this->type;
... | true |
f24ad6f090776a31a650a335834fd269116f3610 | PHP | cosnics/cosnics | /src/Chamilo/Core/User/Storage/DataClass/Session.php | UTF-8 | 4,506 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace Chamilo\Core\User\Storage\DataClass;
use Chamilo\Core\User\Storage\DataManager;
use Chamilo\Libraries\Storage\DataClass\DataClass;
/**
* user.
*
* @author GillardMagali
*/
class Session extends DataClass
{
/**
* Session properties
*/
const PROPERTY_NAME = 'name';
const ... | true |
39c44caf6ecdee03decdc9d1c2f265be60fbc820 | PHP | infrajs/access | /Access.php | UTF-8 | 10,766 | 2.546875 | 3 | [] | no_license | <?php
namespace infrajs\access;
use infrajs\mem\Mem;
use infrajs\nostore\Nostore;
use infrajs\cache\Cache;
use infrajs\view\View;
use infrajs\path\Path;
class Access {
public static $conf = array(
"test"=>array("127.0.0.1","::1"),
"debug"=>array("127.0.0.1","::1"),
"admin"=>array('login'=>"admin", 'password'=>... | true |
04538a7fe0fe8a0ce3d12a51f0124d2f7f4b0962 | PHP | tdt/ui | /public/puttingfile.php | UTF-8 | 8,176 | 2.59375 | 3 | [] | no_license | <?php
/**
* Publishing a file on datatank
* @copyright (C) 2013 by OKFN Belgium
* @license AGPLv3
* @author Leen De Baets
* @author Jeppe Knockaert
* @author Nicolas Dierck
*/
//needed for conntecting to the client
use Guzzle\Http\Client;
//needed for the PUT request
use Guzzle\Http\Message;
use Guzzle\Http\Q... | true |
548383f461e61170621197704c6f9d08c3d5d91f | PHP | AndreyMartinenko/3101backend | /php_basics_tasks_func/22.php | UTF-8 | 474 | 2.859375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: user
* Date: 15.02.18
* Time: 14:50
*/
function isBoolType($a = -20)
{
$b = (bool)$a;
echo "число $a при переводе в булев тип изменится на $b <br/>
так как при переводе значение boolean будет = true не смотря на знак '-'(по правилам приведения типов )";
e... | true |
e90431cca5ae8ff7e781e6d22989c8a4aefb1787 | PHP | sonlc02/BaiTapPHP | /Chap-1-Basic/4-Switch-case.php | UTF-8 | 1,914 | 3.578125 | 4 | [] | no_license | <?php
$firsrtNumber = 30;
$secondNumber = 4;
$operator = '+'; // khai báo phép toán
switch($operator){
case '+':
{
$result = $firsrtNumber + $secondNumber;
break;
}
case '-':
{
$result = $firsrtNumber - $secondNumber;
break;
}
case '*':
{
$result ... | true |
6e2a72947abe2cb595226f8d8867b1db98a8d331 | PHP | Ditronian/Video-Cardz-RUs | /AppData/Controllers/UpdateUser.php | UTF-8 | 1,406 | 2.84375 | 3 | [] | no_license | <?php
include('../Models/User.php');
session_start();
//Grab email from post, and add as session variable. In practice this will be a USER object created from a DB interaction
$email = $_POST["email"];
$options = ['cost' => 12,];
$password = password_hash($_POST["password"], PASSWORD_BCRY... | true |
1a39dbeee4b4533099e4ec4d3ac2fa312dd9cb73 | PHP | Ibaia/2DAW_Ander | /DesarrolloWebEnEntornoServidor/U.D.-1/Erronka2_Azterketa_world/newCity/index.php | UTF-8 | 387 | 2.671875 | 3 | [] | no_license | <?php
include_once "../clases/cityClass.php";
if (isset($_POST['name'])) {
$name = $_POST['name'];
$code = $_POST['code'];
$population = $_POST['population'];
$city = new cityClass();
$city->addCity($name, $code, $population);
unset($city);
header("Loc... | true |
e3b7711b6d484bcf37248acaff9933f3d734dd2a | PHP | qq361834029/EDA_Htao | /YttPHP/FrameWork/Extend/Library/Correos/ERRORVALTYPE/CorreosStructERRORVALTYPE.php | UTF-8 | 2,661 | 2.90625 | 3 | [] | no_license | <?php
/**
* File for class CorreosStructERRORVALTYPE
* @package Correos
* @subpackage Structs
* @author WsdlToPhp Team <contact@wsdltophp.com>
* @version 20150429-01
* @date 2016-10-17
*/
/**
* This class stands for CorreosStructERRORVALTYPE originally named ERRORVALTYPE
* Meta informations extracted from the ... | true |
d371f8507aad837039842504c3a45e7ced5cae6a | PHP | aminatadjer/Find-Your-Translator | /User/connexion.php | UTF-8 | 307 | 2.5625 | 3 | [] | no_license | <?php
class db
{
function base()
{
$servername = "localhost";
$username = "root";
$password = "";
$db = "webproject";
// Create connection
$conn = "(".$servername.",".$username.",".$password.",".$db.")";
// Check connection
return $conn;
}
}
?> | true |
2fc38bd9488351e4b1d838fe0a343565e5b6912a | PHP | hugocica/dota2midas | /app/Helpers/DotaHelper.php | UTF-8 | 3,972 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Helpers;
Class DotaHelper {
/**
* Returns the css class of the item quality
* @param int $qualityNum
* @return string
*/
public static function getQualityCss($qualityNum = 0){
switch ($qualityNum){
case 1 :
$quality = "genuine";
... | true |
c75195e689cd31ed3d9a53b274aba383f821c528 | PHP | anedovba/homeworks | /site1/oop/oop2.php | UTF-8 | 1,756 | 3.703125 | 4 | [] | no_license | <?php
//8. Изменить область видимости свойств класса User на protected. Унаследовать от класса User классы Manager, Admin. Создать объекты менеджера и админа, задать значения для свойств объектов.
class User{
protected $login;
protected $password;
protected $email;
protected $rating=0;
protected ... | true |
66714febe9a79eacfc737444d90025aa30141f1f | PHP | vetoni/toko | /modules/checkout/models/Order.php | UTF-8 | 4,661 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\checkout\models;
use app\components\ActiveRecord;
use app\models\Currency;
use app\modules\user\models\Country;
use app\modules\user\models\User;
use Yii;
use yii\behaviors\TimestampBehavior;
/**
* This is the model class for table "{{%order}}".
*
* @property integer $id
* @property i... | true |
6f27f8a26438ae277daee03dd5474b87e6b9812f | PHP | sh00r00p/test-quest-3 | /app/views/list.php | UTF-8 | 5,235 | 2.65625 | 3 | [] | no_license | <?php
/*forming filters arrays*/
$surnames = array();
$semesters = array();
$averages = array();
$groups = array();
$group_id = array();
$group_title = array();
foreach($content as $student){
if(!in_array($student->student_surname, $surnames)) $surnames[] = $student->student_surname;
if(!in_array($student->semeste... | true |
b2e363e584c3300e3647bc21d60a1af53bdce205 | PHP | eduardosouzv/brockhampton-shoes | /api/app/model/User.php | UTF-8 | 959 | 2.875 | 3 | [] | no_license | <?php
include '../../../database/Connection.php';
class User extends Connection
{
public function registerUser($username, $password, $street, $number, $district, $state, $zip, $type)
{
$query = "INSERT INTO users(username, password, street, `number`, district, state, zip, `type`)
VALUES (:user_username,:... | true |
8eef31e57b61beeabbb3d408e3ca7070531556c6 | PHP | DanielSA123/ejerciciosphp | /Tienda/fuente/Repositorio/ProductosRepositorio.inc | UTF-8 | 1,278 | 2.859375 | 3 | [] | no_license | <?php
class ProductosRepositorio
{
public function findProductoById(int $id): object
{
$sql = "SELECT id,nombre,nombre_corto,descripcion,pvp,familia
FROM productos
WHERE id=:id";
require_once __DIR__ . '/../../core/conexionBd.inc';
try {
$con = (new Conexi... | true |
89837edf05391cb190ca7925aabd9d6de5f868b1 | PHP | Catfeeds/JingBanYun----2018-8-28------- | /Application/Common/Model/Sensitive_wordsModel.class.php | UTF-8 | 848 | 2.625 | 3 | [] | no_license | <?php
namespace Common\Model;
use Think\Model;
class Sensitive_wordsModel extends Model{
public $model='';
protected $tableName = 'sensitive_words';
public function __construct(){
parent::__construct();
$this->model=M($this->tableName);
}
/*
* 得到全部数据
*/
public f... | true |
a51dfdd0012c81e119c0226b04a9fc966423d147 | PHP | locfax/rsf | /src/Cache/Cacher.php | UTF-8 | 2,159 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Rsf\Cache;
class Cacher
{
use \Rsf\Traits\Singleton;
private $config;
private $prefix;
private $cacher;
public $enable;
public $type;
/**
* Cacher constructor.
* @param null $cacher
* @throws \Exception
*/
public function __construct($cacher = nul... | true |
1eeab662a806e51f6cd4d23fc90178f141b564f0 | PHP | flipty/hutch2 | /wp-content/plugins/mvc-theme-master/lib/MvcMenuIcons.php | UTF-8 | 16,567 | 2.546875 | 3 | [] | no_license | <?php
/**
* Adds ability to specify icons in nav menus
* @author Mat Lipe
* @since 6.21.13
*/
if( class_exists('MvcMenuIcons') ) return;
class MvcMenuIcons {
function __construct(){
//change admin menu output
add_filter( 'wp_edit_nav... | true |
2f70fc82089d225c3a3c4f23edae3791b14418d4 | PHP | kkrico/SistemaCadSystem | /classes/class-UF.php | UTF-8 | 626 | 2.734375 | 3 | [] | no_license | <?php
/**
* Enum que retorna as UF's
*
*
* @version 1.0
* @author dframos
*/
abstract class UF extends BasicEnum
{
const AC = 0;
const AL = 1;
const AP = 2;
const AM = 3;
const BA = 4;
const CE = 5;
const DF = 6;
const ES = 7;
const GO = 8;
const MA = 9;
const MG = 10;... | true |
123bbb9b85746c87aa537c81728a44eb1a7ad602 | PHP | wetrust/interconsultas | /application/controller/ProfileController.php | UTF-8 | 591 | 2.546875 | 3 | [] | no_license | <?php
class ProfileController extends Controller
{
public function __construct()
{
parent::__construct();
}
public function index()
{
$this->View->render('profile/index', array(
'users' => UserModel::getPublicProfilesOfAllUsers())
);
}
public function s... | true |
d6a929c0a35fc1b7ef3da4f9fe946b61ed7203fd | PHP | writeprovidence/companyListing | /app/Http/Controllers/MailSubscriptionController.php | UTF-8 | 804 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Newsletter;
use Illuminate\Http\Request;
use App\Models\Newsletter as DBNewsletter;
class MailSubscriptionController extends Controller
{
public function subscribe(Request $request)
{
if (! Newsletter::isSubscribed($request->email) )
{
N... | true |
f49a3a3a6fa84c849eba5ae92fe37ee09ba7c2f6 | PHP | atmdsouza/circuitos | /app/config/router.php | UTF-8 | 799 | 2.53125 | 3 | [] | no_license | <?php
//$router = $di->getRouter();
//
//$router->handle();
$router = $di->getRouter(FALSE);
// HANDLER ROTAS: Se não estiver discriminado a baixo, redirecionará para página de Erro :D
$router->notFound(array(
"controller" => "error",
"action" => "show404"
));
// Rota padrão de Erro
$router->add("/error/sho... | true |
848c5b5b51382e139c2fc517cf181f235cef31ff | PHP | RomainKasp/P3_BLOG | /models/userManager.php | UTF-8 | 1,290 | 2.84375 | 3 | [] | no_license | <?php
namespace models;
class userManager extends databaseManager
{
protected $util;
function __construct($params){
$this->util = $params['utilisateur'];
$this->connexion= $params['connexionBDD'];
}
/***************************************************************
* Requetes de selections ... | true |
961237030a6008fc8c1d1c391ab409f8cfa06b0d | PHP | madni-sadiq/PHP-MVC-Student-Teacher-Portal | /migrations/m0006_SubjectTable.php | UTF-8 | 573 | 2.6875 | 3 | [] | no_license | <?php
class m0006_SubjectTable
{
public function up()
{
$db = \app\core\Application::$app->db;
$SQL = "CREATE TABLE subject (
id INT AUTO_INCREMENT PRIMARY KEY,
email VARCHAR(255) NOT NULL,
Sname VARCHAR(255) NOT NULL,
Stime TIME(... | true |
6b8b660f0e14e1353ae804cf3b907672cf27fb69 | PHP | ddoluk/design-patterns | /src/Facade/Computer.php | UTF-8 | 226 | 2.890625 | 3 | [] | no_license | <?php
namespace Facade;
use Common\Utils;
class Computer
{
public function turnOn()
{
Utils::println('computer on');
}
public function turnOff()
{
Utils::println('computer off');
}
} | true |
592043994cc418ec97fd96dede6e240a0a8967a3 | PHP | farkhan/easy-portfolio | /models/portfolio_items_m.php | UTF-8 | 3,315 | 2.703125 | 3 | [] | no_license | <?php defined('BASEPATH') or exit('No direct script access allowed');
/**
*
* @author Farhan Khan
* @package PyroCMS
* @subpackage Easy Portfolio
* @category Module
* @copyright MIT
*
*/
class portfolio_items_m extends MY_Model {
private $folder;
public function __construct()
{
parent::__constru... | true |
ded75c2a18bab252ff95331927fda9f374728c4c | PHP | jamil2gomes/projeto-com-laravel5.8 | /matricula/app/Http/Controllers/Painel/AlunoController.php | UTF-8 | 2,816 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Painel;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\Aluno;
use App\Models\Turma;
class AlunoController extends Controller
{
private $aluno;
function __construct(Aluno $aluno){
$this->aluno = $aluno;
}
public function... | true |
53daaca5fc0275ba99505614eda42c990a58d5e5 | PHP | yiiworld/yii2-news-module | /widgets/VideoGalleryWidget.php | UTF-8 | 5,243 | 2.640625 | 3 | [] | no_license | <?php
/**
* @link http://www.diemeisterei.de/
* @copyright Copyright (c) 2014 diemeisterei GmbH, Stuttgart
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace dmstr\modules\news\widgets;
use dmstr\news\models\Video;
use dmstr... | true |
11a37024f124ad475c52af44e9764ffdf4a7658a | PHP | peantunes/CrudUtilPHP | /class/crudUtils/CrudModel.class.php | UTF-8 | 5,172 | 2.921875 | 3 | [] | no_license | <?
require_once("CrudTypes.class.php");
require_once("CrudLog.class.php");
class CrudModel{
protected $_connection_var="cConexao";
protected $_table_name=null;
protected $_auto_increment_field=null;
const INT_STATUS_DELETED = 3;
const INT_STATUS_SAVED = 2;
const INT_STATUS_LOAD = 1;
const INT_STATUS_NEW = 0;
... | true |
455694fee1b2c3283b16c2875cfda2eb2fe6858d | PHP | anibalPicazo/much-fit-api | /src/DTO/User/UserCreateDTO.php | UTF-8 | 1,753 | 2.84375 | 3 | [] | no_license | <?php
namespace App\DTO\User;
use App\DTO\DTOInterface;
use Symfony\Component\Validator\Constraints as Assert;
use JMS\Serializer\Annotation as JMSSerializer;
class UserCreateDTO implements DTOInterface
{
/**
* @Assert\NotNull()
* @JMSSerializer\Type("string")
*/
private $username;
/**
... | true |
c5993060f3f746863f424a434faea93cd104707f | PHP | bizsoftsolution/php_redcresent | /cgi-bin/sample/application/models/employeemodel.php | UTF-8 | 1,065 | 2.65625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class employeemodel extends CI_Model {
function __construct()
{
parent::__construct();
$this->load->database();
}
function add_employee($employee)
{
if($this->db->insert('employee',$employee))
{
return "SUCCESS";
}
}
function get_entries()
{
$qu... | true |
23cedde5bda85d740a107f8d6fa4718b0c3f1a60 | PHP | grawiton/simple-cms | /php/company/insertCompany.php | UTF-8 | 670 | 2.6875 | 3 | [] | no_license | <?php
include_once('../../db.php');
// Escape user inputs for security
$first_name = mysqli_real_escape_string($conn, $_POST['firstname']);
$last_name = mysqli_real_escape_string($conn, $_POST['lastname']);
$company = mysqli_real_escape_string($conn, $_POST['company']);
// attempt insert query execution
$sql ... | true |
ed3f28e799ab246588091920ec7852ec20884a3a | PHP | wigedev/FUDForum | /public/theme/_oldtwig/groupmgr.php | UTF-8 | 26,423 | 2.609375 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
/**
* copyright : (C) 2001-2011 Advanced Internet Designs Inc.
* email : forum@prohost.org
* $Id: groupmgr.php.t 5366 2011-08-26 16:14:37Z naudefj $
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as pu... | true |
2e53d1249a1080ef4ca43a051e1631dcfbddf92b | PHP | summercake/php_oop | /14_OOP_StaticMethod.php | UTF-8 | 1,106 | 3.609375 | 4 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: jack
* Date: 3/13/2018
* Time: 3:29 PM
*/
class Student
{
public $name;
private static $fee;
public function __construct($name)
{
$this -> name = $name;
}
/*
* inside class ---------------------------------> self::static_method()
... | true |
25469e2c835f38d30d70be46db3dccf927643c2c | PHP | white-bear/php-db-layer | /Cms/Db/Query/Expression/NullExpression.php | UTF-8 | 391 | 2.703125 | 3 | [] | no_license | <?php
namespace Cms\Db\Query\Expression;
/**
* sql выражение Null
*
* @author Alex Shilkin <shilkin.alexander@gmail.com>
* @package Cms\Db\Query\Expression
*/
class NullExpression extends BaseExpression
{
/**
* Приведение выражения к строковому представлению
*
* @return string
*/
public function __... | true |
af807c994dbf38eba33acde2ae82f5da974a77be | PHP | zhanguangcheng/sublime-portable | /Data/Packages/PhpNinJaManual/App/Common/Common/function.php | UTF-8 | 15,212 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | <?php
function datetime($str = 'now'){
return @date("Y-m-d H:i:s" ,strtotime( $str ));
}
//密码加密
function password($password){
$md5str=md5($password);
$salt=get_password_salt($md5str);
return hash('sha256',$md5str.$salt);
}
function get_password_salt($md5str,$d=1001){
$crc32_value = floatval(sprintf("... | true |
9c72f95b5c107bc62a7b8e4adf782e31c43b5818 | PHP | ikbel436/the-go-fever | /Voyage.php | UTF-8 | 2,584 | 2.75 | 3 | [] | no_license | <?php
class Voyage
{
private $id;
private $heureDepart;
private $heureArrive;
private $dateDepart;
private $dateArrive;
private $prix;
private $duree;
private $nbrPlace;
private $description;
private $ville;
private $idType;
function __construct($heureDe... | true |
8510612242a09205349a5c72008398a1161d2af6 | PHP | baodenho0/words-to-numbers-vietnamese | /index.php | UTF-8 | 2,805 | 3.359375 | 3 | [] | no_license | <?php
class WordsToNumbers
{
const MIX = [
'ty' => 1000000000,
'trieu' => 1000000,
'ngan' => 1000,
'nghin' => 1000,
'tram' => 100,
'muoi' => 10,
'chin' => 9,
'tam' => 8,
'bay' => 7,
'sau' => 6,
'nam' => 5,
'lam' => 5,
... | true |
15353f8167949917ab023fd5fcea7ca03ece5dc1 | PHP | api-platform/core | /tests/Behat/OpenApiContext.php | UTF-8 | 6,100 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the API Platform project.
*
* (c) Kévin Dunglas <dunglas@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace ApiPlatform\Tests\Behat;
use Behat\Behat\Con... | true |
57220be8aef07e4d918e1b8420a9aae9752a9013 | PHP | alhamdibahri/backend-bimbel-laravel | /database/migrations/2019_12_01_121405_create_chat_table.php | UTF-8 | 1,197 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateChatTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('chat', function (B... | true |
1be2eb67d131a304971181200935e1b25453f4bd | PHP | castillodacc/Ficha | /database/seeds/PoblacionesTableSeeder.php | UTF-8 | 866 | 2.578125 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class PoblacionesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
if (is_readable(storage_path('app/public/populations.json'))) {
$lines = file(storage_path('app/public/populations.js... | true |
f26f47d483419e8a27fc7b206feae6c09924a67e | PHP | joaquincamara/proyecto-terminal-JOCR | /editClinic.php | UTF-8 | 4,063 | 2.8125 | 3 | [] | no_license | <?php
require 'database.php';
$message = '';
$id = $_GET['id'];
$clinicToEditRecord = $conn ->prepare('SELECT * FROM clinic WHERE id=:id');
$clinicToEditRecord->bindParam(':id', $id,PDO::PARAM_INT);
$clinicToEditRecord->execute();
if (!empty($_POST)) {
$name = $_POST['name'];
$address = $_POST['ad... | true |
e0762947a32b8e5780398222213c27480d55c1d0 | PHP | alv1310/mid_proj | /camping_0515final_ko/cart_deleteIds.php | UTF-8 | 791 | 2.625 | 3 | [] | no_license | <?php
require_once('./db.inc.php'); //引用資料庫連線
//將所有 id 透過「,」結合在一起,例如「1,2,3」
$strIds = join(",", $_POST['chk']);
//記錄資料表刪除數量
$count = 0;
//先查詢出所有 id 資料欄位中的大頭貼檔案名稱
//在這裡刪除資料表記錄
$sqlDelete = "DELETE FROM `cartOrder` WHERE FIND_IN_SET(`cartOrderId`, ?) ";
$stmtDelte = $pdo->prepare($sqlDelete);
$stmtDelte->execute([$s... | true |
d08ca7d81c9838de665d6163710b02966192ded4 | PHP | b1706974/WebQLDKHV | /class.giangvien.php | UTF-8 | 2,791 | 2.65625 | 3 | [] | no_license | <?php
class giangvien extends database {
private $_magv;
private $_tengv;
private $_matkhau;
function __construct()
{
$this->connect();
}
/**
* @return mixed
*/
public function getMagv()
{
return $this->_magv;
}
/**
* @param... | true |
9f3c23386006ebaa6149fe813fb067f9e8b8ac97 | PHP | oscarotero/form-manager | /src/Inputs/Email.php | UTF-8 | 596 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace FormManager\Inputs;
/**
* Class representing a HTML input[type="email"] element
*/
class Email extends Input
{
protected $validators = [
'email',
'required' => 'required',
'length' => ['minlength', 'maxlength'],
'pattern' => 'pattern',
... | true |
4b9b406aca6689d60670528d084cb60ac5c3f224 | PHP | rifkirahadian/laravel-api-case | /app/Traits/Responser.php | UTF-8 | 670 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Traits;
use Validator;
trait Responser {
protected function successResponse($data, $message)
{
return response()->json(compact('message', 'data'))->send();
}
protected function badRequest($message)
{
$response = [
'error' => 'Bad Request',
'message' => $message
];
retu... | true |
c74fc19103231d9349adf40d462a3cdc8aa6fc7a | PHP | davidtran/itake1 | /console/migrations/m131109_105601_add_user_slug.php | UTF-8 | 748 | 2.59375 | 3 | [] | no_license | <?php
class m131109_105601_add_user_slug extends CDbMigration
{
public function up()
{
$this->execute('alter table {{user}} add column slug varchar(100) null;');
$userList = User::model()->findAll();
$slugMaker = new SlugMakerUtil();
foreach($userList as $user){
$slug =... | true |
41451b0619fe4d00235efb7666cc5fac883b7e0c | PHP | FaisalNahian/BlackBoard | /php/signup.php | UTF-8 | 1,110 | 2.71875 | 3 | [] | no_license | <?php
require('connect.php');
// If form submitted, insert values into the database.
if (isset($_REQUEST['username'])){
// removes backslashes
$username = stripslashes($_REQUEST['username']);
//escapes special characters in a string
$username = mysqli_real_escape_string($con,$username);
$email = str... | true |
26611b53d3db205ea8dd980845435ce939ef7dd2 | PHP | blindly/gorilla | /application/models/Bills_model.php | UTF-8 | 863 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Bills_model extends CI_Model {
public function __construct()
{
// Call the CI_Model constructor
parent::__construct();
$this->load->database();
}
public function add($params = array())
... | true |
e32a5016d74ff15f4031d4a3f58cbd287d93b152 | PHP | coeux/lingyu-meisha-jp | /server/godssenki/gmtool/cache.php | UTF-8 | 608 | 2.5625 | 3 | [] | no_license | <?
class user_data_t
{
}
class user_pro_t
{
}
class user_team_t
{
}
class user_bag_t
{
}
class user_cache_t
{
public $ud = new user_data_t();
public $up = new user_pro_t();
public $ut = new user_team_t();
public $ub = new user_bag_t();
}
class cache_t
{
static private $m_instance = null;
stati... | true |
f8783676acc8491de118fde5b1cc334208e19b56 | PHP | itlo-cms/cms | /src/helpers/Image.php | UTF-8 | 1,365 | 2.6875 | 3 | [] | no_license | <?php
/**
* @author Logachev Roman <rlogachev@itlo.ru>
* @link http://itlo.ru/
* @copyright ITLO (Infomarket)
*/
namespace itlo\cms\helpers;
use itlo\cms\components\imaging\Filter;
/**
* Class Request
* @package itlo\cms\helpers
*/
class Image
{
/**
* @return string
*/
public static function... | true |
85228e051d3c034333cfb8e204d0de14e735b50a | PHP | doyoque/sanctum-implement | /app/Http/Controllers/Auth/AuthController.php | UTF-8 | 1,818 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use App\Models\User;
use Illuminate\Support\Facades\Auth;
use \Exception;
class AuthController extends Controller
{
/**
* handle login
*
* @param Illuminate\Ht... | true |
6656d8f6d20a727545bdfb34171dcae7466e1ee2 | PHP | bijoyone/Student-ID | /verify.php | UTF-8 | 1,444 | 2.6875 | 3 | [] | no_license | <?php
session_start();
if ($_POST) {
ob_start();
$email = $_POST['email'];
$password = $_POST['password'];
if ($email == "" || isValidEmail($email) == FALSE) {
header("Location:index.php?email=" . $email . "&error=email");
exit();
} else if ($password == "") {
header("Locat... | true |
5fcb84ae4f3396ee2b5ca8dc7280512663f39195 | PHP | blesce/poker | /classes/Dealer.php | UTF-8 | 9,645 | 2.9375 | 3 | [] | no_license | <?php
class Dealer {
private $cartas;
private $mazo;
private $mesa;
public function __construct($mesa) {
$this->mazo = new Mazo(true);
$this->mesa = $mesa;
}
private function buscarColor() {
foreach($this->cartas as $carta) {
$stack[$carta->getPalo()][] = $carta;
}
foreach($stack as $palo => $ca... | true |
8ba8ffa4cd9b98688ad7d27ccb2e9451f817ed78 | PHP | StephenMiracle/greenfly-framework | /src/Greenfly/Modules/Content/Models/Content.php | UTF-8 | 2,046 | 2.625 | 3 | [] | no_license | <?php
namespace Greenfly\Modules\Content\Models;
use Greenfly\Modules\Model;
class Content extends Model
{
protected $fillable = ['name', 'type_name'];
/**
* Get all the versions associated with a content item. The data attribute will also be converted to an array.
*
* @return mixe... | true |
8809928188c7e0406a96b533b5baa2b88cad1b10 | PHP | MrJco/jmi.github.io | /ci/application/views/lihat.php | UTF-8 | 208 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <!DOCTYPE html>
<html>
<head>
<title> TEST</title>
</head>
<body>
<?php
foreach($hasil as $row){
echo $row->nim . "|".$row->nama."|".$row->email."<br>";
}?>
</body>
</html> | true |
7826172cc4d1ba186f1fa87cc3e2156f2821fa70 | PHP | vidavenel/tcgv2_bo | /tests/Models/Departement.php | UTF-8 | 643 | 2.796875 | 3 | [] | no_license | <?php
namespace Tcgv2\Bo\Test\Models;
use Tcgv2\Bo\Interfaces\DepartementInterface;
class Departement extends BaseModel implements DepartementInterface
{
private $id;
private $nom;
private $code;
public function __construct()
{
parent::__construct();
$this->id = $this->faker->r... | true |
269a989178e6acc3371751f27d46acb321070060 | PHP | Plancke/hypixel-php | /src/responses/Leaderboards.php | UTF-8 | 488 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Plancke\HypixelPHP\responses;
use Plancke\HypixelPHP\cache\CacheTimes;
use Plancke\HypixelPHP\classes\HypixelObject;
/**
* Class Leaderboards
* @package Plancke\HypixelPHP\responses
*/
class Leaderboards extends HypixelObject {
/**
* @return string
*/
public function getCacheTim... | true |
165ec123757903b945c1edf0b519efd61031264a | PHP | guillaumedelre/team-flow | /src/AppBundle/Service/Artifact/PhpunitCloverParser.php | UTF-8 | 2,244 | 2.515625 | 3 | [] | no_license | <?php
namespace AppBundle\Service\Artifact;
use AppBundle\Entity\Artifact\PhpunitClover;
use Symfony\Component\Finder\Finder;
use Symfony\Component\Serializer\Encoder\XmlEncoder;
class PhpunitCloverParser
{
/**
* @var string
*/
private $artifactPath;
/**
* @var XmlEncoder
*/
priv... | true |
eb37395c067b4d4025b6f09ebb85bfaae345cdf8 | PHP | khoa-le/shopware-production | /.gitlab-ci/tools/src/Command/GenerateChangelogCommand.php | UTF-8 | 5,678 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Shopware\CI\Command;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\ClientException;
use Shopware\CI\Service\CredentialService;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Exception\InvalidOptionException;
use Symfony\Component\Console\Input\I... | true |
cb4b7b9e7e9503281fc84051cfca9f187bb220a5 | PHP | mostafaelsayed/CafeteriaApp | /CafeteriaApp/CafeteriaApp.Backend/migration/migration-files/2018-05-13-09-22-48_addGenderAndDateOfBirthToUser.php | UTF-8 | 500 | 2.515625 | 3 | [] | no_license | <?php
require_once(__DIR__ . '/../migration-classes.php');
require_once(__DIR__ . '/../migrator.php');
$migrator = new migrator();
$up = function($conn) {
column::addColumn($conn, 'user', 'Gender', ['type' => 'int', 'not null', 'default' => 1]);
column::addColumn($conn, 'user', 'DateOfBirth', ['type' => 'date... | true |
558543c5d3ace3f967bcc91ab0761387b562a2e2 | PHP | nimmneun/m2stuff | /M2Stuff/Uri/CustomerGroups.php | UTF-8 | 1,799 | 2.609375 | 3 | [] | no_license | <?php
namespace M2Stuff\Uri;
class CustomerGroups
{
/**
* Uri to: Get customer group by group ID.
*
* @param int $id
* @return string
*/
public function getById($id)
{
return "/V1/customerGroups/{$id}";
}
/**
* Uri to: Update customer group.
*
... | true |
d8e303d901f84eea8e989fbcf09fff9c1cc1cb5f | PHP | mbehn/khali-haat-2016 | /submit.php | UTF-8 | 2,178 | 2.546875 | 3 | [] | no_license | <?php
if (isset($_GET["page"])) {
$current_page_name = $_GET["page"];
} else {
$current_page_name = "";
}
if (isset($_POST["form-email-address"])) {
$email_address = $_POST["form-email-address"];
$encrypted_email_address = md5($email_address);
$display_name = $_POST["form-email-address"];
}
else {
$email_address... | true |
8b7da678e190ced01239504a1b166eb4712d75e9 | PHP | therainmaiker/PHP7-Doc | /movies.php | UTF-8 | 522 | 2.9375 | 3 | [] | no_license | <?php
$movie =$_GET["movie"];
$actor =$_GET["actor"];
$date =$_GET["date"];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<title><?php echo $movie; ?> </title>
<h1>Information about <?php echo ... | true |
d93af0ad459f8382bf884b4b180bf75bd6ec9a00 | PHP | xingxianglong/convey | /app/Rules/Api/User/Collect.php | UTF-8 | 1,466 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Rules\Api\User;
use Illuminate\Support\Facades\Facade;
use Illuminate\Support\Facades\Validator;
class Collect extends Facade
{
/**
* @param array $data 数据
*
* @return string
*/
public function Update($data)
{
$rules = array(
'house_id' => 'ba... | true |
2ca0348ca865d8d19f67cfeb2f7656ace3a30b5e | PHP | alexwebsitemobile/websitemobilesitedesarrollo | /mu-plugins/system/includes/cache/types/class-transient.php | UTF-8 | 594 | 2.625 | 3 | [] | no_license | <?php
namespace WAPaaS\MWP\Cache\Types;
use WP_Error;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
final class Transient implements Type {
/**
* Flush the transient cache.
*
* @since 1.0.0
*
* @return int|WP_Error
*/
public static function flush() {
global $wpdb;
$result = $wpdb->query( "DELETE F... | true |
4cb8e3cf1c13009b684a6f1745da1c069f907c4e | PHP | TatuUlmanen/BankWS | /src/SoapResponseHeader.php | UTF-8 | 830 | 3.375 | 3 | [] | no_license | <?php
namespace BankWS;
/**
* SoapResponseHeader
*
* Container for the headers of an SoapResponse message. Implements iterator interface.
*/
class SoapResponseHeader implements \Iterator {
private $headers = array();
private $position = 0;
public function __set($key, $value) {
$this->headers[] = array($ke... | true |
4a18d42fd404ac3da6ca79acd979b22b18fc6598 | PHP | GoVolodya/centrasoft | /views/student.php | UTF-8 | 1,006 | 2.828125 | 3 | [] | no_license | <?php
/**
* This is view for adding new student. Also this view is render when editing students;
*
* @var $form \app\core\form\Form
* @var $this \app\core\View
* @var $model Student
*/
use app\models\Student;
use app\core\form\Form;
?>
<?php if(empty($model->errors) and empty($model->age)): ?>
<?php $this->titl... | true |
6538959121878461dacf5c618d5bd394d014f6e3 | PHP | standardebooks/web | /lib/EbookSource.php | UTF-8 | 155 | 2.859375 | 3 | [
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] | permissive | <?
class EbookSource{
public $Type;
public $Url;
public function __construct(int $type, string $url){
$this->Type = $type;
$this->Url = $url;
}
}
| true |
e4a42377f87f79d88bc90c7d7c9962fa36b75776 | PHP | mccutchen/humortree.org | /projects/lines01/original/linesA.php | UTF-8 | 754 | 2.96875 | 3 | [] | no_license | <?php
Header ("Content-type: image/png"); // tell the browser what sort of image to expect... no HTML can be output now.
if (isset($h))
$imgHeight = $h;
else
$imgHeight = 1200;
$imgWidth = 1;
$im = ImageCreate ($imgWidth, $imgHeight);
$numberOfColors = 10;
for ($i = 0; $i < $numberOfColors; $i++)
{
... | true |
39f7da77054dfb821a72ae78b981ddbf97628724 | PHP | jamescarrillo/app-php-base | /conf_app/Routes.php | UTF-8 | 2,373 | 3.015625 | 3 | [] | no_license | <?php
class Routes{
public function getResourceForContainer(){
$routes = new Routes();
//$routes = $routes->isURLValidate();
$path_resource = "view/modules/";
//VALIDAMOS SI ES UNA URL CORRECTA
if($routes->isURLValidate()){
/*CAMBIAR EL CONTEXTO DE ACUERDO AL PROYECTO. DEJAR EN <</> CUANDO ESTA ... | true |
52656af283de0d8a1982010cb16bdc799295e849 | PHP | suryamudti/multistore | /database/migrations/2015_11_04_172203_create_shops_table.php | UTF-8 | 1,280 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateShopsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('shops', function (Blueprint $table) {
$table... | true |
29def430f2ff3610101666bf320ffec9e00225cc | PHP | bigbig23/eCommerce-multi-vendors | /app/Models/Tag.php | UTF-8 | 812 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Models;
use Astrotomic\Translatable\Translatable;
use Illuminate\Database\Eloquent\Model;
class Tag extends Model
{
use Translatable;
/**
* The relations to eager load on every query.
*
* @var array
*/
protected $with = ['translations'];
/**
* The attrib... | true |
f64f3acab9f019233d635c8feffbb200183623dd | PHP | TheCypher/randomThings | /gpaCalculatorForAFriend/app/engine/calculator/calculator.class.php | UTF-8 | 1,942 | 3.015625 | 3 | [] | no_license | <?php
namespace Engine\Calculator;
/**
* Calculator
*/
class Calculator
{
/**
* @param int
* @return string
*/
public function generateTables($needRows)
{
$rows = [];
for ($i=0; $i < $needRows; $i++) {
$rows[] = '
<tr>
<td>
<div class="pull-right searc... | true |
5c6b31ce1ee831c6249904006283c9419f3c6953 | PHP | sandstormports/wordpress-sandstorm | /read-only-plugins/sqlite-integration/utilities/utility.php | UTF-8 | 38,286 | 2.890625 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer",
"GPL-2.0-only"
] | permissive | <?php
/**
* This file defines SQLiteIntegrationUtils class.
*
* @package SQLite Integration
* @author Kojima Toshiyasu
*/
/**
* This class provides global $text_domain variable and defines some utility methods.
*
*/
class SQLiteIntegrationUtils {
/**
* Varible to store textdomain string for all the plugin fi... | true |
02f5612fac5f78e21f0206f4203a709e8dac3b52 | PHP | z17/ticket-system | /ticket/application/models/model_logout.php | UTF-8 | 354 | 2.546875 | 3 | [] | no_license | <?php
class Model_Login extends Model
{
public function get_data()
{
if (!isset($_SESSION['userid']))
{
$data['message'] = "Для выхода необходимо авторизоваться";
}
else
{
session_destroy();
$data['message'] = "Выход выполнен";
}
$data['title'] = "Выход";
return $data;
}
} | true |
05fe73c354549035ba2fb317a8c4fd084ceef683 | PHP | SteveTsao/OOP | /Laravel/app/Services/Finders/FileFinderFactory.php | UTF-8 | 1,028 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: tsao
* Date: 2017/11/12
* Time: 下午 08:36
*/
namespace App\Services\Finders;
use App\Services\Configs\Config;
/**
* 備份來源工廠模式
* Class FileFinderFactory
* @author steve.tsao
* @package App\Services\Finders
*/
class FileFinderFactory
{
const InstanceNamespace = __N... | true |
f82d31e8bc994b24e287e77020c883e529c4b1a6 | PHP | belen-3010/Proyecto-Final-PHP | /class/buscar.php | UTF-8 | 1,480 | 2.640625 | 3 | [] | no_license | <?php
include "conexion.php";
//if(isset($_POST["busqueda"]))
$busqueda =mysqli_real_escape_string($conexion,$_POST['buscar']);
$consultas = "SELECT * FROM libro WHERE nombre LIKE '%$busqueda%'";
$query = mysqli_query($conexion,$consultas);
?>
<!DOCTYPE html>
<html lang="en">
<head>
... | true |
bf0010504560015210c7b1ae1575f9299cc0b995 | PHP | Ranovan7/gajahmungkur | /src/main.php | UTF-8 | 3,603 | 2.703125 | 3 | [] | no_license | <?php
use Slim\Http\Request;
use Slim\Http\Response;
// Main Route
// home
$app->get('/', function(Request $request, Response $response, $args) {
return $this->response->withRedirect('/operasi');
// return $this->view->render($response, 'main/index.html');
});
// Auth User
$app->get('/login', function(Requ... | true |
095795f4f6889017e56e6df69cfb4d2ef4afb34a | PHP | Pechynho/inizio-entry-test | /src/Service/Mailer.php | UTF-8 | 1,094 | 3.015625 | 3 | [] | no_license | <?php
namespace App\Service;
use Swift_Mailer;
use Swift_Message;
class Mailer
{
/** @var Swift_Mailer */
private $mailer;
/** @var string */
private $fromEmail;
/** @var string */
private $from;
/**
* Mailer constructor.
* @param Swift_Mailer $mailer
* @param string $fromEmail
* @param str... | true |
0b3312b81200b016e72ef4dc1870f15ef7dd5d1a | PHP | nielsfilmer/eloquent-lister | /src/NielsFilmer/EloquentLister/Factory.php | UTF-8 | 1,595 | 2.8125 | 3 | [] | no_license | <?php namespace NielsFilmer\EloquentLister;
use Illuminate\Http\Request;
use NielsFilmer\EloquentLister\Exceptions\ModelListerException;
class Factory {
/**
* @param $class
* @param $attribute
* @param callable $accessor
* @param array $options
*
* @return mixed
* @throws Mode... | true |
4054ac998b89a8ed3c18b6688c823716b70addac | PHP | RussoFaccin/slim-boilerplate | /index.php | UTF-8 | 1,692 | 2.546875 | 3 | [] | no_license | <?php
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
require 'vendor/autoload.php';
// UTILS - FUNCTIONS
require __DIR__ .'/app/utils-functions.php';
// Environment variables
$settings = require 'app/.env';
// Session
session_start();
// Settings
$sett... | true |
9513dce81aa564bb80f431e9da95efdffc66b92c | PHP | vadimobukhov/framework | /app/Core/View.php | UTF-8 | 459 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Core;
use Twig\Environment;
use Twig\Loader\FilesystemLoader;
class View
{
public function render(string $template, array $data = null)
{
$loader = new FilesystemLoader(APPPATH . '/Views/');
$twig = new Environment($loader);
if (is_null($data)) {
echo $t... | true |
3bc7136fef4dd711a1c10b5fc25eae50ad0b886a | PHP | NunoTech/correiazezito | /app/Http/Controllers/Admin/PostsController.php | UTF-8 | 2,892 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Http\Requests\PostsStoreRequest;
use App\Http\Requests\PostUpdateRequest;
use App\Models\Post;
use App\Services\Posts\PostServiceInterface;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
class PostsController extend... | true |
e9a9f26ba2ffde60a2da03f1a918369f5ba573ad | PHP | JimJLE/Symfony-unitary-and-functional-tests | /tests/unitary/02_TimeMeasureTest.php | UTF-8 | 579 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Tests\Unitary;
use PHPUnit\Framework\TestCase;
use Symfony\Component\Stopwatch\Stopwatch;
class SecondTest extends TestCase
{
public function testSecondTestUnitaire() {
$rule_001 = 'La durée d\'insertion d\'un utilisateur doit être inférieure à 6 secondes';
$stopwatch = new St... | true |
fb523653e4aaec5715627627bce4a20190fe2618 | PHP | chanchal-kumar-mandal/Hallam | /pages/individuals-vats-email-submit.php | UTF-8 | 4,128 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
header('Content-type: application/json');
/* Session Check */
session_start();
if(empty($_SESSION["username"])){
echo json_encode(array('status'=>'fail', 'message' => 'Please login'));
}else{
require_once('dbconnection.php');
$email_sent_to_individuals_ids = $_POST['individualIds'];
$email_sent_to_indiv... | true |
f708145f46a8f67c4ac039e429f58bb060e10798 | PHP | sebastianamaro/proyectofinal | /web/src/tuttifruttiweb/PlayerBundle/Entity/Player.php | UTF-8 | 2,930 | 2.75 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace tuttifruttiweb\PlayerBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Player
*
* @ORM\Table()
* @ORM\Entity
*/
class Player
{
public function set($data) {
if (!isset($data)) return;
foreach ($data AS $key => $value) {
switch ($key) {
case 'dat... | true |
c2d77860852b0d173c7122cb542ed47bfa0d7da3 | PHP | punktDe/elastic-sync | /Classes/Service/ShellCommandService.php | UTF-8 | 3,328 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace PunktDe\Elastic\Sync\Service;
/*
* (c) 2019 punkt.de GmbH - Karlsruhe, Germany - http://punkt.de
* All rights reserved.
*/
use Neos\Flow\Annotations as Flow;
use Neos\Flow\Cli\ConsoleOutput;
use PunktDe\Elastic\Sync\Configuration\PresetConfiguration;
use PunktDe\Elastic\... | true |
9316e1c4998c16e8f9ac69c9ad2d5c8ce71f2357 | PHP | SayenkoDesign/chugach-corp | /wp-content/themes/chugach-corp/template-parts/shareholder/questions.php | UTF-8 | 2,612 | 2.8125 | 3 | [] | no_license | <?php
// Shareholder - Questions
if( ! class_exists( 'Shareholder_Questions_Section' ) ) {
class Shareholder_Questions_Section extends Element_Section {
public function __construct() {
parent::__construct();
$fields = get_field( ... | true |
a2eca6f0146ae1747fa05e5492789d57db0a6769 | PHP | TacirOzdemir/IoT-Weather-Data-Logger | /PHP-Files/filter.php | UTF-8 | 1,640 | 2.84375 | 3 | [] | no_license | <?php
// If variable is set and not NULL
if(isset($_POST["from_date"], $_POST["to_date"])) {
// Start MySQL Connection
$mysqli = mysqli_connect("localhost","tacirozdemir","zgb6Epvkw0S#","tacirozd_IoT_Project");
$output = '';
// Select data between dates
$query = " SELECT * FROM Data WHERE Date BETW... | true |
23790db6e9c9c8e4020dfa34951bd32ad11a8231 | PHP | Viktor-s/f | /src/Furniture/ProductBundle/ProductRemoval/ProductRemovalChecker.php | UTF-8 | 1,853 | 2.671875 | 3 | [] | no_license | <?php
namespace Furniture\ProductBundle\ProductRemoval;
use Doctrine\ORM\EntityManagerInterface;
use Furniture\CommonBundle\RemovalChecker\Removal;
use Furniture\ProductBundle\Entity\Product;
/**
* Service for check products before remove
*/
class ProductRemovalChecker
{
/**
* @var EntityManagerInterface
... | true |
caecb01667449665d1930768b23937144d1a9ad7 | PHP | chamcham3112/CSE485_tranthicham_1851061747 | /editabout.php | UTF-8 | 2,775 | 2.53125 | 3 | [] | no_license | <!doctype html>
<html lang="en">
<head>
<title>Edit about me</title>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com... | true |
c35d55616d0e330d27f92e506eae0244b0764544 | PHP | A111ex/parser.ru | /components/NormalazePrice/vershina.php | UTF-8 | 478 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
function normalizeStrOfPrice($arStrCSV) {
$arRes = array();
$name = str_replace(array("Автошина ", "Автошины ", " LT2"), array("", "", " 2"), $arStrCSV[1]);
$arRes['name'] = "Автошина {$name}";
$price = str_replace(array(" ", "-"), array("", ","), $arStrCSV[3]);
$arRes['price'] = float... | true |
8d8c7a881d30e595e391de7956ef4a16db55cb34 | PHP | munjoki/outcome_db | /application/models/Agency_model.php | UTF-8 | 1,433 | 2.640625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
class Agency_model extends CI_Model
{
private $table;
public function __construct()
{
parent::__construct();
$this->table = "akdn_agency";
}
public function getAgency()
{
$query = $this->d... | true |
0ec6e6383977feb52ee54c0f389b7f24a1f84352 | PHP | lnd2409/MangXaHoiCTU | /app/Models/YearSemester.php | UTF-8 | 684 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class YearSemester
*
* @property int $semester_id
* @property int $school_year_id
*
* @property SchoolYear $school_year
* @property Semester $semester
*
* @package App\Models
*/
class YearSemes... | true |
2484c39e55749174be1c90227fec34f16946292c | PHP | howtolivelikehuman/UAI | /UAI/cart.php | UTF-8 | 1,497 | 2.515625 | 3 | [] | no_license | <?php
session_start();
$id = $_SESSION['usr'];
?>
<html>
<head> <meta charset = "utf-8"></head>
<body>
<?php
include ("./commons/data_conn.inc");
include( "./commons/functions.inc");
extract($_POST);
extract($_GET);
$query = "SELECT pageid FROM mypage where name = '$id'";
$result = mysqli_query($conn,$qu... | true |
4758dfdb4e19aad703d079bf66b700f5ce9218e9 | PHP | yukiweaver/laravel-app5 | /app/GenreItem.php | UTF-8 | 537 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Relations\Pivot;
class GenreItem extends Pivot
{
protected $table = 'genre_item';
public function findByGenreIds(array $genreIds)
{
$cnt = count($genreIds);
$itemIds = [];
$result = collect($this->whereIn('genre_id', $genreIds)->get... | true |