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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
28107740aff3f99a5fa20da789606018ac2bdb0a | PHP | rvelhote/rockpaperscissor-webapp | /src/AppBundle/Service/GameService.php | UTF-8 | 2,574 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* MIT License
*
* Copyright (c) 2016 Ricardo Velhote
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use,... | true |
bddb6bac846c185be49df24336ad56942a9317a1 | PHP | ei12003/ltw | /manage.php | UTF-8 | 2,224 | 2.65625 | 3 | [] | no_license | <?php include_once './header.php'?>
<?
if($_SESSION['login']==null || $_SESSION['login']=="error" || $_SESSION['permission']!=1)
echo "Not Authorized";
else
{
$db = new PDO('sqlite:data/database.db');
$query = 'SELECT Username, Permission FROM users';
$rows = $db->query($query);
?>
<table border="1" class... | true |
045f6cf303e558d6a3e249129be051a53d794300 | PHP | dotmailer/dotmailer-magento-extension | /code/Dotdigitalgroup/Email/controllers/Adminhtml/ConnectorController.php | UTF-8 | 18,468 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class Dotdigitalgroup_Email_Adminhtml_ConnectorController extends Mage_Adminhtml_Controller_Action
{
/**
* AutoCreate and map datafields.
*/
public function setupdatafieldsAction()
{
$result = array('errors' => false, 'message' => '');
$websiteParam = $this->getRequest()->ge... | true |
ab964ee68782ab23c62b671f9910bbf091181be5 | PHP | tommydemarco/TravelCMS | /models/about.model.php | UTF-8 | 612 | 2.78125 | 3 | [] | no_license | <?php
require_once "connection.php";
class AboutInfoModel {
static public function mdlShowAboutInfo($table) {
$statement = Connection::connect() -> prepare("SELECT * FROM $table");
$statement -> execute();
return $statement -> fetch();
$statement -> close();
$statement = n... | true |
96e9088f80ab11605b236a51958015e3a6f4e56c | PHP | Tinovanderlaan/Tutorial-CMS | /app/controllers/controller.php | UTF-8 | 219 | 2.6875 | 3 | [] | no_license | <?php
class Controller {
public $load, $model;
// Instantiate models and load class.
public function __construct() {
$this->load = new Load();
$this->model = new Model();
}
} | true |
78de4a123dcbcb7edfe96614700ae7fea5d3ad56 | PHP | Adlia/loja | /src/paginas/produtos_principais.php | UTF-8 | 1,052 | 2.625 | 3 | [] | no_license | <?php
include_once('./src/config/MyPDO.php');
?>
<div class="produtos-principais">
<h2>Conheça nossos melhores produtos...</h2>
<?php
$produtos = MyPDO::executa_sql('SELECT * FROM produtos WHERE quantidade <> 0');
if (count($produtos) > 0) {
$aux = 4;
... | true |
d3d612cd1faf0f40ea824db0da2f94a8606b4570 | PHP | adjoamaison/mw_cuisine | /model/instruction.php | UTF-8 | 829 | 3.109375 | 3 | [] | no_license | <?php
/**
*author: Agatha Adjoa Maison
*date: 22nd November, 2015
*description: A class that manages the interactions of instructions of a recipe with the database
*/
include("adb.php");
class instruction extends adb{
/**
*description: A function to add instructions of a recipe to the database
*@param reci... | true |
320b8f6bebafad51d47aaf70a4d008075243e8fc | PHP | miki208/slagalica | /otkrij_asocijacija.php | UTF-8 | 755 | 2.546875 | 3 | [] | no_license | <?php
include "asocijacije_lib.php";
if(isset($_POST['nick']))
{
$nick=$_POST['nick'];
$d=$_POST['polje'];
$data=mysql_query("SELECT * FROM slagalica_sesije WHERE nick='$nick' AND igra='asocijacije'");
$res=mysql_fetch_assoc($data);
$podaci=explode('*',$res['rec']);
$podaci[21]=strval(intval($podaci[21])... | true |
70a48e417f8ff10a011ff263d8c12eca6966dad4 | PHP | ktanifuji/gr3 | /lib/mvc/Dispatcher.php | UTF-8 | 2,259 | 2.9375 | 3 | [] | no_license | <?php
class Dispatcher
{
private $sysRoot;
public function setSystemRoot($path)
{
$this->sysRoot = rtrim($path, '/');
}
public function dispatch()
{
// パラメーター取得(末尾の / は削除)
$param = ereg_replace('/?$', '', $_SERVER['REQUEST_URI']);
$param = ereg_replace('^/', '... | true |
300bce5ef3086e585d63d6daace271ae5eeda6dc | PHP | marknotbatman/dttw-old | /wp-content/themes/modernize-v3-15/include/plugin/page-item.php | UTF-8 | 41,607 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Goodlayers Page Item File
* ---------------------------------------------------------------------
* @version 1.0
* @author Goodlayers
* @link http://goodlayers.com
* @copyright Copyright (c) Goodlayers
* ---------------------------------------------------------------------
... | true |
5d79926a38f6c96a8f536ac28e86e91e7b08e6ec | PHP | Yoriluo/PM | /projectmanager/Server/Web/Controller/ProjectController.class.php | UTF-8 | 5,242 | 2.84375 | 3 | [] | no_license | <?php
class ProjectController
{
// 返回json类型
private $returnJson = array('type' => 'project');
/**
* 构造函数,验证身份
*/
public function __construct()
{
session_start();
if (quickInput('userToken') != $_SESSION['userToken'])
{
$this -> returnJson['statusCode'] = '000001';
exit(json_encode($this -> returnJ... | true |
a678ab5e5f035715722003ce47be304dce69acc3 | PHP | hypeJunction/Elgg-payments | /classes/hypeJunction/Payments/Amount.php | UTF-8 | 2,593 | 3.109375 | 3 | [] | no_license | <?php
namespace hypeJunction\Payments;
use SebastianBergmann\Money\Currency;
use SebastianBergmann\Money\Money;
class Amount implements \Serializable {
const DEFAULT_CURRENCY = 'EUR';
/**
* @var int
*/
protected $amount;
/**
* @var string
*/
protected $currency;
/**
* Constructor
*
* @param... | true |
f2d48720f299f0026b0a6d4a77099b7f5f4d0016 | PHP | yeramora/DAW_goma | /PracticaPHP/acceso.php | UTF-8 | 1,939 | 2.546875 | 3 | [] | no_license | <?php
require("conexionBD.php");
$username = mysqli_real_escape_string($conexion, $_POST['username']);
$password = mysqli_real_escape_string($conexion, $_POST['password']);
$recordar = "";
$salted = "32298u2fjhkjsdvnfskhvsiudh2u3894234sdfjvds".$password."2349F09WUFjjfjF0WJFGOJFOIW";
$hashed = hash('sha512... | true |
f0a5c1d3e056847fc7b7fa1db077f4f8064ac74a | PHP | derekmd/laravel-dusk-firefox | /src/Concerns/TogglesHeadlessMode.php | UTF-8 | 1,086 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Derekmd\Dusk\Concerns;
trait TogglesHeadlessMode
{
/**
* Remove browser option arguments for headless mode when it is disabled.
*
* @param array $args
* @return array
*/
protected function filterHeadlessArguments(array $args = [])
{
return collect($args)-... | true |
db7b14faee5bb92e7b414486c82d843d3e632978 | PHP | weddingjuma/mobilecartcorebundle | /CartComponent/Shipment.php | UTF-8 | 10,755 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/*
* This file is part of the Mobile Cart package.
*
* (c) Jesse Hanson <jesse@mobilecart.io>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace MobileCart\CoreBundle\CartComponent;
/**
* Class Shipment
* @package... | true |
e2382dd26c9f31ba00ccb7e721e1ca25357357b7 | PHP | sanu16236/worldwidenovel | /admin/book.php | UTF-8 | 2,397 | 2.625 | 3 | [] | no_license | <?php
define('TITLE','Book');
define('PAGE','Book');
include('../dbconnection.inc.php');
include('header.php');
if(!isset($_SESSION['alogin'])){
header('location:login.php');
}
if(isset($_GET['type'])){
if($_GET['type']== 'active'){
$status = 1;
}else{
$status = 0;
}
$usql = "update book set status='$status... | true |
a4716d7f350d1a82d229d771bd291581664a99c7 | PHP | lcdlovel/classFiles | /HTML5/day_07/day07/xz/data/xz_productlist.php | UTF-8 | 447 | 2.515625 | 3 | [] | no_license | <?php
//功能:查询所有产品信息并且返回json数据
//1:修改响应头格式json
//2: 连接数据库
//3: 设置编码
require("init1.php");
//4: 创建SQL语句并且发送sql语句
$sql = "SELECT * FROM xz_laptop";
$result = mysqli_query($conn,$sql);
//5: 抓取多行记录
$rows = mysqli_fetch_all($result,MYSQLI_ASSOC);
//6: 转换json数据并且输出(服务器返回数据)
echo json_encode($rows);
?> | true |
fe6470c4fdf42946d4c9e5eb4f3f466c5f634cc0 | PHP | daengtobs/thobs-design | /tests/Unit/Helpers/HelperTest.php | UTF-8 | 2,457 | 2.625 | 3 | [] | no_license | <?php
namespace Tests\Unit\Helpers;
use Tests\TestCase;
class HelperTest extends TestCase
{
/**
* @test
* @group u-helper
*/
public function configUrl()
{
$expected = config('shortener.hash_length');
$actual = urlConfig('hash_length');
$this->assertSame($expected... | true |
c4d6aadf2d8f3494d09b1cc53602966aa2bd64aa | PHP | rsoleillant/html_class | /MultiPage.class.php | ISO-8859-1 | 16,257 | 3.015625 | 3 | [] | no_license | <?php
/*******************************************************************************
Create Date : 20/11/2007
----------------------------------------------------------------------
Class name : multipage
Version : 1.1
Author : Emilie Merlat
Description : permet de grer les affichages multipage
******************... | true |
6aa4039d439b2f5eaa40daa2781666d854f441a2 | PHP | shanliankun/zspay | /controllers/components/zs/zs_page.php | UTF-8 | 5,662 | 2.71875 | 3 | [] | no_license | <?php
class ZsPageComponent extends Object {
/**
* 分页组件
*
* @param string $mpurl 当前地址 :如 $mpurl = news/newscontent
* @param int $page 当前页
* @param int $total 总条数
* @param int $pernum 每页显示的条数
* @param 1.普通分页,2.搜索条数过多时候最大支持1000条
* @return 分页的html代码
*/
function setMulitpage($url, $curr... | true |
f4e6de4d223270247874aaaab1107e84f0e83cd0 | PHP | jrean/blogit | /src/BlogitCollection.php | UTF-8 | 959 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of Jrean\Blogit package.
*
* @author Jean Ragouin <go@askjong.com> <www.askjong.com>
*/
namespace Jrean\Blogit;
use Illuminate\Support\Collection;
class BlogitCollection extends Collection
{
/**
* Sort the collection by dates of creation DESC.
*
* @return Jrean\Blo... | true |
f928fbd7874bc3df7340c55c0a79379d068d5a81 | PHP | asocialoff/spirit-revision-installer | /install_changes.php | UTF-8 | 5,730 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
//error_reporting(E_ERROR | E_PARSE);
//require("installer.php");
/*
* INFO: This all system needs a public target directory such as http://examplesite.com/mypublic-source
* which contains all the source code that can be fetched & zipped to any server
*/
require("deploy.php");
//echo 'debug: ' . $_POST['test'];... | true |
df3ed60b7cc1ccf8b307348239a7f45aa0b19ed8 | PHP | lanlianjiu/interface-Admin | /common/JWT.php | UTF-8 | 1,841 | 2.9375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @author: jiangyi
* @date: 下午5:53 2018/7/25
*/
namespace common;
class JWT
{
public static function encode(array $payload, $secretKey, $alg = 'SHA256')
{
$jwt = self::urlsafeB64Encode(json_encode([
'typ' => 'JWT',
'alg' => $alg,
])) . '.' . s... | true |
be1e64233e8372595be32b108c4db20f69b17747 | PHP | msandor76/minilib_with_smarty | /lib/classes/Csrf.php | UTF-8 | 1,772 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
namespace Helpers;
/**
* It's based on Simple MVC (now it call Novaframework) @author David Carr - dave@novaframework.com
*
* Instructions:
* At the top of the controller where the other "use" statements are place:
* use Helpers\Csrf;
*
* Just prior to rendering the view for adding or editing data create... | true |
69c992714c1bf5a6f70a8f61043e55d670972d5b | PHP | noviewpoint/ActivityMonitor_public | /php/get_active_users.php | UTF-8 | 789 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
require_once '../include/config.php';
/* PDO + prepared statements */
try
{
$conn = new PDO("mysql:host=".DB_HOST.";dbname=".DB_DATABASE, DB_USER, DB_PASSWORD);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$sql = $conn->prepare("SELECT B.user... | true |
e42404f6a36addeca2cf6341f1fafaeafbf463d6 | PHP | cmgus/sge-backend | /src/Entity/Recurso.php | UTF-8 | 1,503 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entity;
use App\Repository\RecursoRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=RecursoRepository::class)
*/
class Recurso
{
/**
* @ORM\Id()
* @ORM\Generat... | true |
5fb71299b8a7bdb25c6d909aab0b95582b655f68 | PHP | aqeel1415/tms | /src/Post/Domain/PostRepository.php | UTF-8 | 450 | 2.75 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Src\Post\Domain;
use Src\Post\Domain\Post;
interface PostRepository
{
public function findById(int $id): Post;
public function findBySlug(string $slug): Post;
public function findByTitle(string $title): Post;
public function findAll(): array;
public functi... | true |
e3aecaf540b6ce697bc33856562c44ca332b179d | PHP | rahhalali/PHP_PDO | /Upload.php | UTF-8 | 2,315 | 2.609375 | 3 | [] | no_license | <?php
require_once "vendor/autoload.php";
session_start();
use App\Connection;
$db=new Connection();
$conn=$db->connect();
$userid = $_SESSION['id'];
$folder = "user_".$userid;
$upload_dir = "user_images/$folder/";
$upload_path = $upload_dir;
$file_name = $_FILES['file']['name'];
$file_temp = $_FILES['file']['tmp_name'... | true |
d426f93bc5abee29cb18ce5c07667364a5a25bc5 | PHP | PeeHaa/Uploader | /Src/RichUploader/Http/RequestMatcher/Host.php | UTF-8 | 1,481 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Check whether a request matches with host requirements
*
* PHP version 5.4
*
* @category RichUploader
* @package Http
* @package RequestMatcher
* @author Pieter Hordijk <info@pieterhordijk.com>
* @copyright Copyright (c) 2012 Pieter Hordijk
* @license http://www.opensour... | true |
de0b2fd5aece3649656414a5f5e0e6cc77dfb0db | PHP | 4iwi33/Traning | /oop/construct/User.php | UTF-8 | 897 | 3.78125 | 4 | [] | no_license | <?php
class User
{
public $name;
public $password;
public $email;
public $city;
function __construct($name, $password, $email, $city, $color, $car) //сдесь аргументы конструктора
{
$this->name = $name;
$this->password = $password;
$this->email = $email;
$this->c... | true |
a07b0b77ef0e0645417396826874c7138d1db30e | PHP | Elena-sky/awesome_news | /app/Contracts/CommentInterface.php | UTF-8 | 741 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Contracts;
use Illuminate\Http\Request;
interface CommentInterface
{
/**
* Store a new comment in storage.
*
* @param $request
* @return mixed
*/
public static function createComments($request);
/**
* Search the user in storage.
*
* @param $u... | true |
1456dc53ecee9e436350cc441dd177d085009b2d | PHP | FrannQuiroga/MoviePass | /Controllers/TicketController.php | UTF-8 | 4,401 | 2.90625 | 3 | [] | no_license | <?php
namespace Controllers;
use DAO\TicketDAO as TicketDAO;
use Models\Ticket as Ticket;
class TicketController
{
private $ticketDAO;
public function __construct()
{
$this->ticketDAO = new TicketDAO();
}
public function ShowListVi... | true |
5da06702f26cf7ae8078564d292db686081cfb3b | PHP | diossystem/multicasting | /src/Interfaces/SingleValueEntity.php | UTF-8 | 552 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Dios\System\Multicasting\Interfaces;
/**
* Is used for initialization an instance that uses a single value.
*/
interface SingleValueEntity extends MulticastingEntity
{
/**
* Fills an instance of a class with a value.
* May assign default value or throw an exception, also may return a s... | true |
c9c0d20f5455977625e95835dec223c5da0802a2 | PHP | btraas/CataclysmRemasteredMod | /setVersion.php | UTF-8 | 641 | 2.5625 | 3 | [] | no_license | <?php
/*
SetVersion - Brayden Traas
*/
$VERSION = 1.1;
$ERROR = "\033[31mERROR\033[0m";
$WARNING = "\033[33mWARNING\033[0m";
$file = "ui/newui/main/crmod/version.lua";
$ver = @$argv[1];
echo "CRMod setVersion v$VERSION - Brayden Traas".PHP_EOL.PHP_EOL;
echo "Setting CRMod version ".($... | true |
7ef86a62fe75634d98fc8d489e583826f7ae61f6 | PHP | galuhest/kuliner_web | /app/Http/Controllers/OrderController.php | UTF-8 | 2,366 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Order;
use Illuminate\Http\Request;
class OrderController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
... | true |
8cb0a37fbeb89c032476c3b0f63a3aeb30418c1f | PHP | kossa/blog | /app/Article.php | UTF-8 | 1,683 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Intervention\Image\ImageManagerStatic as Image;
use Storage;
class Article extends Model
{
protected $casts = [
'published_at' => 'dateTime',
];
protected $fillable = [ 'title', 'sub_title', 'slug', 'body', 'published_at', 'image'];... | true |
0ea95a8be8b54d0d85e8e4da580b48a50656e940 | PHP | workroot/ddk | /application/index/logic/LogoLogicQuery.php | UTF-8 | 962 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\index\logic;
use app\common\base\LogicQuery;
class LogoLogicQuery extends LogicQuery{
/**
* 获取logo图
* @return string
* @throws \Exception
*/
public function logo(){
try{
$logo = Db('banner')->where('type','=',2)->order('id desc')->find();... | true |
ffd4df4ffdd08e4d83725056f4b015f2ee391c41 | PHP | acodesmith/LABjs-and-yii-clientscript | /lab/labScript.php | UTF-8 | 1,932 | 2.609375 | 3 | [] | no_license | <?php
class labScript extends CClientScript {
//Instance of Client Script setin init()
public $cs;
//Asset folder location
protected $_assetsUrl;
//Required for Yii App Life Cycle
public function init() {
if (Yii::getPathOfAlias('labScript') === false)
Yii::setPathOfAlia... | true |
a88de23ba2dc4b79e5362aa9e92743b5fc412701 | PHP | interestingforked/ltc | /src/Ltc/ArticleBundle/Document/Category.php | UTF-8 | 3,687 | 2.5625 | 3 | [] | no_license | <?php
namespace Ltc\ArticleBundle\Document;
use DateTime;
use Gedmo\Sluggable\Util\Urlizer;
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* @MongoDB\Document(
* collection="category",
* repositoryClass="Ltc\ArticleBundle\Document\CategoryRepository"
* )
... | true |
def8af2766fe9116e302842011c40d6e482a03fa | PHP | ifeomi/i4 | /html/client.php | UTF-8 | 6,064 | 2.578125 | 3 | [] | no_license | <?php
/*******************************
client.php
By: Willy Xiao
willy@chenxiao.us
Developed for SCAS i4
masmallclaims@gmail.com
To use code, please contact SCAS or
Willy at the above emails.
August 2013
Description: Displays the client editing page.
Calls template client_form which in turn also requires
contact_f... | true |
a20054393e2401f2db0fd464f405ca6ab5ebe571 | PHP | meks285/cispro | /index/bkp/msf/msfmain.php | UTF-8 | 457,889 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
session_start();
$_SESSION=$_GET;
$con=mysql_connect("localhost","root","Nu66et%%","apindb");
mysql_select_db("apindb");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
class MyClass{
public function GetUserInformation(){
$repmonth = $... | true |
a690842fecfaf26e8aa4926a20955ebee504e6d2 | PHP | Mizukis/PHP_Pro | /Lesson_1_5.php | UTF-8 | 1,557 | 3.34375 | 3 | [] | no_license | <?php
// Задание 5. Результат 1234. Доступ к статическому свойству осуществляется через функцию и
// статическая $x доступна любому экземляру своего класса
class A {
public function foo() {
static $x = 0;
echo ++$x;
}
}
$a1 = new A();
$a2 = new A();
$a1->foo(); // 1
$a2->foo(); // 2
$a1->foo()... | true |
baa9c8b8e8d6359711f698de0c575e8f15715a7c | PHP | tardigradedigital/smss | /synservice/resources/libraries/azure/examples/Client/CloudStorageService.php | UTF-8 | 5,548 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* LICENSE: Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
*... | true |
fcf3085825b87d4eff5950eb6b5065bcf08dfa2c | PHP | dausuke/11_13_enclothse-3 | /main_consumer/consumer_php/shop_detail_data.php | UTF-8 | 1,207 | 2.734375 | 3 | [] | no_license | <?php
//検索されたデータ取得
session_start();
ini_set( 'display_errors', 1 );
// var_dump($_GET['searchWord']);
// exit();
include('../../functions.php');
$pdo = connect_to_db();
// var_dump($_GET);
// exit();
// データ取得SQL作成
$shop_id = $_GET['shop_id'];
$sql = "SELECT shopname,Introduction,area,photo,name,age,experience,image,b... | true |
7767ad269027e7caaf96bb836d69d1222a48fdeb | PHP | smjgordon/LRCA | /private_php/p_email.php | UTF-8 | 1,175 | 2.5625 | 3 | [] | no_license | <?php
// TODO: update once user class has been refactored
require_once 'p_server.php';
require_once 'p_system_settings.php';
require_once 'p_uri_functions.php';
function emailConfirmation($subject, $message, $toUsers, $redirectUri) {
global $CanSendEmail;
foreach ($toUsers as $user) {
$toStrings[] = '"' . $user->... | true |
7bf0ada474e40fca59c73d5d70a398ab3dcdb6e4 | PHP | fabiogif/designpatterns | /calculadoraDeDesconto.php | UTF-8 | 935 | 2.625 | 3 | [] | no_license | <?php
require_once 'DescontosCincoItens.php';
require_once 'DescontoQuinhentosReais.php';
require_once 'semDesconto.php';
require_once 'DescontoMilReais.php';
require_once 'DescontoPorVendaCasada.php';
class calculadoraDeDesconto
{
public function desconto(Orcamento $Orcamento)
{
$descontoCincoItens... | true |
66dd3b98edaf65e6017d1f945805ac812b2fbe21 | PHP | DevSlashNull/sawtooth-seth-php | /deploy_contract.php | UTF-8 | 1,092 | 2.9375 | 3 | [
"MIT"
] | permissive | <!doctype html>
<html>
<body>
<pre id="json"></pre>
<?php require "vendor/autoload.php";
/*Our PHP script exists as an HTML tag within the body of the script.
The opening tag also loads our dependencies*/
// Include our functions:
include_once "includes/functions.php";... | true |
6887e79762be7ab394862aec7bf655250f885819 | PHP | porkalmighty/enter-the-codegeon | /Models/Stage.php | UTF-8 | 4,273 | 3.234375 | 3 | [] | no_license | <?php
class Stage
{
private $collection;
private $stageName;
private $startPosition;
private $goalPosition;
private $obstacles;
private $pickedStage;
// Constructor
public function __construct($collection)
{
$this->collection = $collection;
}
// Se... | true |
8f8b8a9e149b9a10945cce5b569bd40594a68c22 | PHP | surest-sky/shop_surest | /database/migrations/2014_10_12_000000_create_users_table.php | UTF-8 | 1,489 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function ... | true |
64e39c309e41410377898fe9f09c8e5992143f78 | PHP | Stefkoff/restaurant-rate | /components/FlashShower.php | UTF-8 | 794 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Description of FlashShower
*
* @author Georgi
*/
namespace app\components;
use Yii;
use yii\base\Widget;
class FlashShower extends Widget{
public $key = null;
public $type = null;
public $extraText = null;
public function init() {
parent::init();
}
public fun... | true |
e5539c73be9ffd366b891605bc2b415b436b2a68 | PHP | dev-pradeep/FormApprovalTask | /project/server/src/Controller/MessageController.php | UTF-8 | 2,144 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
use App\Entity\Message;
use App\Service\MessageService;
class MessageController extends AbstractController
{
const CRON... | true |
54b9c96146e3dc553763b4cdf8b3e722adc92645 | PHP | digimon1740/learn-php | /string.php | UTF-8 | 196 | 2.625 | 3 | [] | no_license | <?php
// echo "Hello world!";
// var_dump(123);
// var_dump("123");
echo "Hello" . " " . "World";
echo " ";
echo "Hello\" Sanghoon \" World";
echo " ";
echo 'Hello"Sanghoon "World';
?>
| true |
1119d37b684245035d474833e0e7fbc4b0e35462 | PHP | materliu/movie-star-library | /app/Console/Commands/UnzipMovie.php | UTF-8 | 8,551 | 2.921875 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use ZipArchive;
class UnzipMovie extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'unzip:movie {input} {output} {tmpFolder?}';
/**
* The console ... | true |
88c328695125e62d82a0d0b87920cfdf82e9e92c | PHP | gerardoGomr/sise | /app/Infraestructura/Usuarios/UsuariosRepositorioLaravelSQLServer.php | UTF-8 | 1,366 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Sise\Infraestructura\Usuarios;
use DB;
/**
* Class UsuariosRepositorioInterface
* @package Sise\Infraestructura\Usuarios
* @author Gerardo Adrián Gómez Ruiz
*/
class UsuariosRepositorioLaravelSQLServer implements UsuariosRepositorioInterface
{
/**
* @return array
*/
public funct... | true |
25179eef482e2aa7a0bd69f3452a09b854a6372f | PHP | alifhunter/bookubook | /reg.php | UTF-8 | 5,756 | 2.78125 | 3 | [] | no_license | <?php
session_start();
require_once('includes/config.php');
/* new registration script */
if(isset($_POST['submit'])){
// mengambil data dari $_POST
$username = $_POST['username']; //data dari input username
$password1 = $_POST['password1']; //data dari input password
$password2 = $_POST['password2']; //data... | true |
b853b743e691fddc4bc623b0c98ffc65862c76f5 | PHP | DaWe35/DappDappGo | /public_html/api/add_skylink.php | UTF-8 | 1,642 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
header("Access-Control-Allow-Origin: *");
header('Content-Type: application/json');
require('../config.php');
require('../model/init.php');
function startsWith($string, $startString) {
$len = strlen($startString);
return (substr($string, 0, $len) === $startString);
}
function jsonexit($error, $description... | true |
5c5c9a2156ed1f3f9cd10eb2c7935c5f1743d469 | PHP | PestsovDmitrijj/forOxemStudio | /Crib.php | UTF-8 | 796 | 3.171875 | 3 | [] | no_license | <?
class Crib{
private $crib = [
'Cow' => array(),
'Hen' => array()
];
public function add_animal($animal_type){
$success = false;
foreach( $this->crib as $key => $value ){
if( $key == $animal_type ){
array_push( $this->crib[$key], new $key(count($this->crib[$key])) );
$success = true;
}
... | true |
e6d6a1aea03ca749909f6aa9b4794e1faece95a7 | PHP | solcre/updater-strategies | /src/Strategies/BrouUpdaterStrategy.php | UTF-8 | 1,646 | 2.96875 | 3 | [] | no_license | <?php
namespace Solcre\UpdatersStrategies\Strategies;
use Solcre\UpdatersStrategies\SourceUpdaterInterface;
class BrouUpdaterStrategy implements SourceUpdaterInterface {
private $source_url;
private $source_id;
function __construct($source_url, $source_id) {
$this->source_url = $source_url;
... | true |
6d6a67b8e152b860dc3121a2cf5dc9d904d78043 | PHP | juansevas99/inventario_1 | /framework/querybuilder/concreteDecorators/limit.php | UTF-8 | 959 | 3.03125 | 3 | [] | no_license | <?php
class limit extends aggregation{
public function __construct(operation $operation,$parameters)
{
$this->function="limit";
if($operation->function=="select" || $operation->function=="where"
|| $operation->function=="*" || $operation->function=="all"
|| $operation->funct... | true |
969fc41940c68fe29a812bc8dd367ffd38f9d46e | PHP | prajactakhopkar/DailyRetailCoupounz | /create-excel-report.php | UTF-8 | 1,280 | 2.640625 | 3 | [] | no_license | <?php
session_start(); //Start a new session or resume a session
require_once("db_info.php");
mysql_connect($db_host,$db_username,$db_password,$db_name);
mysql_select_db($db_name);
$selectQuery = "SELECT * from coupon order by coupon_id";
$header = '';
$result ='';
$couponData = mysql_query ($selectQuery );
$fields ... | true |
2a5cc62b3be7b4a5378a4de9919fb2ef6f87574e | PHP | bramus/ansi-php | /src/Traits/EscapeSequences/CUF.php | UTF-8 | 803 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
namespace Bramus\Ansi\Traits\EscapeSequences;
/**
* Trait containing the CUF Escape Function Shorthands
*/
trait CUF
{
/**
* Manually use CUF (Move cursor forward)
* @param array $data Parameter byte to the CUF Escape Code
* @return Ansi self, for chaining
*/
public function cuf(... | true |
505c62a7aa944f767b44e13fbcde45055a172327 | PHP | Asha2797/weblabvvce | /8c.php | UTF-8 | 559 | 3.421875 | 3 | [] | no_license | <?php
$trans = array(
array(1, 2,9),
array(3, 4,9),
array(5, 6,9)
);
echo "<h2> Matrix </h2>";
for ($row = 0; $row < 3; $row++) {
echo "<p><b>Row number $row</b></p>";
for ($col = 0; $col < 3; $col++) {
echo "<p>".$trans[$row][$col]."</p>";
}
}
array_unshift($trans, null);
$trans = call_user_fun... | true |
e752be3d0a30bcdb1cf2ec793c9007e8d70313e7 | PHP | Allba/mycard | /app/models/Blacklistip.php | UTF-8 | 1,558 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
class Blacklistip extends Eloquent {
public $rules = array('ip'=> array('required', 'regex:/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\z$/'));
protected $table = 'blacklist_ip';
public static function updateLoginFail($user){
$ip = getenv("REMOTE_ADDR");
$exists = Blacklistip::where('ip', '=' , $ip)->c... | true |
c1394051e67bc8ba0ee8640f17602b672d9035b1 | PHP | Clycheng/Uibe | /core/util/position.class.php | UTF-8 | 2,832 | 2.828125 | 3 | [] | no_license | <?php
include_once($root."/core/dao/categoryDao.php");
include_once($root."/core/dao/channelDao.php");
class Position {
function Position() {
}
static function cat($url, $catId) {
if ($catId == "" || $catId == 0) {
return "";
}
$categoryManager = ManagerFactory::getCategoryManager();
$categoryobject... | true |
5245f1279f9f9012ecaa4bc74fbc709e46584455 | PHP | btybug/membership | /src/Database/CreatePostsTable.php | UTF-8 | 1,148 | 2.59375 | 3 | [] | no_license | <?php namespace BtyBugHook\Membership\Database;
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePostsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public static function up... | true |
bf735b59b93c9834bb4265b6153567cf946f25c2 | PHP | quentinhorg/BHL_Clothes | /controleur/ControleurCatalogue.php | UTF-8 | 3,582 | 2.875 | 3 | [] | no_license | <?php
require_once('vue/Vue.php');
class ControleurCatalogue{
private $vue;
private $VetementManager;
private $TailleManager;
private $GenreManager;
private $CouleurManager;
private $CategorieManager;
// CONSTRUCTEUR
public function __construct($url){
if( isset($url) && count(... | true |
2b36a6d89b2a75cb6b4041fefe00e59eb826a24c | PHP | broccoli-html-editor/broccoli-html-editor | /fields/php/image.php | UTF-8 | 4,302 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* broccoli-html-editor fields
*/
namespace broccoliHtmlEditor\fields;
/**
* Image Field
*
* @author Tomoya Koyanagi <tomk79@gmail.com>
*/
class image extends \broccoliHtmlEditor\fieldBase{
/** $broccoli */
private $broccoli;
/** Dummy Image */
private $_imgDummy = 'data:image/png;base64,iVBORw0KG... | true |
ea35c0a4bbc82b2ff5c4718461248e10ef95e40f | PHP | Team-Squirtle-Squad/AnimeActu | /src/AppBundle/Services/AnimeService.php | UTF-8 | 1,260 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Tomy
* Date: 13/08/2018
* Time: 15:19
*/
namespace AppBundle\Services;
use AppBundle\Entity\Anime;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\File\UploadedFile;
class AnimeService
{
private $em;
public function __construct(Enti... | true |
e2e2ad0edf5d889ae459145ec1d39cb04c303669 | PHP | Nit-leang/jasmit | /web/ass(copy slide)/OOP/inheritance(3).php | UTF-8 | 220 | 3.265625 | 3 | [] | no_license | <?php
require_once("square.php");
$obj=new Square;
$obj->lenght=20;
$obj->width=20;
if($obj->isSquare()){
echo "The area of the square is:";
}else{
echo "The area of the retangle is:";
};
echo $obj->getArea();
?> | true |
c39a5023d72ef91381b52f580b1eee27f8309b2b | PHP | pobaby1125/taskmanager | /app/Http/ViewComposer/TaskAllComposer.php | UTF-8 | 527 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Http\ViewComposer;
use Illuminate\View\View;
use App\Repositories\TasksRepository;
class TaskAllComposer{
public $task;
public function __construct(){
$this->task = new TasksRepository();
}
public function compose(View $view){
... | true |
f7f0835a95cb193f1cb3be66087ab1032b048ea9 | PHP | HenriqueBS0/data-structures | /src/LinkedList.php | UTF-8 | 6,031 | 3.328125 | 3 | [] | no_license | <?php
namespace HenriqueBS0\DataStructures;
class LinkedList {
private Nodo|null $start = null;
private Nodo|null $end = null;
public function getStart() : Nodo|null
{
return $this->start;
}
private function setStart(Nodo|null $start) : self
{
$this->start = $st... | true |
00818123bfa84658bee863d814aeabc356b96d7f | PHP | Hans-Schwal/HitSongwriter | /models/database.php | UTF-8 | 632 | 2.6875 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of database
*
* @author hans
*/
class database{
public $db;
public function __construct(){
$this->db =... | true |
1d13b44c7723f8878dbfb5a41a7d689e72bd22de | PHP | jordan-hamblin/CSE-341 | /web/Proves/Week03/assign03_a.php | UTF-8 | 960 | 2.6875 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Checkout</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<header>
<ul>
<li><a href="assign03.php">B... | true |
bc5cbce80fda53e1113d3460f06bc032534207f6 | PHP | AJInddev/backendscripts | /torrents/trackers_list.php | UTF-8 | 1,320 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
use TorrentCheck\TrackerInfo;
// error_reporting(0);
?>
<!DOCTYPE html>
<html>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://ajax.... | true |
c7ed2910d499b79b0cb33c4b9a1df52d6a204856 | PHP | tiankonguse/record | /inc/verifyCode.php | UTF-8 | 1,328 | 2.78125 | 3 | [] | no_license | <?php
session_start();
$num = 4;
$width = $num *10 + 5;
$height = 28;
$str = "23456789abcdefghijkmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVW";
$verifyCode = '';
for ($i = 0; $i < $num; $i++) {
$verifyCode .= $str[mt_rand(0, strlen($str)-1)];
}
$_SESSION['verifyCode'] = $verifyCode;
header ('Content-Type: image/png');
$im =... | true |
711afdf0c22caa609d8d16232200acbae42e4588 | PHP | upovod/fl-ru-damp | /classes/card_verified.php | UTF-8 | 1,669 | 2.90625 | 3 | [] | no_license | <?
/**
* Класс для работы с пластиковыми картами пользователей.
*
*/
class card_verified
{
/**
* ИД
*
* @var integer
*/
var $id;
/**
* ИД аккаунта пользователя (accounts.id)
*
* @var integer
*/
var $account_id;
/**
* Дата проверки
*
* @var data
*/
var $v_date;
/**
* Номер карты
*
... | true |
bb578737131d1fb6d8567056177c37f4e5f9c042 | PHP | SWIFT-TECH/Chebut-Tea-FMS | /install.php | UTF-8 | 1,812 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
// Installer script for Chebut Tea Farmers Management System
// Database configuration
$hostname = 'localhost';
$username = 'root';
$password = '';
$database = 'chebut';
// Create database connection
$connection = new mysqli($hostname, $username, $password);
// Check connection
if ($connection->connect_error) ... | true |
1eaec2d4866fe00184be682d9c35798bfd7fee1a | PHP | phpchap/BuddyRest | /src/api/ApiDB.php | UTF-8 | 1,206 | 2.953125 | 3 | [] | no_license | <?php
$ds = DIRECTORY_SEPARATOR;
$src_folder = dirname(__FILE__) . $ds . "..".$ds."wordpress";
require_once $src_folder.$ds."wp-config.php";
/**
* MySQL DB. All data is stored in data_pdo_mysql database
* Create an empty MySQL database and set the dbname, username
* and password below
*
* This class w... | true |
e48f04b974e6d1f13514161a962545c863084323 | PHP | comanandrei1993/emag-hero | /src/Inerfaces/Abilities/RapidStrike.php | UTF-8 | 114 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Inerfaces\Abilities;
interface RapidStrike
{
public function rapidStrike($defDefence);
} | true |
f8ac31e9b63b0a90c75f011e82a73126a497d612 | PHP | alexwinter443/LaravelApi | /app/services/Business/SecurityService.php | UTF-8 | 1,265 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\services\Business;
use App\services\data\SecurityDAO;
//use App\services\data\CustomerDAO;
//use app\Models\CustomerModel;
//use App\services\data\OrderDAO;
///THIS IS DONE!
class SecurityService{
// gets all products
public function getAllProducts1(){
$security = new Securi... | true |
884bab953d8621e4a15b7188dbe67d1087656b39 | PHP | aakashdhar/rental | /rrsprovider/viewavailability.php | UTF-8 | 2,130 | 2.515625 | 3 | [] | no_license | <?php include 'includes/header.php'; ?>
<?php
$sql_tot = "SELECT * FROM `tbl_products` WHERE `partner_id` = '".$_SESSION['id']."'";
$result_tot = mysqli_query($con,$sql_tot);
if (isset($_POST['submit'])) {
$quantity = $_POST['quantity'];
$total = $_POST['total'];
$booking = $_POST['booking'];
$id... | true |
f0caa257d4393bc5ba5c36fb976c61cc817e3a92 | PHP | SnapluDJ/News-Website | /homepage.php | UTF-8 | 3,919 | 2.796875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<title>News Web Site</title>
<meta charset="utf-8" />
<link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>
<p id="logout">
<a href="logout.php">Logout</a>
</p>
<p>
<a href="friend.php">Friend</a>
</p>
<?php
session_start();
... | true |
7c5d5b655138116527f54cc7c81fbbfc27d3469d | PHP | NucProject/almada | /api/app/Models/Base/AdUserBase.php | UTF-8 | 490 | 2.515625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
namespace App\Models\Base;
/**
* @package App\Models
* Class AdUserBase
*
* Generated by 'php artisan model:create'
* Properties as follows
* @property $user_id
* @property $user_name
* @property $user_nick
* @property $user_password
* @property $group_id
*/
class AdUserBase exten... | true |
a1eb21d83ad4bbd3c0a5e721f4f5f2721a2aa3c8 | PHP | cultuurnet/udb3-export | /src/Notification/Swift/NotificationMailer.php | UTF-8 | 1,189 | 2.859375 | 3 | [] | no_license | <?php
/**
* @file
*/
namespace CultuurNet\UDB3\EventExport\Notification\Swift;
use CultuurNet\UDB3\EventExport\EventExportResult;
use CultuurNet\UDB3\EventExport\Notification\NotificationMailerInterface;
use ValueObjects\Web\EmailAddress;
/**
* Class NotificationMailer
*
* Notification mailer implementation tha... | true |
919ae5cc0112dbc647ab13a1c00bc676875b5e0e | PHP | Goerik/API.Yandex.Metrika | /YandexMetrika.php | UTF-8 | 4,763 | 2.65625 | 3 | [] | no_license | <?php
/**
* Yandex.Metrika API wrapper.
*/
class YandexMetrika extends YandexApiBase
{
protected static $service = 'https://api-metrika.yandex.ru';
/**
* Список доступных счетчиков
* GET /counters
* @param string $type - simple, partner
* @param string $permission - ownn, view... | true |
3b04fafa3c4c1dac2f0fe687dc4eea7b00d979ed | PHP | juanvoirin/TPFINAL | /DAO/TicketDAO.php | UTF-8 | 6,348 | 3.046875 | 3 | [] | no_license | <?php
namespace DAO;
use Models\Ticket as Ticket;
use DAO\ITicketDAO as ITicketDAO;
use DAO\Connection as Connection;
use DAO\QueryType as QueryType;
use DAO\UserDAO as UserDAO;
class TicketDAO implements ITicketDAO
{
private $connection;
private $tableName = "ticket... | true |
bfc9e3e4033e6a9d65c291c3788a91c42a4c4b0a | PHP | bizcommerce/cielo-commerce | /src/Cielo/API30/Ecommerce/Item.php | UTF-8 | 1,877 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace Cielo\API30\Ecommerce;
/**
* Class Item
*
* @package Cielo\API30\Ecommerce
*/
class Item implements \JsonSerializable
{
private $name;
private $quantity;
private $sku;
private $unitPrice;
/**
* @return array
*/
public function jsonSerialize(): mixed
{
... | true |
2536d7d29aabd488ea883840a7daf464b8ad5694 | PHP | phpstan/phpstan-src | /tests/PHPStan/Analyser/data/property-array.php | UTF-8 | 203 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace PropertyArray;
class Foo
{
private $property;
public function doFoo()
{
'start';
$this->property = [];
'emptyArray';
$this->property['foo'] = 1;
'afterAssignment';
}
}
| true |
cc86de7bd5c0c8320ed75b991ed379fdccce6dde | PHP | kahanov/short_links | /core/services/ShortLinksService.php | UTF-8 | 1,217 | 2.8125 | 3 | [] | no_license | <?php
namespace kahanov\shortlinks\core\services;
use kahanov\shortlinks\core\forms\CreateForm;
use kahanov\shortlinks\core\models\ShortLinks;
use Yii;
class ShortLinksService
{
/**
* @param CreateForm $form
* @return ShortLinks
* @throws \yii\base\Exception
*/
public function createShort... | true |
efe6d5e8ed0aac88ced658770b697150f14b6c7c | PHP | ryan-senn/DictTransformer | /src/Exceptions/MissingIncludeException.php | UTF-8 | 360 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace DictTransformer\Exceptions;
use Exception;
class MissingIncludeException extends Exception
{
public function __construct(string $transformer, string $include)
{
$message = "Transformer is missing the requested include method. Transformer: {$transformer}, Include: {$include}";
... | true |
5a7012a5fd77dbfe262c0cd082a3c70a50d2148e | PHP | allen-soler/php-piscine | /d04/ex02/modif.php | UTF-8 | 1,526 | 2.75 | 3 | [] | no_license | <?php
function check_existance($data, $username, $passwd) {
foreach ($data as $user) {
if ($user['login'] == $username && $user['passwd'] == $passwd) {
return true;
}
}
return false;
}
function getData($file) {
if (file_exists($file)) {
$priv = file_get_contents($fi... | true |
dee81f9e1c25558ddf824ce9d3530b4482cb8ae7 | PHP | flyfix/yawikpermission | /module/Core/test/CoreTestUtils/Constraint/UsesTraits.php | UTF-8 | 2,410 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
/**
* YAWIK
*
* @filesource
* @license MIT
* @copyright 2013 - 2016 Cross Solution <http://cross-solution.de>
*/
/** */
namespace CoreTestUtils\Constraint;
/**
* Constraint to assert that a class uses specific traits.
*
* @author Mathias Gelhausen <gelhausen@cross-solution.de>
* @since 0.26
* @s... | true |
2258faed6b73a3a44a8d0ccfd2d84caf30fa1d70 | PHP | Amber201604/conference-attendee-database | /room.php | UTF-8 | 1,040 | 3 | 3 | [] | no_license | <?php include "header.php"; ?>
<?php
$rid = $_POST["roomnumber"];
if(empty($rid)){
echo "It is empty!!! Please enter the room number<br>";
}
else{
echo "<h2>Room and Student information</h2>";
echo "<table><tr><th>Room Number</th><th>Bed Number</th><th>Student Name</th> </tr>";
#connect to the databa... | true |
e45ea26a226e13d74467c638a7fe4042ae73dee9 | PHP | bvipul/single-action-controller-demo | /app/Http/Controllers/PostStoreController.php | UTF-8 | 781 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Post;
use Illuminate\Http\Request;
use Validator;
class PostStoreController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function __invoke(Request $request)
{
$valida... | true |
dd46b8309b9f973d34e4619bdffd12459acbb7bd | PHP | GathuBoswell/izzum-statemachine | /src/statemachine/EntityBuilder.php | UTF-8 | 4,582 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace izzum\statemachine;
/**
* EntityBuilder is an object that builds an entity (an application domain specific
* model) for a Context object.
* It can be obtained via the factory method EntityBuilder::getEntity().
*
* The entity returned is the application domain specific object that will be
* inje... | true |
260985649050982b1fb362d5112d245022ab1c55 | PHP | linhnguyen125/Looki | /app/Repositories/BlogCategory/BlogCategoryRepository.php | UTF-8 | 1,406 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\BlogCategory;
use App\Repositories\BaseRepository;
class BlogCategoryRepository extends BaseRepository implements BlogCategoryRepositoryInterface
{
//lấy model tương ứng
public function getModel()
{
return \App\Models\BlogCategory::class;
}
public functio... | true |
a06eded6cdcf242398e3afeb09766d3934c340a8 | PHP | DaniloMerconSantos/skeleton | /skeleton/src/SkeletonModule/src/Infrastructure/Repository/AccountRepository.php | UTF-8 | 1,857 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: danilosantos@conder.intranet
* Date: 12/05/17
* Time: 16:57
*/
namespace SkeletonModule\Infrastructure\Repository;
use Doctrine\ORM\EntityManager;
use SkeletonModule\Model\Conta;
use SkeletonModule\Model\ModelInterface;
class AccountRepository
{
protected $model;
... | true |
94b7d515b262c8abd1e126509727fca9f2c9c407 | PHP | isaacloud-getresults/www-locations | /funkcje/leaderboard.php | UTF-8 | 3,311 | 2.734375 | 3 | [] | no_license | <?php
// create an array with leaderboard data
class Leaderboard{
var $users;
var $roomid;
var $members;
var $data2;
public function create_array($users, $roomid){
$tab = array();
$i=0;
foreach ($users as $user):
foreach($user['counterValues'] as $counter):
if(($counter["counte... | true |
3e58f03c5063d176dfe98bb088b282d336be24db | PHP | qianfunian/fandian | /library/Msd/Member/Order.php | UTF-8 | 827 | 2.6875 | 3 | [] | no_license | <?php
class Msd_Member_Order extends Msd_Member_Base
{
protected static $instances = array();
protected static $dao = null;
protected function __construct($uid)
{
parent::__construct($uid);
if (self::$dao==null) {
self::$dao = &Msd_Dao::table('order');
}
}
public static function &getI... | true |
e4c104a35cccbd5732bf929e1056c3d0250bbe14 | PHP | IrfanChairurrachman/hjmb | /app/Database/Seeds/ArticlesSeeder.php | UTF-8 | 1,474 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Database\Seeds;
use CodeIgniter\Database\Seeder;
class ArticlesSeeder extends Seeder
{
public function run()
{
//
$articles_data = [
[
'article_title' => 'Artikel Berita Pipa Rajalon',
'article_author' => 'John Doe',
'article_status' => 'Published',
'article_image' ... | true |