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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
0b63117eb95a9ab8c74f15f8c502b6e270067cfc | PHP | syed-mudasir/social-network | /unlike.php | UTF-8 | 735 | 2.546875 | 3 | [] | no_license |
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
require_once 'include/db_connect.php';
if (isset($_GET['hash']) and isset($_GET['type'])=="unlike")
{
$type=$_GET['type'];
$hash=$_GET['hash'];
$ins= mysql_query("select * from po... | true |
69dbb6110f453366450399585d43f939f0709bdf | PHP | divinemercy/localmapserver | /utils/ExecutionTracker.php | UTF-8 | 293 | 2.796875 | 3 | [] | no_license | <?php
function check_conn_timeout() {
$status = connection_status();
if (($status & CONNECTION_TIMEOUT) == CONNECTION_TIMEOUT) {
return true;
}
}
function microtime_float() {
list($usec, $sec) = explode(" ", microtime());
return ((float) $usec + (float) $sec);
}
| true |
524d27e2a26337248ef46caf7e9d3a67d90d6dd7 | PHP | alpha1892/rfidLock | /webCode/membership/app/Console/Commands/search.php | UTF-8 | 886 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Services\PaymentProviders\PayPalService;
class search extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'membership:search {email}';
/**
*... | true |
05524f4df32bc4246b578d466d2fdcc9f28f5883 | PHP | Unice-SIL/syllabus | /src/Syllabus/Service/AbstractExportService.php | UTF-8 | 1,137 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Syllabus\Service;
use Symfony\Component\HttpFoundation\StreamedResponse;
abstract class AbstractExportService
{
abstract public function getHeaders(): array;
abstract public function getEntityFields($entity): array;
public function export(string $fileName, array $entities)
{
... | true |
30f50572c4c033d4ea237b9e4a4c189b3c0fe9af | PHP | opencodeacademy/tools | /hashDirectoryMd5.php | UTF-8 | 733 | 3.3125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Generate an MD5 hash string from the contents of a directory.
*
* @param string $directory
* @return boolean|string
*/
function hashDirectory($directory)
{
if (! is_dir($directory))
{
return false;
}
$files = array();
$dir = dir($directory);
while (false !== ($file =... | true |
ae8b650a686cf27eaaa4acd8c0bd75d958e924a6 | PHP | fishingboy/IOT_Demo | /application/libraries/MY_Form_validation.php | UTF-8 | 2,090 | 2.9375 | 3 | [] | no_license | <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* 擴充 CI_Form_validation
*/
class MY_Form_validation extends CI_Form_validation
{
/**
* 白名單驗證
* @param string $str 欄位值
* @param string $white_list 白名單(/隔開)
* @return boolean
*/
public function white_... | true |
80b664682f742bee51c86e16cf3f8cb532e35caa | PHP | snapbill/snapbill-phpapi | /src/SnapBill/Http.php | UTF-8 | 4,320 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace SnapBill;
/** Http is responsible for POSTing to the SnapBill API and decoding the results. */
class Http {
static $CURL_OPTIONS = array(
CURLOPT_CONNECTTIMEOUT => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_SSL_VERIFYHOST => 2,
);
protected $url;
protected $headers = array();
protected ... | true |
37a0397daab1aa7c3a668d0ec0248c9f0dc19e69 | PHP | forevergoogle/adsplay-admin | /hmvc-admin/application/libraries/page_decorator.php | UTF-8 | 1,853 | 2.8125 | 3 | [] | no_license | <?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
/**
* page_decorator
*/
class page_decorator {
protected $CI;
protected $pageTitle = "";
protected $pageFooter = "";
protected $pageMetaTags = array();
protected $scriptFiles = array();
protected $cssF... | true |
975f5f3a3d663bbee280c84b81c3a93fd5a8e60b | PHP | mitchellurgero/cloudron-ldap-proxy | /vendor/react/react/examples/test-memory-http.php | UTF-8 | 620 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
// script to test for mem leaks
// You can test it using:
// siege localhost:8080
require __DIR__.'/../vendor/autoload.php';
$loop = new React\EventLoop\StreamSelectLoop();
$socket = new React\Socket\Server($loop);
$http = new React\Http\Server($socket, $loop);
$i = 0;
$http->on('request', function ($request... | true |
ea355272a36e8ba13ee36ee0c548d3866abc6877 | PHP | eltha9/optimapp_back | /bdd.php | UTF-8 | 426 | 2.515625 | 3 | [] | no_license | <?php
$bdd = parse_ini_file("./config.ini", true);
// echo '<pre>';
// var_dump($bdd);
// echo '</pre>';
try{
$pdo = new PDO('mysql:dbname='.$bdd['bdd']['name'].';host='.$bdd['bdd']['host'].';port='.$bdd['bdd']['port'].';',$bdd['bdd']['login'],$bdd['bdd']['psw']);
$pdo->setAttribute(PDO::ATTR_DEFAU... | true |
2bc6d4867822271b40a7a0a3586a595a89fcf6c9 | PHP | wasifAL/smartshop | /admin/category.php | UTF-8 | 6,422 | 2.921875 | 3 | [] | no_license | <?php
require 'header.php';
require '../db/dbcon.php';
function test($val) {
$data = trim($val);
$data = stripslashes($val);
$data = htmlspecialchars($val);
return $val;
}
$category=$subcategory="";
//add new category
if (isset($_POST['submit'])) {
$category = test($_POST['category']);
$subcate... | true |
1b45c819cc5c63ce0b746067e7d2ce585b0bd9ca | PHP | PilarTm/web_admin_php | /application/models/Task_model.php | UTF-8 | 1,765 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
class Task_model extends CI_Model {
public $id = 0;
// Заголовок задачи
public $title = "";
// Описание задачи
public $description = "";
// Время для выполнения
public $time_estimate = "";
// Закрыта или открыта задача
// 1 - закрыта
public $is_close = 0;
public $sprint_id = 0;
... | true |
a8086b508b157e3d3684932d751075a3eb132a8d | PHP | slava-basko/identity-server-sdk | /src/Service/Interfaces/EntityEntryService.php | UTF-8 | 478 | 2.578125 | 3 | [] | no_license | <?php
/**
* Created by Slava Basko <basko.slava@gmail.com>
*/
namespace Is\Sdk\Service\Interfaces;
/**
* Interface EntityEntryService
* @package Is\Sdk\Service
*/
interface EntityEntryService
{
/**
* @param $domainEntity
* @param $entityExternalId
* @param $userEmail
* @return bool
... | true |
4deb9235b60a4b81dab2920134fd0b66b35b301a | PHP | guenillon/zeybux | /classes/response/GestionCaisse/EtatCaisseResponse.php | UTF-8 | 1,408 | 3.09375 | 3 | [] | no_license | <?php
//****************************************************************
//
// Createur : Julien PIERRE
// Date de creation : 21/06/2011
// Fichier : EtatCaisseResponse.php
//
// Description : Classe EtatCaisseResponse
//
//****************************************************************
include_once(CHEMIN_CLASSES . "... | true |
fc6a303b0d8e50ca9b3bef51a582d3b9850942ea | PHP | SaurabhKharivale/laravel-5-boilerplate | /tests/Support/Assertions/AdminAssertions.php | UTF-8 | 964 | 2.515625 | 3 | [] | no_license | <?php
namespace Tests\Support\Assertions;
use App\Admin;
trait AdminAssertions
{
public function assertAdminUserExists($email)
{
$admin = Admin::where('email', $email)->get();
$this->assertCount(1, $admin);
}
public function assertAdminUserDoesNotExists($email)
{
$admin =... | true |
6a4875bf32a00705e07ac124b76536370511fa29 | PHP | ludchieng/IMAC-LimiteLimac | /model/round.php | UTF-8 | 7,668 | 2.71875 | 3 | [] | no_license | <?php
/**
* Functions concerning round.
*
* @package Round
*/
require_once('../model/data_access.php');
require_once('../model/player.php');
require_once('../model/room.php');
require_once('../model/log.php');
/**
* Initiates a new round in the specified room
* by reseting players cards, assigning game master,... | true |
78d53a0aac41dd3ed43578f3b680af834f3e96b9 | PHP | kingtrungtruc/DoAnCuoiKyWeb1 | /follows.php | UTF-8 | 1,661 | 2.515625 | 3 | [] | no_license | <!-- GUEST -->
<?php
require_once 'inc/autoload.php';
// Format Helper
$formatHelper = new FormatHelper();
// DIRECTION
if (!isset($_COOKIE['login'])) {
header('Location: index.php');
}
$style = 'danger';
//$_SERVER['REQUEST_METHOD' => Xác định request gửi đến server con đường nào (post,get,patch,delete)
if ($_SE... | true |
98e2860cd22a9d005cb3707c2e49b37081bf92a6 | PHP | adriansalvatori/alma-one | /public_html/app/plugins/learndash/vendor-prefixed/stellarwp/db/src/DB/QueryBuilder/Concerns/OffsetStatement.php | UTF-8 | 572 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @license GPL-2.0
*
* Modified by learndash on 31-May-2023 using Strauss.
* @see https://github.com/BrianHenryIE/strauss
*/
namespace StellarWP\Learndash\StellarWP\DB\QueryBuilder\Concerns;
/**
* @since 1.0.0
*/
trait OffsetStatement {
/**
* @var int
*/
protected $offset;
/**
* @param int... | true |
efa14071761fd16033a722f873c6fb52665c208d | PHP | leonardor/ddd-laravel5 | /Api/Application/Commands/Validators/AbstractValidator.php | UTF-8 | 817 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Demo\Api\Application\Commands\Validators;
use Demo\Api\Application\{
Contracts\Command\ValidatorInterface,
Contracts\CommandInterface
};
use \Illuminate\{
Validation\Factory as ValidatorFactory,
Validation\Validator,
Support\MessageBag
};
abstract class ... | true |
59202894848b88e17049327fd1b4ae332a66c322 | PHP | bennyt2/archer | /web/utility/updateTemplateswithProperExtends.php | UTF-8 | 957 | 3 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
$path = "/var/www/archer.bennyt.me/htdocs/archer/src/Archer/MeetEntryBundle/Resources/views";
$objects = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::CHILD_FIRST);
foreach($objects as $name => $object){
echo $name."<br>";
if ($name != "/var/www/archer.ben... | true |
5246ce0d28601681694d3e3978ba7739977edfc8 | PHP | qyt1988528/shenghuogan | /app/school/controller/IndexController.php | UTF-8 | 1,949 | 2.625 | 3 | [] | no_license | <?php
namespace School\Controller;
use MDK\Controller;
/**
* Face controller.
* @RoutePrefix("/school", name="school")
*/
class IndexController extends Controller
{
private $_error;
private $_userId;
public function initialize()
{
$config = $this->app->core->config->config->toArray();
... | true |
e6bb50534c50c4e8598bac89839c3ea134d0f0d0 | PHP | ChadTiffin/ChrisAPI | /database/migrations/2013_03_13_133830_create_encounters_table.php | UTF-8 | 3,429 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEncountersTable extends Migration {
/**
* Make changes to the database.
*
* @return void
*/
public function up()
{
Schema::create('encounters', function($table)
{
$table->engine = 'InnoDB';
$... | true |
af4be2fe6bda714b7bef5afdccf170ae07f1b237 | PHP | striikeur/siteOpening | /code/src/model/class/Anime.php | UTF-8 | 2,395 | 3.453125 | 3 | [] | no_license | <?php
class Anime
{
private $id;
private $name;
private $malLink;
private $season;
private $miniature;
private $video;
private $moyenne;
/**
* Anime constructor.
* @param $id
* @param $name
* @param $malLinkadd
* @param $season
* @param $miniature
* @p... | true |
3902e89681e9dc0110daab5586b682ff2d908fd8 | PHP | FortCPE/2bstaff | /answercheck/class/loginClass.php | UTF-8 | 547 | 2.75 | 3 | [] | no_license | <?php
class loginClass{
public function login($user,$pass){
try {
$db = getDB();
$pass = md5($pass);
$stmt = $db->prepare("SELECT * FROM member WHERE username='$user' AND password = '$pass'");
$stmt->execute();
$count = $stmt->rowCount();
$data = $stmt->fetch(PDO::FETCH_OBJ);
... | true |
5586c820d375ddc98407f3a3ed64303aa592aafc | PHP | fanzhaogui/goodgoodstudydaydayup | /Decorator/Decorator.php | UTF-8 | 376 | 2.90625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* User: Andy
* Date: 2018/12/29
* Time: 0:56
*/
namespace Fan\DesignPatterns\Decorator;
/**
* 装饰 配料
*
* Class Decorator
* @package Fan\DesignPatterns\Decorator
*/
abstract class Decorator implements Food
{
/**
* @var Food
*/
protected $food;
public function __construct(Food $... | true |
9e2bdcc2d405ae093d1eb5f1df2531d21f02260f | PHP | csi0n/laravel-request | /src/Repositories/CLaravelRequestRepository.php | UTF-8 | 3,773 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: csi0n
* Date: 07/02/2017
* Time: 5:18 PM
*/
namespace csi0n\Laravel\Request\Repositories;
class CLaravelRequestRepository
{
protected $rule_global = [];
protected $rule_get = [];
protected $rule_post = [];
protected $rule_put = [];
protecte... | true |
4c0bd4b17bca1803606cee7a57813237093ede93 | PHP | Daisleska/Proyecto | /Controladores/controladorLogin.php | UTF-8 | 5,246 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
session_start();
include('../Modelos/clasedb.php');
extract($_REQUEST);
//echo password_hash("12345", PASSWORD_DEFAULT);
class ControladorLogin{
static function controlador($operacion)
{
$login=new ControladorLogin();
switch ($operacion) {
case 'login':
$login->loguear();
break;
case 'olvido':
$l... | true |
cc6208a13a95c63c86280fa53769e61ba406190d | PHP | petecoop/php-mvc-lite | /system/classes/Router.php | UTF-8 | 2,484 | 2.890625 | 3 | [] | no_license | <?php defined('SYSPATH') or die('No direct script access');
class Router
{
private $_controller;
private $_controller_instance;
private $_action;
private $_path;
private $_query;
private $_request;
private $_response;
private static $_server;
private static $_protocol;
const REQUEST_PATH_STRING ... | true |
c96a89a5903b9f1fadeaadd730899c637419dddf | PHP | AbotLucas/YourMovie | /DAO/ScreeningDao.php | UTF-8 | 2,814 | 2.75 | 3 | [] | no_license | <?php
namespace DAO;
use DAO\Iscreenig as Iscreening;
use Models\Screening as Screening;
class ScreeningDao implements Iscreening
{
private $screening_list = array();
private $fileNameScreening;
public function __construct()
{
$this->fileNameScreening = ROOT."/Data/Screenings.json";
}
... | true |
9dc7baca51b8e62c9c6eef3b8eb7d06be3a6e328 | PHP | PresentLocation/Art64X | /191126-sign-language/index.php | UTF-8 | 1,450 | 3.25 | 3 | [
"CC-BY-4.0"
] | permissive | <?
/*
CONCEPT:
USER DOES THIS:
1. VIEW SEARCH BOX
2. ENTER TEXT INTO SEARCH BOX
3. SUBMIT FORM
PAGE RESPONDS WITH THIS
4. COLLECT FORM INPUT
5. TRANSLATE FORM INPUT TEXT INTO SIGN LANGUAGE GRAPHICS
6. PRESENT THE GRAPHICS
*/
/*
INTERACTIVE EVENTS
1. IN HTML, PRESENT FORM
2. IN PHP, SET UP FORM TO RETURN INPUT TO... | true |
2dee294ecb858712622c671f2d63c802ce6c939a | PHP | ybenhssaien/MVC-PHP | /include/Functions.php | UTF-8 | 3,185 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
class Functions{
public static function isArray($array=array()){
return (is_array($array) && count($array)>0)?true:false;
}
public static function isEmail($email){
$Syntaxe='#^[\w.-]+@[\w.-]+\.[a-zA-Z]{2,6}$#';
if(preg_match($Syntaxe,$email))
return true;
return false;
}
/***************... | true |
7886ee9119ec0d4c90cf9c3c200034b3525a0844 | PHP | manakamanaka/Doctrina | /application/controllers/Signup.php | UTF-8 | 3,904 | 2.578125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Signup extends CI_Controller{
function __construct() {
parent::__construct();
$this->load->library('encryption');
}
public function index(){
$data['error']= "";
$this->load->view('template/navbar');... | true |
7ec9f2370858cef61a64abb373d20aeb3c9b18a2 | PHP | jackson-wells/CS440-RiotAPI | /login.php | UTF-8 | 2,535 | 2.8125 | 3 | [] | no_license | <?php
session_start();
$submitError = $key = $loginResult = "";
function login() {
$key = $_POST["key"];
$url = "https://na1.api.riotgames.com/lol/summoner/v4/summoners/by-name/RiotSchmick?api_key=$key";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_... | true |
bbdc3be4ce9f324841daaee2fb2cda1f80effd19 | PHP | vickycampo/mtk-recipe-plugin | /templates/slider-old.php | UTF-8 | 1,864 | 2.53125 | 3 | [] | no_license | <?php
$args = array (
'post_type' => 'testimonial',
'post_status' => 'publish',
'posts_per_page' => 5,
'meta_query' => array (
array (
'key' => '_mtk_testimonial_key',
'value' => 's:8:"approved";i:1;s:8:"featured";i:1;',
'compare' => 'LIKE'
... | true |
fc6c5e5f3a4b68b276b84b85716777953be3eded | PHP | JoseVelasco142/PHP_initial_exercises | /ejercicios/ejercicio6.php | UTF-8 | 2,194 | 3.4375 | 3 | [] | no_license | <div class="col-xs-4 enunc">
<p>6. Dados dos números enteros positivos, comprobar para cada uno de los números que hay entre ellos,<br />
si es múltiplo de 2 y/o de 3. En caso de que lo sea, que saque un mensaje y al final que indique cuantos múltiplos de 2,<br />
de 3 y ... | true |
782f9f3f134e7ebdb809c99260987aba465c4f22 | PHP | thuanvi123/BTLN | /SHOPKMA/app/Http/Controllers/AdminController.php | UTF-8 | 2,346 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Model\AdminModel;
use App\Model\Front\OrderModel;
use Illuminate\Http\Request;
class AdminController extends Controller
{
/**
* Hàm khởi tạo của class được chạy ngay khi khởi tạo đổi tượng
* Hàm này nó luôn được chạy trước các hàm khác trong class
* Ad... | true |
0da2562a0bba6629a71b2d34304bbf7ee08a93ee | PHP | Nwakaudu/College-union-online-election-system- | /voter/votenow.php | UTF-8 | 1,516 | 2.5625 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION['voterid']))
{
header('location: voterlogin.php');
}
?>
<html>
<head>
<title></title>
<link rel="stylesheet" href="common-css-voter.css" type="text/css">
</head>
<body>
<center>
<header>
<h3>COLLEGE UNION ONLINE ELECTION SYSTEM</h3>
</header>
<div... | true |
d471adfe03e8297be93a92fec137d3160b64b46d | PHP | StivZito/moocHCD | /cargaData/carga_data_ec_diagnostico_teorico_practico.php | UTF-8 | 41,030 | 2.71875 | 3 | [] | no_license | <?php
include("lib/funciones.php");
require_once '../src/SimpleXLSX.php';
ini_set('MAX_EXECUTION_TIME', 0);
set_time_limit(0);
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
try
{
// Undefined | Multiple Files | $_FILES Corruption Attack If this request falls under any of them, treat it invalid.
if (!isset($_FILE... | true |
8866d742e88b3a59fa974cde2196682ca1404fdf | PHP | fhnelsis/SGPM | /validacao.php | UTF-8 | 2,434 | 2.578125 | 3 | [] | no_license | <?php
$con = mysqli_connect ( "localhost", "root", "", "sgpm" );
header('Content-Type: text/html; charset=UTF-8');
// Check connection
if (mysqli_connect_error ()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error ();
}
try {
// Pega os dados do formulario
$login = $_POST ['login'];
// $sen... | true |
5606d28630398427d1bb2877d1483f23d51b2169 | PHP | cbpeter/ishetkutweerv4 | /src/Infrastructure/ApiClient/SorryUnableToGetData.php | UTF-8 | 1,807 | 2.625 | 3 | [
"WTFPL"
] | permissive | <?php
declare(strict_types=1);
namespace App\Infrastructure\ApiClient;
use Exception;
use GuzzleHttp\Exception\GuzzleException;
use Psr\Http\Message\ResponseInterface;
use Throwable;
use function get_class;
use function gettype;
final class SorryUnableToGetData extends Exception
{
/** @var mixed[] */
priva... | true |
4b432f724f524a1f9219d198d679adf0a9a4501f | PHP | aoding9/php2021 | /code/laravel/laravel_admin/app/Imports/CommentsImport.php | UTF-8 | 969 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Imports;
use App\Models\Comment;
use Maatwebsite\Excel\Concerns\ToModel;
use Maatwebsite\Excel\Concerns\WithStartRow;
use Maatwebsite\Excel\Concerns\WithValidation;
class CommentsImport implements ToModel,WithStartRow
{
/**
* @param array $row
*
* @return \Illuminate\Database\Eloq... | true |
d4d709627605ab0a30250fb7b7e832f8eeb59463 | PHP | vallsjm/vending | /src/Core/Domain/Model/Coin/CoinValue.php | UTF-8 | 566 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
declare(strict_types=1);
namespace Core\Domain\Model\Coin;
use Assert\Assertion;
use Common\Domain\ValueObject\Money\BaseMoney;
use Core\Domain\Model\Coin\Type\CoinValueType;
final class CoinValue extends BaseMoney
{
public function validate(float $value): void
{
try {
Assertion::t... | true |
390e0b8839060be3700df28f7f36d63ebd613607 | PHP | gentaprima/WebApp-PemesananTelur | /application/models/ModelProduct.php | UTF-8 | 1,313 | 3.078125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class ModelProduct extends CI_Model{
public function getDataProduct()
{
$sql = "SELECT * from tb_product";
return $this->db->query($sql)->result_array();
}
public function insertProduct($idProduct,$productName,$desc,$image,$quality,$stock,$price){
... | true |
b21c889ecc4d201af99f33f0042c5088caff6249 | PHP | stevebontemps/gsb | /WebService/donnees/societe.class.php | UTF-8 | 1,133 | 3.015625 | 3 | [] | no_license | <?php
class Societe extends Modele
{
public function __construct($idSociete=null, $nom=null, $capital=null, $adresse=null, $codepostal=null, $ville=null, $villercs=null, $numerorcs=null, $nomrepresentant=null, $qualiterepresentant=null) // Pour PDO::fetchAll
{
if(!($idSociete==null && $nom==null && $capital==nul... | true |
795a3d4ca66d4aec7b018bbc1d1eeecdf2a637d0 | PHP | sameerabit/t-fort-tour | /src/AppBundle/Entity/User.php | UTF-8 | 3,401 | 2.515625 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* User
*
* @ORM\Table(name="user")
* @ORM\Entity(repositoryClass="AppBundle\Repository\UserRepository")
*/
class User
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(st... | true |
e6402ed93278900f09c539feb9b37c182fbd087b | PHP | garrongarron/geopagos-validations | /tools/AbstractTable.php | UTF-8 | 591 | 3.078125 | 3 | [] | no_license | <?php
abstract class AbstractTable
{
private $select = false;
private $select_n = 0;
public function save($obj){
return get_class($obj).'::'. __FUNCTION__ .'()';
}
public function delete($obj){
return get_class($obj).'::'. __FUNCTION__ .'()';
}
public function update($obj){
return get_class($obj).'::'. __F... | true |
5d7500c7679b3b8f2ef4bda371674433efabe28f | PHP | apie-lib/openapi-schema | /src/Map/ServerVariableObjectList.php | UTF-8 | 798 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Apie\OpenapiSchema\Map;
use Apie\CompositeValueObjects\Exceptions\InvalidKeyException;
use Apie\CompositeValueObjects\ValueObjectHashmapTrait;
use Apie\CompositeValueObjects\ValueObjectListInterface;
use Apie\OpenapiSchema\Constants;
use Apie\OpenapiSchema\Spec\ServerVariable;
use Apie\TypeJuggling\A... | true |
ee6c1fa2c472789e2a094b60169b01d30f824d42 | PHP | RakhithJK/Fortissimo | /src/Fortissimo/Command/CLI/ParseOptions.php | UTF-8 | 7,686 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
/** @file
*
* This file contains commands for parsing options from ARGV or another source.
*
* This file was backported from Villain.
*
* Created by Matt Butcher on 2011-06-18.
*/
namespace Fortissimo\Command\CLI;
/**
* Parse options (flags) from ARGV or another source.
*
* This command is designed to... | true |
ae12a816a8cf378d69c6d0960bbe89cfa4c03638 | PHP | geepee211/web | /bootstrap/form_validate.php | UTF-8 | 4,520 | 2.59375 | 3 | [] | no_license |
<?php
include_once("include/config.php");
//------------------------------ERROR VARIABLE DECLARTIONS START -------------------------
$firstNameError = $lastNameError = $classError = $sNationalityError = $studentAddressError = $output = '';
$firstNameVerified = '';
$firstNameCorrect = '';
$lastNam... | true |
f1ea6d89292d388bb5164dbaafa416f3d1e2b09a | PHP | develme/database-patch | /src/Repository/Patch.php | UTF-8 | 4,789 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: verronknowles
* Date: 5/28/19
* Time: 11:36 PM
*/
namespace DevelMe\DatabasePatch\Repository;
use Illuminate\Database\Connection;
use Illuminate\Database\ConnectionResolverInterface as Resolver;
use Illuminate\Database\ConnectionResolverInterface;
/**
* Class Patch
* @... | true |
89e51fd3361b5439f8386a9d077b0d12d2b7bbf3 | PHP | isaacduarte/affinityCass | /paginas/editar-cliente.php | UTF-8 | 2,947 | 2.515625 | 3 | [] | no_license | <?php
include_once '../classes/Cliente.class.php';
include_once '../classes/Adquirente.class.php';
if(isset($_GET['id_cliente'])){
$cliente = Cliente::getClientePorId($_GET['id_cliente']);
$id = $cliente['id_cliente'];
$nome = $cliente['nome'];
$telefone = $cliente['telefone'];
$em... | true |
2a99a87dac605d60d1f97c52a546f22451302acb | PHP | D4rkMindz/cevi-web_API | /src/Repository/LanguageRepository.php | UTF-8 | 1,286 | 3.03125 | 3 | [] | no_license | <?php
namespace App\Repository;
use App\Table\LanguageTable;
use Slim\Container;
class LanguageRepository extends AppRepository
{
/**
* @var LanguageTable
*/
private $languageTable;
/**
* LanguageRepository constructor.
* @param Container $container
* @throws \Interop\Containe... | true |
5ccdcb9a67cb7e863621e0affc0c96a31529ac4f | PHP | taliffsss/framework | /app/models/admin/M_activity_logs.php | UTF-8 | 869 | 2.765625 | 3 | [] | no_license | <?php
class M_activity_logs extends My_Model {
function __construct() {
parent::__construct();
}
/**
* Save logs in activity log
* @param array string
* @return bool
*/
public function _save_logs($data) {
try {
$date = date('Y-m-d H:i:s');
$uid = Session::userdata('uid');
$this->db->qu... | true |
b83e530a1ffbc616f68fd29eccece21b5bb98d9d | PHP | zikezhang/LaravelAdmin | /src/Verecom/Admin/User/Form/UserFormInterface.php | UTF-8 | 1,213 | 2.75 | 3 | [
"MIT"
] | permissive | <?php namespace Verecom\Admin\User\Form;
interface UserFormInterface {
/**
* Validate and create the user
*
* @author ZZK
* @link http://verecom.com
*
* @param array $data
*
* @return \StdClass
*/
public function create(array $data);
/**
* Validate and ... | true |
873d206566d1a02760322c46e2886f14877e2013 | PHP | sptmru/tweet_panel | /index.php | UTF-8 | 3,195 | 2.5625 | 3 | [] | no_license | <?php
header('Content-Type: text/html; charset=utf-8');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Tweets</title>
<!-- Latest compiled and minified Bootstrap ... | true |
9181222a03130ff2c863c8a81234ab3f7d47407a | PHP | SalihBorucu/journeycrmv2 | /database/seeds/StepSeeder.php | UTF-8 | 1,900 | 2.65625 | 3 | [] | no_license | <?php
use App\CampaignSchedule;
use App\Step;
use App\Schedule;
use Illuminate\Database\Seeder;
class StepSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//standard campaign steps
$campaignScheduleIds = CampaignSchedule:... | true |
d42ded77d3c6198f2c7116caa9c0535bd049bb8f | PHP | ebertbueno/apimoedas | /app/Helpers/diaDaSemana.php | UTF-8 | 940 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
function diaDaSemana(){
return [
[
'completo' => trataTraducoes('Domingo'),
'reduzido' => trataTraducoes('Dom'),
'compacto' => trataTraducoes('D'),
],[
'completo' => trataTraducoes('Segunda'),
'reduzido' => trataTraducoes('Seg'),
'compacto' => trataTraducoes('S'),
],[
'completo' => tr... | true |
55dfb523817ecba713fd4a0eb919be80fc1b6465 | PHP | wovosoft/laravel-bootstrap | /src/View/Components/Td.php | UTF-8 | 665 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Wovosoft\LaravelBootstrap\View\Components;
class Td extends Th
{
/**
* Create a new component instance.
* @param string|null $variant
* @param int|null $colspan
* @param int|null $rowspan
*/
public function __construct(?string $variant = null, ?int $colspan = null, ?in... | true |
aec224740c429bd28c3ab71c309e1dee537dc51c | PHP | pashatw/laravel-api | /app/Repositories/TaskRepository.php | UTF-8 | 1,022 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Models\TaskModel;
/**
*
*/
class TaskRepository
{
function __construct()
{
# code...
}
public function getAll($filter_state = null)
{
$task = TaskModel::query();
if (!empty($filter_state)) {
$task->where('task_state', $filter_state);
}
return $task... | true |
bcb703d1c3e896198bc92a8b97a33008560d9f32 | PHP | pmjones/savant | /Savant3_Plugin_Form/tests/formFile.phpt | UTF-8 | 1,046 | 2.703125 | 3 | [] | no_license | --TEST--
file elements
--FILE--
<?php
require_once '00_prepend.php';
$elem = array(
'name' => 'x_file',
'value' => 'x_file_value',
'attribs' => array(
'size' => '10',
'xss' => '">XSS ATTACK<"',
),
);
$out = array();
// try with individual args
$out[] = $tpl->formFile($elem['name'], $elem['value'], $elem['att... | true |
28083b99e98f3d029214074f56579c569978c80d | PHP | fatimahnurulinsani/kelola-kendaraan | /application/models/pengguna_model.php | UTF-8 | 848 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class pengguna_model extends CI_Model {
/*
Oleh Arie Haryana
http://kalengharapan.com
file : blog_model.php untuk load data dari database
*/
function GetUsers(){
return $this->db->get('pengguna');
}
function GetUser($nama_pengguna, ... | true |
6bea776da91de25e4a5364ec35b88ba0ca1cca31 | PHP | DTruong054/Exercise-02_06_01 | /guestBook.php | UTF-8 | 5,522 | 2.59375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body>
<style>
/* input styles */
input[type=text], select {
width: ... | true |
b90ddb083cff85558a1a4ed6f096ce904155dcb2 | PHP | JIkaheimo/ohjelmistokehityksen-perusteet-s19 | /muokkaa_ohjelma.php | UTF-8 | 3,286 | 2.640625 | 3 | [] | no_license | <?php
//
if (!isset($_GET['id'])) {
http_response_code(404);
header('Location: 404.php');
exit;
}
require_once(__DIR__.'/Komponentit/Header/header.php');
if ($kayttaja == null)
{
header('Location: 401.php');
exit;
}
require_once(__DIR__.'/Komponentit/Harjoitukset/harjoitus_tr.ph... | true |
80ba5a9b90046f506170f2d1989ffab3e3032a1d | PHP | alecg555/Gangazo | /modelo/Conexiontipo.class.php | UTF-8 | 813 | 2.953125 | 3 | [] | no_license | <?php
class ConexionTipo
{
private $server;
private $user;
private $pass;
private $conexion;
public function __construct(){
$this->server="localhost";
$this->user="root";
$this->pass="";
}
public function abrirConexion(){
try{
$this->conexion = new PDO("mysql:host=$this->server;dbname=ga... | true |
7d26a4ccf4d510cd122079575eddb590425abc41 | PHP | FerchoRL/OOPUberProject | /PHP/UberX.php | UTF-8 | 421 | 3.25 | 3 | [] | no_license | <?php
require_once 'UberCar.php';
//How to use Inheritance in PHP
class UberX extends UberCar{
public $brand;
public $model;
public function __construct($license, $driver, $brand, $model){
//To pass parameter to construct use parent
parent::__construct($licen... | true |
04e975dcd0b880f3509fa5e189aaffea712f4f3c | PHP | PhuongNgan2103/new | /bai-tap-1/src/Model/ProductManager.php | UTF-8 | 2,949 | 2.984375 | 3 | [] | no_license | <?php
namespace App\Model;
class ProductManager
{
protected $dbConnect;
public function __construct()
{
$this->dbConnect = new DBConnect();
}
public function getAllProduct()
{
$spl = 'SELECT * FROM Products ORDER BY create_at DESC';
$result = $this->dbConnect->query... | true |
8f775764e63569e178f7eb0f61a6df92e3ab557f | PHP | ANDROFAST/marketing | /controlador/venta.anular.controlador.php | UTF-8 | 534 | 2.546875 | 3 | [] | no_license | <?php
require_once '../negocio/Venta.clase.php';
require_once '../util/funciones/Funciones.clase.php';
if (! isset($_POST["p_numero_venta"])){
Funciones::imprimeJSON(500, "Faltan parametros", "");
exit();
}
try {
$numero = $_POST['p_numero_venta'];
$obj = new Venta();
$datos = $obj->anular($n... | true |
748d24fc1824dc8b00e5863132cfd1d1bedebd40 | PHP | suyamayu/keijiban | /select.php | UTF-8 | 569 | 2.796875 | 3 | [] | no_license |
<?php
mb_internal_encoding("utf-8");
//DB接続
$pdo = new PDO("mysql:dbname=lesson01;host=localhost;","root","root");
//プリペアードステートメントでSQLの型を作る
$stmt = $pdo->prepare("select * from login_mypage where mail=? && password=?");
//bindValueを使用し、実際にwhere句に何をinsertするかを記述
$stmt ->bindValue(1,$_POST['mail']);
$stmt ->bindValue(... | true |
350716974f04490750a3e574cf5828e36bd0f273 | PHP | loveorigami/shop_prototype | /widgets/AccountContactsWidget.php | UTF-8 | 3,754 | 2.8125 | 3 | [] | no_license | <?php
namespace app\widgets;
use yii\base\ErrorException;
use app\widgets\AbstractBaseWidget;
use app\models\UsersModel;
/**
* Формирует HTML строку с текущими контактными данными
*/
class AccountContactsWidget extends AbstractBaseWidget
{
/**
* @var UsersModel
*/
private $user;
/**
* @v... | true |
326b02e6b13139e878a48e583a20156f56b83e32 | PHP | mankwan/addressList | /common.php | UTF-8 | 416 | 2.78125 | 3 | [] | no_license | <?php
function getLastTime(){
if(!empty($_COOKIE['lastVisit'])){
echo "你上次登录的时间是:".$_COOKIE['lastVisit'];
setcookie("lastVisit",date("Y-m-d H:i:s"),time()+24*3600*30);
}else{
echo "你是第一次登录";
setcookie("lastVisit",date("Y-m-d H:i:s"),time()+24*3600*30);
}
}
function getCookieVal($key){
if(empty($_COOKIE[$... | true |
feb3dc0f8b94cd192761a4ea9eea1261ec2007a6 | PHP | igorlimam/HGVJ | /modelo/Noticia.class.php | UTF-8 | 1,517 | 3.0625 | 3 | [] | no_license | <?php
/**
* Description
*
* @author Igor de Lima Mendes
*/
class Noticia {
private $id;
private $titulo;
private $conteudo;
private $data;
private $fonte;
private $ativo;
private $usuario_id;
private $oUsuario;
public function __construct() {
}
public... | true |
917d0618adbb4576abcc3df0429969df92e25585 | PHP | trantienvip/PHP2_MVC_Chuan | /app/controllers/UserController.php | UTF-8 | 1,168 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Controllers;
use App\Models\Users;
class UserController{
function index(){
return "UserController -> index()";
}
function edit(){
if (isset($_POST['btnSubmit'])) {
$id = $_GET['id'];
// $tmp_name = $_FILES['upload']['tmp_name'];
// $na... | true |
d2a271496ea8c6369b4e27a21d351a7b38dfb53e | PHP | cerneigabriel/coleage_projects | /laborator_10/php/varzari/index.php | UTF-8 | 4,523 | 2.765625 | 3 | [] | no_license | <?php
$database_exist = true;
try {
$conn = new PDO("mysql:host=localhost;dbname=elevi_varzari", "root", "");
$conn->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
$database_exist = false;
}
if (!... | true |
7b34bb194adceff294b1f1a79c7b8fb7627b6cd9 | PHP | desarrollo-bexandy-rodriguez/personal-framework-mvc | /application/Controller.php | UTF-8 | 3,310 | 2.9375 | 3 | [] | no_license | <?php
/**
* Clase de donde heredaran el resto de los controladores
*/
abstract class Controller
{
protected $_view;
protected $_acl;
public function __construct()
{
$this->_acl = new Acl();
$this->_view = new View(new Request,$this->_acl);
}
// se obliga a que todas las clases que hereden de C... | true |
3f9283fa66b336528f93e44505e635ec6a1f3aa5 | PHP | kiverchuk/oopproject | /index.php | UTF-8 | 2,069 | 2.5625 | 3 | [] | no_license | <?
require_once("dbconfig.php");
require_once("classes.php");
header('Content-Type: text/html; charset=utf-8');
DBConfig::connect();
DBConfig::$ActualArrayFilms = DBConfig::queryGet("SELECT * FROM `toplist` order by num");
$parser = new Parser();
if(!$parser->isLastParsToday()){
$newList = array();
$newLis... | true |
365efd6222759d78df9352d04b149f51df0bc2c2 | PHP | AlexMik2003/GT | /app/Controllers/MainPage/MainPageController.php | UTF-8 | 2,570 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Controllers\MainPage;
use App\Controllers\BaseController;
use App\Models\Area;
use App\Models\Clients;
use App\Models\Device;
use App\Models\Latency;
use App\Models\Network;
use App\Models\Peers;
use App\Models\Users;
/**
* Class MainPageController
*
* @package App\Controllers\MainPage
*/
cla... | true |
668c834dd5fe8e9bbe1455f86009e9ade306d446 | PHP | Kalpeshk9967016292/CT | /exam.php | UTF-8 | 1,322 | 2.59375 | 3 | [] | no_license | <?php
session_start();
$user = $_SESSION['username'];
if($_SESSION['username'])
{
$name="";
if(isset($_GET['name'])){
$name = $_GET['name'];
}
$time="";
if(isset($_GET['time'])){
$time=$_GET['time'];
$time = $time*60;
}
echo "<b>Welcome,</b>".$_SESSION['username']."!";
include('connect.php');
$result=mysql_query("... | true |
04bf22d935dadff427940962d51e2e6b9206b9c7 | PHP | arturassolncevas/batata_app | /app/Http/Resources/Cart.php | UTF-8 | 603 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\ResourceCollection;
use App\Http\Resources\CartItem;
class Cart extends ResourceCollection
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public fun... | true |
49f4578acd4fd5073bcd07f1f41ada113231a37a | PHP | VKolegov/vk-sdk-wrapper | /src/VkClientWrapperCore.php | UTF-8 | 3,678 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* @Author: Kolegov Vladislav
* @Date: 2019-11-17 11:56:31
* @Last Modified by: Kolegov Vladislav
* @Last Modified time: 2020-01-03 02:39:14
*/
namespace VKolegov\VKAPIWrapper;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Log;
use VK\Client\VKApiClient;
use VK\Exceptions\VKApiException;
use... | true |
bc81384443b80376854f6c46f186f678990c9370 | PHP | qidouhai/haxibiao-breeze | /src/Notifications/LikedNotification.php | UTF-8 | 2,801 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Haxibiao\Breeze\Notifications;
use Haxibiao\Content\Post;
use Haxibiao\Sns\Like;
use Illuminate\Bus\Queueable;
class LikedNotification extends BreezeNotification
{
use Queueable;
public static $notify_event = "点了个赞";
protected $like;
public function __construct(Like $like)
{
... | true |
0c506c61254cc86f86bcb1fb28aba38e8c7c6cb6 | PHP | o2b3k/tapenote | /app/Models/Category.php | UTF-8 | 1,763 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Category extends Model
{
const TYPE_CATEGORY = 'CATEGORY';
const TYPE_PARENT_CATEGORY = 'PARENT_CATEGORY';
const TYPE_INTERNAL_LINK = 'INTERNAL_LINK';
const TYPE_EXTERNAL_LINK = 'EXTERNAL_LINK';
const TYPE_WEB_CONTENT = 'WE... | true |
1cc4d035f453e48e7a37584bf83611edac0b8d83 | PHP | Fath57/blogpackage | /tests/Unit/PostTest.php | UTF-8 | 3,280 | 2.65625 | 3 | [] | no_license | <?php
namespace Arafath57\BlogPackage\Tests\Unit;
use Arafath57\BlogPackage\Models\FathPostCategory;
use Arafath57\BlogPackage\Models\FathPostComment;
use Arafath57\BlogPackage\Tests\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Arafath57\BlogPackage\Tests\TestCase;
use Arafath57\BlogPackage\Models\Fat... | true |
6ab3db99fb747d987fa28e28af591700a1b229e5 | PHP | popy-dev/popy-calendar | /src/ValueObject/DateRepresentation/Date.php | UTF-8 | 3,892 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace Popy\Calendar\ValueObject\DateRepresentation;
use DateTimeZone;
use DateTimeInterface;
use Popy\Calendar\Converter\Conversion;
use Popy\Calendar\ValueObject\TimeOffset;
use Popy\Calendar\ValueObject\DateRepresentationInterface;
/**
* Basic implementation with static factory methods.
*/
class Date i... | true |
3a4fc8a9cfdedb2448921521b2cf3291c506c48f | PHP | cordoval/Hateoas | /src/Hateoas/Builder/LinkBuilder.php | UTF-8 | 707 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Hateoas\Builder;
use Hateoas\Link;
use Symfony\Component\Routing\RouterInterface;
/**
* @author William Durand <william.durand1@gmail.com>
*/
class LinkBuilder
{
/**
* @var RouterInterface
*/
private $router;
public function __construct(RouterInterface $router)
{
... | true |
d7480be5ea6a67fe53ab46aab25f8f132206e1ab | PHP | urgor/calendarr | /src/Pixel.php | UTF-8 | 1,395 | 3.25 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php declare(strict_types=1);
namespace Urgor\Calendarr;
abstract class Pixel
{
/** @var float */
protected $currentValue;
/** @var float */
protected $beginValue;
/**
* @param float $value
*/
public function __construct(float $value)
{
$this->currentValue = $value;
... | true |
f8b9e75f2e7fde05233310e4494c0f5e848e45fb | PHP | inquota/gokkast | /app/models/Stand.php | UTF-8 | 747 | 2.53125 | 3 | [] | no_license | <?php
use Illuminate\Database\Eloquent\Model;
use LaravelBook\Ardent\Ardent;
class Stand extends Ardent {
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'stand';
protected $guarded = array('id');
protected $fillable = array('m_id', 'b_stand', '... | true |
2efa95cb97ad5af163521951802a023782d7b31e | PHP | zhengjianhong001/qr-code-generation | /index.php | UTF-8 | 2,534 | 2.765625 | 3 | [] | no_license | <?php
/**
* php7下生成二维码
* `利用composer管理类`
* @authors Ryan Zheng
* @date 2018-11-25 23:54:05
* @version 1.1
*/
error_reporting(0);
//引入composer自动生成的类加载器
require_once 'vendor/autoload.php';
//命名空间方式调用QrCode类
use Endroid\QrCode\QrCode as EndroidQrCode;//将QrCode命名空间腾出来
//处理需生成二维码的内容、参数和文字
$data = trim($_GET['da... | true |
a90e641042814d09dca81723cefef2d40b8f0f04 | PHP | Solpadoin/telegram_bot_with_api | /app/Http/Middleware/BearerAuth.php | UTF-8 | 976 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use App\Models\User;
class BearerAuth
{
protected $except = [
'/api/authorize',
];
protected function inExceptArray($request)
{
foreach ($this->except as $except) {
if ($except !== '/') {
... | true |
1d0c672c7823b2e5c2d6ce255d4bdf7c806b350c | PHP | luizmiguelp/meutucano.com.br | /modules/Rastreio/app/Console/Commands/UpdateDeadline.php | UTF-8 | 1,443 | 2.671875 | 3 | [] | no_license | <?php namespace Rastreio\Console\Commands;
use Illuminate\Console\Command;
use Rastreio\Http\Controllers\RastreioController;
use Rastreio\Models\Rastreio;
class UpdateDeadline extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = '... | true |
23aa95b69d8347270cb1374bf313cb34b02098b8 | PHP | toxicsec22/yr21_local | /backendphp/functions/makepdf.php | UTF-8 | 2,738 | 2.59375 | 3 | [] | no_license | <?php
//PDF USING MULTIPLE PAGES
//FILE CREATED BY: Carlos Jos� V�squez S�ez
//YOU CAN CONTACT ME: carlos@magallaneslibre.com
//FROM PUNTA ARENAS, MAGALLANES
//INOVO GROUP - http://www.inovo.cl
define('FPDF_FONTPATH', '../../fpdf/font/');
require('../../fpdf/fpdf.php');
//Connect to your database
$path=$... | true |
93d30565e6ba824ff45cebe1970b0362a4a2ac0c | PHP | ppshobi/password_generator | /public/index.php | UTF-8 | 600 | 2.953125 | 3 | [] | no_license | <?php
require_once("../lib/password.php");
if (isset($_POST['submit'])) {
$password= new Password;
$length=$_POST['length'];
$options=array(
'lower'=>true,
'upper'=>true,
'numbers'=>true,
'symbols'=>true
);
echo $password->generate($length,$options);
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Password Gen... | true |
49af375f0076af4cd1908b16a38bce81b6126ffe | PHP | srbarba/Square1-Technical-Assignment | /app/Models/User/User.php | UTF-8 | 1,097 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Models\User;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use App\Models\Catalog\Product\Product;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mas... | true |
39c80a16bfb3452611311dfcaa9814f74276d378 | PHP | kingdomadvisors/craft-plugin-reports | /src/records/Report.php | UTF-8 | 822 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace kingdomadvisors\reports\records;
use yii\db\ActiveQueryInterface;
use craft\base\Element;
use craft\db\ActiveRecord;
/**
* @author Selvin Ortiz
* @package Reports
* @since 0.1.0
*
* @property int $id
* @property int $siteId
* @property string $name
* @property string ... | true |
2770b21bf4c5595a06d66fea0f12944eee1b84e7 | PHP | AlexanderYemelianov/bt | /controllers/AddressesController.php | UTF-8 | 1,658 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\controllers;
use Yii;
use yii\web\Controller;
use app\models\Addresses;
use yii\helpers\Url;
class AddressesController extends Controller
{
/**
* Creates a new Addresses models related to specific user.
*
* @params integer $user_id
* @return mixed
*/
public functi... | true |
fd969ca70c0e4a9a2b8a4540943b6097ecc3e7b4 | PHP | ssyoon/Taxperiment_MLW | /public/include/questionnaire/cognitive.php | UTF-8 | 1,798 | 2.921875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: andreas
* Date: 08.03.19
* Time: 14:16
*/
include "../../../resources/config.php";
if (sizeof($_POST) >= 1) {
$cog1 = $_POST["cog1"];
$participant = $_GET['pid'];
$updateQuery = "UPDATE questionnaire SET cog1 = $cog1 WHERE pid = $participant";
if (isset... | true |
0cf0c35b64cc0d2f93e1fb4071bf8c2bdcca51b8 | PHP | xiao881888/thinkphp_demo | /Application/Content/Model/InformationCategoryModel.class.php | UTF-8 | 456 | 2.515625 | 3 | [] | no_license | <?php
namespace Content\Model;
use Think\Model;
/**
* @date 2014-12-10
* @author tww <merry2014@vip.qq.com>
*/
class InformationCategoryModel extends Model{
public function getCategoryList(){
$where = array();
$where['information_category_status'] = 1;
$list = $this->where($where)->order('information_category... | true |
f0d204e07110bbda41391395ee35f227e4850dfc | PHP | kerry-t-johnson/regis-msse661 | /webapp/src/UserImpl.php | UTF-8 | 631 | 3.015625 | 3 | [] | no_license | <?php
namespace msse661;
class UserImpl extends Entity implements User
{
private const REQUIRED_KEYS = ['id', 'email', 'first_name', 'last_name'];
public function __construct(array $userSpec) {
self::assertRequiredSpec(self::REQUIRED_KEYS, $userSpec);
parent::__construct($userSpec);
}
... | true |
9ad262b19588734c10eba6b3a889b2339985aac2 | PHP | hustshenl/sMall | /src/common/components/attachment/BaseAttachment.php | UTF-8 | 6,164 | 2.5625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
/**
* @Author shen@shenl.com
* @Create Time: 2015/5/5 21:02
* @Description:
*/
namespace common\components\attachment;
use yii\base\Component;
use yii\web\BadRequestHttpException;
use yii\db\ActiveRecord;
use yii\web\NotFoundHttpException;
use yii;
use yii\helpers\ArrayHelper;
use common\models\base\Attachm... | true |
7a33430d45d19e706ec0ce7e8a0cd5f4b27a308f | PHP | pengjiakai8460/nopic | /common/models/utils/FuncUtil.php | UTF-8 | 2,387 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* Date: 2017/10/31
* Time: 17:20
*/
namespace common\models\utils;
use Yii;
class FuncUtil
{
const HTTP_HEADER = 'http';
const HTTPS_HEADER = 'https';
public static function getUriProtocol($uri)
{
if (0 === stripos($uri, self::HTTP_HEADER . '://')) {
... | true |
5ed3931420740bdf12089c222b288af90cb43e82 | PHP | anton-chernianu/wp_plugin_conci | /includes/edit.php | UTF-8 | 1,440 | 2.5625 | 3 | [] | no_license | <?php
include_once('m/function.php');
$id = (int)$_GET['id'];
if($id == 0) {
die('Error ID');
}
if (!empty($_POST)) {
if(isset($_POST['save'])){
if(slide_edit($id, $_POST['title'],$_POST['content'])){
die('<h2>Thanks for Edit</h2>');
}
}elseif(isset($_POST['delete'])){
if(slide_delete($id))... | true |