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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ae45f1407a2e4cf8e13a8dacd63f2bbceb7d4d44 | PHP | UCL/RC-ApplicationForms | /classes/publication.php | UTF-8 | 4,177 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
include_once "includes/config.php";
/**
* The Publication class handles the storage of information about user publications, shockingly.
*
* It represents either a current or future entry in the Publications table of the database.
*/
class Publication {
// db fields
private $id;
private $user_pro... | true |
7bfce8eca23fe7dde1e52b5e2c5ff8489bdba556 | PHP | dicrtarasov/yii2-roistat | /src/callback/ClientEntity.php | UTF-8 | 1,405 | 2.578125 | 3 | [] | no_license | <?php
/*
* @copyright 2019-2020 Dicr http://dicr.org
* @author Igor A Tarasov <develop@dicr.org>
* @license MIT
* @version 30.10.20 21:09:08
*/
declare(strict_types = 1);
namespace dicr\roistat\callback;
use dicr\json\JsonEntity;
use function array_merge;
/**
* Информация о клиенте CRM.
*/
class ClientEntity... | true |
d521a4cd0ba6e3881e4172873c1ef82b78a3a788 | PHP | Jorsek/easyDITA-Knowledge-Portal | /easydita-knowledge-portal/template-parts/toc.php | UTF-8 | 4,821 | 2.640625 | 3 | [] | no_license | <?php
/**
* Template part for displaying table of contents.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package easydita_knowledge_portal
*
*/
function show_subsections_in_toc($page_id, $subsections) {
?>
<div style="overflow:hidden;" page-id="<?php echo $page_id; ?>" class="closed">
<ul... | true |
219cfba8988820173685f8c480b800d9c669a811 | PHP | nagukotta/Php-interview-Qus | /arrays/in_array.php | UTF-8 | 128 | 2.796875 | 3 | [] | no_license | <?php
$arr=array("sekhar","raj","vamsee");
if(in_array("raj",$arr))
{
echo "the element is there";
}
else
{
echo "sorry";
}
?> | true |
a87d7ed36f0661f4daec65e8c8b5731d3ed75259 | PHP | theolymp/diem | /dmFrontPlugin/lib/view/html/widget/dmFrontWidgetRenderer.php | UTF-8 | 2,282 | 2.625 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
class dmFrontWidgetRenderer
{
protected
$dispatcher,
$serviceContainer,
$widget,
$widgetView,
$isRendered,
$html,
$stylesheets,
$javascripts;
public function __construct(sfEventDispatcher $dispatcher, dmFrontBaseServiceContainer $serviceContainer, $widget)
{
$this->dispatcher =... | true |
20fb5e3880390e6c510589bc6110fc5118cecda5 | PHP | lailosus/playmarket3 | /www/html/library/ecc/vendor/bitwasp/bitcoin/src/Script/Factory/OutputScriptFactory.php | UTF-8 | 3,084 | 2.78125 | 3 | [
"Unlicense"
] | permissive | <?php
namespace BitWasp\Bitcoin\Script\Factory;
use BitWasp\Bitcoin\Address\AddressInterface;
use BitWasp\Bitcoin\Address\ScriptHashAddress;
use BitWasp\Bitcoin\Crypto\EcAdapter\Key\PublicKeyInterface;
use BitWasp\Bitcoin\Script\Classifier\OutputClassifier;
use BitWasp\Bitcoin\Script\Opcodes;
use BitWasp\Bitcoin\Scri... | true |
ea75cc67caf45ec37fd1b679ca14a43d5bca7ca4 | PHP | henrytranvan/advanced-query | /src/Sort/Sort.php | UTF-8 | 2,787 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Phatnt99\AdvancedQuery\Sort;
use Phatnt99\AdvancedQuery\Enums\SortDirection;
use Phatnt99\AdvancedQuery\Traits\HasAllowAttributes;
use Phatnt99\AdvancedQuery\Traits\HasCustomQuery;
/*
* Sort by column and their direction -OK
* Default sort -OK
* Advanced sort -NOT REQUIREMENT
* Custom ordering in... | true |
8d4ce4633c8b9d786f04ae22af2d3d98369dbd2f | PHP | 4iwi33/Traning | /All/regual_expression/preg_m_all.php | UTF-8 | 617 | 3.296875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>preg_m_all</title>
</head>
<body>
<?php
$str = "test 46 string mest 694 test test 5863";
//символ"\d" находит первую цифру
//символ"\d+" находит пер... | true |
f78e2b2fe5072b9829e4848fbc1c8497600be904 | PHP | francosi/mon-jardin-dans-ma-rue | /webapp/catchTrigger.php | UTF-8 | 3,797 | 2.8125 | 3 | [] | no_license | <?php
$body=rawurldecode(file_get_contents("php://input"));
if($body != null){
//parser le json
$trigger = json_decode(substr($body,5));
$id = null;
$value = null;
$latitude = null;
$longitude = null;
$date = null;
// test si l'id a bien été renseigné
if($trigger->{'environment'}->{'id'}!=null)... | true |
46e533ca0972cf4c03b2b827a69983abc47ecffd | PHP | Ravneetbajwa/QuizApp | /QuizApp (2)/QuizApp/User/demo1.php | UTF-8 | 5,225 | 2.578125 | 3 | [] | no_license | <!DOCTYPE html>
<?php
include_once './Header.php';
date_default_timezone_set('America/Toronto');
$now = date('H:i:s');
$_SESSION['now'] = $now;
if (isset($_GET['testno'])) {
$sql = "Select status from results where user=? and test=?";
$stmt = $conn->prepare($sql);
$stmt->bindParam(1, $_SESSION['User_email... | true |
ccad9195279b3ba4519d4ca42a66bdc6eed540a9 | PHP | liuxisong/afterpay-prestashop-1.7 | /afterpay/AfterpaySDK/code/Afterpay/Validation/StringValidator.php | UTF-8 | 2,580 | 3.015625 | 3 | [] | no_license | <?php
namespace Afterpay\Validation;
/**
* Class StringValidator
*
* @package Afterpay\Validation
*/
class StringValidator
{
/**
* Helper method for validating address fields
*
* @param mixed $argument
* @param string|null $argumentName
* @return bool
*/
public static function validate($key, $value = nu... | true |
c13f5645f8cfbeb6cff70627731f5353edc35eda | PHP | leonardoleal/gestorImobiliario | /web/application/controllers/manager/statistics.php | UTF-8 | 3,300 | 2.65625 | 3 | [] | no_license | <?php if ( ! defined( 'BASEPATH' ) ) exit( 'No direct script access allowed' );
class Statistics extends CI_Controller
{
public $url;
public function __construct()
{
parent::__construct();
$this->load->library( 'messages' );
$this->url = base_url() . $this->config->item( 'manager_uri' );
//
// verif... | true |
692364225c4ba50dde8667a21058e846aacfb252 | PHP | rmolodyko/api-test | /src/AppBundle/Entity/User.php | UTF-8 | 3,104 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\ORM\Mapping as ORM;
use FOS\UserBundle\Model\User as BaseUser;
use FOS\UserBundle\Model\UserInterface;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Enti... | true |
7f66bc0207b84b076f5c22de2cfaf9bc64bcfa65 | PHP | shooter0106/php-ircdaemon | /src/entities/Channel.php | UTF-8 | 1,713 | 3.421875 | 3 | [] | no_license | <?php
namespace IRCPHP\Entities;
class Channel
{
private $channelName = '';
private $_topic = '';
private $_users = [];
private $_usersCount = 0;
private $_modes = ['n', 'r'];
/**
* Channel constructor.
*
* @param string $channelName
*/
public function __construct(string $channelName)
{
$this->chan... | true |
03b1db8bba561af4d8c0384ce5ca4091dad39604 | PHP | magosdominus/PortfolioWebsite | /Dating Website - Custom Framework, PHP/Live - Backup 12-07-2015/location_selection.php | UTF-8 | 4,760 | 2.625 | 3 | [] | no_license | <?php
/*
Name:Maitri Gemlawala, Matthew Cormier, Gurpreet Maan
WEDE3201
Date: 11/4/2015
Description: This page will generate a list of locations as checkboxes. The user selects the locations they want to
search for and then the page redirects the user back to the search page.
*/
$title="WEDE3201 - L... | true |
2eef576ee05ebd638791815168e4b6c8f1db6d13 | PHP | standrewscollege2018/2020-year-11-web-design-classwork-kanyesouthwest | /Practice Website/respond2.php | UTF-8 | 436 | 2.828125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Response</title>
</head>
<body>
<?php
$mynumber = $_GET ['number'];
if ($mynumber == rand(1,3)) {
echo "Safe again, Choose another door"; ?>
<p><a href="respond3.php?number=1">Left Door</a>
<a hre... | true |
ad49c9c412ca8de00d382353ec60cedc5b3ddff2 | PHP | lennyRaff/symfonyOOP | /oop/src/AppBundle/Repository/UserRepository.php | UTF-8 | 695 | 2.625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace AppBundle\Repository;
use Doctrine\ORM\EntityRepository;
use AppBundle\Entity\User;
class UserRepository extends EntityRepository
{
public function getLogin($em, $fields)
{
$user = $em->getRepository('AppBundle:User')->findOneBy(array('email' => $fields['email']));
if( is_nul... | true |
e34bbb982d25235a0ab7602260d98596da8b68d6 | PHP | sabineleydier/Smoothie | /application/models/DeleteModel.class.php | UTF-8 | 558 | 2.703125 | 3 | [] | no_license | <?php
class DeleteModel
{
//fonction pour créer un favoris
public function delete($user_Id, $recette_Id)
{
$sql = 'DELETE FROM `Recetteline` WHERE `User_Id` = ? AND Recette_Id = ?';
// Insertion du favoris dans la base de données.
$database = new Database();
$database->executeSql($... | true |
5456b31135ac2a128f2cec453a33b65ec88e38d2 | PHP | void-sector/custom-mvc-pet-project | /library/App/Layout.php | UTF-8 | 1,322 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
class Layout extends View
{
/**
* Path to templates
* @var string
*/
protected $templatePath = 'layouts';
/**
* Default Layout template
* @var string
*/
private $template = 'default';
/**
* Placeholder for the View Ob... | true |
448b96e4e184df4f248e01624072def151febfda | PHP | rhertzog/tuleap | /tools/fusionforge_compatibility/src/common/include/PFO-RBAC.interface.php | UTF-8 | 4,553 | 2.65625 | 3 | [] | no_license | <?php
/**
* API for role-based access control
* Defined at Planetforge.org
*
* Copyright 2010, Roland Mas
*
* This file is part of FusionForge. FusionForge 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
* Founda... | true |
9a9e1e1b9c63f5be418651406aeab8bc18f825b0 | PHP | ctiborv/spitzen-wein.ch | /include/classes/exceptions/template_invalid_argument_exception.class.php | UTF-8 | 232 | 2.625 | 3 | [] | no_license | <?php
class Template_Invalid_Argument_Exception extends Template_Exception
{
public function __construct($name, $value, $subcode = 2)
{
parent::__construct("Invalid value of template argument '$name': $value", $subcode);
}
}
?> | true |
b5a27ee2f8073996482dde1683477baefb1a4623 | PHP | uaoleg/icpc.org.ua | /common/ext/Mail/Mail.php | UTF-8 | 549 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace common\ext\Mail;
\yii::import('common.lib.YiiMail.YiiMail');
class Mail extends \YiiMail
{
/**
* Path to the message layout file
* @var string
*/
public $layoutPath;
/**
* Check if given email is unsubscribed
*
* @param string $email
* @return bool
... | true |
8d8fb040c0316032117c6f943fc3a7d6340d9d20 | PHP | MaritzaHC/proyectoSchoolShop | /alumno/php/base/historial.php | UTF-8 | 8,488 | 2.53125 | 3 | [] | no_license | <?php
include 'consultasProductos.php';
function compras()
{
$uu = @$_SESSION['username'];
settype($uu,'integer');
$x = array();
$x = @historialMisCompras($uu,1);
foreach ($x as $are) {
$titulo = $are['titulo'];
$precio = $are['precio'];
$id = $are['idProductos'];
$foto = $are['foto'].".jpg";
if($are['... | true |
26fd3a9f45eb1aed7b8edcf3c26c41cb93e0c579 | PHP | globeestate11/estate_sprint_4 | /application/models/estate/networks_model.php | UTF-8 | 1,944 | 2.78125 | 3 | [] | no_license | <?php
class Networks_model extends CI_Model
{
function __construct()
{
parent::__construct();
}
/**
* Get Network Number Prefixes Information.
*
* @param string network (required) - Ex ( Globe, Smart )
* @param string what (optional) - specify the fields needed
* @return array
*/
function check... | true |
7232b2965f847f493dee13f302c360d21d744979 | PHP | anademetrio/inventorysystem | /App/Controllers/InventoryController.php | UTF-8 | 2,813 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Controllers;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use App\DAO\InventoriesDAO;
use App\Models\InventoriesModel;
final class InventoryController {
protected $DAO;
protected $model;
public function __construct()
... | true |
74fb28b1a8fbe3bb13e3ee3fce50fe02d4907805 | PHP | sarahSamonte/umtdb | /application/models/Users_Model.php | UTF-8 | 2,114 | 2.515625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Users_Model extends CI_Model{
function getUserInfo($userID){
$query = $this->db->get_where('users', array('userID' => $userID));
return $query->result_array();
}
public function login($data){
$condition = "username =" . "'" . $data['username'] . "'";
$this->db->select('*');
$this-... | true |
6d61ccfe9be9ef3952c7821d54d074f1f3f64367 | PHP | ayanmukhi/angular-website | /src/assets/slim/src/config/duplicate.php | UTF-8 | 1,021 | 2.78125 | 3 | [] | no_license | <?php
namespace config;
use config\connection as dbconnect;
use PDO;
class duplicate
{
public function checkemail($email)
{
$dbobj = new dbconnect\dbconnection();
$conn = $dbobj->connect();
$stmt = $conn->prepare("SELECT sic FROM student WHERE email = :email");
$stmt->bindP... | true |
e85f8b67a52dd42a1d8097a1f25bacbb02ba573f | PHP | tomyqg/knxBase | /lib/mod/Calc_None.php | UTF-8 | 1,400 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Calc.php Base class for Customer Order (Calc)
*
* @author Karl-Heinz Welter <karl@modis-gmbh.eu>
* @version 0.1
* @package Application
*/
/**
* Calc - User-Level Class for usage by the application
*
* This class acts as an interface towards the automatically generated BCalc which should
* not be ... | true |
6d48fc82fe572246211dec6114e3cfd9a2c52c72 | PHP | chinawang/Drainage | /drainage/app/Http/Controllers/Station/StationController.php | UTF-8 | 15,511 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Station;
use App\Http\Logic\Employee\EmployeeLogic;
use App\Http\Logic\Log\LogLogic;
use App\Http\Logic\Station\StationEmployeeLogic;
use App\Http\Logic\Station\StationLogic;
use App\Http\Validations\Station\StationEmployeeValidation;
use App\Http\Validations\Station\StationValida... | true |
10cacdf53c8338ffe0b25464a6a75f17569c00e7 | PHP | linhanwei/chezubao | /data/model/fund.model.php | UTF-8 | 730 | 2.734375 | 3 | [] | no_license | <?php
/**
* 合粉公益
*
*
*
*
*/
defined('InSystem') or exit('Access Invalid!');
class fundModel{
/**
* 查询所有系统文章
*/
public function getList(){
$param = array(
'table' => 'fund'
);
return Db::select($param);
}
/**
* 根据编号查询一条
* @param $id
* @return array
... | true |
647c7bd2780945a0647e02d4640f9f81be32ea70 | PHP | Magnacarter/mbbc | /includes/cws-custom-functions.php | UTF-8 | 4,744 | 3.03125 | 3 | [] | no_license | <?php
/**
* CWS Custom Functions
*/
/**
* Get featured image url
*
* @return $image_url string
*/
function cws_get_image_url() {
global $post;
$thumbnail_url = wp_get_attachment_thumb_url( get_post_thumbnail_id( $post->ID ) );
$image_url = print( $thumbnail_url );
return $image_url;
}
/**
* Grab ca... | true |
548cb5afbdea6cbff955bb0bc56b4338291a5f10 | PHP | jeffsocal/proxy-sci | /src/functions/math/arrays/array_psum.php | UTF-8 | 379 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
/*
* Written by Jeff Jones (jeff@socalbioinformatics.com)
* Copyright (2016) SoCal Bioinformatics Inc.
*
* See LICENSE.txt for the license.
*/
/*
* returns the sum of partial array given the start and ending keys
*/
function array_psum($array, $start, $length)
{
$new_array = array_rmna(... | true |
db23639183392e4a98d91d10a74a60a3a135ad66 | PHP | rikzanfernanda/bangundatar | /src/Abstracts/AbstractPersegi.php | UTF-8 | 415 | 2.890625 | 3 | [] | no_license | <?php
namespace BangunDatar\Abstracts;
use BangunDatar\Interfaces\InterfacePersegi;
abstract class AbstractPersegi implements InterfacePersegi {
protected $sisi = 0;
public function luas(): ?float {
return $this->sisi * $this->sisi;
}
public function keliling(): ?float {
return 4 *... | true |
e77f30e0b33bd040a5afd71c509327554fbbce81 | PHP | szepeviktor/settings | /src/DataParser/Filters/TranslateFilter.php | UTF-8 | 672 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace ItalyStrap\DataParser\Filters;
use ItalyStrap\I18N\Translatable;
use ItalyStrap\DataParser\FilterableInterface;
class TranslateFilter implements FilterableInterface {
/**
* @var Translatable
*/
private $translator;
public function __construct( Translatable $translato... | true |
cec6faacf51496e88ebf455261ba6b15283d9724 | PHP | juan3aad/SIACU | /model/T_Tipo_Educacion.php | UTF-8 | 1,385 | 2.703125 | 3 | [] | no_license | <?php
class T_Tipo_Educacion extends EntidadBase{
private $id_tipo_educacion;
private $cod_tipo_educacion;
private $des_tipo_educacion;
public function __construct() {
$table="t_tipo_educacion";
parent::__construct($table);
}
//--------
public function getId_Tipo_Edu... | true |
57bc38372c459e541265c1398483a0205e702948 | PHP | n8kolenberg/laravel_blog | /app/Listeners/NotifySubscribers.php | UTF-8 | 1,064 | 2.9375 | 3 | [] | no_license | <?php
namespace App\Listeners;
use App\Events\ThreadCreated;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
/*
* This whole file is created by adding the corresponding array in EventServiceProvider.php in protected $listener
* Then you can run php artisan event:generate to hav... | true |
f5f2901aaac36173c64885cf76b936f2caf49720 | PHP | ThomasLeray/testGit | /src/Manager/EdtManager.php | UTF-8 | 2,476 | 2.734375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: i181561
* Date: 03/10/2018
* Time: 16:28
*/
namespace UnivLeMans\TP\Manager;
use UnivLeMans\TP\Controller\EdtController;
use \PDO;
use \PDOStatement;
use UnivLeMans\TP\Entity\Edt;
use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag;
use Symfony\Component\H... | true |
01e364af48e98f5e08a80fa22744f4711bec9a32 | PHP | sizzeR1337/Pervonah | /index.php | UTF-8 | 1,191 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
$tokens = [
'token',
'token2'
]; // tokens like ['test', 'test2', 'test3'];
$message = 'my message'; // not array cos useless
$owner_id = '-184006546' // insert vk id
$id = file_get_contents('last_id.txt');
foreach($tokens as $token){
$request_params = array(
'owner_id' => $owner_i... | true |
10ada236bbe40a4e6d06fb84b4318398dd12178c | PHP | arasosman/laravel-elk | /src/Services/Logging/CreateCustomLogger.php | UTF-8 | 306 | 2.6875 | 3 | [] | no_license | <?php
namespace Upaid\Elk\Services\Logging;
class CreateCustomLogger
{
/**
* Create a custom Monolog instance.
*
* @param array $config
* @return \Monolog\Logger
*/
public function __invoke(array $config)
{
return new Logger($config['log_name']);
}
}
| true |
2493e533af7b3a5106b3a3ca4127f0dbc93f6403 | PHP | HappynessMeng/testgit | /online/upms/App/Coct/Common/form_verify.php | UTF-8 | 599 | 2.78125 | 3 | [] | no_license | <?php
/**
* 判断是否合法url 地址
*/
function isUrl($s) {
return preg_match('/^http[s]?:\/\/'.
'(([0-9]{1,3}\.){3}[0-9]{1,3}'. // IP形式的URL- 199.194.52.184
'|'. // 允许IP和DOMAIN(域名)
'([0-9a-z_!~*\'()-]+\.)*'. // 域名- www.
'([0-9a-z][0-9a-z-]{0,61})?[0-9a-z]\.'. // 二级域名
'[a-z]{2,6})'. // fi... | true |
16596db8873c7cfdd77a7e01dbe8bcd7be63455a | PHP | tarikmanoar/xenforo | /src/XF/Service/User/Avatar.php | UTF-8 | 10,831 | 2.59375 | 3 | [] | no_license | <?php
namespace XF\Service\User;
use XF\Entity\User;
use function count, in_array, intval;
class Avatar extends \XF\Service\AbstractService
{
/**
* @var User
*/
protected $user;
protected $logIp = true;
protected $logChange = true;
protected $fileName;
protected $width;
protected $height;
protected... | true |
03404cdf82a719ae065edeb3d5094265d39af582 | PHP | is06/ScrumBoard-it | /Processor/JiraSearchProcessor.php | UTF-8 | 2,520 | 2.609375 | 3 | [] | no_license | <?php
namespace CanalTP\ScrumBoardItBundle\Processor;
use CanalTP\ScrumBoardItBundle\Api\ApiCallBuilderInterface;
use CanalTP\ScrumBoardItBundle\Collection\IssuesCollection;
use CanalTP\ScrumBoardItBundle\Entitie\Task;
use CanalTP\ScrumBoardItBundle\Entitie\SubTask;
/**
* @author Johan Rouve <johan.rouve@gmail.com>... | true |
f5046e3eae66050aaeef4763d7ec11619b71f41b | PHP | waffle-iron/slate-cbl | /php-classes/Slate/CBL/Skill.php | UTF-8 | 3,148 | 2.5625 | 3 | [] | no_license | <?php
namespace Slate\CBL;
class Skill extends \VersionedRecord
{
// ActiveRecord configuration
public static $tableName = 'cbl_skills';
public static $singularNoun = 'skill';
public static $pluralNoun = 'skills';
public static $collectionRoute = '/cbl/skills';
public static $useCache = true;
... | true |
45ddbffa210dc6964fb33b32b023960e9aa8b090 | PHP | bigbrush/yii2-big | /src/models/Category.php | UTF-8 | 4,915 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @link http://www.bigbrush-agency.com/
* @copyright Copyright (c) 2015 Big Brush Agency ApS
* @license http://www.bigbrush-agency.com/license/
*/
namespace bigbrush\big\models;
use Yii;
use yii\db\ActiveRecord;
use yii\behaviors\SluggableBehavior;
use yii\behaviors\TimestampBehavior;
use yii\helpers\In... | true |
99bf16a90261eda243f406274dcdb55ef10fab1d | PHP | fluffybunnies/ace | /web/ace/cao/CaoFactory.php | UTF-8 | 1,653 | 3.03125 | 3 | [] | no_license | <?php
namespace ace\cao;
class CaoFactory {
protected static $caoClassnameCache = array();
public static function getAdapterProxyInstance($toProxy) {
return self::getProxyInstance($toProxy);
}
/**
* Accepts:
* (a) Object instance to be wrapped
* (b) String class name to be instantiated as needed
*
* I... | true |
b26d18f8b3a12efd9c7212fc421714a4fc757c32 | PHP | tsid73/QueryLand | /database/migrations/2018_01_09_143936_create_image_table.php | UTF-8 | 712 | 2.578125 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateImageTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('image_table', fun... | true |
c942efe29274ea317f5ef73c772deb6495360c4d | PHP | ZainaMALEK/Students_App | /process/add_mark.php | UTF-8 | 637 | 2.578125 | 3 | [] | no_license | <?php
require_once '../db_connect.php';
if (isset($_POST['submit'])) {
if (isset($_POST['examId'])&& $_POST['examId'] != '' && isset($_POST['mark'])&& $_POST['mark'] != ''&& isset($_POST['studentId'])&& $_POST['studentId'] != '') {
$studentId = intval($_POST['studentId']);
$examId = intval($_POST['examId']);... | true |
0feed0278f25b0f5108cf1f206d0ac5c91f99de4 | PHP | zjswanson/shoe-store | /src/Store.php | UTF-8 | 2,868 | 3 | 3 | [
"MIT"
] | permissive | <?php
class Store
{
private $name;
private $target_market;
private $id;
function __construct($name, $target_market, $id=null)
{
$this->name = $name;
$this->target_market = $target_market;
$this->id = $id;
}
function g... | true |
c9326ec2262baff3c21047d6a1e263fe136b80fb | PHP | Tracywangsw/lemontool | /user/975521626/lemontool/up.php | GB18030 | 709 | 2.75 | 3 | [] | no_license | <?php
$c = $GLOBALS['HTTP_RAW_POST_DATA'];
$n = $_GET["filename"];
$fp = fopen($n,'w+');
fwrite($fp, $c, strlen($c));
fclose($fp);
//chmod($n,0777);
function unzip_file($file, $destination){
// ʵ
$path="./$destination";
mkdir($path,0777,true);
chmod($path,0777);
$zip = new ZipArchiv... | true |
2248e9c5f91b4c91e7e78f71e700545278fadf4e | PHP | HHPnet/php-core | /spec/Application/Services/Videos/SaveVideo/SaveVideoResponseSpec.php | UTF-8 | 1,395 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace spec\HHPnet\Core\Application\Services\SaveVideo\Videos;
use PhpSpec\ObjectBehavior;
use HHPnet\Core\Domain\Videos\Video;
class SaveVideoResponseSpec extends ObjectBehavior
{
/**
* @param \HHPnet\Core\Domain\Videos\Video $video
*/
public function let(Video $video)
{
$vide... | true |
51eed92943d004103475b1c22e8b0a477257d0cc | PHP | UnivAQ/Tecnologie_Del_Web | /2006-2007/progetti/1_CMS-1/src/zuppiu/include/template.inc.php | UTF-8 | 14,412 | 2.78125 | 3 | [] | no_license | <?
function getDaySelect() {
$data[0][value] = "";
$data[0][text] = "";
for($i=1;$i<=31;$i++) {
if ($i < 10) {
$dummy = "0$i";
} else {
$dummy = "$i";
}
$data[$i][value] = $dummy;
$data[$i][text] = $dummy;
}
return $data;
}
function getMonthSelect() {
$data[... | true |
06eca0be3e68aeed49ff49144c5dd7aadb818d88 | PHP | stanislavtyrsa/FoodAPI | /src/IController.php | UTF-8 | 364 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: stanislav
* Date: 2019-03-28
* Time: 19:38
*/
interface IController
{
/**
* @param string $execMethod
* @param array $params
* @param array $uri
* @param string $method
* @return mixed
*/
public function execute(string $execMethod, arr... | true |
3df72652386e93665d05cbc6dacd26a151b694d1 | PHP | richardcsj/webdev-course-2.0 | /6-php/index.php | UTF-8 | 368 | 3.734375 | 4 | [] | no_license | <?php
$name = "Rob";
echo "<p>Your name is $name</p>";
$string1 ="<p>This is the first part";
$string2 ="of the sentence</p>";
echo $string1." ".$string2;
$x = 10;
$calc = $x * 3;
echo "The result of the calculation is ".$calc;
$myBool = true;
echo "<p>Is this statement true? ".$myBool."</p>"
... | true |
fd62e5c0fe6b3354a32f11c99f88ff90fa400814 | PHP | arslankaleem7229/travel_and_transport | /CRUD/manageticket/update.php | UTF-8 | 1,291 | 2.515625 | 3 | [] | no_license | <?php
include($_SERVER['DOCUMENT_ROOT']. "/travel_and_transport/includes/connection.php");
$routeFrom = $routeTo = $price =$model= "";
if($_SERVER["REQUEST_METHOD"] == 'POST')
{
if(empty($_POST['model']))
{
header("location:javascript://history.go(-1)");
}
else
... | true |
cc0b2b446421fd95ea02ccfa76a2e07c136d5664 | PHP | christianezeani/mailchimp | /src/MailChimp/Models/Lists/SignupForm.php | UTF-8 | 1,843 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace MailChimp\Models\Lists;
use MailChimp\Core\Model;
use MailChimp\Data\Link;
use MailChimp\Data\SignupFormHeader;
use MailChimp\Data\SignupFormContent;
use MailChimp\Data\SignupFormStyle;
use MailChimp\Response\SignupFormListResponse;
/**
* Manage list signup forms.
*
* @property SignupFormHeader $... | true |
fbe2bbf6a825ee910573d5980e2cc685edb2878a | PHP | ungdev/EtuUTT | /src/Etu/Core/UserBundle/Model/CountriesManager.php | UTF-8 | 631 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Etu\Core\UserBundle\Model;
class CountriesManager
{
protected static $initialized = false;
protected static $countries = [];
public static function getCountriesList()
{
if (!self::$initialized) {
self::initialize();
}
return self::$countries;
}... | true |
2a1c4cda76e09fcf18c3202047c5d2989da20abe | PHP | DKvistgaard/dkvistgaard | /includes/frontend/theme_functions.php | UTF-8 | 334 | 2.703125 | 3 | [] | no_license | <?php
/**
* Function that prints the tracking code inserted in the theme settings
* Strips the slashes that were added when inserting the code to the
* database
*/
function print_tracking_code()
{
$tracking_code = get_option('theme_analytics');
if($tracking_code) {
echo stripslashes($tracking_code)... | true |
6186f1215ff2453ea57ed32314837ee298dc5c17 | PHP | oshou/procon | /Paiza/D/d139.php | UTF-8 | 281 | 3.1875 | 3 | [] | no_license | <?php
$n = intval(trim(fgets(STDIN)));
$arr = explode(" ", trim(fgets(STDIN)));
$counts = array_count_values($arr);
if ($counts["G"] === $counts["P"]) {
echo "Draw" . PHP_EOL;
} else if ($counts["G"] > $counts["P"]) {
echo "P" . PHP_EOL;
} else {
echo "G" . PHP_EOL;
}
| true |
d0370c5cab1323653262d684062a243624d8c191 | PHP | Kenley08/ExoPDO | /index.php | UTF-8 | 3,164 | 2.59375 | 3 | [] | no_license | <?php
session_start();
require_once "controlleur.php";
require_once 'modele.php';
//$id=isset($_GET['id']) ? $_GET['id'] : '' ;
// $cli=(object)['id_client'=>'','nom_complet'=>'jjj','ville'=>'','telephone'=>''];
$id="023048884933";
//1)-----utilisation de cookies pour le nombre de visites
// i... | true |
c66fe4bf058f5ca14a5047d9f9a62b7eec2c6b33 | PHP | pantheon-systems/terminus-build-tools-plugin | /src/Commands/ProjectInfoCommand.php | UTF-8 | 1,871 | 2.59375 | 3 | [] | no_license | <?php
/**
* Terminus Plugin that contain a collection of commands useful during
* the build step on a [Pantheon](https://www.pantheon.io) site that uses
* a GitHub PR workflow.
*
* See README.md for usage information.
*/
namespace Pantheon\TerminusBuildTools\Commands;
/**
* Project Repair Command
*/
class Pro... | true |
3ce3c8f227d745b1af7b7e2ee48c901cdc74e927 | PHP | gavriguy/IdeaL--ohel.org.il- | /modules/acquia/token/token.rules.inc | UTF-8 | 3,293 | 2.640625 | 3 | [] | no_license | <?php
// $Id: token.rules.inc,v 1.1.2.5 2010/06/09 00:48:56 davereid Exp $
/**
* @file
* Rules integration for the token module.
*
* This provides a token input evaluator, so that token replacements can be used
* in every rules action.
*/
/**
* Implementation of hook_rules_evaluator().
*/
function... | true |
c354d39462d2bb60dc45e5d96c6f8a559fd983df | PHP | Divergence/framework | /src/Helpers/Validate.php | UTF-8 | 1,263 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Divergence package.
*
* (c) Henry Paradiz <henry.paradiz@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Divergence\Helpers;
class Validate
{
public static function st... | true |
9469e7e11ce81e6412bf20a42a4acbc0bd86c837 | PHP | DeusFigendi/telling_ink | /co_books.php | UTF-8 | 1,773 | 2.515625 | 3 | [] | no_license | <?php
$content['episode'][0] = "";
$content['episode'][1] = "";
$content['title'] = 'Alle Bücher';
$content['episode'][0] .= '
<h2>Alle Bücher:</h2>
<table class="handwritten">
<tr>
<th>Buch</th>
<th>Kapitel</th>
<th>Lizenzen</th>
</tr>';
$sql_query = "SELECT album, license FROM `episodes` ... | true |
e784045ad39509958462daf28bd7c03161a1f6d3 | PHP | MedZiedJlassi/projet-1 | /src/Service/FonctionsService.php | UTF-8 | 4,107 | 3.375 | 3 | [] | no_license | <?php
/**
* PHP version 7
*
* @category App\Service
* @package FonctionsService.php
* @author FERRERO Franck <ferrerofranck@plateformweb.com>
* @license http://opensource.org/licenses/gpl-license.php MIT License
* @link https://plateformweb.com
*/
namespace App\Service;
/**
* PHP version 7
*
* @ca... | true |
54f433e127663db1786b18da46061a962c3fe4e3 | PHP | snigdho991/php-youtube_api-video-streaming-software | /classes/News.php | UTF-8 | 3,024 | 2.8125 | 3 | [] | no_license | <?php
$filepath = realpath(dirname(__FILE__));
include_once ($filepath.'/../lib/Database.php');
include_once ($filepath.'/../helpers/Format.php');
?>
<?php
class News{
private $db;
private $fm;
public function __construct(){
$this->db = new Database();
$this->fm = new Format();
}
public funct... | true |
999f6b50295ced00979af7c2efd3b56059927aa6 | PHP | Akshay-Hegde/Shop-for-PyroCMS | /helpers/shop_helper.php | UTF-8 | 1,155 | 2.6875 | 3 | [
"CC-BY-3.0"
] | permissive | <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/*
* SHOP for PyroCMS
*
* Copyright (c) 2013, Salvatore Bordonaro
* All rights reserved.
*
* Author: Salvatore Bordonaro
* Version: 1.0.0.051
*
*
*
*
* See Full license details on the License.txt file
*/
/*date('d / M / Y ', $orde... | true |
c3eb5e11196e331f4c844f97a147ca7690f51188 | PHP | hadasbro/php-stream-api | /src/Collections/Examples/_CollectorsExamples.php | UTF-8 | 3,607 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Collections\Examples;
use Collections\Collections;
use Collections\Collector;
class _CollectorsExamples
{
public static function generalTest() {
try {
$manyObjects = [
new CollectionsSampleObject(1, 13),
new Collectio... | true |
c215dc6e2569cb1f89d095c198a54f25123d434e | PHP | FarkhodKhuramov/php_membership | /login.php | UTF-8 | 3,481 | 2.75 | 3 | [] | no_license | <?php
session_start();
$userid = $_SESSION['id'];
$username = $_SESSION['username'];
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-qeuiv="Content-Type" content="text/html; charset=utf-8">
<title>Member System - Login</title>
</head>
<body>
<?php
if ($userid && $u... | true |
7c7104860be7189bd1e52544f2a8704cf46ed873 | PHP | javihgil/build-tools-libs | /Composer/Package.php | UTF-8 | 1,411 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the build-tools-lib package.
*
* (c) Javi H. Gil <https://github.com/javihgil>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer;
/**
* Class Package
*
* @package Composer
*/
... | true |
cf023d36d06a98aeb7bf8f9c33e2111d3e10ed11 | PHP | Neelp552/is218project | /is218-project3-master/controller.php | UTF-8 | 4,907 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
include "./model/database.php";
include "./model/accounts_db.php";
include "./model/questions_db.php";
$email_regex = "/\w+@\w+/";
$password_regex = "/\w{8,}/";
$notempty_regex = "/\w+/";
/* using session data */
session_start();
/* validation functions */
function validation_result($value, $regex){
if (pr... | true |
59aa317b28a889c25efc08cddf03a00f31a2b141 | PHP | edcpl/inertia-laravel | /src/Testing/AssertableInertia.php | UTF-8 | 2,410 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Inertia\Testing;
use InvalidArgumentException;
use Illuminate\Testing\TestResponse;
use PHPUnit\Framework\Assert as PHPUnit;
use PHPUnit\Framework\AssertionFailedError;
use Illuminate\Testing\Fluent\AssertableJson;
class AssertableInertia extends AssertableJson
{
/** @var string */
private $c... | true |
8b5e08d1898cce27ed36116a765666e0c6643e5b | PHP | pawodyk/TUDublin_WebApps-Project | /src/dbObjects/CoffeeshopReview.php | UTF-8 | 3,251 | 3.03125 | 3 | [] | no_license | <?php
namespace TUDublin\dbObjects;
class CoffeeshopReview
{
const CREATE_TABLE_SQL =
<<<HERE
CREATE TABLE `coffeeshopreview` (
`id` int NOT NULL AUTO_INCREMENT,
`coffeeshop_id` int NOT NULL,
`title` VARCHAR(120) NOT NULL,
`review` text NOT NULL,
`rating` tinyint NOT NULL DEFAULT 3,
`expens... | true |
bab809733beb1e2e8957ec40a6e3cbb4b7f6ea7f | PHP | Dyson0/tournament | /test.php | UTF-8 | 601 | 2.84375 | 3 | [] | no_license | <?php
if (isset($_POST['name'])){
$name = $_POST['name'];
$age = $_POST['age'];
$like = $_POST['like'];
$friend = $_POST['friend'];
echo 'My name is ' . $name . " and iam " . $age ." i like". $like;
}
?>
<html>
<form method="POST">
<label for="name">
Name
</label>
<input id="name" name="name" /... | true |
c6277eafcf7dfd8ffeca0e7dff4d9bbb7b7c5abf | PHP | LidanL/hope | /application/admin/model/AdminUser.php | UTF-8 | 4,950 | 2.578125 | 3 | [
"Apache-2.0",
"PHP-3.0"
] | permissive | <?php
namespace app\admin\model;
use think\Db;
use think\Model;
class AdminUser extends Model
{
protected $pk = 'id';
/**
* @todo create default admin user count
* @return void
* @author lidan <2364752564@email.com>
*/
protected function createDefaultAdminUser()
{
}
/**
* @todo create r... | true |
813535a18e754d7f2f75ea834fa376324f6f5bdd | PHP | hucongyang/student_cnhutong | /modules/teacher/models/Student.php | UTF-8 | 7,625 | 2.609375 | 3 | [] | no_license | <?php
/**
* 学员数据模型
*/
class Student extends CActiveRecord
{
public static function model($className = __CLASS__)
{
return parent::model($className);
}
/**
* 获取学员列表:
* 默认显示该教师所授课程的所有学生,可以根据条件进行筛选搜索
* @param $user_id
* @param $search
* @param $page
* @return array
... | true |
bc6cb8ba94f2195687bfc6822eea27a1efdb16b6 | PHP | mweimerskirch/TuckConverterBundle | /Loader/StandardLoaderFactory.php | UTF-8 | 1,883 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Tuck\ConverterBundle\Loader;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\Config\Loader\LoaderInterface;
use Tuck\ConverterBundle\Exception\UnknownFormatException;
/**
* Factory for the standard set of loaders Symfony come... | true |
e1767486ba3f689b453717276afcd53d9b4f05b3 | PHP | bhimasty/BelajarPHP | /kuliah/functions.php | UTF-8 | 830 | 2.71875 | 3 | [] | no_license | <?php
function koneksi()
{
return mysqli_connect('localhost', 'root', '', 'perpustakaanku');
}
function query($query)
{
$conn = koneksi();
$result = mysqli_query($conn, $query);
//jika hasilnya hanya 1 data
if (mysqli_num_rows($result) == 1) {
return mysqli_fetch_assoc($result);
}
$rows = [];
w... | true |
574aafd1020d27224801f5c770cf8a2cbc1ae53c | PHP | Airportia/booking-com-sdk | /src/Models/HotelFacilityType.php | UTF-8 | 1,787 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace BookingCom\Models;
use BookingCom\Traits\TranslationsTrait;
class HotelFacilityType extends AbstractModel
{
use TranslationsTrait;
/** @var integer */
private $id;
/** @var string */
private $type;
/** @var integer */
private $facilityTypeId;
/** @var string */... | true |
0e7c8916b3e14d1180dc4ac16007f5cabb5e09ac | PHP | gadzhick/ToDoList | /server/MySQL.php | UTF-8 | 885 | 3.09375 | 3 | [] | no_license | <?php
class MySQL implements ConnectionInterface
{
private $host;
private $DBname;
private $username;
private $password;
private $opt = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => ... | true |
8db38071919a3010cb92a5b4a59948d908eaced3 | PHP | dzarmosz/checkers | /test7.php | UTF-8 | 1,208 | 3.171875 | 3 | [] | no_license | <?php
class User
{
public function login()
{
echo "Logowanie do systemu\n";
}
public function register()
{
echo "Rejestracja \n";
}
}
class Cart
{
public function getItems()
{
echo "Zawartosc koszyka\n";
}
}
class Product
{
public function getAll()
... | true |
577d701300d1c2f3bd5c8d18e2585c0dbb8e5628 | PHP | xiyangxixian/SimpleMVC | /mvc/lib/lib/db/DbHelp.class.php | UTF-8 | 4,961 | 2.84375 | 3 | [] | no_license | <?php
namespace lib\db;
class DbHelp {
private $conn;
private $config;
public function __construct(array $config=array(),$isConnect=true) {
$this->config = $config;
if($isConnect&&!empty($config)){
$this->connect();
}
}
public function loadConfig($config)... | true |
7704215effbab6907e66e924c4e4a1591b214092 | PHP | Evaldo-comp/PHP-Teoria-e-Pratica | /Alura/Introdução ao PHP/Avançando com a linguagem/Exemplos/loop-listas.php | UTF-8 | 290 | 3.75 | 4 | [
"MIT"
] | permissive | <?php
$idadeList = [1, 3, 44, 54, 22, 11]; // declaração de um array
$titulares = ["Titular 1", "Titular 2"];
$saldos = [100, 1000];
// retorna o tamanho da lista
$tam = count($idadeList);
// for para percorrer a lista
for($i = 0; $i < $tam; $i++){
echo $idadeList[$i].PHP_EOL;
}
| true |
5232df0a52aad4cd4ee0a1c924d16f32c8cbfe74 | PHP | luizhenrique1494/ProjetoPHP | /index.modu.pedido.php | UTF-8 | 1,359 | 2.53125 | 3 | [] | no_license |
<?php
require("Conection.php");
//require_once("entidade.php");
if (isset($_GET["botao"])) {
if($_GET["botao"] == "cadastrar") {
$id_pedido = $_GET[]"text_id_pedido"];
$id_produto = $_GET["text_id_produto"];
$id_cliente = $_GET["text_id_cliente"];
$conectBd = new Conection();
$sql = "INSERT INTO pe... | true |
68650bd3669e7b391b2b94d1a3a0591e5aa65c3f | PHP | alexisbarnique/tesis | /php/pagina/validacion.php | UTF-8 | 2,916 | 2.59375 | 3 | [] | no_license | <?php
/*
* Validamos el usuario, la contraseña y el estatus para dar acceso al sistema y a la base de datos.
*/
if($_POST['usuario']!=null&&$_POST['password']!=null&&$_POST['login']==1)
{ $usuario=strtolower($_POST['usuario']);$pass=md5($_POST['password']);$status="0";
include "pgsql.php";
$enl... | true |
5c92dc5ca9918e82423f426317950b6028182ea7 | PHP | paoloxcs/myapp | /app/User.php | UTF-8 | 1,078 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name','last_nam... | true |
b7995b48d43609be2e17816687db8bb9e44c73b2 | PHP | ducminh296/Human_Interface_for_Robotic_Control | /ConnectionServer/update_ip.php | UTF-8 | 681 | 2.828125 | 3 | [
"ISC"
] | permissive | <?php
/*
* This file update the ip address for the robot arm
* Return : 1 - Success; 0 - Failure
* Example: update_ip.php?id=1&ip=128.0.1:5000
*/
include "system.inc";
/*
* Retrieve data from GET
*/
$id = $_GET['id'];
$ip = $_GET['ip'];
//create an sql handler
$sqlHandler = new mysqli(SQL_SERVER,SQL_USERNA... | true |
f90af6805a15c473e343495178ae246acbf15377 | PHP | yiismart/yii2-catalog | /models/StoreReserveProduct.php | UTF-8 | 1,108 | 2.53125 | 3 | [] | no_license | <?php
namespace smart\catalog\models;
use smart\db\ActiveRecord;
class StoreReserveProduct extends ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'catalog_store_reserve_product';
}
/**
* Store relation
* @return yii\db\ActiveQueryInterf... | true |
a53ffe3754cbe1830b191507e6601ac78c3e8723 | PHP | boluijten3/BASALT_PAMsoftware | /htdocs/gino-pam/php_cm/modules/model/service/library/PdpActionClusterService.class.php | UTF-8 | 5,821 | 2.515625 | 3 | [] | no_license | <?php
/**
* Description of PdpActionClusterService
*
* @author ben.dokter
*/
require_once('modules/model/queries/library/PdpActionQueries.class.php');
require_once('modules/model/valueobjects/library/PdpActionClusterValueObject.class.php');
require_once('modules/model/valueobjects/library/PdpActionClusterCollecti... | true |
89cf4b591f42e57691d29ff75c372939605da4f9 | PHP | shaitanshamma/PHP_1 | /lesson_3/task_6/index.php | UTF-8 | 547 | 2.546875 | 3 | [] | no_license | <?php
$year = date("Y");
$dir = "templates/";
$menu = renderTemplate("$dir" . "menu");
$content = renderTemplate($dir . "about", ["content" => "some content"]);
$footer = renderTemplate($dir . "footer", ["year" => $year]);
$args = [
"menu" => $menu,
"content" => $content,
"footer" => $footer
];
echo ren... | true |
4002943364c922c2b7d6c2cc61aab5b775884513 | PHP | fahmidaproma/Ship_Ticket_Booking-Group-11 | /Manager(Fahmida Haque)/controllers/LoginController.php | UTF-8 | 1,263 | 2.546875 | 3 | [] | no_license | <?php
require_once 'models/db_config.php';
session_start();
$uname="";
$err_uname="";
$pass="";
$err_pass="";
$hasError=false;
$err_message="";
if(isset($_POST["login"])){
if(empty($_POST["uname"])){
$err_uname="Username Required";
$hasError = true;
}
else{
$uname = htmls... | true |
fe744e23401864041717cc8b74556852805f7ff0 | PHP | PKRoma/git-php | /manage.php | UTF-8 | 2,745 | 2.703125 | 3 | [] | no_license | <?php
require_once( "config.php" );
require_once( "security.php" );
require_once( "html_helpers.php" );
require_once( "statis.php" );
require_once( "filestuff.php" );
html_header();
html_style();
if(isset($_GET['action']) && $_GET['action']=="create")
{
if(isset($_POST['project_name']))
{
$pName = $_POST['pro... | true |
a850666ba36b7e4813fdd2e0f00209b632a5e9ed | PHP | Eslam-adel-github/novo | /app/DataTables/BuilderParameters.php | UTF-8 | 8,356 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\DataTables;
use Yajra\DataTables\Html\Button;
trait BuilderParameters
{
/**
* $buttons
* @var array
*/
private $buttons = [];
/**
* $custom_buttons
* @var array
*/
private $custom_buttons = [];
/**
* Get Title Checkbox Html.
*
* @... | true |
e0cc47172e0024230f507dbdda57c1f2821bde1a | PHP | CodingWorker/enhancingProgram | /PHP/codes/yuyan_cankao/155.php | UTF-8 | 94 | 2.546875 | 3 | [] | no_license | <?php
class A{
}
function a(A $a=null){
var_dump($a);
}
$var=12;
$var=new A;
a($var);
| true |
ba1b1cb16f753a6439912db05e59e018d4bad084 | PHP | kematjaya0/export | /src/Exception/ViewModeNotSupported.php | UTF-8 | 517 | 2.515625 | 3 | [] | no_license | <?php
/**
* This file is part of the export.
*/
namespace Kematjaya\Export\Exception;
use Exception;
/**
* @package Kematjaya\Export\Exception
* @license https://opensource.org/licenses/MIT MIT
* @author Nur Hidayatullah <kematjaya0@gmail.com>
*/
class ViewModeNotSupported extends Exception
{
public func... | true |
cf98b7a44fa0bb856abffe857eaf83f3837e400f | PHP | josepaz20/gimnasioactualizado | /module/Hotspot/src/Hotspot/Modelo/Entidades/Respuesta.php | UTF-8 | 1,339 | 2.921875 | 3 | [] | no_license | <?php
namespace Hotspot\Modelo\Entidades;
class Respuesta {
private $idRespuesta;
private $respuesta;
private $estado;
public function __construct(array $datos = null) {
if (is_array($datos)) {
$this->exchangeArray($datos);
}
}
public function getArrayCo... | true |
d9c8501d3734debfca945ad0de3184eacaf6310e | PHP | jaybiedev/leadsperfectCode | /application/libraries/Widgets/Leads/ContactForm.php | UTF-8 | 3,486 | 2.546875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace Library\Widgets\Leads;
class ContactForm extends \Library\Widgets\WidgetsAbstract {
protected $CI;
protected $db;
private $Spol;
public $Site;
public function __construct () {
$this->CI =& get_instance();
$this->db = $this->CI->db;
$this->elementID ... | true |
e123bac838613125bd2c114d0675192a0838c09e | PHP | php2015/hsshop | /app/Console/Commands/MemberPayAmount.php | UTF-8 | 3,744 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use App\Lib\Redis\Member;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
use Predis\Response\Status;
class MemberPayAmount extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signatu... | true |
f33f45d242038a4460f026acdd6e0d4dd7829dfd | PHP | calrloco/BoolBnB | /database/seeds/ImagesTableSeeder.php | UTF-8 | 542 | 2.65625 | 3 | [] | no_license | <?php
use App\Image;
use App\Apartment;
use Faker\Generator as Faker;
use Illuminate\Database\Seeder;
class ImagesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$apartments = Apartment::all();
for($i=0; $i<20; $i++... | true |
763a03e9a76bc8aa64cbe38d07d9b75d452d3ee7 | PHP | pmgm/idecide | /lib/cgiapps/idecide.class.php | UTF-8 | 43,988 | 2.546875 | 3 | [] | no_license | <?php
/**
* idecide.class.php
* a subclass of cgiapp2
* an app to access the iDecide survey system
*
* @author Patrick Maslen (pmaslen@unimelb.edu.au)
*
* uses Twig templating system, without the cgiapp2 interface to same
* Also requires PDO
*/
/**
* required files
*/
require_once(dirname(__FILE__) . "/../..... | true |
2b753e0ec06eb3ca3a2089d208630884b854f273 | PHP | Hezekiah-Elisha/tech_archlight | /auth/registerdet.php | UTF-8 | 3,114 | 3 | 3 | [] | no_license | <?php
$host = 'localhost';
$username = 'root';
$password = '';
$database = 'the_tech_archlight';
$conn = mysqli_connect($host, $username, $password, $database);
if(mysqli_connect_errno()){
//if there is any error with the connection, stop the script and display the error...
exit('Failed to connect... | true |