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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3a22534beb18bfdfb6a59cad1a82cff2beb3a11b | PHP | oliveirajonathas/MyMarket_projeto | /site/database.php | UTF-8 | 1,355 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
//Ler Registros
function DBRead($table, $params = null, $fields = '*'){
$params = ($params)? " {$params}": null;
$fields = ($fields)? "{$fields}" : "*";
$query = "SELECT {$fields} FROM {$table}{$params}";
$result = DBExecute($query);
if (!@mysqli_num_rows($result)) {
return false;
}else{
... | true |
94fc655fde7a3c151417a67023038eaa8a69a37c | PHP | bhudaya/payment_service_staging | /application/class/Iapps/PaymentService/PaymentAccess/HoldingAccountPaymentAccessChecker.php | UTF-8 | 527 | 2.53125 | 3 | [] | no_license | <?php
namespace Iapps\PaymentService\PaymentAccess;
use Iapps\Common\Microservice\AccountService\AccountServiceFactory;
class HoldingAccountPaymentAccessChecker extends PaymentAccessChecker
{
/*
* Only APP Public users are allow to utilize holding account
*/
public static function checkDirectionIn(... | true |
e44d5a58c260e59a7799ca305a5c9d11af56989f | PHP | megabr/Active-Record-Mirror | /ActiveRecord.0.1.php | UTF-8 | 10,984 | 3.015625 | 3 | [] | no_license | <?
class empty_class { function parent() { return false; } function child() { return false; }}
/*
Hi,
Modified class to support multiple has_many and belong_to configuration, also to add diferent primary key name, laike table_id, id or any other.
Max Rivera
class Category extends Record {
... | true |
0b1dd13983a57a51d3615450ddfc9ce14d069924 | PHP | GustavoNapa/reta | /page-sistema/produto/function/produto.php | UTF-8 | 1,515 | 2.671875 | 3 | [] | no_license | <?php
ob_start(); //abrir sessao
session_start();//iniciar sessao
error_reporting(0); //não exibir erros!*
function sc_getLoja($arr_where="", $_group=" ", $_order=" "){
// include conexao
include '../../../global/controller/conexao/conexao_pdo.php';
include 'global/controller/conexao/conexao_pdo.ph... | true |
798a76529dd60bc5d2e0103c649b2d57dcb4ee82 | PHP | binary-cats/laravel-zoom-webhooks | /src/Event.php | UTF-8 | 592 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace BinaryCats\ZoomWebhooks;
use BinaryCats\ZoomWebhooks\Contracts\WebhookEvent;
class Event implements WebhookEvent
{
/**
* Attributes from the event.
*
* @var array
*/
public $attributes = [];
/**
* Create new Event.
*
* @param array $attributes
*/
... | true |
e07eaf34c0e4009996436339a32ec9de9db05560 | PHP | ZanoniCintia/programacion3 | /programacion3/clase2/index.php | UTF-8 | 1,218 | 2.890625 | 3 | [] | no_license | <?php
/**
* METODOS PHP
* GET: Obtener recursos
* POST: Crear recursos
* PUT: Modificar recursos
* DELETE: Borrar recursos
*/
include_once './file.php';
include_once './auto.php';
$method = $_SERVER['REQUEST_METHOD'];
$path = $_SERVER['PATH_INFO'];
switch ($path) {
case '/auto':
if ($method == 'POS... | true |
650eb49197a0c6c353fb4d77c9fb7d58f2f9c66e | PHP | IvanBrazza/SDC | /lib/form/edit-account.php | UTF-8 | 3,305 | 2.765625 | 3 | [] | no_license | <?php
require("../common.php");
if (!empty($_POST)) {
if ($_POST['token'] != $_SESSION['token'] or empty($_POST['token'])) {
echo "Invalid token.";
die();
}
// Unset token
unset($_SESSION['token']);
// Check if updated email is already in use
if ($_POST['email'] != $_SESSION['... | true |
5e2fbce0ae56f899aa0a9645e452448b686d9060 | PHP | Fahning/mvpbex | /app/Http/Controllers/Tenant/CompanyController.php | UTF-8 | 863 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Tenant;
use App\Events\CompanyCreated;
use App\Http\Controllers\Controller;
use App\Models\Company;
use Illuminate\Http\Request;
use Illuminate\Support\Str;
class CompanyController extends Controller
{
private $company;
public function __construct(Company $company)
{... | true |
bc572d2705d449237b7056395b690ab2936223b4 | PHP | pinfort/JMA-Publish-Sharer | /app/Services/SocialAccountsService.php | UTF-8 | 2,605 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use Laravel\Socialite\Contracts\User as ProviderUser;
use App\Eloquents\User;
use App\Eloquents\LinkedSocialAccount;
class SocialAccountsService
{
public function findOrCreate(ProviderUser $providerUser, String $provider) : User
{
$account = LinkedSocialAccount::firstOrN... | true |
f38e7c2e0a36fb5a0f2eabbd001e0f559b111dc8 | PHP | spajz/l5 | /database/migrations/2015_05_19_105848_create_content_values_table.php | UTF-8 | 739 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateContentValuesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('content_values', function(Blueprint $table)
{
$t... | true |
6bc494b19f416dedd4315f1bed1769e41f3658f0 | PHP | hscale/micro-mongodb-cms | /index.php | UTF-8 | 2,821 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
$pageTitle = 'Frontpage';
require_once('mongo-config.php'); // MongoDB Connection
require_once('user.php');
$user = new User();
$currentPage = (isset($_GET['page'])) ? (int) $_GET['page'] : 1; // Get current page
$limitPosts = 5; // Total numbers of posts per page
$skipPage = ($currentPage - 1) * $limitPosts;
... | true |
4efafb0eb244089d5b5b30435c8e328eab8b466d | PHP | tetsu/JiraWorkLogSaver | /application/models/jira_model.php | UTF-8 | 13,344 | 2.515625 | 3 | [] | no_license | <?php
class Jira_model extends CI_Model
{
var $user_id = "";
var $userName = "";
var $projectKey = "";
function __construct()
{
parent::__construct();
}
/********************************************************************
Table "user"
id : int
email : varchar
first_name : varchar
las... | true |
0c575522e8c504578b4d0f9e311392be37e0c1ce | PHP | evertondepaula/laravel-doctrine-odm | /src/Queues/MongoQueue.php | UTF-8 | 8,956 | 2.75 | 3 | [] | no_license | <?php
namespace Epsoftware\Laravel\Doctrine\Mongo\Queues;
use Illuminate\Queue\Queue;
use Illuminate\Support\Carbon;
use Epsoftware\Laravel\Doctrine\Mongo\Queues\Jobs\MongoJob;
use Epsoftware\Laravel\Doctrine\Mongo\Queues\Jobs\MongoJobRecord;
use Illuminate\Contracts\Queue\Queue as QueueContract;
use MongoDB\Database... | true |
41e7b87930d95b85148b967476ab1808d266b1d1 | PHP | RIP-Peroni/php-project-lvl2 | /src/Formatters/Plain.php | UTF-8 | 1,709 | 2.984375 | 3 | [] | no_license | <?php
namespace Differ\Formatters\Plain;
use function Functional\flatten;
function render(array $diffTree): string
{
$result = makePlain($diffTree);
return implode("\n", flatten($result));
}
function makePlain(array $diffTree, string $path = ''): array
{
return array_map(
function ($node) use ($... | true |
91bf79d9f44af5cfb5e94db58104527ac4ac459f | PHP | isdarka/BaseProject | /module/Core/src/Core/Model/Factory/NotificationFactory.php | UTF-8 | 1,968 | 2.78125 | 3 | [] | no_license | <?php
/**
*
* NotificationBean
*
* GeCo
*
* @autor isdarka
* @category Model
* @package Factory
* @copyright
* @license
* @created Fri Jan 31 09:48:50 2014
* @version 1.0
*/
namespace Core\Model\Factory;
use Core\Model\Bean\Notification;
use Model\Factory\AbstractFactory;
use Core\Model\Exception\No... | true |
5b5daff0dc10ad6b47ef95aa5f4b7e1bf452aaa3 | PHP | manis6062/Eooro | /.svn/pristine/5b/5b5daff0dc10ad6b47ef95aa5f4b7e1bf452aaa3.svn-base | UTF-8 | 545 | 2.953125 | 3 | [] | no_license | <?php
require CLASSES_DIR.'/class_LoggablePDOStatement.php';
class LoggablePDO
{
/**
*
* @var \PDO
*/
private $pdo;
public function __construct(\PDO $pdo)
{
$this->pdo = $pdo;
}
public function prepare($statement, $options = array())
{
$stmt = $th... | true |
621f0bd8b7fc0e556d4d6630da4d593880de9b7a | PHP | Tar3ntino/monPremierProjet | /src/Controller/IndexController.php | UTF-8 | 3,492 | 2.796875 | 3 | [] | no_license | <?php
// src/Controller/IndexController.php
namespace App\Controller;
// NOS DEPENDANCES :
use App\Entity\User;
use Twig\Environment;
use App\Form\UserType;
use App\Entity\Contact;
use App\Form\ContactType;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bun... | true |
18629843640d8081f7d984cb599671a775d4058d | PHP | jlrn-rph/jmc-clinic-management | /app/Http/Controllers/UserController.php | UTF-8 | 4,729 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Requests\CreateUserRequest;
use App\Http\Requests\UpdateUserRequest;
use App\Repositories\UserRepository;
use App\Http\Controllers\AppBaseController;
use Illuminate\Http\Request;
use Flash;
use Response;
use App\Role;
use DB;
use PDF;
use App\User;
use Gate;
class U... | true |
3de74b7b252df998d4fa788d5bf5a9c3f5f0c444 | PHP | liyiru-droid15/ys7 | /src/Cache.php | UTF-8 | 1,633 | 2.953125 | 3 | [] | no_license | <?php
namespace droid15;
//默认缓存目录,建议不修改以免删除重要数据
define("CACHE_PATH", __DIR__.'/cache/');
class Cache {
/**
* 存缓存
* @param [string] $k [缓存键名]
* @param [mix] $value [缓存内容]
*/
public static function set($k, $value)
{
if(!is_string($k) || !trim($k)){
return false;
}
$key = CACHE_PATH.sha1(md... | true |
2d7ac77067cc918ca72f34de5e00fa922232699b | PHP | SylvainTran/anime-flix | /animeflix_multipages_src/assets/server/product-delete.php | UTF-8 | 1,363 | 2.59375 | 3 | [] | no_license | <?php
session_start();
?>
<!doctype html>
<html lang="en">
<?php include '../head.html';?>
<body>
<?php include '../nav-admin.html';?>
<?php
require_once("../db/connect.inc.php");
$deleteId=$_POST['admin__delete-id'];
$request="SELECT * FROM products WHERE id=?";
$stmt=$conn... | true |
200d2a5fa3312b985e0ccfa6cc3b934bbb6b5294 | PHP | LolliFart/barangay-profiling-and-clearance-issuance | /classes/Utilities/Validator.class.php | UTF-8 | 10,344 | 2.65625 | 3 | [] | no_license | <?php
namespace Classes\Utilites;
class Validator{
private $data;
private $errors = [];
private $message = [
'invalid' => 'invalid input',
'checked' => 'must be checked',
'empty' => 'please put something here',
'min' => 'input is too ... | true |
bff3cde2be001f501b108bb0aaf2e9d7c2e1828e | PHP | myeti/discord | /Http/Response/Json.php | UTF-8 | 678 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Discord package.
*
* Copyright Aymeric Assier <aymeric.assier@gmail.com>
*
* For the full copyright and license information, please view the `licence`
* file that was distributed with this source code.
*/
namespace Discord\Http\Response;
use Discord\Http\Response;
class Jso... | true |
3cc441963e51a8e5f1a0d88f3be5dab11bbefe7e | PHP | Ceciliaa/laravel-restify | /src/Fields/BelongsTo.php | UTF-8 | 2,044 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Binaryk\LaravelRestify\Fields;
use Binaryk\LaravelRestify\Fields\Concerns\Attachable;
use Binaryk\LaravelRestify\Http\Requests\RestifyRequest;
use Binaryk\LaravelRestify\Repositories\Repository;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class BelongsTo extends EagerField
{
... | true |
52172c4d8676b19afef97fb48df3b65e0d2097fd | PHP | KWRI/laravel-kong-route-publisher | /src/Console/PublishRouteCommand.php | UTF-8 | 8,610 | 2.546875 | 3 | [] | no_license | <?php
namespace KWRI\KongPublisher\Console;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use Illuminate\Routing\Route;
use Illuminate\Routing\Router;
use Illuminate\Console\Command;
use Illuminate\Routing\Controller;
use Symfony\Component\Console\Input\InputOption;
use Ignittion\Kong\Kong;
use Illuminate\F... | true |
9c36e811e19b5e9ddfafae129d667608c6589cb3 | PHP | wschams/notes | /class/PHP/71/session.php | UTF-8 | 514 | 2.9375 | 3 | [] | no_license | <?php
session_start();
if(!empty($_SESSION['count'])) {
$count = $_SESSION['count'] + 1;
} else {
$count = 1;
}
$_SESSION['count'] = $count;// + 1;
$_SESSION['test'] = "Hello There!";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, i... | true |
1bb691bd1502b5de25bfe8040e6f6bb99a4cb16a | PHP | async-aws/aws | /src/Service/Rekognition/src/Result/CreateCollectionResponse.php | UTF-8 | 1,453 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace AsyncAws\Rekognition\Result;
use AsyncAws\Core\Response;
use AsyncAws\Core\Result;
class CreateCollectionResponse extends Result
{
/**
* HTTP status code indicating the result of the operation.
*
* @var int|null
*/
private $statusCode;
/**
* Amazon Resource Name ... | true |
d4104d31d28cfa0a8e094215d010ca527903f329 | PHP | omart-code/SPE | /entities/DegreeCourseTeacher.inc.php | UTF-8 | 1,840 | 2.8125 | 3 | [] | no_license | <?php
class DegreeCourseTeacher {
private $id_profesor_curso_grado;
private $id_curso_grado;
private $niu_profesor;
private $max_estudiantes;
private $estudiantes_asignados;
public function __construct($id_profesor_curso_grado, $id_curso_grado, $niu_profesor, $max_estudiantes, $est... | true |
ec2789a46366e4d3273b0ff924ce154ffab52bef | PHP | jfadich/MyFamilySocial | /app/Services/Authorization/AccessControl.php | UTF-8 | 806 | 2.734375 | 3 | [] | no_license | <?php namespace MyFamily\Services\Authorization;
use MyFamily\Exceptions\AuthorizationException;
use Illuminate\Database\Eloquent\Model;
class AccessControl
{
public function __construct()
{
$this->currentUser = \JWTAuth::toUser();
}
/**
* Check a requested action against the permissions... | true |
146a322ed18bd69495111be6738796c47549b0fd | PHP | pieman1981/Shopify | /models/login_model.php | UTF-8 | 3,002 | 2.59375 | 3 | [] | no_license | <?php
class Login_Model extends Model {
public function __construct() {
parent::__construct();
}
public function run($login = '', $password = '') {
$User = new User_Model();
$data = $User->find(array('fields' => array('id','name'), 'conditions' => array('login' => $l... | true |
f7ccde3653d12e40e62d1a2661ff648a020c6c70 | PHP | LukasKalinski/Shopping-List | /lib/IKL/Domain/Account/EDO/Interface.php | UTF-8 | 613 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
*
*
* @package IKL
* @subpackage Domain
* @since 2007-11-10
* @version 2007-11-17
* @copyright Cylab 2007
* @author Lukas Kalinski
*/
require_once 'IKL/Domain/EDO/Interface.php';
/**
* Base Interface for all Account EDO's.
*
* @access public
*/
interface IKL_Domain_Account_EDO_Interface
exten... | true |
781830f071229bfeaf236f696afe98eb10201193 | PHP | ParadoxPixel/Framework | /App/Controllers/LoginController.php | UTF-8 | 974 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Controllers;
use Fontibus\Collection\Collection;
use Fontibus\Facades\Auth;
use Fontibus\Facades\Controller;
use Fontibus\Facades\Validator;
use Fontibus\Route\Redirect;
class LoginController extends Controller {
public function __construct() {
$this->middleware(['guest']);
}
... | true |
23a17e9e839d63587ad90c0522950c273d3e1652 | PHP | MunzirAhmadh/IMS_HBCA | /HinduBuddistCulturalAssociation/Admin/incl/classroom_handle.php | UTF-8 | 2,656 | 2.53125 | 3 | [] | no_license | <?php
/*act_mode post value contain the information of selecting particular function*/
if(isset($_POST['act_mode'])){
if($_POST['act_mode']=="add_clroom"){
add_clroom();
}
if($_POST['act_mode']=="load_clroom_data"){
load_clroom_data();
}
if($_POST['act_mode']=="update_clroom"){
update_clroom();
... | true |
a07ff007b5cb7302d29a6cfc7bae2c13c9a6c090 | PHP | PapooSoftware/PapooCMS | /lib/ez_sql_core.php | UTF-8 | 18,552 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
if (strstr( $_SERVER['PHP_SELF'],'ez_sql_core.php')) die('You are not allowed to see this page directly');
/**********************************************************************
* Author: Justin Vincent (jv@vip.ie)
* Web...: http://justinvincent.com
* Name..: ezSQL
* Desc..: ezSQL Core module - datab... | true |
c58c7edeae123c5c0d78dbca8067d980a56d5fbd | PHP | nnsncl/BitChest | /server/app/Http/Controllers/TransactionsController.php | UTF-8 | 2,197 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\Transactions;
use App\Models\User;
use Illuminate\Http\Request;
class TransactionsController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
re... | true |
27314e4717c7a0c9aa61de311492fffd78bb64ef | PHP | Carlos-Daniel2002/curso-backend-bitlab | /M01T04/18.php | UTF-8 | 1,877 | 3.9375 | 4 | [] | no_license | <?php
$number1 = 100;
$number2 = 13;
echo"Para el numero $number1 <br>";
while($number1 > 1){
if ($number1%2==0) {
echo"Mitad de $number1= " . ($number1/2) . "<br>";
$number1 /= 2;
}
else if($number1%3==0){
echo"Tercera de $number1= " . ($numbe... | true |
2db35e93dc58eaae75fab645f20b98bb43ee6846 | PHP | lejewk/consul_kv | /service_fileupload/src/vendor/dcarbone/php-consul-api/src/Agent/AgentMember.php | UTF-8 | 2,565 | 2.515625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php namespace DCarbone\PHPConsulAPI\Agent;
/*
Copyright 2016-2017 Daniel Carbone (daniel.p.carbone@gmail.com)
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... | true |
59878d270d4b7cb2ef49b4bd607c38b6d213eed2 | PHP | aquaruiz/PHP-MVC-Frameworks-Symfony | /MVC Introduction/My MVC/Repository/UserRepository.php | UTF-8 | 360 | 2.703125 | 3 | [] | no_license | <?php
namespace Repository;
use \Model\UserRegisterFormModel;
use \PDO;
class UserRepository
{
private $db;
public function __construct(\PDO $db){
$this->db = $db;
}
public function insert(UserRegisterFormModel $user_model)
{
$this->db->prepare(
'INSERT INTO users (USER_NAME, PASSWORD) VALUES (:usernam... | true |
0d8a260c88be025c5350af3c881b477f54e2e2d3 | PHP | Gseropia42/camagru | /pass_change.php | UTF-8 | 2,489 | 2.625 | 3 | [] | no_license | <?php
if($_SERVER['REQUEST_METHOD'] == 'GET' && isset($_GET['v'])) {
include_once "pdo_connect.php";
$query = $dbh->prepare('SELECT * FROM user WHERE valid_mail = :valid');
try {
$query->execute(array(':valid' => $_GET['v']));
$result = $query->fetch();
} catch (Exception $e) {
... | true |
ccf951071cdb080f71698c448c4c0e7508242a89 | PHP | savan007/Blood_Bank | /Online Bloodbank database/changepassword.php | UTF-8 | 1,193 | 2.515625 | 3 | [] | no_license | <?php
include('config.php');
$data = (array)json_decode(file_get_contents("php://input"));
$username = $_REQUEST['user_name'];
$password = $_REQUEST['password'];
$newpassword = $_REQUEST['newpassword'];
$sql="SELECT * FROM login WHERE user_name ='$username' AND password ='$password'";
$select = mysql_query($sql);
$... | true |
d0ca4109cc70d3ff2f7e72a7a2e0ef74a91ea7ea | PHP | saulhoward/haddock-cms | /core/tags/2008-08-10/admin/classes/Admin_NXFPage.inc.php | UTF-8 | 2,940 | 2.734375 | 3 | [] | no_license | <?php
/**
* Admin_NXFPage
*
* @copyright 2008-04-29, RFI
*/
class
Admin_NXFPage
{
private $page;
private $module;
private $section;
private $url;
private $special_page;
private $page_class;
public function
__construct()
{
$this->page = NULL;
$this->module = NULL;
$this->section = NULL;
$this->... | true |
6f3060070f54744512c0bfc09fdb1da58c210e2c | PHP | Daniel2506/SSSmartAPP | /app/Classes/HomeCharts.php | UTF-8 | 3,742 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Classes;
use Illuminate\Http\Request;
use App\Models\Base\Machine;
use DB;
class HomeCharts {
private $sql_condition = "";
public $error = null;
function __construct(Request $request)
{
// Meses & dias en español
DB::statement('SET lc_time_names = es_ES');
... | true |
d41dabf01d65434ad3aec96e81209617038bdaa7 | PHP | potherca-blog/ProjectEuler | /src/PHP/Solutions/Problem002.php | UTF-8 | 958 | 3.578125 | 4 | [] | no_license | <?php
/**
* Project Euler Problem 2: Even Fibonacci numbers
*
* Each new term in the Fibonacci sequence is generated by adding the previous
* two terms. By starting with 1 and 2, the first 10 terms will be:
*
* 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
*
* The sum of the even-valued terms whose values do not ... | true |
5974205bc2ee5d9053a08210dda9d36a35ef8266 | PHP | timspace1988/JiaBlog | /app/Http/Requests/TagCreateRequest.php | UTF-8 | 789 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Http\Requests\Request;
/**
* This is a request class which contains validation logic
*/
class TagCreateRequest extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
... | true |
51dd149e1eaf1e0a4f3ccc9a83f90c9ef99c92ed | PHP | zerasul/BullyingAPI | /core/db/dbHelper.php | UTF-8 | 1,096 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
require_once 'core/db/MySQL.php';
class dbHelper{
private $sqlConnection;
public function __construct(){
$this->sqlConnection=MySQL::getConnection();
}
public function getRanking(){
$sql ="select * from votosusuarios order by votos desc";
$params = array();
$this->sqlConnection->ejecutar("... | true |
c6b9724e8a3807a808c2fc494b18d52fbfed7ddc | PHP | jasny/persist-core | /src/Option/LookupOption.php | UTF-8 | 4,993 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Jasny\Persist\Option;
use Jasny\Persist\Filter\FilterItem;
use Jasny\Immutable;
use Jasny\Persist\Schema\Relationship;
use Jasny\Persist\Schema\SchemaInterface;
/**
* Option to lookup related data from other collections / tables.
*/
class LookupOption implements OptionInte... | true |
ca533e7b1baee9d82553257ba60c72b06e572841 | PHP | patriciatamega/estruturas-condicionais | /if/exemplo-01.php | UTF-8 | 739 | 3.8125 | 4 | [] | no_license | <?php
//if: se a condição for (verdadeira), ele vai {executar}
$qualASuaIdade = 30;
$idadeCrianca = 12;
$idadeMaior = 18;
$idadeMelhor = 65;
if ($qualASuaIdade < $idadeCrianca){
echo "Criança";
}
// else: senão. Importante lembrar que else é usado só no final e uma única vez.
/* else {
echo "Não é criança"... | true |
b32a7a261df2272bc792fae0c42f7b3687ed0fbc | PHP | Zeafier/AdminAudit | /functions/Staff_function.php | UTF-8 | 16,296 | 3 | 3 | [
"MIT"
] | permissive | <?php
class staff{
//insert staff
public function insertstaff($con){
//register staff member
if((isset($_POST['Create_staff']) || isset($_POST['Create']) || isset($_POST['Add_order']) || isset($_POST['Edit_order'])) && !empty($_SESSION['login']) && $_SESSION['isadmin'] == 1){ # proceed funct... | true |
cde774e790e3026d50fded24dc5c212f7a76f464 | PHP | hamroy/berlatih-php | /papan-catur.php | UTF-8 | 684 | 3.515625 | 4 | [] | no_license | <?php
function papan_catur($angka) {
// tulis kode di sini
$angka2=$angka;
$spasi=" ";
for ($i=0; $i < $angka; $i++) {
if ($i%2==1) {
// $as=1;
$angka2 = $angka2-1;
$spasi=" ";
echo " ";
}else{
$angka2 = $angka2+1;
$spasi=" ";
}
for ($j=0; $j < $angka2; $j++) {
ech... | true |
005f340ab8c88244bdf39e47fe72ea6b85948182 | PHP | zygimantask/PHP-MySQL | /SimpleOnlineShopWithoutDesign/vidus.php | UTF-8 | 3,688 | 2.546875 | 3 | [] | no_license | <?php
if (mysqli_connect_errno()) {
echo mysqli_connect_error();
} else {
include "prisijungimasDB.php";
if (isset($_GET["dashboardAction"])) {
switch ($_GET['dashboardAction']) {
case 'atsijungti':
setcookie("username", "username", time() - 60 * 60 * 4);
... | true |
b19c11db449ba441c824e83c066412e7c0b1c55a | PHP | FabioBatSilva/pipeline-streams | /src/Pipeline/Sink.php | UTF-8 | 2,057 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | <?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS B... | true |
af02297e0972369a44c7202f48c50ec6f20eaa55 | PHP | cgt-training/yii_demo | /backend/models/Department.php | UTF-8 | 2,178 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "department".
*
* @property integer $dept_id
* @property integer $branch_id
* @property integer $company_id
* @property string $dept_name
* @property string $dept_create_date
* @property string $dept_status
*
* @property Branch $b... | true |
3d4387b82bfab488158e3e876c2a810b47c5de86 | PHP | Thomasevano/NewsWebsite | /Models/articles.php | UTF-8 | 351 | 2.625 | 3 | [] | no_license | <?php
function add_articles ()
{
global $bdd;
$sql = "INSERT INTO articles (id_u, link, titre) VALUES (:id_u, :link, :titre)";
$requete = $bdd->prepare($sql);
$requete->bindParam(':id_u', $_SESSION['id']);
$requete->bindParam(':link', $_GET['link']);
$requete->bindParam(':titre', $_GET['titre'... | true |
794d1dae9b6d429ddef7fdaedf305fa802249baa | PHP | scarwu/Diablo3Calculator | /src/Controller/Api/ProfileController.php | UTF-8 | 1,778 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Api/Profile Controller Example
*
* @package Diablo III Calculator
* @author ScarWu
* @copyright Copyright (c) 2012-2014, ScarWu (http://scar.simcz.tw/)
* @link http://github.com/scarwu/Diablo3Calculator
*/
namespace OniApp\Controller\Api;
use Oni\Controller;
use Oni\Req;
use Oni... | true |
11e1b114f20a0f6cf621eef9c21842705e003b87 | PHP | bandazhenxin/coolthings | /vendor/inhere/php-validate/src/Filter/Filters.php | UTF-8 | 17,358 | 3.296875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @date 2015.08.05 sanitize
* 过滤器(strainer/filter): 过滤数据,去除不合要求的数据,返回过滤后的数据(始终返回字符串, 全部不符合返回空字符串)
*/
namespace Inhere\Validate\Filter;
use Inhere\Validate\Helper;
use Inhere\Validate\Traits\NameAliasTrait;
/**
* Class Filters
* @package Inhere\Validate\Filter
*/
final class Filters
{
use NameAlia... | true |
c212bd3fcd1544bea8f7efcd18cded21c2225655 | PHP | mamepon2580/psAppLike | /source/app/Http/Controllers/FriendController.php | UTF-8 | 2,441 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Friend;
use Illuminate\Http\Request;
class FriendController extends Controller {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$friends = Friend::orderB... | true |
d7a72fc860b3e5cac24c15d2ee71086b284f896e | PHP | Chloe2021Bai/f-Web-Server-Applications-Classwork- | /session3/create2.php | UTF-8 | 620 | 2.765625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Create</title>
</head>
<body>
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "customers";
$connection = new mysqli($servername, $username, $password, $dbname);
$sql = "INSERT INTO customers VALUES ('".$_POST["customersID"]."','".$_POST... | true |
d67807fae6c8c6bb63756355bc2f077b257bea67 | PHP | guyradford/engineering-codetest-php | /src/Awin/Tools/CoffeeBreak/Services/Renderer/PreferencesForTodayRenderer.php | UTF-8 | 2,274 | 2.9375 | 3 | [] | no_license | <?php
namespace Awin\Tools\CoffeeBreak\Services\Renderer;
use Awin\Tools\CoffeeBreak\Entity\CoffeeBreakPreference;
class PreferencesForTodayRenderer implements RendererInterface
{
public function renderJson($data): string
{
return json_encode([
"preferences" => array_map(
... | true |
f95898c49ca0202af541ff2781093bb5b96899af | PHP | DarrenInwood/silverstripe-css-js-munger | /code/useragent/Useragent.php | UTF-8 | 15,241 | 2.78125 | 3 | [] | no_license | <?php
/**
* @class Useragent
*
* The Useragent class can be checked out out of svn at:
* http://svn.chrometoaster.com/svn/src/libraries/useragent
*
* Provides methods for breaking apart and analysing browser User Agent strings.
* Hopefully future-proofed.
* This uses the method from http://www.texsoft.it/index... | true |
6493479321fe21907a287af5cd064e0cf5446beb | PHP | DanielCanaviriMenaWebDeveloper/PHP-7-POO | /11_CRUD/index.php | UTF-8 | 1,674 | 2.890625 | 3 | [] | no_license | <?php
require_once "conexion.php";
require_once "metodosCrud.php";
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>CRUD CON PHP</title>
<style>
table {
box-shadow: 10px 10px 5px;
border-collapse: collapse;
margin: 50px auto;
}
td, th {
border: 2px solid red;... | true |
e86da78413bb7325d52be1dfab81c124d7d7477f | PHP | ctl5563096/basic | /components/ExceptionHandler.php | UTF-8 | 948 | 2.640625 | 3 | [] | permissive | <?php declare(strict_types=1);
namespace app\components;
use Yii;
use yii\web\BadRequestHttpException;
use yii\web\ErrorHandler;
use yii\web\NotFoundHttpException;
/**
* 统一异常处理器
*
* Class ExceptionHandler
* @package yii\components
*/
class ExceptionHandler extends ErrorHandler
{
/**
* 统一异常处理方法
*... | true |
3fb882637fbb65fb6c48a809456192a892696b89 | PHP | kraftp/Leginon-Feature-Detection-Modification | /myamiweb/processing/stackhierarchy.php | UTF-8 | 3,920 | 2.609375 | 3 | [] | no_license | <?php
/**
* The Leginon software is Copyright 2003
* The Scripps Research Institute, La Jolla, CA
* For terms of the license agreement
* see http://ami.scripps.edu/software/leginon-license
*
* Simple viewer to view a image using mrcmodule
*/
require_once "inc/particledata.inc";
require_once "inc/leginon.inc";... | true |
ce4fb0a6e63e573d56a298c20f836f56d3721b22 | PHP | hakamanathhar/petshop | /pembeli/cart.php | UTF-8 | 1,570 | 2.53125 | 3 | [] | no_license | <?php
require 'item.php';
if(isset($_GET['id']) && !isset($_POST['update'])) {
$sql = "SELECT * FROM barang WHERE id=".$_GET['id'];
$result = mysqli_query($con, $sql);
$product = mysqli_fetch_object($result);
$item = new Item();
$item->id = $product->id;
$item->nama = $product->nama;
$item->kategori = $produ... | true |
4360003293ac21a4b429378443536efc7ae82df2 | PHP | Hendridev/Latihan_Soal | /php/hasil.php | UTF-8 | 1,172 | 2.71875 | 3 | [] | no_license | <?php
session_start();
include('../db/function.php');
$db = new database();
$user = $db->tampil_user();
$soal = $db->tampil_soal();
$no = 1;
$score = 0;
$nama = $_SESSION['nama_user'];
foreach($soal as $sl){
if(isset($_POST['kirim'])){
if(!empty($_... | true |
e4929a470c384adf2ec8c487d3ceef26b042adfd | PHP | rocambolesque/kanbanlite | /application/models/CardStatusOwnerMapper.php | UTF-8 | 3,318 | 2.671875 | 3 | [] | no_license | <?php
class KanbanLite_Model_CardStatusOwnerMapper extends KanbanLite_Model_Mapper
{
public function __construct()
{
$this->dbTableClassName = 'KanbanLite_Model_DbTable_CardStatusOwner';
}
public function find($id, KanbanLite_Model_CardStatusOwner $cardStatusOwner)
{
$result = ... | true |
1c86df8bdbee024e0a7f19078ef76a8fd51670d4 | PHP | formation-dwwm/ecf2_Cursusdev | /main.php | UTF-8 | 2,547 | 2.765625 | 3 | [] | no_license | <?php
require_once 'header.php';
require_once 'classes/db.php';
require_once 'classes/users.php';
require_once 'classes/services.php';
/* Classes actives menu */
if (isset($_SERVER['REQUEST_URI'])) {
$activeAccueil = ($_SERVER['REQUEST_URI'] == '/ecf2_Cursusdev/index.php') ? 'active' : '';
$activeCreate = ($_SER... | true |
9d3eb87bfd9ec7f0b99605adcf9f328e742910b9 | PHP | hryvinskyi/magento2-responsive-images | /Module/ImageInterface.php | UTF-8 | 1,159 | 2.5625 | 3 | [] | no_license | <?php
/**
* Copyright (c) 2021. All rights reserved.
* @author: Volodymyr Hryvinskyi <mailto:volodymyr@hryvinskyi.com>
*/
declare(strict_types=1);
namespace Hryvinskyi\ResponsiveImages\Module;
interface ImageInterface
{
/**
* @return string
*/
public function getUrl(): string;
/**
* @p... | true |
2f948dfb827db78f9aa982e96cdb1f3caafe290e | PHP | calvinmok/SMS | /lib-dataDirectory.php | UTF-8 | 1,684 | 2.796875 | 3 | [] | no_license | <?php
require_once("lib-stockType.php");
require_once("lib-customer.php");
require_once("lib-invoice.php");
require_once("lib-restock.php");
require_once("lib-user.php");
class DataDirectory
{
public static function createDef()
{
return DataDirectory::create('data');
}
private $directory;
... | true |
28c1baa6e574e016d918dc6bb5d85c227c22b178 | PHP | MutugiBrian/eCAST | /includes/functions.php | UTF-8 | 2,001 | 2.890625 | 3 | [] | no_license | <?php
function makequery($query){
include 'includes/strings.php';
$conn = mysqli_connect($server,$dbuser,$dbpass,$dbname);
if (mysqli_connect_errno($conn)){
return $a = array('error', 'Failed to connect to MySQL: ' . mysqli_connect_error());
}else{
if ($result = mysqli_query($conn,$query)){
... | true |
4070ef7ca7f6158e165f0ea9694bc9886749c2df | PHP | muhammad-anwaar/algorithms | /Cats_and_a_Mouse/index.php | UTF-8 | 409 | 3.421875 | 3 | [] | no_license | <?php
$handle = fopen ("input.txt","r");
fscanf($handle,"%d",$q);
for($a0 = 0; $a0 < $q; $a0++){
fscanf($handle,"%d %d %d",$x,$y,$z);
$distance_A=abs($z-$x);
$distance_B=abs($z-$y);
if($distance_A < $distance_B)
{
echo "Cat A \n";
}
else if($distance_B < $distance_A)
... | true |
d3c81162c5775ac5b3f677072ca63d7d699a059e | PHP | microsoftgraph/msgraph-beta-sdk-php | /src/Generated/Models/GroupPolicyUploadedPresentation.php | UTF-8 | 2,997 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Microsoft\Graph\Beta\Generated\Models;
use Microsoft\Kiota\Abstractions\Serialization\Parsable;
use Microsoft\Kiota\Abstractions\Serialization\ParseNode;
use Microsoft\Kiota\Abstractions\Serialization\SerializationWriter;
/**
* Represents an ADMX checkBox element and an ADMX boolean element.
*/
clas... | true |
ba44ab7b96548f153d9b48d653252ba9e1e36f64 | PHP | plivo/plivo-php | /src/Plivo/Resources/Pricing/OutboundNetwork.php | UTF-8 | 714 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace Plivo\Resources\Pricing;
/**
* Class OutboundNetwork
* @package Plivo\Resources\Pricing
*/
class OutboundNetwork
{
/**
* @var string
*/
public $groupName;
/**
* @var string
*/
public $rate;
/**
* OutboundNetwork constructor.
* @param string $group... | true |
635924bcca971c577482eea9ffafb8b740bebd33 | PHP | qiwi3268/Expertise | /Lib/Singles/Logger.php | UTF-8 | 2,294 | 3.109375 | 3 | [] | no_license | <?php
namespace Lib\Singles;
use Lib\Exceptions\Logger as SelfEx;
use Exception;
use core\Classes\Request\Request;
use core\Classes\Session;
/**
* Предназначен для логирования действий
*
*/
class Logger
{
private string $path;
/**
* Конструктор класса
*
* @param string $path абсолютн... | true |
e066249d9b134694f61eacd2928aefdf2116da1b | PHP | NBSgamesAT/HTL3R-MED2019 | /Login/index.php | UTF-8 | 2,574 | 2.71875 | 3 | [] | no_license | <?php
session_start();
$SHOW_ERROR = false;
if(isset($_POST["submit"]) && $_POST["submit"] === "LOGIN"){
if(isset($_POST["benutzername"]) && $_POST["benutzername"] != "" && isset($_POST["passwort"]) && $_POST["passwort"] != ""){
$benutzername = $_POST["benutzername"];
$passwort = $_POST["passwort"];
... | true |
bb5df3e2a35af1322815db640a7ba995b6ff0fe2 | PHP | VnHunter95/ProjectPHP | /class/ProductImage.Class.php | UTF-8 | 1,611 | 2.734375 | 3 | [] | no_license | <?php
require_once($_SERVER['DOCUMENT_ROOT']."/config/db.class.php");
class ProductImage
{
private $imageId;
private $imageFilename;
public function __construct($filename)
{
$this->ImageFilename = $filename;
}
//Get list of image for product with $prouctId Id
public static func... | true |
5b4f9e4863c7d64ec63888884f0a9d8925903984 | PHP | AnthonyWhitakerJr/PHP-Blackjack | /src/models/Card.model.php | UTF-8 | 835 | 3.578125 | 4 | [] | no_license | <?php
class Card {
private $suit;
private $rank;
/**
* Card constructor.
* @param $suit
* @param $rank
*/
public function __construct($suit, $rank) {
$this->suit = $suit;
$this->rank = $rank;
}
public function getImageLocation() {
return "assets/c... | true |
944ba1afca9b433424a1d397b6018efce6fb112d | PHP | skaut/Skautske-hospodareni | /app/model/Payment/ReadModel/Queries/MembersWithoutPaymentInGroupQuery.php | UTF-8 | 677 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Model\Payment\ReadModel\Queries;
use Model\Common\UnitId;
use Model\Payment\ReadModel\QueryHandlers\MembersWithoutPaymentInGroupQueryHandler;
/** @see MembersWithoutPaymentInGroupQueryHandler */
final class MembersWithoutPaymentInGroupQuery
{
public function __construct(... | true |
bce6ee64edb13a4362255f4ab35dd9ad37ef1c70 | PHP | Jowdan3006/PHP-Reflection | /public/contact.php | UTF-8 | 7,191 | 2.65625 | 3 | [] | no_license | <?php
require_once __DIR__ .'/../src/config.php';
$pageTitle = "MYPHPokémon - Contact us";
require_once INC_PATH . "/head.php";
require_once LIB_PATH . "/MyPokémonUserDatabase.php";
require_once INC_PATH . "/userData.php";
require_once LIB_PATH . "/PokeAPI.php";
require_once INC_PATH . "/pokemonVariables.php";
use P... | true |
5fbee1782bc02edcd9263770184a2652665a7a88 | PHP | TobiasLounsbury/EmpireSkillTest | /app/Http/Controllers/Leaderboard.php | UTF-8 | 819 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Auth\User;
use App\Models\Game;
class Leaderboard extends Controller
{
//
/**
* Display a listing of players
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$output = array... | true |
948f3b29f7d9b115ae415697c0d438ac7a866882 | PHP | MohamedYahye/new_modulator | /model/backend/tools/delete_beheerde.php | UTF-8 | 1,242 | 3 | 3 | [] | no_license | <?php
class DeleteBeheerder{
private $beheerder;
private $connect;
private $response;
private $proceed;
public function __construct(){
$this->proceed = false;
$this->connect = null;
$this->response = array();
if(!empty(isset($_POST))){
if(isset($_POST['beheerder'])){
$this->beh... | true |
1f5d230b51659309eef9b70d7fc7b263861ef6b8 | PHP | abhishek2112003/testing | /pdf_creation.php | UTF-8 | 2,467 | 2.765625 | 3 | [] | no_license | <?php
include('pdf17/fpdf.php');
include 'db.php';
$id= '';
if (!isset($_SESSION['role']) )
{
header('location:login.php');
}
$pdf=new FPDF();
//Creating new pdf page
$pdf->AddPage();
$pdf->SetRightMargin(50);
$margin;
// Insert a logo in the top-left corner at 300 dpi
//$pdf->Image('images/logo... | true |
fd0e9a000623eb24b3e2ea66030ec074b459d11d | PHP | enriconale/MagentoBlogModule | /app/code/local/Alpenite/Blog/Helper/Data.php | UTF-8 | 3,780 | 2.546875 | 3 | [] | no_license | <?php
class Alpenite_Blog_Helper_Data extends Mage_Core_Helper_Abstract {
//Returns an array that contains all the values needed for the multiselect of sets and groups.
public function getArrayOfGroups() {
$entityTypeId = Mage::getModel('eav/entity')->setType(Alpenite_Blog_Model_Post::ENTITY)->getType... | true |
4d1e2c55f40fe79cfdeb435f8d9d52d8e803532d | PHP | eDataQuest/simpleweb | /private/libs/edq/qSession.php | UTF-8 | 4,105 | 2.875 | 3 | [] | no_license | <?php
class qSession
{
static protected $dbh = null;
/************** START SessionHandlerInterface Methods **************/
static public function close()
{
return true;
}
static public function destroy($session_id)
{
self::dbConnect();
$stmt = self::$dbh->prepare('DEL... | true |
5f8c5ebf7634a28768312ba9453c9f3719a55d16 | PHP | KaiserEMP/widget_cms | /index.php | UTF-8 | 1,074 | 2.59375 | 3 | [] | no_license |
<?php
require ('components/config.php');
?>
<?php
$query = "SELECT * FROM subjects WHERE visible = 1 ORDER BY position";
$result = mysqli_query($connect, $query);
$subject = mysqli_fetch_row($result);
?>
<?php
if (isset($_GET['id'])) {
$id = $_GET['id'];
$currentPageQuery = "SELECT content FROM subjects whe... | true |
067acf054d274a1bb330a7317e2848a47d6b28f0 | PHP | spittoon-co-uk/woocommerce-ilevel-sync-plugin | /inc/taxonomy_functions.php | UTF-8 | 3,595 | 2.703125 | 3 | [] | no_license | <?php
/*-----------------------------------------------------------------*/
/*-- Check an Attribute exists in WooCommerce ---------------------*/
/*-----------------------------------------------------------------*/
function check_for_product_attribute( $attribute ) {
global $wpdb;
$taxonomy_table_name = $wpdb->pr... | true |
9fc5a52a5cd97e9ef42008c438eaee01d078ea7d | PHP | jibundeyare/popschool-lens-php-2016-2017 | /class-04.php | UTF-8 | 603 | 3.765625 | 4 | [] | no_license | <?php
class Vehicule
{
private $passagers;
private $capacite;
// constructeur avec paramètre
public function __construct($capacite)
{
$this->passagers = 0;
$this->capacite = $capacite;
}
public function getPassagers()
{
return $this->passagers;
}
public function setPassagers($passagers)
{
$this->... | true |
846cda42f4c150e111c766704779b8877dbf7d96 | PHP | sedaym/agency | /app/Repositories/UserRepository.php | UTF-8 | 4,780 | 2.953125 | 3 | [] | no_license | <?php namespace Agency\Repositories;
use Carbon\Carbon;
use Agency\User;
use Agency\Contracts\Repositories\UserRepositoryInterface;
/**
*
* @category Repository
* @author Abed Halawi <abed.halawi@vinelab.com>
*/
class UserRepository extends Repository implements UserRepositoryInterface
{
/**
* Constructo... | true |
7acc5c1bc77639c6bf40836c2bdeba0be883f64f | PHP | Mucil/Projects | /Project code/PHP/muciltech/upload.php | UTF-8 | 829 | 2.59375 | 3 | [] | no_license | <?php
if($_SERVER['REQUEST_METHOD']=='POST'){
$image = $_POST['image'];
$name = $_POST['name'];
$price = $_POST['price'];
$description = $_POST['description'];
$category = $_POST['category'];
require_once('dbConnect.php');
$sql ="SELECT id FROM products ORDER BY id ASC";
$res = mysqli_quer... | true |
debbe51335a78ee45a9e4328274310bd9d3c3b3a | PHP | n-peugnet/wcms | /app/class/Config.php | UTF-8 | 13,583 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Wcms;
abstract class Config
{
protected static $pagetable = 'mystore';
protected static $domain = '';
protected static $fontsize = 15;
protected static $basepath = '';
protected static $route404;
protected static $alerttitle = '';
protected static $alertlink = '';
prote... | true |
e5b586876dae482fec30f5860c2735b497daa42e | PHP | ryanvalle/video_portfolio | /app/lib/logo_save.php | UTF-8 | 2,463 | 2.640625 | 3 | [] | no_license | <?php
header('Content-Type: application/json');
if ($_SERVER['REQUEST_METHOD'] != "POST") {
echo set_error_response(400, 'Bad Request');
exit();
}
/*
* Save Video To DB
*/
$data = $_FILES["photo"];
$msg = '';
if ( !isset($_POST['token'])) {
// todo validate token...
echo set_error_response(403, ... | true |
88ab7c14620211120a4440b9268c16de06b86991 | PHP | FedeGarabello/Spotify-Api-Test | /app/Http/Controllers/SpotifyController.php | UTF-8 | 738 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Services\SpotifyService;
use App\Services\Helpers\SpotifyHelper;
use Illuminate\Http\Request;
class SpotifyController extends Controller
{
protected $spotifyService;
protected $spotifyHelper;
public function __construct(SpotifyService $spotifyService, Spotify... | true |
6623644b6a2af789c22b094b8be8d96b259f7ee6 | PHP | zhangxunchi/yii | /basic/models/Product.php | UTF-8 | 2,271 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use yii\db\ActiveRecord;
class Product extends ActiveRecord{
public $picture;
public $color;
public $size;
public static function tableName()
{
return "{{%product}}";
}
public function attributeLabels()
{
return [
'ti... | true |
327d20714d49481d3f2dad55722ff8c84c119785 | PHP | JoeRowe123/EnterpriseWeChatApplications | /common/models/VoteRecord.php | UTF-8 | 1,380 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "vote_record".
*
* @property string $id
* @property int $vote_id 投票id
* @property int $user_id 用户id
* @property string $username 用户姓名
* @property array $option_ids 选项id
* @property string $desc 选项信息
* @property int $created_at 创... | true |
852cdf5addbfae07ef56dfcb2dac45b037a013b1 | PHP | diegowrhasta/SAHRST | /database/seeds/PuntoRutaSeeder.php | UTF-8 | 728 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use App\Punto_Ruta;
use Illuminate\Database\Seeder;
class PuntoRutaSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$j = 1;
for($i=1;$i<=3;$i++){
Punto_Ruta::create([
'punto_id' => $i,
... | true |
38eed46b8224534443a86d1d6b0de8c5f7748344 | PHP | onepixeldev/training_module_pg | /models/Ext_training_model.php | UTF-8 | 90,494 | 2.53125 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Ext_training_model extends MY_Model
{
private $staff_id;
private $username;
public function __construct()
{
$this->load->database();
$this->staff_id = $this->lib->userid();
$this->username = $this->lib... | true |
336d9e337bfb017723477a33b3e1cd9480fc1771 | PHP | shunyokota/nadukete_web | /app/Http/Controllers/NamingController.php | UTF-8 | 2,012 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Theme;
use App\Naming;
use App\Star;
use App\Libs\Twitter;
use Illuminate\Support\Facades\DB;
class NamingController extends Controller
{
public function create(Request $request, $theme_id) {
//不正なIDならエラー
$theme = Theme::w... | true |
3cc4ad6ddea6d6762ad35153ca92bacd19c5e8ae | PHP | ecmyamaoka/ecmyamaoka | /app/Vendor/util/arraykey.php | UTF-8 | 320 | 2.84375 | 3 | [] | no_license | <?php
namespace Util;
class arraykey {
public function check($array,$key) {
if (!empty($array)){
if (isset($array['item'][$key])) {
return $array['item'][$key];
}else{
return '';
}
}else{
return '';
}
}
}
| true |
4da2d00adef00d2e807118b43d11379b2f96e598 | PHP | christophercsmall/UNF_COP_4813_Internet_Programming | /public_html/cop4813/assign6/change_b.php | UTF-8 | 1,114 | 2.65625 | 3 | [] | no_license | <?php
//get variables
$ID = $_POST['ID'];
$title = filter_var($_POST['title'], FILTER_SANITIZE_STRING);
$author = filter_var($_POST['author'], FILTER_SANITIZE_STRING);
$genre = filter_var($_POST['genre'], FILTER_SANITIZE_STRING);
$readStart = filter_var($_POST['readStart'], FILTER_SANITIZE_STRING);
$readFinish = filte... | true |
51a5d80519948ba82e23aee097e1b3d5ed449c05 | PHP | sudheeshsbabu/symfony_training | /src/ProductBundle/Document/People.php | UTF-8 | 2,249 | 2.578125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?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.
*/
namespace ProductBundle\Document;
use Doctrine\ODM\MongoDB\Mapping\Annotations as MongoDB;
use Symfony\Component\Validator\Con... | true |
0e2a76a6195fd7894106a6e10223189b75d884f1 | PHP | incredibletitan/patterns | /code_examples/observer/libs/Subject.php | UTF-8 | 535 | 2.890625 | 3 | [] | no_license | <?php
namespace libs;
/**
* Interface Subject
*
* @author Yuriy Stos
*/
interface Subject
{
/**
* Attaches an Observer
*
* @param Observer $observer - Observer instance
* @return mixed
*/
function attach(Observer $observer);
/**
* Detaches an Observer
*
* @para... | true |
bcae71a5126b30ff4b97aca8fb10f0b2bab7b0e0 | PHP | Lupo-Brittaney/cs313-php | /web/teamwk3end.php | UTF-8 | 485 | 2.953125 | 3 | [] | no_license | <?php
$name=$_POST['name'];
$email=$_POST['email'];
$major=$_POST['major'];
$comments=$_POST['comments'];
$place=$_POST['continent'];
?>
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<?php
echo "<p>Name:</p>".$name;
echo "<p>Email:</p>".$email;
echo "<p>Major:</p>".$major;
echo "<p>Commen... | true |