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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c270696d346e18e2f3d1389c6ec498fe4f673031 | PHP | iagapie/fast-route-attribute | /src/Collector/RouteCollector.php | UTF-8 | 2,517 | 2.875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace IA\Route\Collector;
use FastRoute\RouteCollector as FastRouteCollector;
use IA\Route\Route;
use IA\Route\RouteInterface;
use function array_reverse;
class RouteCollector extends FastRouteCollector implements RouteCollectorInterface
{
protected const IDENTIFIER_PREFIX = ... | true |
e713ce594ed01b21c2ba8b5a66704e8668a1ff96 | PHP | cashgithubs/liaoqiu_ch | /application/models/Liaoqiu_admin_role_model.php | UTF-8 | 3,796 | 2.65625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
header("Access-Control-Allow-Origin:*"); // 允许AJAX跨域
class Liaoqiu_admin_role_model extends CI_Model
{
/**
* 表名
*
*/
const TANEM_NAME = 'liaoqiu_admin_role';
/**
* 分页数
*
*/
const LIMIT = 20;
... | true |
53e518241391bd989c18ca508f39523b742e56b3 | PHP | hoangvanngoc/CustomChekout | /Observer/SaveCheckout.php | UTF-8 | 827 | 2.59375 | 3 | [] | no_license | <?php
namespace AHT\CustomChekout\Observer;
class SaveCheckout implements \Magento\Framework\Event\ObserverInterface
{
protected $_quoteFactory;
public function __construct(\Magento\Quote\Model\QuoteFactory $quoteFactory)
{
$this->_quoteFactory = $quoteFactory;
}
public function execute(\... | true |
b6ce9010c1478506afb221bc3ac009d08145556f | PHP | nruffilo/eBookCraft2019 | /files.php | UTF-8 | 1,180 | 3.640625 | 4 | [] | no_license | <?php
/*
Reading and writing to files is one of the most important things when it comes to automation
*/
/*
The variable we will use later to reference the file
|
| - The name of the file
| |
| | - how you want to open the file.
v v v
*/
$fh = fopen... | true |
76d9eff239b62f17809e24073a5225e0fab79f04 | PHP | romanovitch-nicolas/projet5 | /models/Post.php | UTF-8 | 2,372 | 3.125 | 3 | [] | no_license | <?php
namespace Nicolas\FermeHaffner\Models;
class Post
{
protected $id;
protected $title;
protected $content;
protected $imageName;
protected $creationDate;
protected $online;
public function __construct(array $data)
{
$this->hydrate($data);
}
public ... | true |
748ab477364e7e424e3949121191fff83465b881 | PHP | davidrey87/test-mvc-php | /Model/criterio.php | UTF-8 | 2,469 | 2.78125 | 3 | [] | no_license | <?php
class criterio
{
private $pdo;
public $idcriterio;
public $nombre;
public $descripcion;
public $idcategoria;
/*
Comstructor para inicializar nuestro PDO
*/
public function __CONSTRUCT()
{
try
{
$this->pdo = Database::Conectar();
}
catch(Exception $e)
{
die($e->getMessage... | true |
fdaba426b87196abec0916e65d3ad0af0868d420 | PHP | OlgaKlekot/EPAM-PHP-mentee | /Arrays/booksSearching.php | UTF-8 | 3,402 | 2.828125 | 3 | [] | no_license | <?php
$books = [
[
'name' => 'Learning php, mysql & JavaScript',
'author' => 'Robin Nixon',
'price' => 30,
'tags' => ['php', 'javascript', 'mysql']
],
[
'name' => 'Php for the Web: Visual QuickStart Guide',
'author' => 'Larry Ullman',
'price' => 25,
... | true |
e2172bd9d1f1a4e43c6e35d17011de4a124eaf96 | PHP | unDemian/gcdc-migrate | /app/core/Util.php | UTF-8 | 5,467 | 2.703125 | 3 | [
"MIT"
] | permissive | <?
/**
* Class Util
*/
class Util
{
/**
* Resize the google profile pic from it's URL
*
* @param null $user
* @param int $size
*
* @return string
*/
public static function profileImageUrl($user = null, $size = 28)
{
if($user) {
if(isset($user['avatar'])) {
$url = parse_url... | true |
faa73b96d422a23ce771beefb83562665dbc922a | PHP | skingned/Hachthon1126 | /HJ2/data/BUSSTOP.php | UTF-8 | 1,265 | 2.515625 | 3 | [] | no_license | <?php
/*********************************************
目地:取出站點資料
來源:MySQL--->JSON
*********************************************/
header('Access-Control-Allow-Origin: *');
header("Content-Type:text/html; charset=utf-8");
//====================init ===================
include_once "config.php";
if (!empty($_GET)){
$max... | true |
e5bfa057a0239ca96a03126fbdf5f27b3f0421b0 | PHP | ahmetberkeren/CS353-GetFlo | /GetFlo/public/addflowerpage.php | UTF-8 | 2,646 | 2.8125 | 3 | [] | no_license | <?php include "templates/header.php";
require "../config.php";
require "../common.php";
session_start(); ?>
<?php
if (isset($_POST['submitAdd'])) {
$connection = new PDO($dsn, $username, $password, $options);
$id = $_SESSION['accountID'];
$new_order = array(
"name" => $_POST['name'],
"growerID" => $id... | true |
52493eea171ee9d3e09843a1ec224a2fcbeabe58 | PHP | llliufen/workplace | /work8.8/One.php | UTF-8 | 5,193 | 4.03125 | 4 | [] | no_license | <?php
namespace work;
class Sort
{
public function Operation()
{
$empty = '';
$null = null;
$bool = false;
$array = array();
$a = 1;
$x = &$a;
$b = $a++;
echo $b; //$b的值为1
}
public function maxNum()
{
$a = 1;
... | true |
61c7b3ef5fd373fde12631f8d9bc71521c97db73 | PHP | kbond/zsUtilPlugin | /test/unit/zsMarkdownDocumentTest.php | UTF-8 | 755 | 2.71875 | 3 | [] | no_license | <?php
require_once dirname(__FILE__).'/../../../../test/bootstrap/unit.php';
$t = new lime_test(3, new lime_output_color());
$doc = new zsMarkdownDocument('# Hello World');
$doc->toMarkdown();
$t->is(preg_match('#<h1>#', $doc->render()), true, '->toMarkdown()');
$input = <<< EOF
## [header]header 2
... | true |
e424359cabd5a83abfdb778c014852670ae1789b | PHP | George1097/Projects | /edit.php | UTF-8 | 1,601 | 2.71875 | 3 | [] | no_license | <?php
require_once("class/class.php");
$tra = new Trabajo();
if(isset($_POST["grabar"] and $_POST["grabar"]=="si"))
{
$tra->edit();
exit;
}
$datos=$tra->get_estudiante_matricula($_GET["Matricula"]);
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Modulo de Inscripciones con CRUD</title>
</head>
<body... | true |
c8e509ac4ff0025dfc44422890198886a96b2edb | PHP | kokmok/SKCMS-User | /Command/ImportCountriesCommand.php | UTF-8 | 1,515 | 2.671875 | 3 | [] | no_license | <?php
namespace SKCMS\UserBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use S... | true |
9815a74bf71037f8cbd8bb262d3f620834bc1c8d | PHP | SugiPHP/Pagination | /tests/PaginationTest.php | UTF-8 | 12,502 | 3 | 3 | [] | no_license | <?php
/**
* @package SugiPHP.Pagination
* @author Plamen Popov <tzappa@gmail.com>
* @license http://opensource.org/licenses/mit-license.php (MIT License)
*/
namespace SugiPHP\Pagination;
use PHPUnit_Framework_TestCase;
class PaginationTest extends PHPUnit_Framework_TestCase
{
public function testDefaultPage... | true |
1f8cefabe7bb989330236ce335a8fb2cc12486eb | PHP | marquislockhart/Musicfy | /song_values.php | UTF-8 | 1,066 | 2.59375 | 3 | [] | no_license | <?php
require 'db.php';
if(isset($_POST['save_audio']) && $_POST['save_audio'] == "Upload Audio")
{
$dir='audio/';
$audio_path=$dir.basename($_FILES['audioFile']['name']);
if(move_uploaded_file($_FILES['audioFile']['tmp_name'],$audio_path))
{
echo 'Uploaded successfully';
// values... | true |
30d86e58c3fd06ab45c8399d6142dc9b23b0d13b | PHP | CarolineVerpoorten/jepsen-brite | /model/EventManager.php | UTF-8 | 8,424 | 2.75 | 3 | [] | no_license | <?php
namespace model;
require_once('Manager.php');
class EventManager extends Manager
{
public function getUpcomingEvents()
{
$db = $this->dbConnect();
$req = $db->query('SELECT e.id, e.title, DATE_FORMAT(e.event_date, \'%d/%m/%Y\') AS event_date_formatted, DATE_FORMAT(e.event_hour, \'%H:%i\... | true |
66138e678f95a3b210236b7b1695991a94a69953 | PHP | lera-coder/ficus | /app/Services/ModelService/ProjectService/ProjectService.php | UTF-8 | 5,119 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Services\ModelService\ProjectService;
use App\Exceptions\TransactionFailedException;
use App\Exceptions\WorkerNotInThisCompanyException;
use App\Repositories\Interfaces\ProjectRepositoryInterface;
use App\Repositories\Interfaces\WorkerRepositoryInterface;
use Exception;
use Illuminate\Support\Fa... | true |
397f0ab0c1b106451ef19f47a83b55568e750d1c | PHP | MariaShkurko/tour_plan | /send.php | UTF-8 | 2,824 | 2.625 | 3 | [] | no_license | <?php
// Файлы phpmailer
require 'phpmailer/PHPMailer.php';
require 'phpmailer/SMTP.php';
require 'phpmailer/Exception.php';
// Переменные, которые отправляет пользователь
if (isset($_POST['subscribe'])) {
$email = $_POST['email'];
} else if (isset($_POST['contact'])) {
$name = $_POST['name'];
$phone = $_P... | true |
ee58d8fe2eaa1b708b6f4d38c5606cad44b32e9a | PHP | ashokgadri/webbee-test | /app/Repositories/Menu/MenuItemRepository.php | UTF-8 | 1,182 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Menu;
use App\Models\Event;
use App\Models\MenuItem;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
class MenuItemRepository
{
protected $model;
public function __construct(MenuItem $model)
{
$this->model = $model;
}
public function getMenuI... | true |
fcb76abf54af44c82aca9540b9669fc1a6c2208c | PHP | SistemasAplexTM/worldcargo | /app/Http/Requests/TransportadorRequest.php | UTF-8 | 1,719 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class TransportadorRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* ... | true |
adce43d69f7b33c6124747779ca8cef2239286f0 | PHP | Sandhya023/form | /form/display.php | UTF-8 | 1,343 | 2.890625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Table with database</title>
<style>
table {
border-collapse: collapse;
width: 100%;
color: #588c7e;
font-family: monospace;
font-size: 25px;
text-align: left;
}
th {
background-color: purple;
color: white;
}
tr:nth-child(even) {background-color: #f2f2f2}
</style>
</head>
<body>
<tab... | true |
1b1415a72e1bbebfd7987da0b28eb46d0920bf6f | PHP | appf-anu/phis-webapp | /components/widgets/AnnotationButtonWidget.php | UTF-8 | 1,997 | 2.75 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
//******************************************************************************
// AnnotationButtonWidget.php
// SILEX-PHIS
// Copyright © INRA 2018
// Creation date: 10 Jul, 2018
// Contact: arnaud.charleroy@inra.fr, anne.tireau@inra.fr, pascal.neveu@inra.fr
//***************************... | true |
1e4b37cdb43349225347dac6387f8d2e297fdcb6 | PHP | Jeriiii/priznani | /public/app/models/Dao/Categories/UserCategoryDao.php | UTF-8 | 6,308 | 2.671875 | 3 | [] | no_license | <?php
/*
* @copyright Copyright (c) 2014 Kukral COMPANY s.r.o.
*/
namespace POS\Model;
use Nette\Database\Table\ActiveRow;
use Nette\Database\Table\Selection;
/**
* Umožňuje práci s kategoriemi jednotlivých uživatelů. Kategoriemi se
* myslí určitě vlastnosti uživatel. Př. jednoduché kategorie jsou
* muži.
*
... | true |
a37c60045062061b2eb20a9ebf4223c7ff1a6c6d | PHP | joedooley/genesis-customizer-support | /src/Customizer/RegisterInterface.php | UTF-8 | 751 | 2.515625 | 3 | [] | no_license | <?php
/**
* Interface for registering new customizer controls and settings.
*
* @package DevDesigns\GenesisCustomizerSupport
* @since 1.0.0
* @author Developing Designs
* @link https://www.developingdesigns.com/
*/
namespace DevDesigns\GenesisCustomizerSupport\Customizer;
/**
* Interface RegisterI... | true |
89bb0a87aec356955893a0379fccdfa3e963a128 | PHP | zxy123123/case | /admin/user/index.php | UTF-8 | 5,754 | 2.546875 | 3 | [] | no_license | <?php
require '../init.php';
$where = '';
$urlname = '';
$name = '';
if (isset($_GET['name']) && !empty($_GET['name'])) {
$name = $_GET['name'];
$where = "WHERE `name` LIKE '%$name%'";//SQL查询条件
$urlname = "&name=$name";//url的参数
}
//分页开始
//总记录数
... | true |
9c7856ddfbe1c1a3341b898965d391752963a982 | PHP | heghon/piscine_php | /git_day07/ex06/UnholyFactory.class.php | UTF-8 | 1,037 | 3.765625 | 4 | [] | no_license | <?php
class UnholyFactory
{
protected $army = array();
public function absorb($skeleton)
{
foreach($this->army as $dudes)
{
if ($dudes->class == $skeleton->class)
{
echo "(Factory already absorbed a fighter of type " . $skeleton->class . ")\n";
... | true |
f26d0bb06546f47f95e2a9ad36221113d2fda157 | PHP | Setono/SyliusCalloutPlugin | /src/Model/CalloutsAwareInterface.php | UTF-8 | 664 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Setono\SyliusCalloutPlugin\Model;
use Doctrine\Common\Collections\Collection;
interface CalloutsAwareInterface
{
/**
* @return Collection|CalloutInterface[]
*/
public function getCallouts(): Collection;
/**
* @return Collection|CalloutInterface[]
... | true |
10618698ec800ea31c6f12af307003c83b0aebcd | PHP | DaanMeijer/rdnaptrans-php | /src/Cartesian.php | UTF-8 | 739 | 3.09375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: daan
* Date: 9/29/18
* Time: 2:21 PM
*/
namespace StudioSeptember\RDNAPTrans;
/**
* @property double X
* @property double Y
* @property double Z
*/
class Cartesian
{
/**
* <p>Constructor for Cartesian.</p>
*
* @param double X
* @param double ... | true |
60150790e2a942832577173861d7485a35188545 | PHP | csteve77/LMS | /approved_applications.php | UTF-8 | 514 | 2.75 | 3 | [] | no_license | <?php
//this controller is used to get the list of approved applications for the current user
session_start();//ensures that a session is et
include_once "../model/class/class.pending_applications.php";
$id=$_SESSION['emp_id'];//put the contents of the session in a variable called $id
$new = new application;//creat... | true |
2ea4f21f01040fd31522f4c9742de393b1846750 | PHP | sejalgupta3/Private-School-Application | /views/setVisitCookie.php | UTF-8 | 1,881 | 2.703125 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "<username>";
$password = "<password>";
// Create connection
$conn = new mysqli($servername, $username, $password, "sejalgup_school");
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$array_visited = json_decode($_COOKIE["cookie_l... | true |
300273648b29ae8b4854043662310c8dcee5c564 | PHP | kleyla/sigProy | /gisProy/app/Http/Controllers/UserController.php | UTF-8 | 657 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User;
class UserController extends Controller
{
public function users(){
$users= User::all();
//dd($users);
return view('admin.users', compact("users"));
}
public function userNew(){
return view('a... | true |
1a5ca9a9ff6fb54b80a574114faef24db1609930 | PHP | MaCroTux/rabbitmq | /src/Telegram/Config.php | UTF-8 | 440 | 2.921875 | 3 | [] | no_license | <?php
namespace MaCroTux\Telegram;
class Config
{
/** @var string */
private $token;
/** @var string */
private $chatId;
public function __construct(string $token, string $chatId)
{
$this->token = $token;
$this->chatId = $chatId;
}
public function token(): string
... | true |
2db96fd3eba964eaaee5c5191655f3406b3468eb | PHP | yuwenlan/phpwind | /mode/cms/lib/db/articleextenddb.class.php | UTF-8 | 681 | 2.515625 | 3 | [] | no_license | <?php
!defined('P_W') && exit('Forbidden');
class PW_ArticleExtendDB extends BaseDB {
var $_tableName = "pw_cms_articleextend";
var $_primaryKey = 'article_id';
function insert($fieldData) {
$fieldData = $this->_checkAllowField($fieldData,$this->getStruct());
return $this->_insert($fieldData);
}
f... | true |
d8eca10a81dc64904028a8edca834b6813458527 | PHP | amigozgovi/agrotech | /code/AdminHandler.php | UTF-8 | 1,612 | 2.578125 | 3 | [] | no_license | <?php
class AdminHandler
{
protected $comp;
function __construct($comp)
{
$this->comp=$comp;
$this->handle();
}
function handle()
{
if(key_exists('CATEGORY',$this->comp))
{
$cat=strtolower($this->comp["CATEGORY"]);
}
else
{
$cat='home';
}
if(!isset($_SESSION))
{... | true |
2d05bec811c2a39a0ceace6c1ef1e98d6d4bfc77 | PHP | UCDS/Equipment4Seva_v1 | /application/libraries/Format_data.php | UTF-8 | 8,379 | 2.546875 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Format_data {
public function format_table_data($table_data, $action = null){
$table_rows = array();
$header = array();
if(!$table_data)
return;
if(isset($action)){
foreach($action as $op){
$header[] = $op... | true |
59fe1b80e11c3766ebc75b54464aa70eb2a8e21d | PHP | brynbeaudry/vangbong | /app/Http/Controllers/ImageController.php | UTF-8 | 592 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage;
class ProfileImageController extends Controller
{
//
public function store_image_return_path(Request $request){
$file = $request->file('file');
$ext = $... | true |
5a893e65f3325fdc994801f0e65e5660ccd03ec9 | PHP | rickyhsu1942/MultimediaE-formsBackEnd | /Main/phpFunction/mysqlEquipmentDelete.php | UTF-8 | 562 | 2.734375 | 3 | [] | no_license | <?php
require "mysqlconf.php";
//抓取目前頁數
if ($_GET['sqlEquipmentNumber']) {
$EquipmentNumber = $_GET['sqlEquipmentNumber'];
} else {
$EquipmentNumber = "";
}
//計算出本業開始記錄筆數
$startRowRecords = ($currentPage - 1) * $pageRowRecords;
$sql = "DELETE FROM property WHERE equipmentNumber = '".$EquipmentNu... | true |
73c08279528bb59b836072dd7de6cb40b2b39258 | PHP | zzv2/zzv2.github.io | /projects/image album/main/add_user.php | UTF-8 | 6,445 | 3.109375 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Add User</title>
<link href="../css/style.css" rel="stylesheet" type="text/css"/>
</head>
<?php
//Display the POST data for debugging
//echo '<pre>' . print_r( $_POST, true ) . '</pre>';
... | true |
5f02a06f95853045161ff80ab05e7abf31dcc8d6 | PHP | PabloUrb/daw_steam | /Login.php | UTF-8 | 1,580 | 2.828125 | 3 | [] | no_license | <<<<<<< HEAD
<!DOCTYPE html>
<!--
Formulario de Login para los usuarios
-->
<html>
<head>
<meta charset="UTF-8">
<title>Login</title>
</head>
<body>
<div>
<form action="" method="POST">
<p>Usuario: <input type="text" name="user"></p>
<p>Pa... | true |
4fc1a8f2ef2fd8c5a033fd19534b1a04458f7a3b | PHP | igoralves1/HSJ---PHP | /TestsToDelete/testDisplayArr.php | UTF-8 | 1,472 | 2.5625 | 3 | [
"LicenseRef-scancode-other-permissive"
] | permissive | <?php
$servername = "localhost";
$username = "hsj";
$password = "123";
$dbname = "hsjsi";
try {
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
ec... | true |
ee5aaef0ad473c3c296118a0dab1148d781cb1fc | PHP | wumvi/selectel-dns-api | /src/Model/RecordCommonModel.php | UTF-8 | 594 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Wumvi\DnsApi\Model;
class RecordCommonModel
{
protected $raw;
public function __construct(array $raw)
{
$this->raw = $raw;
}
public function getContent(): string
{
return $this->raw['content'];
}
public function getTtl(): int
{
return $thi... | true |
7c881d9072029742673873fa69c6b90809bbf1ee | PHP | jewel-rana/laravel-sslcommerz | /src/SSLCommerzParams.php | UTF-8 | 5,613 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace DGvai\SSLCommerz;
use DGvai\SSLCommerz\SSLCommerzParamVars;
class SSLCommerzParams extends SSLCommerzParamVars
{
public function amount($amount)
{
$this->total_amount = $amount;
return $this;
}
public function trxid($trxid = null)
{
$this->tran_id = is_nul... | true |
8c7607ac8e070e2e7638fc43c30fc2fdea05ddf8 | PHP | rayabanilolly/telkom-alpro | /app/Http/Controllers/OdcSpekController.php | UTF-8 | 1,884 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\odcspec;
use Illuminate\Http\Request;
class OdcSpekController extends Controller
{
/**
* Retrieving data from database
*/
public function index()
{
$response = null;
$data = odcspec::orderBy('name', 'ASC')
->where('deleted', '0')
->get();
if (!$d... | true |
38e0a6f4659c89c7f436711ed2982e1d968a210b | PHP | suquant/soloweb-onphp | /core/Logic/CallerExpression.class.php | UTF-8 | 2,433 | 2.71875 | 3 | [] | no_license | <?php
/***************************************************************************
* Copyright (C) 2010 by Kutcurua Georgy Tamazievich *
* email: g.kutcurua@gmail.com, icq: 723737, jabber: soloweb@jabber.ru *
* *
* T... | true |
abea6a272bc6eaef127174fe45f55249deecd19a | PHP | fanos1/invoices_expenses_app | /invoices/index.php | UTF-8 | 4,300 | 2.53125 | 3 | [] | no_license | <?php
session_start();
try {
include __DIR__ . '/../../../DatabaseConnectionAccountant.php';
$errors = array();
$output = '';
$q = " SELECT * FROM invoices ";
$result = $pdo->query($q);
$q2 = " SELECT * FROM customers ";
$customers = $pdo->query($q2);
$count = 0 ;
$total = 0;
$tr ='';
// SHOW ONLY... | true |
797a1d19fb8d637801d75a28f767ee6bdacdd816 | PHP | fromUse/guestDemo | /l.php | UTF-8 | 2,100 | 2.984375 | 3 | [] | no_license | <?php
/**
*
* 此函数生成验证码
*
*/
_code();
function _code( $width = 70,$height = 23,$size = 4 ){
session_start();
header('Content-type:image/png');
//搜集验证码数据源
$str = array(
2,3,4,5,6,7,8,a,b,c,d,e,f,h,i,j,k,m,n,o,p,q,r,s,t,u,v,w,x,y
);
$code = '';
//计算数组的长度
$str_length = count($str);
//设置字体大小
$font = 6;
//创建一个画布,画布默... | true |
ff30f80fdc12f81c17df42e3dd083078b82f5efe | PHP | Klaasie/oc-pushbullet-plugin | /classes/eventlisteners/ExceptionListener.php | UTF-8 | 1,374 | 2.640625 | 3 | [] | no_license | <?php
namespace Klaasie\Pushbullet\Classes\EventListeners;
use Exception;
use Illuminate\Http\Request;
use Klaasie\Pushbullet\Models\Settings;
use October\Rain\Events\Dispatcher;
use Pushbullet\Pushbullet;
/**
* Class LogListener
*
* @package Klaasie\Pushbullet\Classes\EventListeners
*/
class ExceptionListener
{... | true |
9864c5ad78674b0443d5d298a8ae2cf82a42dce6 | PHP | scheras/Skautske-hospodareni | /app/model/Cashbook/Commands/Unit/ActivateCashbook.php | UTF-8 | 552 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Model\Cashbook\Commands\Unit;
use Model\Common\UnitId;
final class ActivateCashbook
{
/** @var UnitId */
private $unitId;
/** @var int */
private $cashbookId;
public function __construct(UnitId $unitId, int $cashbookId)
{
$this->unitId =... | true |
59fd815e5b793510cc656410ff10216379cd2a35 | PHP | mega6382/skeleton | /A/User/Access.php | UTF-8 | 1,693 | 2.84375 | 3 | [] | no_license | <?php
/**
* Access.php
*
* @license http://www.opensource.org/licenses/bsd-license.php BSD
* @link http://skeletonframework.com/
*/
/**
* A_User_Access
*
* Check if user has access based on supplied rules.
*
* @package A_User
*/
class A_User_Access
{
protected $user;
protected $rules = array();
protecte... | true |
a262d5eafb2d4b77bb2342f410539162f469bb1b | PHP | flxdev/dewkit | /bitrix/templates/main/includes/mail/index.php | UTF-8 | 3,980 | 2.625 | 3 | [] | no_license | <?php
require '../vendor/PHPMailerAutoload.php';
require '../templates/template.php';
require '../environment/environment.php';
// Get form data
$name = $_POST["name"];
$email = $_POST["email"];
$message = $_POST["message"];
$uid = $_POST["uid"];
$check = $_POST["check"];
if ($check !== '' || $... | true |
50bd6b599b21f6b4bd821a991d35f8161f44d3df | PHP | mathijsvdb/fastback-php | /src/Models/Model.php | UTF-8 | 192 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Fastback\Models;
class Model
{
public function __construct($XMLElement)
{
$this->brand = $XMLElement->make;
$this->name = $XMLElement->model;
}
}
| true |
272fe6750871cdf6bce9739037a913730df832aa | PHP | thu0ng91/wcode | /cms/Lib/Action/Admin/ChapterAction.class.php | UTF-8 | 7,056 | 2.6875 | 3 | [] | no_license | <?php
/**
* 书籍章节管理模块
*
* @author flashfxp
*/
class ChapterAction extends BaseAction {
// 章节管理首页
public function index(){
$book_id = (int)$_GET['id'];
$book = $this->check_auth($book_id);
$volumes = $this->get_volume_list($book['book_id']);
$this->assign('volumes', $volumes);
$chapter_obj= M('Book_... | true |
fb692b50f78638958e9402c7c2848104b442752f | PHP | rafi73/robot | /app/Helpers/FightRobotsOwnerStatus.php | UTF-8 | 1,920 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Helpers;
use App\Robot;
use App\Contracts\FightInterface;
use Illuminate\Support\Facades\Auth;
use App\Exceptions\RobotService\RobotNotFoundException;
use App\Exceptions\FightService\RobotFightConflictException;
use App\Exceptions\RobotService\RobotOwnerMismatchedException;
class FightRobotsOwner... | true |
2d816fd4d2275921faa2de751ef603e5354077c6 | PHP | chancellorPro/stockworker | /app/Http/Requests/Product/FastSaveRequest.php | UTF-8 | 744 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Requests\Product;
use App\Http\Requests\FormRequest;
use App\Traits\Requests\Authorize;
/**
* FastSaveRequest
*/
class FastSaveRequest extends FormRequest
{
use Authorize;
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
publi... | true |
05ab85af7ac291a461d193677b3b7611ac19f96b | PHP | alexf79/prthenon | /admin/classresizeimage.php | UTF-8 | 4,802 | 2.6875 | 3 | [] | no_license | <?php
class UploadedImage
{
var $maxsize = 1048576;
var $uploaddir;
var $file = array();
var $newfile;
var $maxwidth;
var $maxheight;
var $allowtypes = array("image/jpg","image/jpeg","image/pjpeg","image/gif","image/png");
var $deniedtypes = array("image/bmp");
var $relscale = false;
var $scale = null;
var $... | true |
f6ebf1363483f0559ed4e67efaca8530a544057c | PHP | chrome-php/wrench | /src/Socket/ClientSocket.php | UTF-8 | 2,422 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace Wrench\Socket;
/**
* Options:
* - timeout_connect => int, seconds, default 2.
*/
class ClientSocket extends UriSocket
{
/**
* Default connection timeout.
*
* @var int seconds
*/
public const TIMEOUT_CONNECT = 2;
public function reconnect(): void
{
... | true |
24954338a254683302c37b32a99c1c416b2486c3 | PHP | lochmueller/ink | /Classes/Postprocessing/PostprocessingInterface.php | UTF-8 | 300 | 2.65625 | 3 | [] | no_license | <?php
/**
* Interface for processing
*/
namespace FRUIT\Ink\Postprocessing;
/**
* Interface for processing
*/
interface PostprocessingInterface
{
/**
* Run the process
*
* @param string $content
*
* @return string
*/
public function process($content);
}
| true |
0b20650cd0889acdcc2b851dc6974d26c0f98943 | PHP | danidassler2/AplicacionesWeb | /REPREME - Aplicacion Web/P4/includes/FormularioCompra.php | UTF-8 | 11,632 | 2.859375 | 3 | [] | no_license | <?php
require_once __DIR__.'/Form.php';
require_once __DIR__.'/DAOventa.php';
require_once __DIR__.'/config.php';
require_once __DIR__.'/DAOventaproducto.php';
require_once __DIR__.'/DAOproducto.php';
require_once __DIR__.'/lib_carrito.php';
class FormularioCompra extends Form{
/**
* @var string Cadena uti... | true |
837b3410c7c1c0cc988fab8860eece7c6b6c1c33 | PHP | WernerLuiz92/08-PHP-e-PDO-Banco-de-Dados | /App/selectAllStudents.php | UTF-8 | 581 | 3.078125 | 3 | [] | no_license | <?php
use Werner\Pdo\Infrastructure\Persistence\DatabaseConnection;
use Werner\Pdo\Infrastructure\Repository\PdoStudentRepository;
require_once 'vendor/autoload.php';
$pdo = DatabaseConnection::createConnection();
$studentRepo = new PdoStudentRepository($pdo);
$studentsList = $studentRepo->allStudents();
foreach ... | true |
da9ebfe080288e69e677e5d900f6fd26a1168efb | PHP | moreirapontocom/parabensthais | /scripts/getMessages.php | UTF-8 | 1,231 | 2.5625 | 3 | [] | no_license | <?
include("conecta.php");
$sql = "SELECT * FROM messages WHERE published = 1 ORDER BY id DESC";
$query = mysql_query($sql) or die (mysql_error());
while ( $res = mysql_fetch_array($query) ) {
$id = $res['id'];
$datePost = $res['datePost'];
$author = $res['authorName'];
$message = $res['message'];
$... | true |
899ad7e8ea5c1c7b589e895ba502ee57a34ca7c2 | PHP | Andduril/Projet_Symfony | /src/Entity/Departement.php | UTF-8 | 1,047 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Departement
*
* @ORM\Table(name="departement", uniqueConstraints={@ORM\UniqueConstraint(name="id", columns={"id"})})
* @ORM\Entity(repositoryClass="App\Repository\DepartementRepository")
*/
class Departement
{
/**
* @var string
*
... | true |
091d1bc821b2e10effe7086ed2fcf71270de64d6 | PHP | marinoalessio/Database-WebProgramming-Porting-Laravel | /app/Models/Director.php | UTF-8 | 377 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Eloquent\Model;
class Director extends Model
{
public $timestamps = false;
protected $fillable = [
'cf', 'name', 'surname', 'qualification', 'img'
];
public function shows(){
return $this->hasMany(Show::class);
}
public function users(){
... | true |
487849b7c4f6ec2fc12a27a4c42628869f3b50b5 | PHP | Shamim2001/php | /chapter5/utilityarray.php | UTF-8 | 1,198 | 4.1875 | 4 | [] | no_license | <?php
/*
// utility function / array_walk / array_map / array_filter
$numbers = array(1,2,3,4,5,6,7,8,9,12);
function square($n) {
printf("Square of %d is %d \n", $n, $n*$n);
}
// array_walk($numbers, 'square');
// array_map
echo "======= array map \n";
function cube($n) {
return $n*$n*$n;
}
$newArray = arr... | true |
0a0b17b806633d52e29e679572e91d4ee87fc27d | PHP | netkiller/cms | /sender/sbin/import.php | UTF-8 | 16,830 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/*
* PHP Daemon sample.
* Home: http://netkiller.github.io
* Author: netkiller<netkiller@msn.com>
*
*/
class Logger {
public function __construct($logfile /*Logging $logger*/) {
$this->logfile = $logfile;
}
public function logger($type, $message) {
$log = sprintf ( "%s\t%s\t%s\n", date ... | true |
1a5fb703caeea41398e15cb7a3623a9f4d0c3e13 | PHP | leonardocarlos/convjuwes | /admin/index.php | UTF-8 | 5,568 | 2.625 | 3 | [] | no_license | <?php ini_set( 'default_charset', 'utf-8'); ?>
<?php
include '../classes/funcoes.php';
/*
// Verifica se houve POST e se o usuário ou a são é vazio
if(!empty($_POST) AND (empty($_POST['login']) or empty($_POST['senha']))){
header('Location:'.URL_BASE.'admin/index.php'); exit;
}
$login = $_POST['login'];
... | true |
703ab17335e9b4a756e5450561acc9878f612b14 | PHP | pboethig/emotico-backend | /data/www/src/Mittax/MediaConverterBundle/Service/Uuid/Format.php | UTF-8 | 608 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: pboethig
* Date: 14.12.16
* Time: 21:09
*/
namespace Mittax\MediaConverterBundle\Service\Uuid;
class Format
{
/**
* @var Format
*/
private $item;
/**
* Format constructor.
* @param \Mittax\MediaConverterBundle\ValueObjects\Format $item
... | true |
8f6372840359c929897f498c3401581d700286d0 | PHP | Geraldinew04/multipage-website-in-php | /envois_mail.php | UTF-8 | 2,930 | 2.671875 | 3 | [] | no_license | <?php
include('acces.php');
$nom = htmlspecialchars($_POST['LastName']);
$prenom = htmlspecialchars($_POST['FirstName']);
$mail_U = trim(htmlspecialchars($_POST['email']));
var_dump($_POST);
$message = htmlspecialchars($_POST['message']);
$photo = htmlspecialchars($_FILES['photo']['tmp_name']);
$dossier = 'upload/';... | true |
09f610d05f5659f626d4bf23ea2032e53889c821 | PHP | MUlt1mate/timetable_narhoz | /include/AppModels/Lists.php | UTF-8 | 3,520 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* @author: MUlt1mate
* Date: 13.04.13
* Time: 18:08
*/
class Lists
{
public static $table = '';
const GROUP_LIST_DB = 'sh_shiftGrup';
const TEACHERS_LIST_DB = 'sh_shiftPrep';
public static $faculty = array(
80 => 'Финансово-информационный факультет',
81 => 'Экономический ... | true |
03253a5be228401257753e93776831971287cf9a | PHP | bytic/services-newrelic | /src/Monolog/Handler.php | UTF-8 | 1,268 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace ByTIC\NewRelic\Monolog;
use ByTIC\NewRelic\Utility\HasNewRelicAgent;
use Monolog\Formatter\FormatterInterface;
use Monolog\Formatter\NormalizerFormatter;
use Monolog\Handler\AbstractProcessingHandler;
/**
* Class Handler
* @package ByTIC\NewRelic\Monolog
*/
class Handler extends AbstractProcessing... | true |
b9370c79f2e754449fb3254f6427e6d915437d86 | PHP | shixinzi/lacc_project | /app/Services/ProjectFileService.php | UTF-8 | 3,343 | 2.609375 | 3 | [] | no_license | <?php
/**
* File: ProjectFileService.php
* Created by: Luis Alberto Concha Curay.
* Email: luisconchacuray@gmail.com
* Language: PHP
* Date: 24/02/16
* Time: 20:55
* Project: lacc_project
* Copyright: 2016
*/
namespace LACC\Services;
use LACC\Repositories\ProjectFileRepository;
use LACC\Repositories\ProjectR... | true |
3204db0b004876e5a883f15f72f956dfcb42988f | PHP | gryzz/freeje | /presentation/common/ResponseBase.php | UTF-8 | 2,004 | 3.15625 | 3 | [] | no_license | <?
require_once PATH_PRESENTATION_COMMON . 'VarContainer.php';
require_once PATH_PRESENTATION_COMMON . 'TemplateEngine.php';
class ResponseBase {
protected $container;
private $childResponses = array();
private $template;
public function __construct($template) {
$this->container = new VarC... | true |
d0d55cc5256c08bfc9e3853d30d1523b77e12622 | PHP | karolsojko/paths-api | /src/Domain/UseCase/AddGoal.php | UTF-8 | 970 | 2.703125 | 3 | [] | no_license | <?php
namespace Domain\UseCase;
use Domain\Repository\PathsRepository;
use Domain\UseCase\AddGoal\Command;
use Domain\UseCase\AddGoal\Responder;
use Domain\Model\Goal;
class AddGoal
{
private $pathsRepository;
public function __construct(PathsRepository $pathsRepository)
{
$this->pathsRepository... | true |
668d833bec13b7ebc77bba61552581b20b0c092c | PHP | mvc5/mvc5-tests | /src/Response/ResponseTest.php | UTF-8 | 3,478 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
*
*/
namespace Mvc5\Test\Response;
use Mvc5\Cookie\HttpCookies;
use Mvc5\Http\HttpHeaders;
use Mvc5\Response\HttpResponse;
use Mvc5\Test\Test\TestCase;
final class ResponseTest
extends TestCase
{
/**
*
*/
function test_default_values()
{
$response = new HttpResponse;
... | true |
903cc92e779304eff0fd64ca67a1715a660894ce | PHP | lkp1996/hrm_edelcert_server | /wrks/wrk_login.php | UTF-8 | 793 | 2.90625 | 3 | [] | no_license | <?php
class WrkLogin
{
private $connection;
public function login(DBConnection $db_connection, $user)
{
$this->connection = mysqli_connect($db_connection->get_server(), $db_connection->get_username(), $db_connection->get_password(), $db_connection->get_dbname());
mysqli_set_charset($this->... | true |
a55d97c90b7af68ef2600cbc70881fb1d3dfdfd5 | PHP | Pawkey/GBAF | /new_password.php | UTF-8 | 584 | 2.625 | 3 | [] | no_license | <?php
try
{
$bdd = new PDO('mysql:host=localhost;dbname=gbaf;charset=utf8','root','root');
}
catch(Exception $e)
{
die('Erreur :'.$e->getMessage());
}
$req = $bdd->prepare('SELECT * FROM members WHERE id = :id');
$req->execute(array(
'id'=> $resultat["id"]));
$ins = $req->fetch();
if (isset($_P... | true |
92fa119c604a6b9f0e6d96d41b285b3541011d7d | PHP | ShahzadNaser/cabs | /dashboard/pages/cars.php | UTF-8 | 8,236 | 2.609375 | 3 | [] | no_license | <?php
if (isset($_POST['add_car'])) {
$file=uniqid().'_'.$_FILES['car_image']['name'];
$upload_path = 'uploads/'.$file;
$data = array(
'car_title' => $_POST['car_title'],
'car_name' => $_POST['car_name'],
'car_description' => $_POST['car_description'],
'car_image' => $_POST['car_image'],
'passeng... | true |
6de1ca73f6b4d2cded54c288e95faad7f2c8f67c | PHP | alexandergreb/calldesk | /form_processing.php | UTF-8 | 15,101 | 2.90625 | 3 | [] | no_license | <?php
//------------------------Обработка формы в таблицах-----------------------------------------
$executors= new ExecutorClass();
$authors= new AuthorClass();
$reg1= new RegClass();
$task= new TaskClass();
$mailer= new EmailNotifClass();
// Добавление нового исполнителя
if($_POST['addexecutor'])
{
$name... | true |
678550260e140777c6b4ecdadc88b1c106b2f9af | PHP | sabbirsabat/PracticeCodeTWLP | /PHP/01.PHP Fundamental/30-PHP URL-E-MAIL Validation.php | UTF-8 | 3,224 | 2.796875 | 3 | [] | no_license | <?php
$fonts="verdana";
$bgcolor="#444";
$fontcolor="#FF9800";
$errname = $erremail = $errweb = $errcomment = $errgender ="";
$name = $email = $website = $comment =$gender = "";
if ($_SERVER ["REQUEST_METHOD"]=="POST"){
if(empty($_POST['name'])){
$errname = "<span style='color:red'>Name is Required.<... | true |
5d464b08a5b66e3c102e7cb584a2f96b2834cab0 | PHP | HariharanMiracle/Reg | /app/Controllers/Register.php | UTF-8 | 6,573 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Controllers;
use App\Models\CourseModel;
use App\Models\RegisterModel;
use CodeIgniter\Controller;
class Register extends Controller{
public function saveform1(){
$validation = \Config\Services::validation();
$emailx = \Config\Services::email();
$email = $this->request... | true |
5d838344387614555ea8773645c76d50b757c28d | PHP | antonshell/interview-tasks | /php/collectEmails/calculate.php | UTF-8 | 950 | 2.609375 | 3 | [] | no_license | <?php
require '_bootstrap.php';
$limit = 10000;
$offset = 0;
$delay = 1;
$results = [];
for(;;){
$rows = $db->run('SELECT id,email FROM users WHERE id > ? LIMIT ?', $offset, $limit);
if(!count($rows)){
break;
}
foreach ($rows as $row) {
$userId = $row['id'];
$emailCol = $ro... | true |
7e9320f4415c03f42cf1e7c70c2a16e46bbd2870 | PHP | Lombard-Web-Services/covid19 | /bot/covid_table.php | UTF-8 | 18,089 | 2.765625 | 3 | [] | no_license | <?php
$host = "databasehost";
$username = "username";
$password = "password";
$dbname = "dbname";
$tablename = "tablename";
// table name for standard deviation
$tablenameSD = "SD";
// configure the update hour of the CSSE DB import
$updatehour = 8;
// limit the result for a row request without grouping
$rowresultlim... | true |
5a58d9c5347d164a8a160651a80b487acf0ac667 | PHP | vctaragao/SIGF-deprecated | /SIGF2.0/app/Http/Controllers/ProfessorController.php | UTF-8 | 4,990 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Classroom;
use App\Classes;
use App\Attendence;
use App\User;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Hash;
class ProfessorController extends StudentController
{
public function addStudentsToClassroom($cl... | true |
670485c250a2d70b548889ef2ec84f23ae4cd714 | PHP | marscore/hhvm | /hphp/test/slow/traits/2065.php | UTF-8 | 711 | 3.28125 | 3 | [
"Zend-2.0",
"PHP-3.01",
"MIT"
] | permissive | <?php
trait TraitFoo {
public function getStringThroughProtectedMethod() {
return $this->protectedMethod();
}
protected function protectedMethod() {
return 'fallback protected method';
}
public function getStringThroughPrivateMethod() {
return $this->privateMethod();
}
private function privat... | true |
fd9c1c0891247baded3f2183d0b12ccb471624d2 | PHP | IonutBajescu/crud | /src/Commands/Scaffolding.php | UTF-8 | 1,661 | 2.765625 | 3 | [] | no_license | <?php namespace Ionut\Crud\Commands;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
class Scaffolding extends Command
{
protected function configure()
{
... | true |
4ac5da838d206ad3911bdc3f4bc77a35b236a1d8 | PHP | weimanxu/public | /class/TokenClass.php | UTF-8 | 1,685 | 2.59375 | 3 | [] | no_license | <?php
class TokenClass extends CustomBaseClass{
/**
* 新增代币明细记录
* @param int $userProjectId
* @param int $uid
* @param int $projectId
* @param int $opt_type
* @param float $token
* @param float $balance
* @param int $relateId
... | true |
a1ea98c78e87a6182f51e2bba4ca80c18b3aa876 | PHP | RamiGamalMahmoud/Simple | /src/Core/DataAccess/MySQLAccess.php | UTF-8 | 919 | 2.765625 | 3 | [] | no_license | <?php
namespace Simple\Core\DataAccess;
use PDO;
class MySQLAccess extends BaseDataAccess
{
public function get(\Simple\Core\DataAccess\Query $query)
{
return $this->prepare(
$query->getQueryString(),
$query->getQueryParams()
)->fetch(PDO::FETCH_ASSOC);
}
publ... | true |
3fb6d8648a8ed33b3cb464888e9646d5609f707e | PHP | MinhajulMU/taalama | /app/User.php | UTF-8 | 1,335 | 2.640625 | 3 | [] | no_license | <?php
namespace App;
use App\Model\Role;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var ... | true |
5461d1224e0408bce03f71629d21a06361413e6e | PHP | XAKEPEHOK/DependentRunner | /src/DependencyConnection.php | UTF-8 | 521 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Date: 10/26/21 12:07 AM
* @author Timur Kasumov (XAKEPEHOK)
*/
namespace XAKEPEHOK\DependentRunner;
use Redis;
class DependencyConnection
{
private Redis $redis;
private string $redisKey;
public function __construct(Redis $redis, string $redisKey)
{
$this->redis = $redis;
... | true |
886e2d4fa95dadd0050be9d0fe21e7e78e503b83 | PHP | SuperDev820/CakePHP-edocnszw_localinspire- | /src/Model/Entity/Offer.php | UTF-8 | 1,812 | 2.5625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Model\Entity;
use Cake\ORM\Entity;
/**
* Offer Entity
*
* @property int $id
* @property int $business_id
* @property string $title
* @property bool|null $code_offer
* @property string|null $code
* @property bool|null $link_offer
* @property string|null $link
* @... | true |
d52a652bfb80b2aa9b0da9e90c636bd425f4a434 | PHP | andi97p/uts | /WEBSITE/admin/database1.php | UTF-8 | 967 | 2.609375 | 3 | [] | no_license | <?php
class database{
var $host = "localhost";
var $uname = "infosisw_datamurid";
var $pass = "andi04011997";
var $db = "infosisw_DataMurid";
function __construct(){
mysql_connect($this->host, $this->uname, $this->pass);
mysql_select_db($this->db);
}
function tampil_data(){
$data = mysql_query("SELECT... | true |
e7627913322c8124f1a02712bcb07d111bb3fba9 | PHP | hergesel/noopmvc-master | /visao/compra/listar.visao.php | UTF-8 | 1,339 | 2.578125 | 3 | [] | no_license | <h1> Dados Cliente </h1>
<br>
Nome: <h3><?=$dados_cliente['nome']?></h3>
Email: <h3><?=$dados_cliente['email']?></h3>
CPF: <h3><?=$dados_cliente['cpf']?></h3>
Endereço: <h3><?=$dados_cliente['endereco']?></h3>
<br>
<br>
<br>
<h1> Produtos Comprados </h1>
<?php
$quantidade = 0;
$total = 0;
foreach ($produtos as $pro... | true |
e561cd56a0fb206f880426995acdd92b4127a4b6 | PHP | nymous-experiments/EBM-FrontendBackend | /src/Routes/Article.php | UTF-8 | 7,235 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace EBM\Routes;
use EBM\Database;
class Article
{
public static function getArticles(Database $db)
{
$articles = $db->query("SELECT id, title FROM np_articles");
return json_encode($articles);
}
public static function getArticleById(Database $db, int $article_id)
{
... | true |
c58f8ce50473dce689fa7e308478b53e07bbaa4b | PHP | dantleech/maestro | /src/Extension/File/Task/PurgeDirectoryHandler.php | UTF-8 | 1,198 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Maestro\Extension\File\Task;
use Amp\Parallel\Worker;
use Amp\Promise;
use Maestro\Extension\File\Amp\Task\PurgeDirectoryAmpTask;
use Maestro\Extension\File\Task\Exception\CouldNotPurgeDirectory;
use Webmozart\PathUtil\Path;
class PurgeDirectoryHandler
{
/**
* @var string
*/
private... | true |
3a6f13894c63765444a2f00c9692dd555bdd97e0 | PHP | yiwenzhe8877/tkapi | /server/modules/v1/forms/order/log/UpdateForm.php | UTF-8 | 928 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\v1\forms\order\log;
use app\componments\sql\SqlUpdate;
use app\modules\v1\forms\CommonForm;
class UpdateForm extends CommonForm
{
public $log_id;
public $order_id;
public $op_id;
public $op_name;
public $dateline;
public $behavior;
public $result;
public $log_text;
public ... | true |
c7fce3961254b1dbdeb0fab98eaab0715501862a | PHP | vespakoen/bolt-core | /src/Bolt/Core/Config/Object/Collection/RelationCollection.php | UTF-8 | 1,102 | 2.5625 | 3 | [] | no_license | <?php
namespace Bolt\Core\Config\Object\Collection;
use InvalidArgumentException;
use Bolt\Core\App;
use Bolt\Core\Support\Collection;
use Bolt\Core\Config\Object\Relation;
class RelationCollection extends Collection
{
protected $items = array();
public function __construct($items = array())
{
... | true |
d09b2e32e9e1bf858431d57e3f4fee54eb9852b6 | PHP | dvsa/olcs-backend | /module/Api/src/Domain/Validation/Validators/IsOwner.php | UTF-8 | 1,844 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Is Owner
*
* @author Rob Caiger <rob@clocal.co.uk>
*/
namespace Dvsa\Olcs\Api\Domain\Validation\Validators;
use Dvsa\Olcs\Api\Domain\AuthAwareInterface;
use Dvsa\Olcs\Api\Domain\AuthAwareTrait;
use Dvsa\Olcs\Api\Entity\Doc\Document;
use Dvsa\Olcs\Api\Entity\System\SubCategory;
use Dvsa\Olcs\Api\Entity... | true |
fc7da23ab1a2e9df11561babf71b44076a464722 | PHP | utshadasakash/projectcse470 | /controller/updateadmininst.php | UTF-8 | 1,970 | 2.53125 | 3 | [] | no_license | <?php
$con=mysqli_connect('localhost','root');
mysqli_select_db($con,'project');
if(isset($_POST['submit'])){
$id=$_GET["ID"];
$newname=$_POST['name'];
$newid=$_POST['id'];
$newdepartment=$_POST['department'];
$newpassword=$_POST['password'];
$query="update student set Name=$newname,ID=$n... | true |
0c7c5dd5764725e9b2717f5418c3712764083978 | PHP | bazo/nette-gridder | /Gridder/Document.php | UTF-8 | 669 | 2.546875 | 3 | [] | no_license | <?php
namespace Gridder;
use Doctrine\ODM\MongoDB\Mapping\Annotations as ODM;
/**
* Document
*
* @author Martin Bazik
* @ODM\MappedSuperClass
*/
abstract class Document extends \Nette\Object implements \ArrayAccess
{
public function offsetExists($offset)
{
return isset($this->$offset);
}
public functio... | true |
106701f192185738531fcb2670bcef247bc491c8 | PHP | jazzystring1/PHP---Database-Query-Builder | /AdapterFactory.php | UTF-8 | 1,096 | 2.921875 | 3 | [] | no_license | <?php
namespace Barbet;
require_once dirname(__FILE__) . "\Exceptions.php";
require_once dirname(__FILE__) . "\Adapter\QueryFactoryAdapter.php";
require_once dirname(__FILE__) . "\Adapter\WriterAdapter.php";
require_once dirname(__FILE__) . "\Adapter\SyntaxAdapter.php";
use Barbet\BarbetExceptions;
use Barbet\WriterA... | true |