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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
797cf12af4b876bb8733cc1969bbfb4fe5bda43f | PHP | avenirs05/cabinet.loc | /models/User.php | UTF-8 | 5,793 | 3.28125 | 3 | [] | no_license | <?php
/**
* Класс User - модель для работы с пользователями
*/
class User
{
/**
* Проверяем существует ли пользователь с заданными $email и $password
* @param string $email <p>E-mail</p>
* @param string $password <p>Пароль</p>
* @return mixed : integer user id or false
*/
public static fu... | true |
deb7e7a2d1c5a35a6bb2eed22607764f89e923e1 | PHP | xiayunzhu/laravel | /tisu_shop/app/Handlers/BaseHandler.php | UTF-8 | 962 | 2.703125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: jjg
* Date: 2018-12-03
* Time: 20:42
*/
namespace App\Handlers;
class BaseHandler
{
/**
* @var array
*/
protected $scenes = [
'create' => [],
'modify' => ['id'],
];
/**
* 应用场景-过滤数据
* @param array $arr
* @param nu... | true |
e4a3de25006851b2db7cbc45bb1468742edeaba4 | PHP | romanzaycev/hackathon-boilerplate | /snippets/migration.php | UTF-8 | 522 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
use Hackathon\Util\Migration;
/**
* Class TestMig
*/
class TestMig extends Migration
{
public function up()
{
$this->query("
CREATE TABLE IF NOT EXISTS yolo
(
id serial NOT NULL CONSTRAINT yolo_pk PRIMARY KEY,
name VARCHAR(512) NOT NULL
... | true |
e0b5f136e548824e4b20879647f18b412a36517d | PHP | rtrevizoli/SamplePhpCrud | /vendas/app/Db/Database.php | UTF-8 | 4,692 | 3.1875 | 3 | [] | no_license | <?php
namespace App\Db;
use \PDO;
use \PDOException;
class Database {
/**
* Database host conection
* @var string
*/
const HOST = 'localhost';
/**
* Database name
* @var string
*/
const NAME = 'SamplePhpCrud';
/**
* Database user
* @var string
*/
... | true |
fc6d49c21e5e7c817ab2293927ac577a4dac721d | PHP | andreghub01/mining-pool-report | /app/Console/Commands/GetAll.php | UTF-8 | 807 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\Http\Controllers\SheetController;
use Illuminate\Console\Command;
class GetAll extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'get:data';
/**
* The console command des... | true |
f7bc0feeb9a720f3d68585f509c1b6e314c49fa0 | PHP | NguyenTrungDuc74212/LapTrinhWed_NguyenTrungDuc | /blog/app/Http/Controllers/page/PageLoginController.php | UTF-8 | 1,525 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\page;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Session;
use App\Models\User;
use Illuminate\Support\Facades\Hash;
class PageLoginController extends Controller
{
//
private static function get_data($username,$pass)
... | true |
66c5a61fd222c38ff449923e8908bfad25fd58f9 | PHP | vitor5g/Picole | /classes/services/createCliente.php | UTF-8 | 1,321 | 2.921875 | 3 | [] | no_license | <?php
include_once "../model/Cliente.php";
include_once "../model/ClienteDAO.php";
try {
$data = json_decode($_POST['data']);
$dto = new Cliente();
$dto->setNome(trim($data->nome));
$dto->setSobrenome(trim($data->sobrenome));
$dto->setSetor(trim($data->setor));
$dto->setApelido(trim($data->... | true |
078f502bcdf42fe2c4784396d491f5b03f32d12c | PHP | zhumingliangsir/project-jiansanyoufu | /data/new.php | UTF-8 | 1,623 | 2.796875 | 3 | [] | no_license | <?php
//分页向客户端输出所有产品信息
//以json格式
//{
// recordCount:36, //满足条件总的记录数
// pageSize:8, //页面大小,一页最多保存记录数
// pageCount:5, //页面数量
// pageNum:3; //当前显示行号
// data:[{},{},{}] //当前页面中的记录数据
//}
//1:修改输出格式 json
header("content-type:application/json;charset=utf-8");
//2:获取客户端提交的要显示页号 pageNum
@$pno = $_REQUEST['pageNum'];... | true |
2c65b1841f829a142943656a99bae34e0c94086b | PHP | HazemMostafa23/Hotel-Management-System | /php/employees.php | UTF-8 | 1,741 | 2.609375 | 3 | [] | no_license | <style>
.color{
color:#36486b;
}
.color:hover{
color:blue;
text-decoration:none;
}
</style>
<?php
session_start();
include "classes.php";
$GLOBALS['admin']=new admin();
// include "dbhandler.php";
function viewE(){
$result=$GLOBALS['admin']->display_employee();
while($row = mysqli_fetc... | true |
db3a63e615771562ff724fde2634e0ec05469e86 | PHP | brainor-rus/zeus-admin | /src/SectionBuilder/Meta/Meta.php | UTF-8 | 774 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Artem
* Date: 25.10.2018
* Time: 11:21
*/
namespace Zeus\Admin\SectionBuilder\Meta;
class Meta
{
private $styles = [];
private $scripts = [];
/**
* @return array
*/
public function getStyles()
{
return $this->styles;
}
/**
... | true |
8a03694f687ca317ad1dec90616a71f72eff9179 | PHP | gordey777/lemanta | /lemanta.dev/objects/.ref-models/BasicModel.php | UTF-8 | 7,676 | 2.734375 | 3 | [] | no_license | <?php
// подложка макета справочника
require_once(dirname(__FILE__) . '/BasicSubstrate.php');
// =======================================================================
/**
* Макет справочника админпанели
*
* @package Impera CMS
* @author AIMatrix
* @copyright Copyr... | true |
87cb8236a441382a14ece50eff615cb504c505e3 | PHP | tcrfund/WikiRumours | /source/libraries_(protected)/tidal_lock/0-5/helpers/class.encrypter.php | UTF-8 | 9,703 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
class encrypter_TL {
private $ambiguousCharacters = '0O1lI5S|';
public function quickEncrypt($plaintext, $salt = false) {
/* Uses MD5 for rapid low-criticality one-way encryption. For higher-grade one-way encryption,
try a Bcrypt implementation such as PH Pass. */
// add salt
$pla... | true |
f77fa0cd672765644cb7fb7a995079d019cbe63e | PHP | tesol-association/viettesol | /app/ConferenceRepositories/PaperFileRepository.php | UTF-8 | 1,655 | 2.6875 | 3 | [] | no_license | <?php
namespace App\ConferenceRepositories;
use App\Models\PaperFile;
class PaperFileRepository
{
public function all()
{
return PaperFile::all();
}
public function find($id)
{
return PaperFile::find($id);
}
public function get($filters = null)
{
if (empty($f... | true |
d043de585069f1f07518c61c5a6042b6b1d297bb | PHP | SukhinaAndrey/Automobile | /Auto_project/script.php | UTF-8 | 961 | 2.71875 | 3 | [] | no_license |
<?php
$gender = htmlspecialchars($_POST["gender"]);
$name = htmlspecialchars($_POST["name"]);
$sername = htmlspecialchars($_POST["sername"]);
$email = htmlspecialchars($_POST["email"]);
$phone = htmlspecialchars($_POST["phone"]);
$question = htmlspecialchars($_POST["question"]);
$date_tod... | true |
c2238c6fcd735890fec06529632ded185f365de4 | PHP | theintz/PlistaPrize-Example-Implementation | /classes/ContestFeedback.php | UTF-8 | 3,165 | 2.78125 | 3 | [] | no_license | <?php
/*
* this message is created on the live server, then sent to the contest server and from there on forwarded to all teams.
*/
class ContestFeedback extends ContestMessage {
private $client;
private $domain;
private $source;
private $target;
private $category;
public function __construct($data) {
paren... | true |
b169766b7176846abd4b3440e8389d462ea69368 | PHP | barbosaadriano/video-aula-php-mvc | /public/index.php | UTF-8 | 918 | 2.546875 | 3 | [] | no_license | <?php
header('Content-Type: text/html; charset=utf-8');
ini_set('display_errors', 1);
ini_set('log_errors', 1);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
error_reporting(E_ALL);
/**
* Método de carregamento automático de classes
* @param class $c classe que será instaciada
*/
function... | true |
fec6aa388f5b4d5fbacaf930a038688cc1ee356f | PHP | Lesbraslongs/DL15Projects | /MVCTeleacorriger/src/View/View.php | UTF-8 | 1,228 | 3.140625 | 3 | [] | no_license | <?php
namespace View;
class View
{
private $fichier = array();
public function __construct(){
}
/**fonction de construction et d'affichage des vues
*
* @param $donnees
*/
public function generer($donnees){
$contenu="";
foreach($donnees as $value){
$fi... | true |
334a94a74c45e92f508da897d36beb17226f68e3 | PHP | dxw/govuk-blogs | /lib/about-widget.php | UTF-8 | 2,198 | 2.625 | 3 | [
"LicenseRef-scancode-proprietary-license",
"MIT",
"GPL-2.0-or-later",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
add_action('widgets_init', function () {
register_widget('AboutWidget');
});
class AboutWidget extends WP_Widget
{
public function __construct()
{
$this->WP_Widget('about_widget', 'About Widget', ['classname' => 'about_widget', 'description' => 'Information about blog']);
$this->alt_... | true |
1c7da0d43a9eff7b6106b9872d0ad907b8cd3598 | PHP | mollie/mollie-JTL | /version/200/class/Helper.php | ISO-8859-1 | 13,564 | 2.546875 | 3 | [] | no_license | <?php
/**
* @copyright 2022 WebStollen GmbH
* @link https://www.webstollen.de
*/
namespace ws_mollie {
use Exception;
use Jtllog;
use PclZip;
use Plugin;
use Shop;
use stdClass;
if (!class_exists('ws_mollie\Helper')) {
/**
* Class Helper
* @package ws_mollie
... | true |
d3e5d13a4a0d817dee587531482fcdebd5bb11e6 | PHP | Glitchier/Computer-World-Website | /Computer World Website/pro_table.php | UTF-8 | 420 | 2.578125 | 3 | [] | no_license | <title>Product Table Creation</title>
<?php
include"connection.php";
$t="create table product(Batch_No varchar(40) not null, Name varchar(50) not null,Rate int not null,Quantity int not null,Description varchar(400) not null,Photo varchar(500), primary key(Batch_No))";
$q=mysqli_query($cn,$t);
if($q)
{
... | true |
30e852567800410c54e1af5bbb454ab7c0f07310 | PHP | UnknownRori/php-router | /tests/Integration/InvokableControllerTest.php | UTF-8 | 1,022 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace UnknownRori\Tests\Integration;
use PHPUnit\Framework\TestCase;
use UnknownRori\Router\RouteResolver;
use UnknownRori\Router\Routes;
class Home
{
public function __invoke()
{
return "Home pages!";
}
}
/**
* @covers \UnknownRori\Router\RouteResolver
* @covers \UnknownRori\Router\... | true |
397a059c8faca3afd58cfd28f493229211655e8b | PHP | MoisesM02/PrimerTrabajo | /Backend/delete-services.php | UTF-8 | 466 | 2.546875 | 3 | [] | no_license | <?php
include("connection.php");
if(isset($_POST["id"]) && !empty($_POST["id"])){
$id = $_POST["id"];
$stmt = $conn->prepare("DELETE from Servicios WHERE ID =:id;");
try{
$result = $stmt->execute(["id" => $id]);
if($result){
echo "Producto eliminado correctamente";
}else{
ech... | true |
a62b107e90080443240f46d6f7db7e6f7b37a04c | PHP | datamonnit/blog_project | /app/get_user_data.php | UTF-8 | 899 | 2.890625 | 3 | [] | no_license | <?php
// get_user_data.php
// Returns userdata in JSON-format
session_start();
header("Content-type: application/json; charset=utf-8");
// check if id-param is set
if (filter_has_var(INPUT_GET, 'id')){
$id = $_GET['id'];
} else {
$data = array(
'status' => 'error',
'message' => 'id not set'... | true |
5b92b4482daecb0f0ffb41b12850fe3c200fa0b4 | PHP | ishishlov/shmixit | /Models/RoomUsers.php | UTF-8 | 804 | 2.90625 | 3 | [] | no_license | <?php
namespace Models;
use Domain\User;
class RoomUsers extends Main {
private const TABLE_NAME = 'room_users';
private const ID_FIELD_NAME = 'room_id';
public function __construct()
{
parent::__construct(self::TABLE_NAME, self::ID_FIELD_NAME);
}
public function save(User $user, i... | true |
d063ae01445e71db6af57d21a92bf942e88fc46f | PHP | gdarquie/mibu | /src/Repository/FictionRepository.php | UTF-8 | 2,202 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repository;
use App\Entity\Concept\Fiction;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Symfony\Bridge\Doctrine\RegistryInterface;
class FictionRepository extends ServiceEntityRepository
{
public function __construct(RegistryInterface $registry)
{
pa... | true |
7f676b92e119054daf05b5f3ca2d2397d96e9a48 | PHP | octalmage/wib | /php-7.3.0/ext/oci8/tests/bug70700.phpt | UTF-8 | 6,063 | 2.546875 | 3 | [
"BSD-4-Clause-UC",
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"TCL",
"ISC",
"Zlib",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"blessing",
"MIT"
] | permissive | --TEST--
Tests for LOBs with multibyte strings, reading them out in chunks
(Doc Bug #70700)
--CREDITS--
Chuck Burgess
ashnazg@php.net
--SKIPIF--
<?php
if (!extension_loaded('mbstring')) die('skip mbstring is not enabled');
$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs
require(... | true |
84fa05cb45bdec492bdae74dce271a4373ed5b4f | PHP | poe1599/proj19 | /cart_api.php | UTF-8 | 3,589 | 2.703125 | 3 | [] | no_license | <?php
// 導入驗證登入的php檔
require './is_member.php';
// 導入寫有資料庫連線的php檔
require './db_connect.php';
$title = '購物車';
// 讓navbar對應的選單變色
$pageName = 'cart';
// 本次購物清單
$member = $_SESSION['member']['member_sid'];
$sql = "SELECT * FROM `order_list` WHERE `member_sid` = $member AND `visible` = 1 AND `next_time` = 0 AND `check_st... | true |
37119491b548aac27e49e01ee631f2dacfcb148d | PHP | DanielTaranger/animated-broccoli | /coursereview/utils/buttoncode.php | UTF-8 | 2,185 | 2.828125 | 3 | [] | no_license | <?php
/*
** These php functions are used primarily in generating the vote up and vote down buttons on the review entries
*/
//This prevents users to access the document directly
if(!defined('LOCK')) {
die('Direct access not permitted');
}
/*
** It checks if the post has the same author as the user that is lo... | true |
2d93bb7b2845775f72fab607e2594fcbcb95db4f | PHP | wjchoi87/laravel-geoip2 | /src/Commands/Downloader.php | UTF-8 | 4,400 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace danielme85\Geoip2\Commands;
/*
* The MIT License
*
* Copyright 2016 Daniel Mellum.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including with... | true |
e9ed33cebafdc5d9e4a69c29ce1260dc4c2c6dfb | PHP | gazhur94/bulls-and-cows-minigame | /components/player/checker.php | UTF-8 | 1,530 | 2.9375 | 3 | [] | no_license | <?php
namespace minigame\components\player;
class checker
{
public static function cows($num1,$num2,$num3,$num4)
{
$counter = 0;
if ($num1 == $_SESSION['number']->numb[1] || $num1 == $_SESSION['number']->numb[2] || $num1 == $_SESSION['number']->numb[3])
{
$counter ... | true |
1d11237f3e94df76fe559f8dc2392163386a4295 | PHP | 4yop/miscellaneous | /learn/data/treefgfg.php | UTF-8 | 2,062 | 3.640625 | 4 | [] | no_license | <?php
class Node {
public $data = null;
public $parent = null;
public $left = null;
public $right = null;
}
#使用数组构造完全二叉树
function build_cbtree($a) {
$root = new Node();
$root->data = $a[0];
for ($i = 1; $i < count($a); $i++) {
... | true |
6eec8e10b004e61634448760accafd9a79bc8ab1 | PHP | andri000me/E-SPP | /spp_06/function/Kelas.php | UTF-8 | 3,956 | 2.765625 | 3 | [] | no_license | <?php
class Kelas
{
public function __construct()
{
global $koneksi;
$this->auth = new Auth();
$this->auth->ceklogin();
$this->db = $koneksi;
}
//Mengambil data siswa
public function ambil($limit = null)
{
if (isset($limit)) {
... | true |
0976267e2893e808720688554b1c28c86d94eec5 | PHP | MaximeTAILOR/allyouneed | /php/name_customer.php | UTF-8 | 693 | 2.609375 | 3 | [] | no_license | <?php
// au -> {aurelien, augustin};
session_start();
include './conn_db.php';
$table = array();
$firstname = $_GET['fname'];
$sql = "SELECT * from customer where fname_customer='" . $firstname . "'";
$resultat = mysqli_query($conn, $sql);
if ($resultat == FALSE) {
$table = array(
'error' => true,
... | true |
511c953c2d141d6b4d380a033258dc67127469a0 | PHP | ravinsharma7/samples-php | /app/src/MoneyBatch/MoneyBatchWorkflow.php | UTF-8 | 2,060 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* This file is part of Temporal package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Temporal\Samples\MoneyBatch;
use Carbon\CarbonInterval;
use Temporal\Activity\ActivityOptions;
... | true |
711d84bb4cc8c99720fcf462373cb0146dfa8ab5 | PHP | ibrahimramadan1/fourWheels | /deleteAdmin.php | UTF-8 | 5,151 | 2.5625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Delete Admins</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/cs... | true |
6eac32ee9dc0e47fc18be022cfa70f28e6d32b8b | PHP | ivebeenlinuxed/my-community | /framework/application/library/CellRenderer.php | UTF-8 | 1,025 | 2.78125 | 3 | [] | no_license | <?php
/**
* This is a library for all the DataTable cell renderers. This probably should be done in a better way at some point.
*
* PHP Version: 5.3
*
* @category Library
* @package My-Community
* @author ivebeenlinuxed <will@bcslichfield.com>
* @license All Rights Reserved
* @version GIT: $Id$
* @link... | true |
50a222144b53ad24897d1ddb9f4e724af3102600 | PHP | MaartenJager/Public_Agenda | /index.php | UTF-8 | 2,263 | 2.546875 | 3 | [] | no_license | <?php session_start(); ?>
<!DOCTYPE html>
<html lang="nl">
<head>
<?php require_once("inc/header.inc"); ?>
</head>
<body>
<div id="header">
<?php //Controleer of de gebruiker ingelogd is; zoja, geef dit weer in container ?>
<?php if(isset( ... | true |
a82cb60a571b1091a479cb160c871ead962a8d8d | PHP | keithcasey-okta/api-testing | /php/bootstrap/FeatureContext.php | UTF-8 | 2,607 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
use Behat\Behat\Context\BehatContext,
Behat\Behat\Exception\PendingException,
GuzzleHttp\Client as GuzzleClient;
/**
* Defines application features from the specific context.
*/
class FeatureContext extends BehatContext
{
protected $apikey = '';
protected $domain = '';
protected $client =... | true |
2575e9883e9636aba77304c09c23505dc5d3bbf4 | PHP | mvqn-ucrm/rest | /src/UCRM/Endpoints/Helpers/ClientHelper.php | UTF-8 | 11,978 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace MVQN\REST\UCRM\Endpoints\Helpers;
use MVQN\Collections\Collection;
use MVQN\REST\UCRM\Endpoints\Client;
use MVQN\REST\UCRM\Endpoints\ClientContact;
use MVQN\REST\UCRM\Endpoints\Organization;
/**
* Trait ClientHelper
*
* @package UCRM\REST\Endpoints\Helpers
* @author Ryan ... | true |
4ba98d381e7bc55d8f8d3a16ad024c080a82908e | PHP | lostinfo/jos-open-api | /src/request/EclpSerialQueryPageSerialByOwnerNoAndCondition.php | UTF-8 | 5,171 | 2.53125 | 3 | [] | no_license | <?php
namespace Lostinfo\JosOpenApi\request;
/**
* 根据货主编号和业务类型等查询序列号详情
* ECLP仓海API-ECLP商家使用
* url: http://open.jd.com/home/home#/doc/api?apiCateId=138&apiId=1682&apiName=jingdong.eclp.serial.queryPageSerialByOwnerNoAndCondition
* Class EclpSerialQueryPageSerialByOwnerNoAndCondition
* @package Jd\request
*/
clas... | true |
5985a9d852769c4098dac7ef5ccaee479fbc0a7a | PHP | UNAH-IS/IS912-I2018 | /php/9gag/ajax/obtener-memes.php | UTF-8 | 1,540 | 2.578125 | 3 | [] | no_license | <?php
$archivo = fopen("../data/memes.csv","r");
while ($linea=fgets($archivo)) {
$partes = explode(",", $linea);
echo '<div class="col-lg-12 col-sm-12 col-xs-12 col-md-12">'.
' <div class="well">'.
' <strong>'.$partes[2]. '</strong>'.
' <p>'.$partes[1]. '</p>'.
' <button type="butt... | true |
4d8d550e157a6762a429976d1ff59d879f15fc31 | PHP | preliga/VoiceMcDonalds | /public/content/addProduct.php | UTF-8 | 1,033 | 2.515625 | 3 | [] | no_license | <?php
use resource\action\Base;
use \library\PigFramework\model\Session;
/**
* Created by PhpStorm.
* User: Piotr
* Date: 2018-01-07
* Time: 17:13
*/
class addProduct extends Base
{
public function onAction()
{
$productId = $this->getParam('productId');
$amount = $this->getParam('amount'... | true |
db1a21b92841dc0f68555fdb6809383518a30ae6 | PHP | fle-z/undergraduate | /Demo/httpRange.php | UTF-8 | 5,193 | 2.78125 | 3 | [] | no_license | <?php
$file = __DIR__.'numbers.txt';
$content_type = 'text/plain';
if(($filelength = filesize($file)) === false) {
error_log("Problem reading filesize of $file")
}
//解析首部来确定发送响应所需的时间
if(isset($_SERVER['HTTP_RANGE'])) {
//定界符不区分大小写
if(!preg_match('/bytes=\d*-\d*(,\d*-\d*)*$/i', $_SERVER['HTTP_RA... | true |
21b56e27f17cdb3f9db37709eb17dc946050c68d | PHP | waxi2015/stat | /src/Stat/SimpleBars.php | UTF-8 | 2,396 | 2.75 | 3 | [] | no_license | <?php
namespace Waxis\Stat\Stat;
class SimpleBars extends Ancestor {
public $type = 'simple-bars';
public $template = 'simple-bars.phtml';
public $height = 220;
public $days = 7;
public $sources = null;
public function __construct($descriptor) {
if (isset($descriptor['height'])) {
$this->height = $d... | true |
119f9485cabbe3e25e7100abcd13a4baa74a691a | PHP | Light-orochi/E-commerce-website | /connect.php | UTF-8 | 310 | 2.71875 | 3 | [] | no_license | <?php
$dsn='mysql:host=localhost;dbname=shop';
$pass='';
$user="root";
$option= array(PDO::MYSQL_ATTR_INIT_COMMAND =>'SET NAMES utf8');
try{
$con=new PDO($dsn,$user,$pass,$option);
$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch(PDOException $e){
echo "fail". $e->getMessage();
}
?>
| true |
c4ca0c6314a7da42a3a3966bb6bf404296c069cd | PHP | davidkeen/f1buzz | /library/FacebookController.php | UTF-8 | 3,516 | 2.734375 | 3 | [] | no_license | <?php
require_once 'facebook.php';
/**
* @todo Externalise these config details
*/
abstract class FacebookController extends Zend_Controller_Action
{
protected $simulateFb;
protected $apiKey;
protected $apiSecret;
protected $canvasUrl;
protected $fbUserId;
/**
* @var array The logged ... | true |
d69b52e02be9dcc83468625962b9b5e2fcac1e60 | PHP | lucas6238/EP_projectSD | /connectDatabase.php | UTF-8 | 752 | 2.796875 | 3 | [] | no_license | <?php
/*
Lucas Chacon
* CIS 4990
*/
$DBname = "ep_project";
//host user password
$connection = mysqli_connect("localhost", "root");
if (!$connection) {
echo "Connection failed" . mysqli_errno($connection);
echo "unable to connect: " . mysql... | true |
d91cfcce67e084c7f6ec06903fd8af9a21e93222 | PHP | ArekvanSchaijk/T3EXT-properties | /Classes/Service/TemplateService.php | UTF-8 | 3,555 | 2.671875 | 3 | [] | no_license | <?php
namespace Ucreation\Properties\Service;
/***************************************************************
* Copyright notice
*
* (c) 2016 Arek van Schaijk <info@ucreation.nl>, Ucreation
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can... | true |
e828821f3b186ab74bf21371b3ebbc4298672385 | PHP | jubelltols/AngularJS_FrameworkPHP_OO_MVC | /backend/module/cart/model/BLL/cart_bll.class.singleton.php | UTF-8 | 1,652 | 2.59375 | 3 | [] | no_license | <?php
class cart_bll {
private $dao;
private $db;
static $_instance;
function __construct() {
$this -> dao = cart_dao::getInstance();
$this->db = db::getInstance();
}
public static function getInstance() {
if (!(self::$_instance instanceof self)) {
self::$_instance = new self();
}
retu... | true |
c11b11e96e241af21221bf9de0cb9f550924117c | PHP | Imran-cse/Housing | /modules/housing/bao/class.housingDetailsbao.php | UTF-8 | 3,624 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
include_once UTILITY.'class.util.php';
include_once MODULES_HOUSING_DAO.'class.housingDetailsdao.php';
/*
Housing Details Business Object
*/
Class HousingDetailsBAO{
private $_DB;
private $_HousingDetailsDAO;
function HousingDetailsBAO(){
$this->_HousingDetailsDAO = new HousingDetailsDAO();
}
... | true |
2297278c29e3e6d91846252115f58866b297a1b0 | PHP | NovalHendriyanto13/printerous | /app/Form/OccupationForm.php | UTF-8 | 703 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Form;
use Lib\Form;
use App\View\Components\InputText;
use App\View\Components\InputSelect;
use App\Models\Occupation;
class OccupationForm extends Form {
protected function initialize($entity=null, array $options) {
$mode = '';
if (isset($options['mode']) && $options['mode'] == 'edit')
... | true |
1a37de24f31e1f4065e3fc7e28c9e514ee2cbd88 | PHP | tcola/tinyframework | /lib/TinyFramework/Controller.php | UTF-8 | 553 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* TinyFramework Controller abstract.
*
* @package TinyFramework
*/
abstract class TinyFramework_Controller
{
use TinyFramework_DependencyInjected;
/**
* Renders the specified View. Views should access tokens using the $tokens
* stdClass.
*
* @param string $filename Path relative to $_SERVER['P... | true |
8bc491f4726302a315930e5a359edcedf2c1d64f | PHP | harkespan/mvc-example | /index.php | UTF-8 | 650 | 2.59375 | 3 | [] | no_license | <?php
/**
* Bootstrap page
* Require file autoload dari vendor
*/
require_once __DIR__ . '/vendor/autoload.php';
use Controllers\Mahasiswa;
/**
* Buat objek dari kelas Mahasiswa
*/
$controller = new Mahasiswa();
//tentukan bagaimana halaman akan di-load
if(!isset($_GET['act']))
{
//pemanggilan ... | true |
30369389d17e8e577e17478ad3fd5ea9414168ec | PHP | marvinmino/Task3Atis | /Task3Atis/core/database/TaskQuery.php | UTF-8 | 1,218 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Core\Database;
use PDO;
class TaskQuery extends QueryBuilder{
protected $pdo;
public function __construct($pdo)
{
$this->pdo = $pdo;
}
public function insertTask($name,$description,$priority,$deadline,$user_email)
{
$this->insert('tasks', [
... | true |
b779061610971761dff591a61bfac8d990f8482d | PHP | 6walnuts/ecse321 | /HomeAudioSystemPhp/test/controllerTest/HASControllerTest.php | UTF-8 | 1,214 | 2.578125 | 3 | [] | no_license | <?php
require_once 'C:\Users\User\workspace2\Ecse321GroupProject\src\controller\HASController.php';
require_once 'C:\Users\User\workspace2\Ecse321GroupProject\src\Model\Album.php';
require_once 'C:\Users\User\workspace2\Ecse321GroupProject\src\Model\Manager.php';
require_once 'C:\Users\User\workspace2\Ecse321GroupProje... | true |
d35360f8efa92399c40f9f1105662b72717ab10a | PHP | guinso/hx-core | /src/Document/Context/Component/ColumnInterface.php | UTF-8 | 632 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Hx\Document\Context\Component;
interface ColumnInterface extends \Hx\Document\Context\ElementInterface {
public function getWidth();
public function setWidth($width);
public function getPadding();
public function getMargin();
public function insertSpan(
\Hx\Document\Context\Component\... | true |
425d75ad8a109181e18822ae30bf4c30aa833ba6 | PHP | binarychen/study | /study-php/other/foreach.php | UTF-8 | 169 | 3.09375 | 3 | [] | no_license | <?php
$array = [1, 2, 3, 4];
foreach ($array as $key => &$value) {
$value += 3;
}
//unset($value);
var_dump($array);
echo '<br />';
$value = 10;
var_dump($array);
| true |
d8008172263ceb847c36824c53ccd72b3fe7bbeb | PHP | koie3211/simplePOS | /user_service.class.php | UTF-8 | 1,335 | 2.65625 | 3 | [] | no_license | <?php
session_start();
require_once 'dbconfig.php';
class UserService{
//登入驗證
function CheckUser($user,$pass){
$dbconfig = new dbconfig();
$sql = "SELECT * FROM `user_account` WHERE `username` = '{$user}'";
$arr = $dbconfig->excute_dql($sql);
$dbconfig->close();
if($pass ==... | true |
49318ead245c12b783a89aefd50d8fa2aa4da948 | PHP | jeszy-tanada/ezadven | /app/Http/Models/Country.php | UTF-8 | 874 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Models;
use Illuminate\Database\Eloquent\Model;
use Validator;
class Country extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $table = 'country';
protected $fillable = [
'name',
];
public $rules = arr... | true |
39294a0ec55633eac2e2d318a0ee44c09fcfb7e1 | PHP | renalpha/panda | /Domain/Entities/PhotoAlbum/Photo.php | UTF-8 | 996 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Domain\Entities\PhotoAlbum;
use Cog\Laravel\Love\Likeable\Models\Traits\Likeable;
use Domain\Common\Entity;
use Domain\Services\UploadService;
/**
* Class Photo
* @package Domain\Entities\PhotoAlbum
*/
class Photo extends Entity
{
use Likeable;
/**
* @var array
*/
protected ... | true |
328dc0c8baf0490f3e1b2000fc80b88f802511fd | PHP | canaan5/innovating | /src/Innovating/Application.php | UTF-8 | 4,755 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by Canan Etaigbenu
* User: canaan5
* Date: 3/26/16
* Time: 7:56 PM.
*/
namespace Innovating;
use Illuminate\Http\Response;
use Innovating\Contracts\ApplicationInterface;
use Innovating\DIC\Container;
use Innovating\Exceptions\ErrorHandlerService;
use Innovating\ServiceProviders\DatabaseServic... | true |
3eb63c1af418e8072e7cc02b430ac00c7d34f8c5 | PHP | barakavictor62/shopping_cart_with_vue | /backend/pull_all.php | UTF-8 | 807 | 3.015625 | 3 | [] | no_license | <?php
header('Content-type: application/json');
$servername = "localhost";
$username = "xxxxxxxxxxx";
$password = "xxxxxxxxxxxx";
try {
$conn = new PDO("mysql:host=$servername;dbname=cake_shop", $username, $password);
// set the PDO error mode to exception
$conn->setAttribute(PD... | true |
47b88d51429d24c45d4dd9736fd4a716acd23899 | PHP | chiragjindal/Competitive-programming | /Codechef/Practice/HOLES.php | UTF-8 | 333 | 3.125 | 3 | [] | no_license | <?php
$n=fgets(STDIN);
while($n){
$n-=1;
$str=fgets(STDIN);
$count=0;
$l=strlen($str);
for($i=0;$i<$l;$i++){
//foreach($str as $al){
switch($str[$i]){
case 'A':
case 'D':
case 'O':
case 'P':
case 'R':
case 'Q':
$count+=1;
break;
case 'B':
$count+=2;
break;
}
}
echo $coun... | true |
a159385a50b3c82f836a262f66dc48d628bf6eac | PHP | Jixiaolan0102/php2102 | /qw/qe.php | UTF-8 | 302 | 3.78125 | 4 | [] | no_license | <?php
// 首字母转化大写
$strl= "abc def ghr";
echo ucfirst($strl);
echo "\n";
// 所有单词的首字母大写
echo ucwords($strl);
echo "\n";
// 所有字母大写
echo strtoupper($strl);
echo "\n";
// 所有字母小写
echo strtolower($strl);
| true |
bc7f5569981785caba739222a1fb9556169b9a02 | PHP | deatil/lake-admin-addon-lapi | /lib/FileDoc.php | UTF-8 | 3,176 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\lapi\lib;
use ReflectionClass;
use ReflectionMethod;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use Lake\Doc;
/**
* 文件注释解析
*
* @create 2020-8-17
* @author deatil
*/
class FileDoc
{
/**
* 扫描文件
*
* @create 2020-8-17
* @author deatil
*/
p... | true |
0ef98eb157d0aa4d0be72a41c25956fcbe80c360 | PHP | CelsoUliana/Laravel8-Sample | /app/Http/Resources/RoomTypeResource.php | UTF-8 | 1,027 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
class RoomTypeResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return array
*/
public function toArray($request)
{
... | true |
3f37ef11238b7018fe3f19cae14924ccd4acecbf | PHP | aferrandini/robatudinero | /src/RobatuDinero/DataBundle/Entity/Information.php | UTF-8 | 2,844 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace RobatuDinero\DataBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Information
*
* @ORM\Table()
* @ORM\Entity
*/
class Information
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="IDENTITY")
*/
pri... | true |
50c6e54b17b65532f4c34e1f31011a84361cdd2d | PHP | DavidCodina/login-system-1 | /scripts/php/logout-with-fetch.php | UTF-8 | 3,216 | 2.734375 | 3 | [] | no_license | <?php
include_once "config.php";
if ( $_SERVER['REQUEST_METHOD'] != 'POST' ){
header("Location: ../../403.php?error=logout_with_fetch_permission_error");
//exit(); //Technically not necessary.
} else {
/* ===========================================================================
if ( isse... | true |
ec168cb3300fe03c0a6d6c03fb032d5c9df2237c | PHP | KawsarAhmad43/oporajta | /Web_project/download.php | UTF-8 | 997 | 2.5625 | 3 | [] | no_license | <?php
// connect to database
$servername="localhost";
$user="root";
$password="";
$database="oporajita";
$con=mysqli_connect($servername,$user,$password,$database);
// Downloads files
if (isset($_GET['id'])) {
$id = $_GET['id'];
// fetch file to download from database
$query ="SELECT * FROM us... | true |
49c6ddc00ad6338b7048c107235e1619f738d9bd | PHP | schtiell/Php5 | /POO/conexion.php | UTF-8 | 466 | 2.828125 | 3 | [] | no_license | <?php
require ("config.php");
class Conexion{
//ATRIBUTOS DE LA CLASE
protected $conexiondb;
//METODOS DE LA CLASE
public function __construct(){
$this->conexiondb = new mysqli(DB_HOST, DB_USER, DB_PWD, DB_NAME);
if ($this->conexiondb->connect_errno){
echo "fallo en la conexi... | true |
6f8e343b188403f284b91058d2292635d6f0d302 | PHP | t6767/bootRacer | /api/reactionUI.php | UTF-8 | 4,281 | 2.71875 | 3 | [] | no_license | <?php
require 'vendor/autoload.php';
use Telegram\Bot\Api;
class reactionUI extends PDO
{
public $telegram;
public $messageID;
public $chatID;
public $userID;
public $userName;
public $messageDate;
public $message;
public $keyboard;
// Создадим конструктор ебаный Лего
public function __construct($bootID, ... | true |
a8689e95427861429dddcd8b9094e23b62c892c3 | PHP | mcwelja/prossic | /mailer/PHPMailer.php | UTF-8 | 4,448 | 2.65625 | 3 | [] | no_license | <?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
include '../config/config.php';
require_once "../vendor/autoload.php";
$response = '';
if (isset($_POST['cart'])) {
$response .= '<table class="table table-striped">';
$response .= '<thead>';
$response .= '<tr>';
$response .= '<th... | true |
5396bb492289d4986332a504f4c063eeda646241 | PHP | patoattie/Parcial1PIII | /clases/Pizza.php | UTF-8 | 3,641 | 3.375 | 3 | [] | no_license | <?php
class Pizza
{
private $id;
private $tipo;
private $sabor;
private $cantidad;
private $precio;
public function __construct($id, $tipo, $sabor, $cantidad, $precio)
{
$this->id = $id;
$this->tipo = $tipo;
$this->sabor = $sabor;
$this->cantidad = $cantidad;
$this->precio = $precio;
}
public stat... | true |
96c546505bc2eb250c9bdd7088b5007571223244 | PHP | VerifiedJoseph/data.verifiedjoseph.com | /include/Admin/Manage/Dataset/View.php | UTF-8 | 1,034 | 2.828125 | 3 | [] | no_license | <?php
namespace Admin\Manage\Dataset;
use \Csv;
use \Exception;
use \Admin\Manage\File;
use \Admin\Manage\Manage;
use Build\Html\Table;
class View extends Manage {
public function __construct() {
try {
if (isset($_GET['id']) && !empty($_GET['id'])) {
$file = new File();
$this->metadata = $file->... | true |
35667877340335920100651658e0c3344656682f | PHP | suseokpark/es-cqrs-broadway-workshop | /src/SuperAwesome/Blog/Domain/Model/Post/Command/PublishPost.php | UTF-8 | 513 | 2.796875 | 3 | [] | no_license | <?php
namespace SuperAwesome\Blog\Domain\Model\Post\Command;
class PublishPost
{
/**
* @var string
*/
public $id;
/**
* @var string
*/
public $title;
/**
* @var string
*/
public $content;
/**
* @var string
*/
public $category;
public func... | true |
08810fdd5225e40f17008e7cf3a11b75572053d4 | PHP | Yelfive/notes | /server/api/components/Controller.php | UTF-8 | 7,095 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Base controller for all controllers of the module, inherited from restful
* @author Felix Huang <yelfivehuang@gmail.com>
*/
namespace api\components;
use Exception;
use Yii;
use yii\base\InvalidValueException;
use yii\data\DataProviderInterface;
use yii\rest\ActiveController;
use yii\web\ForbiddenHttp... | true |
29ced671b75a485b6c44974c192af740abdd0e3e | PHP | niroice/PCS | /Classes/FinaliseRepairPanel.php | UTF-8 | 5,122 | 2.828125 | 3 | [] | no_license | <?php
class FinaliseRepairPanel
{
private $queryResult;
private $claimID;
private $claimType;
public function __construct()
{
// performs no action on creation
}
// sends query to database to r... | true |
6f5eb695cc93ca55f626b51fc25d3dd96b7e8f0f | PHP | valeryq/SCS_example | /app/validators/TaskValidator.php | UTF-8 | 959 | 2.875 | 3 | [] | no_license | <?php
/**
* Class TaskValidator
*/
class TaskValidator implements IValidator
{
/**
* Register validator
* @param \Illuminate\Routing\Route $route
* @param \Illuminate\Http\Request $request
* @return mixed
* @throws ValidatorException
*/
public function validate(\Illuminate\Routi... | true |
5ec23090d19c88a89546f855f07d19623ccfc5a4 | PHP | taylornetwork/laravel-username-generator | /tests/Units/CharacterSetTest.php | UTF-8 | 2,625 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace TaylorNetwork\UsernameGenerator\Tests\Units;
use TaylorNetwork\UsernameGenerator\Generator;
use TaylorNetwork\UsernameGenerator\Tests\TestCase;
class CharacterSetTest extends TestCase
{
public function testDefaultCharacters()
{
$g = new Generator();
$this->assertEquals('testu... | true |
5861cb8e85930024469e4ca3a1593070fc32925e | PHP | phanthanhdat1998/luuux | /UNITOP PHP MVC/Lesson/Section10/select_form.php | UTF-8 | 957 | 2.796875 | 3 | [] | no_license | <?php
function showArray($data)
{
if (is_array($data)) {
echo '<pre>';
print_r($data);
echo '</pre>';
}
}
if (isset($_POST['btn_order'])) {
showArray($_POST);
if (empty($_POST['pay'])) {
echo "Error !!!";
} else {
echo $_POST['pay'];
}
}
?>
<!DOCTYPE html... | true |
1f8e12225fec616c64afbc9e5cac58431df8916b | PHP | fortis/moneyobject | /src/Exception/ExchangeException.php | UTF-8 | 437 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace Money\Exception;
use Currency\Currency;
class ExchangeException extends MoneyException
{
public static function createFromCurrencies(Currency $baseCurrency, Currency $counterCurrency)
{
return new self(
sprintf(
'Cannot exchange a currency pair: %s/%s',
... | true |
214e69edc1ca8f7a17b0938631ee063327824fd1 | PHP | PedroRago10/midrub | /application/base/admin/components/collection/notifications/classes/alerts.php | UTF-8 | 13,866 | 2.640625 | 3 | [] | no_license | <?php
/**
* Alerts Class
*
* This file loads the Alerts Class with methods to manage the alerts
*
* @category Social
* @package Midrub
* @author Scrisoft <asksyn@gmail.com>
* @license https://github.com/scrisoft/midrub_cms Midrub’s License
* @link https://www.midrub.com/
*
* @since 0.0.8.3
*/
// D... | true |
4ba5affb14d8c326350e5911d07962df8e47bfeb | PHP | lerre/DuPHP | /du/image/image.php | UTF-8 | 6,660 | 3.34375 | 3 | [
"MIT"
] | permissive | <?php
namespace image;
class image {
// point:点;line:线;arc:弧;fill:填充;border:边
// ellipse:椭圆;rectangle:矩形;polygon:多边形
//创建
static function create($width, $height, $bgcolor = false, $type = false){
$create = $type ? 'imagecreatetruecolor' : 'imagecreate';
$image = $create($width, $height)... | true |
0f16f1f031955816d86cb8940602b489a6f21dcc | PHP | LycheeOrg/Lychee | /app/Http/RuleSets/Photo/SetPhotoUploadDateRuleSet.php | UTF-8 | 503 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\RuleSets\Photo;
use App\Contracts\Http\Requests\RequestAttribute;
use App\Contracts\Http\RuleSet;
use App\Rules\RandomIDRule;
/**
* Rules applied when changing the upload date of a photo.
*/
class SetPhotoUploadDateRuleSet implements RuleSet
{
/**
* {@inheritDoc}
*/
public static fun... | true |
b2b26eb420f00f835a3ad08d5c1c7fc286286203 | PHP | kaushalgairola/bookmyhotel | /includes/db.php | UTF-8 | 5,616 | 2.59375 | 3 | [] | no_license | <?php
include_once 'functions.php';
class db_class{
public function __construct() {
$con = mysql_connect("localhost","root","nerdix");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
else{
... | true |
45086a88a26ef12b439490386ea28a3173be4806 | PHP | zty8023ys/vip | /table.php | UTF-8 | 2,385 | 2.671875 | 3 | [] | no_license | <?php
function table ($result) {
$needPhoto = $_POST[needPhoto];
if (!$result) {
die ("本次操作失败,原因:".mysql_error());
}
$row = mysql_fetch_array($result);
if (!$row) {
die("没有这个用户");
}
echo "<table border='1'>
<tr>
<th>平台ID</th>
<th>会员状态</th>
<th>会员名称</th>
<th>会员性别</th>
<th>证件号码</th>
<th>出生日期</th>
... | true |
64c53c52468f7995816410031b54f85994c48922 | PHP | lakshayverma/code-spring | /public/task_details.php | UTF-8 | 7,205 | 2.71875 | 3 | [] | no_license | <?php
require_once('../includes/initialize.php');
give_access(FALSE, FALSE);
// update task values if the FORM was posted.
if (isset($_POST['submit']) && $_POST['submit'] == "update task") {
$task = Task::find_by_id($_POST['task_id']);
$task->name = (isset($_POST['task_name'])) ? $_POST['task_name'] : $task->n... | true |
3ce6ea0a62365619ae760cb898356083ede12ac5 | PHP | ziganshinalexey/vk-group-analyzer | /back/vendor/ziganshinalexey/keyword-admin/components/KeywordAdminComponent.php | UTF-8 | 4,031 | 2.78125 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace Ziganshinalexey\KeywordAdmin\components;
use Userstory\ComponentBase\interfaces\ComponentWithFactoryInterface;
use Userstory\ComponentBase\traits\ModelsFactoryTrait;
use yii\base\Component;
use yii\base\InvalidConfigException;
use Ziganshinalexey\KeywordAdmin\forms\keyword\... | true |
bda59568618b4566a7f5a6f0ca0a2e15d74eb02d | PHP | pirathipan/infoway | /src/Service/DotEnvParser.php | UTF-8 | 3,348 | 3.46875 | 3 | [] | no_license | <?php
namespace App\Service;
class DotEnvParser
{
/**
* Read .env file and return array which will contain .env data
*
* @param string $env_path
* @return array
* @throws \Exception
*/
public static function envToArray(string $env_path)
{
$array = [];
if(... | true |
25038ace46d7c0c3ae23559360ffb797ff85dad2 | PHP | shamanzpua/api-request | /src/RequestConfig.php | UTF-8 | 3,452 | 2.8125 | 3 | [] | no_license | <?php
namespace shamanzpua\apirequest;
/**
* Class for configuration request
*/
class RequestConfig implements RequestConfigInterface
{
private $method;
private $baseUrl;
private $queryParams = [];
private $pathParams = [];
private $options = [];
const HTTP_METHOD_GET = 'GET';
const... | true |
dd05a316a841a0870fc425a89343f43c835851ce | PHP | ariefhidayatullah/kelompok2 | /project-repairme/app/core/App.php | UTF-8 | 2,040 | 3.078125 | 3 | [] | no_license | <?php
//file ini digunakan untuk mengatur url yang ada di atas
//semuanya sudah di sinkronisasi di file .htdocs
class App{
//membuat variable $controller untuk url pertama
//$method untuk url kedua
//$params untuk memasukkan parameter ke url
//agar url rapi
protected $controller = 'Home';
protected $metho... | true |
044a1643566eeb0752d828ca19d191284b2cce27 | PHP | cefarpro/class | /Download.class.php | UTF-8 | 3,675 | 2.6875 | 3 | [] | no_license | <?php
/**
* Download Class
*
* @version 0.1.0
* @author Startsev Pavel <cefar@mail.ru>
* @package server_name
* @category server identyfy
* @todo -
* @example -
* @copyright Copyright (c) 2017, Startsev Pavel
*/
class Download {
public static function wget( $from_file, $to_file ) {
if ( Os :: is_windows(... | true |
0a15520215b12ff10e92ae2d252a9e8d2aad3ef5 | PHP | capci/Collections | /Collections/src/Capci/Collections/AbstractCollection.php | UTF-8 | 6,197 | 3.234375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package Capci\Collections
* @version 0.9
* @author capci https://github.com/capci
* @link https://github.com/capci/Collections Capci\Collections
* @license http://www.opensource.org/licenses/mit-license.php MIT License
*/
declare (strict_types = 1);
namespace Capci\Collections;
/**
* コレクションのデフォルト... | true |
ed17aea69efdac61e5e7d62163c22e46eb867832 | PHP | Far4Mac/blog-headfirst | /profile/editprofile.php | UTF-8 | 1,601 | 2.640625 | 3 | [] | no_license | <?php
require_once ('../patterns/startsession.php');
require_once ('../vars/connectvars.php');
if (!isset($_SESSION['id'])){
echo '<p>Пожалуйста, <a href="login.php">войдите</a> чтобы посмотреть профиль.';
exit();
}
require_once ('../patterns/navmenu.php');
$dbc = mysqli_connect(DB_HOST,DB_USER,DB... | true |
b7dad1284db566d2c2a937d5be9a18df70a13e44 | PHP | james182/PyroCart | /pyrocart/controllers/checkout.php | UTF-8 | 5,620 | 2.609375 | 3 | [] | no_license | <?php
class checkout extends Public_Controller
{
/**
* Constructor method
* @access public
* @return void
*/
public function __construct()
{
//parent::Public_Controller();
parent::__construct();
$this->config->load('paypal_constants');
$t... | true |
0d796ade3f23a6eb468e48824ad469eedd43fece | PHP | uzulla/Mizam | /src/Repo/UploadImageFileRepo.php | UTF-8 | 3,100 | 2.734375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Mizam\Repo;
use Exception;
use Mizam\Env;
use Mizam\Model\UploadImageFile;
use Mizam\Model\User;
use PDO;
use RuntimeException;
class UploadImageFileRepo extends DBBase
{
/**
* @param int $upload_file_id
* @param null $pdo
* @return User|null
* @throws... | true |
45822ac2929633109b0b4cc9d07e2552e877f1ed | PHP | arbi/MyCode | /backoffice/module/BackofficeUser/src/BackofficeUser/Form/Login.php | UTF-8 | 1,857 | 2.609375 | 3 | [] | no_license | <?php
namespace BackofficeUser\Form;
use Zend\Form\Form;
/**
* @package backoffice_user
* @subpackage backoffice_user_forms
* @author Tigran Petrosyan
*/
class Login extends Form
{
/**
* @access public
* @param string $name
*/
public function __construct($name = 'login-form') {
parent::__constr... | true |
07724b92ff49dd66422ab52e66d4533d50ee53b9 | PHP | kabircse/Design-Principle-Pattern | /DesignPattern/Creational/Factory/5. Loan.php | UTF-8 | 1,455 | 3.4375 | 3 | [
"MIT"
] | permissive | <?php
public abstract class Loan {
protected double interestRate;
abstract double getInterestRate();
public double calculateInterest(int loanAmount){
return loanAmount * (getInterestRate() / 100);
}
}
public class HomeLoan extends Loan {
@Override
double getInterestRate() {
re... | true |
79743b143fa7c876caeeb016aca17b7bae85b0c2 | PHP | Jeyck0/contabilidad | /clases/Ingreso.php | UTF-8 | 4,239 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
require_once ("Conexion.php");
header ('Access-Control-Allow-Origin: * ');
Class Ingreso {
public $ingresos;
public $ingresos2;
public $conectar;
public $monto;
public $id_cuenta;
public $id_cat_ingresos;
public $fecha;
public $comentario;
public function Ingreso(){
... | true |
7d5ecae9a0f2819fce9f9ff6885c56afba7a6d92 | PHP | IAlzoriqi/libraryManagement | /lab/connection.php | UTF-8 | 360 | 2.53125 | 3 | [] | no_license | <?php
$user='root';
$pass='';
$db_host='localhost';
$db_database='library';
//$conn = @mysql_connect($db_host,$db_user,$db_pass) or die('Unable to establish a DB connection');
//mysql_set_charset('utf8');
//mysql_select_db($db_database,$conn);
$conn = new PDO('mysql:host=localhost:3306;dbname=library', $user, $p... | true |