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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
61a86f18042f2869f876215738848428c1ff8cb3 | PHP | docpht/docpht | /src/model/VersionModel.php | UTF-8 | 4,290 | 2.734375 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
/**
* This file is part of the DocPHT project.
*
* @author Valentino Pesce
* @copyright (c) Valentino Pesce <valentino@iltuobrand.it>
* @copyright (c) Craig Crosby <creecros@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with... | true |
c1349893739a1572c791e2b60db9a09e5abd69e7 | PHP | mnazw/Web-Programming-Exercises | /Praktikum 05/Project Latihan/viewtabung.php | UTF-8 | 1,128 | 3.296875 | 3 | [] | no_license | <?php
$file = "datatabung.dat";
$filetabung = fopen($file, "r") or die("Tidak bisa buka file!");
//Baca dan convert isi file ke array
$arraytabung = array();
while (!feof($filetabung)){
array_push($arraytabung, explode(",", fgets($filetabung)));
}
//Judul dan Jumlah Data
echo "<div style=max-width:328px>... | true |
7c3768c2ba8018f843800e7897f62183e72ce594 | PHP | hubgit/user | /includes/user.inc.php | UTF-8 | 5,661 | 2.53125 | 3 | [] | no_license | <?php
require 'libs/PasswordHash.php';
function user_load($id = NULL, $name = NULL, $email = NULL, $cached = TRUE){
static $users;
if (!isset($users))
$users = array();
if ($id){
if ($cached && array_key_exists($id, $users))
return $users[$id];
$result = db_query("SELECT * FROM user... | true |
a23742cdd7d4c0d778a67b2c4264e2cef51c8740 | PHP | jhholen/livestagram | /application/models/admin/menu_model.php | UTF-8 | 1,769 | 2.78125 | 3 | [] | no_license | <?php
/**
* Menu model
* @author Anton Zekeriev Rodin
*/
class Menu_model extends CI_Model {
public function __construct() {
parent::__construct();
$this->mainmenu = array(
'Moderate Images' => 'admin/main'
);
$this->submenu = array(
'Us... | true |
56a2c22382d2921897ab5bf2f762c7bcd8b12196 | PHP | morgen2009/linq_php | /Qmaker/Lambda/Operators/Parameter.php | UTF-8 | 331 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Qmaker\Lambda\Operators;
class Parameter {
protected $offset;
public function __construct($offset)
{
$this->offset = $offset;
}
public function __invoke()
{
$params = func_get_args();
return isset($params[$this->offset]) ? $params[$this->offset] : nu... | true |
f3a8f5c23b44a16ba73f094103d1a17762072a89 | PHP | elian1203/ezPanelWeb | /ezpanel/protected/daemon.php | UTF-8 | 1,042 | 2.703125 | 3 | [] | no_license | <?php
if (basename(__FILE__) == basename($_SERVER["SCRIPT_FILENAME"])) {
http_response_code(401);
return;
}
function call($request, $data)
{
$user = base64_decode($_COOKIE['321']);
$pass = base64_decode($_COOKIE['456']);
return call_user_pass($request, $data, $user, $pass);
}
function call_user_pass($reque... | true |
3b41906ce1ac7ebf9bb8b61219b37b63bc6d6b8e | PHP | WillianSchmidt/poa | /database_functions.php | UTF-8 | 670 | 2.828125 | 3 | [] | no_license | <?php
require('dbconf.php');
function connect_to_database($dbname = NULL) {
global $driver, $host, $username, $password;
if ($dbname) {
$dbname = "dbname=${dbname};";
} else {
$dbname = "";
}
$dsn = "${driver}:host=${host};${dbname}";
$options = [
PDO::ATTR_EMULATE_P... | true |
2a14ddeadef3ec29e5e4a4827efe72d1270e0ba0 | PHP | andparsons/mage-app-start | /lib/internal/Magento/Framework/Filter/Test/Unit/SplitWordsTest.php | UTF-8 | 598 | 2.546875 | 3 | [] | no_license | <?php
namespace Magento\Framework\Filter\Test\Unit;
class SplitWordsTest extends \PHPUnit\Framework\TestCase
{
/**
* Bug: $maxWordLength parameter has a misleading name. It limits qty of words in the result.
*/
public function testSplitWords()
{
$words = '123 123 45 789';
$filte... | true |
8e0024076bee06695ab58b637f8278bb38f23e1d | PHP | naaanazar/MachineLearning | /MachineLearningApp/app/Library/Pagination/Pagination.php | UTF-8 | 1,140 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Library\Pagination;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class Pagination
{
private $currentPage;
private $collection;
private $perPage;
private $currentPageSearchResults;
private $paginatedSearchResults;
/**
* $data (a... | true |
85a7b1b43234c5a0b40fa2d57fe18704f8e9c718 | PHP | AlanNunes/auto-enrol-moodle | /php/database/DataBase.php | UTF-8 | 541 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created on ??/05/2018
*
* @category DataBase
* @author Alan Nunes da Silva <alann.625@gmail.com>
* @author Gustavo de Mello Brandão <sm70plus@gmail.com>
* @copyright 2018 Dual Dev
*/
Class DataBase {
private $host = "localhost";
private $user = "root";
private $password = "";
priva... | true |
5841325d3072923c55c9e65e0b21029afa9df3b1 | PHP | jiahongwei/newland-project | /protected/models/AsApply.php | UTF-8 | 3,616 | 2.71875 | 3 | [] | no_license | <?php
/**
* This is the model class for table "as_apply".
*
* The followings are the available columns in table 'as_apply':
* @property integer $applyId
* @property integer $stuId
* @property string $stuName
* @property string $specification
* @property string $assetName
* @property string $applyTime
* @prop... | true |
725a77a9fa93f51ebf1b8d6b7946a25b74003b70 | PHP | Rudrasish/Event-Management- | /event_details.php | UTF-8 | 2,524 | 2.546875 | 3 | [] | no_license | <?php include_once('connection.php'); ?>
<!DOCTYPE html>
<html>
<head>
<title>Database Crud Operation</title>
</head>
<style type="text/css">
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: ... | true |
da4faa905012f8fe52775bc9e1b3c3849df5f032 | PHP | FightLightDiamond/clean-architecture | /base/Domain/Services/TaskService.php | UTF-8 | 2,386 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace CleanArchitecture\Task\Domain\Services;
use CleanArchitecture\Task\Domain\Entities\Task;
use CleanArchitecture\Task\Domain\Entities\User;
use CleanArchitecture\Task\Domain\Factories\TaskFactory;
use CleanArchitecture\Task\Domain\Policies\TaskPolicy;
use CleanArchitecture\Task\Domain\Repositories\Tas... | true |
1a946eb609e94c6c56e877a17d6ff7162017e78d | PHP | klymenok/camagru | /model/ImageRedactor.php | UTF-8 | 2,949 | 2.984375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: oklymeno
* Date: 11/19/17
* Time: 2:03 PM
*/
namespace model;
class ImageRedactor
{
protected $imageResourse;
protected $resizedResourse;
protected $imageName;
protected $width;
protected $height;
protected $new_width;
protected $new_hei... | true |
a758c5c42e907d31835867d9ab9577b71c3c5f08 | PHP | FlarumChina/core | /src/Api/Middleware/HandleErrors.php | UTF-8 | 1,124 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Flarum.
*
* (c) Toby Zerner <toby.zerner@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Flarum\Api\Middleware;
use Flarum\Api\ErrorHandler;
use Psr\Http\Message\ResponseInter... | true |
86b6da7468d4acec391b7f6af7203577fa17b005 | PHP | k-shg/myshopping | /registProduct.php | UTF-8 | 12,500 | 2.5625 | 3 | [] | no_license | <?php
require('function.php');
debug('「「「「「「「「「「「「「「「「「「「「「「「「「「「「「「「「「「');
debug('「「「「「「「「「「「商品登録「「「「「「「「「「「「「「「');
debug('「「「「「「「「「「「「「「「「「「「「「「「「「「「「「「「「「「');
require('auth.php');
$title = '';
//カテゴリーを取得
$categoryData = getCategory();
debug('カテゴリー情報:'.print_r($categoryData, true));
//クエリパラメータの有無をチェック
if(!em... | true |
f20b32cb0c9fd6b5a5d1c37bab1d28f47c4ceb74 | PHP | essif/fadls-vaip | /ShiftFactory.php | UTF-8 | 1,665 | 2.9375 | 3 | [] | no_license | <?php
/**
* A shift
* @author Softbox
*
*/
class Shift {
var $type;
var $date;
var $empID;
var $message;
/**
* Constructs a shift
* @param date - The date of the shift (in UNIX-time)
* @param type - The type of the shift (in integers)
*/
function __construct($date , $type , $empID,... | true |
f98e678eb99c540e44b54270eb8b9bbda3296c41 | PHP | wgx954418992/rapid-php | /scripts/model/classier/handler/JavaIHandler.php | UTF-8 | 5,770 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace script\model\classier\handler;
use Exception;
use rapidPHP\modules\common\classier\StrCharacter;
use script\convert\classier\enum\Optional;
use script\model\classier\config\IHandlerConfig;
use script\model\classier\config\JavaHandlerConfig;
use script\model\classier\helper\CommonHelper;
use script\mod... | true |
fcb434931427b623adf9483897797144b372eec7 | PHP | r-j-b/recruitment | /src/models/parentModel.php | UTF-8 | 791 | 2.546875 | 3 | [] | no_license | <?php
define("DB_DATABASE", "test");
define("DB_HOST", "database");
define("DB_USER", "testuser");
define("DB_PASSWORD", "password");
define('DB_PORT', 3306);
require_once($root.'/models/helper.php');
require_once($root.'/models/bookingsModel.php');
require_once($root.'/models/customersModel.php');
class DB{
var ... | true |
5703f9ed17a8b68e099362e9d0b44f4c53168700 | PHP | Letractively/iredeem | /lite/WebContent/libs/dao/Dao.php | UTF-8 | 7,606 | 2.625 | 3 | [] | no_license | <?php
define('UN_SET', '_this_is_a_unseted_value_');
define('LAZY_INIT', '_this_is_a_lazy_value_');
class Dao {
public static $_cache = array();
public static $listner = NULL;
const EVENT_INSERT = 'insert';
const EVENT_UPDATE = 'update';
const EVENT_DELETE = 'delete';
/**
*
* Enter description here ...
* @p... | true |
91820168cefda0fce237ca0012725e34a868c7b3 | PHP | rlinguri/phpmybootstrap | /phpmybootstrap/app/page.php | UTF-8 | 750 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/***
* project name: phpmybootstrap
* file name: page.php
* description: page model
* author: Roderic Linguri
* date created: Tue Sep 3 06:48:06 CDT 2013
*/
require_once('/Library/WebServer/Documents/phpmybootstrap/lib/config.php');
require_once('model.php');
class PageModel extends Model {
... | true |
58058ade11c7545ac5eceac49875d0721c99d387 | PHP | fd17302010069/project2 | /deleteConfirm.php | UTF-8 | 1,089 | 2.515625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Art Store</title>
<link rel="stylesheet" type="text/css" href="css/myAlert.css" />
</head>
<body>
<?php
$mysqli = new mysqli("localhost","root","","art");
if($mysqli->connect_errno){
die('Failed to connect to MySQL:'.$mysqli->connect... | true |
b0976d057dd593a5cc6e4d1a8101a19efbbde8cd | PHP | dreemcatcher/LoftScool102016Homework1 | /zadanie8.php | UTF-8 | 1,119 | 3.4375 | 3 | [] | no_license | <?php
$str = 'Массив — упорядоченный набор данных, используемый для хранения данных одного типа,
идентифицируемых с помощью одного или нескольких индексов. В простейшем случае массив
имеет постоянную длину и хранит единицы данных одного и того же типа.';
echo $str. "<br>";
// Затем разбейте строку на массив
$words... | true |
d9a6c0218ff50bd93d2aa2d70c36b4a963c30029 | PHP | DimDimmas/kmawarehouse | /save.php | UTF-8 | 2,164 | 2.578125 | 3 | [] | no_license | <?php
include 'config.php';
if(count($_POST)>0){
if($_POST['type']==1){
$id=$_POST['id'];
$name=$_POST['name'];
$stock=$_POST['stock'];
$category=$_POST['category'];
$sql = "INSERT INTO product VALUES ('$id','$name','$stock','$category')";
if (mysqli_query($con, $sql)) {
echo json_encode(array("statusC... | true |
9cfc1c8e74964eb73c8134d2f81cd57fbd7ba16b | PHP | Ephigenia/ephFrame | /lib/ephFrame/File/Image.php | UTF-8 | 5,972 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace ephFrame\File;
class Image extends File
{
protected $handle;
protected $width;
protected $height;
public $antialiased = true;
public $thickness = 1;
public function __construct($filenameOrWidth, $height = null)
{
if (is_int($filenameOrWidth)) {
$this->width = $filenameOrWidth;
... | true |
4c67bf9048517ae5ae9f093481836a908130bc20 | PHP | Zeratulaxer/price_generator | /src/model/PercentageRate.php | UTF-8 | 1,117 | 3.40625 | 3 | [] | no_license | <?php
namespace App\model;
class PercentageRate
{
/**
* This field is identifier(PK).
*
* @var int
*/
private int $monthCount;
private float $percentage;
private float $bankPercentage;
public function __construct(int $monthCount, float $percentage, float $bankPercentage)
... | true |
b70b1426e15f5ef6dcfdf279ecd96359ef1f9e70 | PHP | firewood3/php_codeigniter_study | /study/IO_form/io1.php | UTF-8 | 266 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
// $_GET['id']; 는 배열이다.
// http://localhost:8081/study/IO_form/io1.php?id=egoing
// http://localhost:8081/study/IO_form/io1.php?id=wefwef&pw=eee&name=name
echo 'Welcome, ' . $_GET['id']."님 안녕하세요";
echo $_GET['pw'];
echo $_GET['name'];
?> | true |
e41f402b88de0f01571f0d50742c0c1802624b06 | PHP | Phyo-Ei-Khin/cafemyanmar | /database/seeds/CategoriesTableSeeder.php | UTF-8 | 814 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use App\Category;
use Carbon\Carbon;
use Illuminate\Database\Seeder;
class CategoriesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$now = Carbon::now()->toDateTimeString();
Category::insert([
['... | true |
4436e5adb57e03982ddb27f8a4104a8f1bd0f229 | PHP | jsk56143/SpaceLego | /php/cart_view.php | UTF-8 | 4,548 | 2.625 | 3 | [] | no_license | <?php
require_once('accountDatabase.php');
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
if (!isset($_SESSION['id'])) {
header('Location: loginForm.php');
}
$userID = $_SESSION['id'];
//get User's product
$getProducts = "SELECT * FROM cart INNER JOIN product ON cart.productID =... | true |
842ad8360e6816d34f217f2587bd0d3f4ce762f7 | PHP | dattocngan/WEB | /Back-end/Lesson 8/learning/app/Http/Controllers/Hotel/HotelController.php | UTF-8 | 1,284 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Hotel;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class HotelController extends Controller
{
public function __construct()
{
$this->middleware('auth');
$this->middleware('permission');
}
public function showAll(Request $reque... | true |
3d47ab9b22f9b157413f299433de42a348d119b0 | PHP | guoyu07/cakephp-activity-logger | /src/Database/Type/JsonDataType.php | UTF-8 | 934 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Elastic\ActivityLogger\Database\Type;
use Cake\Database\Driver;
use Cake\Database\Type;
use PDO;
/**
* @see http://book.cakephp.org/3.0/en/orm/database-basics.html#adding-custom-database-types
*/
class JsonDataType extends Type
{
public function toPHP($value, Driver $driver)
{
if (... | true |
bdb68a9fb61af194aa39a644e65c86624a53c907 | PHP | paullewallencom/php-978-1-7821-6410-4 | /_src/chapter4/web/view-post.php | UTF-8 | 2,027 | 3.078125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* View a blog post
*/
use Blog\Entity\Comment;
require_once __DIR__ . '/../src/bootstrap.php';
/** @var \Blog\Entity\Post $post The post to edit */
$post = $entityManager->getRepository('Blog\Entity\Post')->findWithComments($_GET['id']);
if (!$post) {
throw new \Exception('Post not found');
}
// A... | true |
943853bfd177e79947d9d0871195fba6a9486d9b | PHP | ihazsda/leboncoin | /website-skeleton/src/Repository/AdRepository.php | UTF-8 | 1,401 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Repository;
use App\Entity\Ad;
use App\Entity\Category;
use App\Entity\City;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Symfony\Bridge\Doctrine\RegistryInterface;
class AdRepository extends ServiceEntityRepository
{
/**
* CityRepository constructor.
*... | true |
21c1f8167e6fff7ead01049b0c6a433e56a15c82 | PHP | mertsaner/LearningKitforBeginners-PHP | /17-Php_REGEX/PHPveRegex.php | UTF-8 | 935 | 2.875 | 3 | [] | no_license | <?php
# preg_match()
# preg_match_all()
$metin = 'ben php yi çok seviyorum!';
$sonuc = preg_match('/\bphp\b/', $metin);
/*
if ($sonuc){
echo 'EVET';
} else {
echo 'HAYIR';
}
*/
$url = 'http://www.php.net/index.html';
//preg_match('@^(?:http://)?([^/]+)@i', $url, $sonuc);
//print_r($sonuc);
# @^(?:http://)?... | true |
380db5c32dc8f7f87cb8fba1481baf85be99a08f | PHP | phan-anh-tuan/php7-real-world-application-development | /src/chap_07_simple_rest_client_google_maps_template.php | UTF-8 | 596 | 2.71875 | 3 | [] | no_license | <?php
foreach ($routes->legs as $item) : ?>
<!-- Trip Info -->
<br>Distance: <?= $item->distance->text; ?>
<br>Duration: <?= $item->duration->text; ?>
<!-- Driving Directions -->
<table>
<tr>
<th>Distance</th><th>Duration</th><th>Directions</th>
</tr>
<?php foreach ($item->steps as $step) : ?>
<?php $class = ($count++ ... | true |
37dd1ee30b746b7e8e9d187d3fb6011160e8c64d | PHP | H6yV7Um/dd | /libs/Global/Cms/Base.php | UTF-8 | 1,272 | 2.796875 | 3 | [] | no_license | <?php
/*
* @descripton: 以php数组的方式读取cms数据类
*
* @filename: Data.php
* @author : mozhuoying@baidu.com
* @date : 2014-04-08
* @package : global
*
* @Copyright (c) 2014 BAIDU-GPM
*
*/
class Global_Cms_Base{
/**
* 根据路径读取cms数据
* @param string $dataPath 读取的数据路径
* @return array 读取cms数据
*/
st... | true |
a0be0981ebf14325d189630b9afda2d226e0863e | PHP | tokenly/swapbot | /app/Swap/Rules/SwapRuleHandler.php | UTF-8 | 2,466 | 2.6875 | 3 | [] | no_license | <?php
namespace Swapbot\Swap\Rules;
use Exception;
use Illuminate\Support\Facades\Log;
use Swapbot\Models\Data\SwapConfig;
class SwapRuleHandler {
/**
* Create the command handler.
*
* @return void
*/
public function __construct(SwapRuleHandlerFactory $swap_rule_handler_factory) {
... | true |
8faff16c3f4ba58b99f32f7a055f87da50def3fb | PHP | web-yk5160/kintai_app_laravel | /database/migrations/2021_02_02_103550_add_column_to_users_table.php | UTF-8 | 1,389 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddColumnToUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', funct... | true |
ed48980f10950fd5dd059cc86db5e77d0215649c | PHP | K0nias/YetORM | /tests/model/ServiceLocator.php | UTF-8 | 1,368 | 2.734375 | 3 | [] | no_license | <?php
class ServiceLocator
{
/** @var Nette\Database\Connection */
protected static $connection = NULL;
/** @var BookRepository */
protected static $bookRepository = NULL;
/** @var AuthorRepository */
protected static $authorRepository = NULL;
/** @var BookFacade */
protected static $bookFacade = NULL;
... | true |
ab74089a7d5cab4eccb3f8e932c655d4ce7c76ad | PHP | lmiguelm/Pizzanet-V1 | /classeButton.php | UTF-8 | 241 | 3.53125 | 4 | [] | no_license | <?php
class Button implements Exibicao{
private $label;
public function __construct($label){
$this->label = $label;
}
public function exibe(){
echo "<br/><br/><nav><button>$this->label</button></nav>";
}
}
?> | true |
2e01e1bd5d52ce118a89a86dd3b49aec4cf45684 | PHP | akimsko/froodTwig | /src/FroodRendererTwigTemplateLoader.php | UTF-8 | 1,747 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* This file is part of the froodTwig Frood extension.
* @link https://github.com/akimsko/froodTwig
*
* @copyright Copyright 2011 Bo Thinggaard
* @license http://www.apache.org/licenses/LICENSE-2.0
*/
/**
* A custom template loader for Twig. It supports theme: and original: prefixes.
*
* @category ... | true |
e0e17a01c570224239304fef32d1d551c9a4fe28 | PHP | grigoryya/bitcoind-rpc | /src/Http/AuthBasic.php | UTF-8 | 1,664 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is a part of "furqansiddiqui/bitcoind-rpc" package.
* https://github.com/furqansiddiqui/bitcoind-rpc
*
* Copyright (c) 2019 Furqan A. Siddiqui <hello@furqansiddiqui.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source ... | true |
4a7cbf679e35d9097f349ef7ac140e3111b72130 | PHP | Krasakov/College | /src/NewBundle/Command/TestCommand.php | UTF-8 | 4,066 | 2.515625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace NewBundle\Command;
use NewBundle\Entity\Branch;
use NewBundle\Entity\BranchHead;
use NewBundle\Entity\College;
use NewBundle\Entity\Lesson;
use NewBundle\Entity\Party;
use NewBundle\Entity\Student;
use NewBundle\Entity\StudentLesson;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use... | true |
cae098cc7a9b0656e081b9600522ef37e6c98cf0 | PHP | ElmageAce/mvc-blog | /classes/models/Register.php | UTF-8 | 1,389 | 2.796875 | 3 | [] | no_license | <?php
namespace Elmage\models;
/**
* Registration class
*/
class Register extends \Elmage\libs\Model {
function __construct(\Elmage\libs\DB $db, \Elmage\libs\Validate $validation) {
parent::__construct($db);
$this->validate = $validation;
}
public function validateRegistration() {
//
$validation = $t... | true |
4cfbeeb922df8b91c874e3cc77226daf42d0e463 | PHP | tiagomichaelsousa/helm-php | /src/Commands/VersionCommand.php | UTF-8 | 564 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace tiagomichaelsousa\Helm\Commands;
use Symfony\Component\Process\Process;
use tiagomichaelsousa\Helm\Models\Version;
class VersionCommand
{
public function get(): Version
{
$process = new Process(['helm', 'version', '--template', '{{.Version}},{{.GitCommit}},{{... | true |
09edcda86479458de507673bdc701850ea6807ab | PHP | va-fursenko/moysklad | /src/Util/Param/Expand.php | UTF-8 | 796 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace MoySklad\Util\Param;
/**
* Class Expand
*
* Параметр с дополнительным полем
*
* @project ms-lib
* @date 30.09.2020 10:03
* @author Viktor.Fursenko
*/
class Expand extends Param
{
/**
* @var string
*/
public $expand;
/**
* Extra-fields params constructor
*
... | true |
c187899ed8519613889d98cd7794aaaa9605eabd | PHP | Qcc/CRM | /app/Console/Commands/SendReportOfMonth.php | UTF-8 | 1,713 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use App\Models\User;
use App\Models\Company;
use Illuminate\Support\Facades\Redis;
use Illuminate\Support\Facades\Cache;
use Carbon\Carbon;
use App\Jobs\SendReport;
use Illuminate\Support\Facades\Log;
class SendReportOfMonth extends Command
{
... | true |
bd9e346296d1ad9a34e1c187d5d75c3d24b3893e | PHP | nisckis/tuenti-challenge-10 | /15 - The internsheep/old/cha15v3.php | UTF-8 | 7,298 | 2.5625 | 3 | [] | no_license | #!/usr/bin/php
<?php
define('GF2_DIM', 32);
class _cha15{
public $__crc32_table = [];
public $checkpoints = [];
function start(){
$this->lines = file('php://stdin');
$this->count = 0;
$case = 0;
while (count($this->lines)) {
$tmp = trim(array_shift($this->lines));
[$file,$samples] = explo... | true |
8d7aafbc223e3db28a97316dc0e6793c81a280fe | PHP | turisap/hotel | /Core/Controller.php | UTF-8 | 1,795 | 2.828125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: HP
* Date: 4/28/2017
* Time: 10:53 AM
*/
namespace Core;
use \App\Flash;
use App\Authentifiacation;
abstract class Controller {
protected $route_parametrs = [];
public function __construct($route_parametrs) {
$this->route_parametrs = $route_parametrs;
... | true |
5182c0f1971a02b8d07cd47c2e85cdb018f22006 | PHP | agunggumelars1212/latihan.php-1 | /liers03.php | UTF-8 | 1,053 | 2.515625 | 3 | [] | no_license | <?php
if(isset($_POST['hitung'])){
$nama1 = $_POST['name'];
$jln = $_POST['jln'];
$kecamatan = $_POST['camat'];
$kota = $_POST['kota'];
$provinsi = $_POST['provinsi'];
$kodepos = $_POST['kode'];
$nama = $_POST['nama'];
$harga = $_POST['harg... | true |
e9f51c8da948e45020e0475b9c1e75205e97ac42 | PHP | TomTervoort/webtech3 | /www/application/models/configuration.php | UTF-8 | 1,189 | 2.828125 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Configuration extends CI_Model
{
/**
* Constants representing similarity measure coefficients.
*/
const SMC_DICE = 0,
SMC_JACCARD = 1,
SMC_COSINE = 2,
SMC_OVERLAP = 3;
/**
... | true |
72b9991d57dab3e470a604e9928e09242e9f2c7d | PHP | kogleron/test-12go-asia | /src/Service/Calculator/AvgDestinationCalculator.php | UTF-8 | 1,178 | 3.015625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Kogleron\Test12GoAsia\App\Service\Calculator;
use Kogleron\Test12GoAsia\App\Model\Route;
/**
* Class AvgDestinationCalculator
* @package Kogleron\Test12GoAsia\App\Service\Calculator
*/
class AvgDestinationCalculator
{
/**
* @var array|Route[]
*/
private ... | true |
50f68d6c5639da9bcf75b4ea8cc97cea1f772d47 | PHP | vgrynishak/m2 | /src/App/Factory/Section/SectionFactory.php | UTF-8 | 701 | 2.671875 | 3 | [] | no_license | <?php
namespace App\App\Factory\Section;
use App\App\Component\Message\MessageInterface;
use App\Core\Model\Section\Section;
use App\Core\Model\Section\SectionInterface;
use PhpCollection\Set;
class SectionFactory implements SectionFactoryInterface
{
/**
* @param MessageInterface $command
* @return Sec... | true |
335cdf1ede3e4c729b5312cc383cdbee6202f0a6 | PHP | hanierming/swoft-component | /src/framework/src/Bean/Parser/ValueParser.php | UTF-8 | 3,164 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Swoft\Bean\Parser;
use Swoft\Bean\Annotation\Value;
use Swoft\Helper\DocumentHelper;
/**
* value注解解析器
*
* @uses ValueParser
* @version 2017年11月14日
* @author stelin <phpcrazy@126.com>
* @copyright Copyright 2010-2016 swoft software
* @license PHP Version 7.x {@link http://www.php.ne... | true |
1ebab3cf8cd377caa538300515446a7aad93c37d | PHP | Andrew-Dmyterko/MyNewPHP | /socket1/classes.php | UTF-8 | 2,988 | 2.84375 | 3 | [] | no_license | <?php
class Connect
{
public function sendHeaders($headersTxt, $newSocket){
$headers = [];
$arrHeaders = explode("\r\n", $headersTxt);
foreach($arrHeaders as $value){
$arrValue = explode(": ", trim($value));
if(isset($arrValue[0],$arrValue[1])){
$head... | true |
6ee93c56b1d13f641e63c3bbff329953524a0565 | PHP | sleddog/methods-spring-2020 | /examples/phpform/form.php | UTF-8 | 832 | 3.40625 | 3 | [] | no_license | <html>
<head>
<title>Simple Form</title>
</head>
<body>
<h1>Data</h1>
<p>URL parameters:</p>
<?php
foreach($_GET as $key => $value){
echo $key . " : " . $value . "<br />\r\n";
}
?>
<p>POST data:</p>
<table>
<?php
foreach ($_POST as $key => $value) {
echo "<tr>";
echo "<td>";
echo $ke... | true |
51dda749253e6d763bc8cdbb2c1f883515958acc | PHP | andrmoel/cloud-map-creator | /src/Controller/DailyCloudCoverageMapController.php | UTF-8 | 3,238 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\FileUtils;
class DailyCloudCoverageMapController extends AbstractController
{
const SATELLITES = [
'aqua' => 'MYDAL2_D_CLD_FR',
'terra' => 'MODAL2_D_CLD_FR',
];
const DIRECTORY_TEMP_RAW = __DIR__ . '/../../temp/raw/';
const DIRECTORY_TEMP_TRANS... | true |
70381ed31b8958badf07fb8d502b27a76c8645fd | PHP | josedoneguillen/wordpress-child-theme | /functions.php | UTF-8 | 2,470 | 2.609375 | 3 | [] | no_license | <?php
/**
* Twenty Twenty functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package WordPress
* @subpackage Twenty_Twenty
* @since Twenty Twenty 1.0
*/
/**
* Table of Contents:
* Theme Support
* Required Files
* Register Styles
* Register Scripts
* Re... | true |
8fc25691611b9e7ed738b13cf689303e3ab8a595 | PHP | comdexxsolutionsllc/dcas-laravel55-old | /app/Consumer.php | UTF-8 | 1,637 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App;
use DCAS\Observers\ConsumerModelObserver;
/**
* App\Consumer
*
* @property string $id
* @property string|null $api_token
* @property string $name
* @property string $url
* @property \Carbon\Carbon|null $created_at
* @property \Carbon\Carbon|null $updated_at
* @method static \Illuminate\... | true |
187d54e8c7b4631a258f586aa1819fe9a163f84d | PHP | silvianawidya/tugas-5 | /variable/statickunci.php | UTF-8 | 584 | 3.46875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<body>
<?php //tag pembuka php pada html
function myTest() { //menjalankan fungsi
//setiap kali fungsi dipanggil, variabel yang akan masih memiliki informasi yang terkandung dari terakhir kali fungsi dipanggil.
static $x = 0; //untuk membuat variable lokal tidak terhapus
echo $x;... | true |
9983dce9cb5d341fd2070cb4c17a43c81008e817 | PHP | Nogrod/ebay-sdk-php | /src/MerchantData/AuthTokenTypeCodeType.php | UTF-8 | 1,292 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace Nogrod\eBaySDK\MerchantData;
/**
* Class representing AuthTokenTypeCodeType
*
* This enumeration type lists the types of user authentication tokens that can be used to access/use eBay APIs.
* XSD Type: AuthTokenTypeCodeType
*/
class AuthTokenTypeCodeType
{
/**
* Constant for 'ClientAlert... | true |
d4f450be5735f1f7cbf6e3551ebdd65c9e256e2d | PHP | fpbeat/ele | /app/Repositories/MessageRepository.php | UTF-8 | 1,162 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Models\Message;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
class MessageRepository
{
/**
* @var array|Collection
*/
static $messages = [];
/**
* MessageRepository constructor.
*/
public function __construct()
{
... | true |
6e0d5019514b5cd19e93fa5ce9682d8e260ec386 | PHP | Innmind/OperatingSystem | /src/Sockets.php | UTF-8 | 761 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Innmind\OperatingSystem;
use Innmind\Socket\{
Address\Unix,
Server,
Client,
};
use Innmind\TimeContinuum\ElapsedPeriod;
use Innmind\Stream\Watch;
use Innmind\Immutable\Maybe;
interface Sockets
{
/**
* This method will fail if the socket already exist
... | true |
40b18c1ceaa258691d0fdfbb50d6d209e300aca0 | PHP | Francesconliner95/laravel-boolpress | /app/Http/Controllers/Admin/PostController.php | UTF-8 | 8,907 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Post;
use Illuminate\Support\Str;
use App\Category;
use App\Tag;
class PostController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Res... | true |
90f25ab088294720546e2148fc680954c46e1373 | PHP | igor-fortaleza/myrepository | /Codes/web-php/Banco de dados - appinventor/app_php/banco/listar.php | UTF-8 | 387 | 2.953125 | 3 | [] | no_license |
<?php
conexap = mysql_connect('localhost','root');
mysql_select_db('agenda',$conexao);
$sql="select * from conatato";
$resultado = mysql_query($sql) or die (" Erro:" . mysql_error());
//obtém o resultado de uma linha como um objeto
while ($linha = mysql_fetch_object($resultado))
echo... | true |
689181f2f81660bc3f869cff4d1ccfda91f0c398 | PHP | darthan914/sitri-project | /application/app/Sitri/Actions/ClassRoom/ActiveClassRoomAction.php | UTF-8 | 371 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Sitri\Actions\ClassRoom;
use App\Sitri\Models\Admin\ClassRoom;
class ActiveClassRoomAction
{
/**
* @param int $classRoomId
* @param bool $active
*
* @return bool
*/
public function execute($classRoomId, $active)
{
return ClassRoom::query()->find($cl... | true |
356bdfa1597d9e8e92a2b3e36112632d34d0881c | PHP | fuel/depot | /fuel/modules/documentation/classes/controller/move.php | UTF-8 | 1,863 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Part of Fuel Depot.
*
* @package FuelDepot
* @version 1.0
* @author Fuel Development Team
* @license MIT License
* @copyright 2012 Fuel Development Team
* @link http://depot.fuelphp.com
*/
namespace Documentation;
class Controller_Move extends \Controller_Base_Public
{
/**
... | true |
e17395387f580decdcaa8c450297154160e49c16 | PHP | ruhul0/PHP-mailer-without-redirecting | /submit.php | UTF-8 | 1,029 | 2.796875 | 3 | [] | no_license | <?php
$check=0;
if($_POST) {
$visitor_name = "";
$visitor_email = "";
$recipient="ruhul20@gmail.com";
if(isset($_POST['name'])) {
$visitor_name = filter_var($_POST['name'], FILTER_SANITIZE_STRING);
}
if(isset($_POST['email'])) {
$visitor_email = str_replace(array(... | true |
a7862f5d6ccf3a28d8f8833dc9c13f5eafab08d4 | PHP | todaprojects/BitPHP-Sprint3 | /src/utils/update_post.php | UTF-8 | 893 | 2.546875 | 3 | [] | no_license | <?php
session_start();
require_once '../../config/bootstrap.php';
$post = $entityManager->find('Models\Post', $_REQUEST['id']);
if (isset($_REQUEST['deletePost'])) {
$entityManager->remove($post);
$entityManager->flush();
$_SESSION['msg'] = 'the post has been deleted';
header('location: ../../');
... | true |
3f8c1d75ea61f9c2f26a639bea7237b22d2cda91 | PHP | antoniaat/CSharp-SoftUni | /Tech-Module/Software_Technologies/06. PHP-Syntax-And-Basic-Web/Lab/08_Sort_Lines.php | UTF-8 | 474 | 2.96875 | 3 | [] | no_license | <DOCTYPE html>
<html>
<head>
<title>Sort Lines</title>
</head>
<body>
<form>
<textarea rows="10" name="text"></textarea><br>
<input type="submit" value="Extract">
</form>
</body>
</html>
</DOCTYPE>
<?php $sortedLines = "";
if (isset($_GET['text'])) {
$lines =... | true |
0e92207cc30df92d3726f692e388e6ac76ee7cbd | PHP | marcelobarth/bludata-laravel | /app/Http/Controllers/Site/HomeController.php | UTF-8 | 766 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Site;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
/** Contrutor obriga autenticação para ter acesso aos métodos da classe. Isso ... | true |
fc198ac87f526714ef6df40bc8f16cdf5ff96c60 | PHP | diamond520/webpush-backend | /app/Http/Controllers/RegController.php | UTF-8 | 1,005 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Models\WebUser;
use Validator;
class RegController extends Controller
{
// reg gcm id
public function reg($client_id)
{
$validator = Validator::make(array('id' => $client_id) , [
'id' => ... | true |
256d822eb99de4c17bfc132aad757745260ab80a | PHP | rik43/yandex-direct | /src/Api/V5/Contract/DynamicTextCampaignSetting.php | UTF-8 | 1,171 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Biplane\YandexDirect\Api\V5\Contract;
/**
* Auto-generated code.
*/
class DynamicTextCampaignSetting
{
protected $Option = null;
protected $Value = null;
/**
* Creates a new instance of DynamicTextCampaignSetting.
*
* @return self
*/
public static function crea... | true |
320155a2928605cb2b8e06fc46056914a5a479cd | PHP | ChanYuhong/Web-Learning | /源码/2JavaScript/第22章-JSONP跨域/mysql/showStudents_json.php | UTF-8 | 793 | 2.796875 | 3 | [] | no_license | <?php
header("Content-type:text/html;charset=utf-8");
/*
链接数据库 天龙八部
*/
//1、链接数据库
/*
第一个参数:链接数据库的IP/域名
第二个参数:用户名
第三个参数:密码
*/
$link = mysql_connect("localhost", "root", "123456");
//2、判断是否连接成功
if(!$link){
echo "链接失败";
exit; //终止后续所有的代码
}
//3、设置字符集
mysql_set_charset("utf8");
//4、选择数据库
mysql_... | true |
1e401583b48026e83f7cdac155e870089a9b318a | PHP | NaufalFadhil/Website_UNPAS_PHP_MVC | /app/core/App.php | UTF-8 | 2,820 | 2.984375 | 3 | [] | no_license | <?php
// CORE APP
// MEGATUR SEMUA SETTINGAN DI WEB
///////////
// MEMBUAT CLASS APP
class App
{
// MEMBUAT PRPOERT PADA CLASS (APP)
protected $controller = 'Home';
protected $method = 'index';
protected $params = [];
// MEMBUAT CONSTRUCTOR
public function __construct()
{
// ASIGN ... | true |
9ff704af36ef0cfeaeb1964e1bbfa7bbed695f63 | PHP | ashish0205/W12-PHP | /first.php | UTF-8 | 1,957 | 3.921875 | 4 | [] | no_license | <!-- <!DOCTYPE html>
<html lang='en'>
<head>
<title>First php page</title>
</head>
<body>
<?php
/*
//php is case sensitive
$x = 10;
$y = 10;
echo 'x='.$x.'<br>'; // by . we concatinate
//$x = 'sss'; //variable decleration
var_dump($y);
$arr = [22, 33, 33, 44, 55, 55];
echo $arr[3].'<br>';
echo "x= $x";
$arr[6] ... | true |
fd0e2b2a8ae24b5b54549ef5de244bd5a697fd7f | PHP | cazunigag/reabastecimiento | /assets/telerik/wrappers/php/lib/Kendo/UI/SpreadsheetExcel.php | UTF-8 | 1,499 | 2.546875 | 3 | [
"LicenseRef-scancode-free-unknown",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Kendo\UI;
class SpreadsheetExcel extends \Kendo\SerializableObject {
//>> Properties
/**
* Specifies the file name of the exported Excel file.
* @param string $value
* @return \Kendo\UI\SpreadsheetExcel
*/
public function fileName($value) {
return $this->setProperty('f... | true |
daa8cc8b4750eee212c20d24e1148744605905f2 | PHP | xionic/PiOn | /hardware/HardwareDualGPIOToggle.class.php | UTF-8 | 4,397 | 2.640625 | 3 | [] | no_license | <?php
namespace PiOn\hardware;
use \PiOn\Item\Value;
use \PiOn\Event\Scheduler;
use \PiOn\Event\FixedIntervalTimer;
use \PiOn\StandardClass;
use \PiOn\Session;
use \Amp\Loop;
use \Amp\Promise;
use \Amp\Success;
use \Amp\Deferred;
/*
Acts as an array of binary switches, but is backed by GPIO on and o... | true |
f0b1f061260248096091d22a0454d7956e0b84da | PHP | MonicaMedhat/SoftwareEng | /salarydetails.php | UTF-8 | 2,830 | 2.90625 | 3 | [] | no_license | <?php
$id=0;
$originalsalary="";
$Deductable="";
$Bonus="";
$totalsalary="";
//connect to database
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "swproj";
// Create connection
$con = new mysqli($servername, $username, $password, $dbname);
if (isset($_POST['sum'])){
... | true |
5d4f84c401ed9bb7a9fec06d8473122c0f31e1c4 | PHP | WebTales/bigml-php | /tests/test_06_batch_predictions.php | UTF-8 | 13,990 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
include '../bigml/bigml.php';
include '../bigml/ensemble.php';
include '../bigml/cluster.php';
include '../bigml/fields.php';
class BigMLTest extends PHPUnit_Framework_TestCase
{
protected static $username; # "you_username"
protected static $api_key; # "your_api_key"
protected static $api;
publ... | true |
06cd77581987df1c8cc6c3a2cefb25283a51f704 | PHP | ninozvorc/LearningEnglish | /okviri/meni.php | UTF-8 | 1,911 | 2.546875 | 3 | [] | no_license | <?php
include_once ("user.class.php");
$user = new User();
$id = 0;
if (isset($_SESSION["prijava"])) {
$user = $_SESSION["prijava"];
$id = $user->getId();
$name = $user->getName();
}
?>
<div class="fixed">
<nav class="top-bar" data-topbar>
<ul class="title-area">
... | true |
db12c18120bede19dbaeb63ec3488fe381360c96 | PHP | lathspe11/AWS-Backup | /prand.php | UTF-8 | 446 | 3.546875 | 4 | [] | no_license | #!/usr/bin/php5
<?php
function generateRandomString($length = 400) {
$characters = "0123456789abcdefghijklmnopqrstuvwxyz !~`@#$%^&*()_+-=';:><ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$clen = strlen($characters); //echo "clen = $clen\n";
$randstring = '';
for ($i = 0; $i < $length; $i++) {
$dx = rand(0, $... | true |
004e43b67efa403ae538bae7415e8fb13defc29f | PHP | ashfaq1211/rentit | /Controller/addcomrev.php | UTF-8 | 1,084 | 2.5625 | 3 | [] | no_license | <?php
session_start(); //starts the session
if($_SESSION['user']){ // checks if the user is logged in
}
else{
header("location: ../../MVC/View/index.php"); // redirects if user is not logged in
}
$user = $_SESSION['user']; //assigns user value
?>
<?php
$regValue = $_SESSION['user'];
$dbhost =... | true |
9f426072abca0f78673a3b797b43d06218dea19c | PHP | ChRomfr/immophp | /kernel/base_app/model/Baselogmoderation.php | UTF-8 | 654 | 2.640625 | 3 | [] | no_license | <?php
class Baselogmoderation extends Record{
const Table = 'forum_log_moderation';
/**
* Id dans la base
* @var int
*/
public $id;
/**
* Date de l action
* @var DATETIME
*/
public $date_action;
/**
* Id du moderateur
* @var int
*/
public $moderateur_id;
/**
* [$thread_id description]
... | true |
ab6ef536f7ca8af11a94476bfb53b0416896785e | PHP | sidibos/moneyreader | /application/models/Merchant.php | UTF-8 | 3,136 | 3.140625 | 3 | [] | no_license | <?php
/**
* makes sure transactions data are converted in Pounds and display them
* @uses Application_Model_CurrencyConverter
* @uses Application_Model_CurrencyWebservice
*/
class Application_Model_Merchant
{
public $merchantId;
//the mapp between currency name and symbol
public $currencyMapp;
public ... | true |
4373245612e97b6a067b7ca90c3864d5ed2314f4 | PHP | alexpodolin/Natlog | /12_вариант_!!!/natlog/inc/ora_functions.php | UTF-8 | 497 | 2.59375 | 3 | [] | no_license | <?
function getSubnets()
{
global $db_ora_conn;
//Выберем подсети из таблицы
$sql_get_sbnt = $db_ora_conn->query("SELECT * FROM SUBNET");
foreach ($sql_get_sbnt as $key => $val)
{
echo "<pre>";
$subnet = preg_grep("/^(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})\/(\d{1,3})$/", array($val['SUBNET_NAME'])); ... | true |
9a85dd35dc4f60c8a5142fe53ee88da1d4b990ba | PHP | CeusMedia/HydrogenModules | /src/UI/Helper/TimePhraser/classes/View/Helper/TimePhraser.php | UTF-8 | 2,443 | 2.84375 | 3 | [] | no_license | <?php
use CeusMedia\HydrogenFramework\Environment;
use CeusMedia\HydrogenFramework\View\Helper\Timestamp;
class View_Helper_TimePhraser
{
const MODE_HINT = 1;
const MODE_BREAK = 2;
const MODES = [
self::MODE_HINT,
self::MODE_BREAK,
];
protected $env;
protected $asHtml = TRUE;
protected $template =... | true |
8f533f161074c55ac5a4800fcfcbd8e1b09480a0 | PHP | wilkques/admin | /app/Repositories/RestfulRepository.php | UTF-8 | 912 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
/**
* Class RestfulRepository.
*/
Trait RestfulRepository
{
public $status = 'error';
public $msg = '';
public $status_code = 200;
public $data = [];
public $error_code;
public $header;
/**
* @return string
* Return the model
*/
publ... | true |
93693c9c803cef9fcc459b789db2dc8f00a538d6 | PHP | zengy220/xhlr | /Application/Web/Controller/api_to.php | UTF-8 | 1,419 | 2.53125 | 3 | [] | no_license | <?php
header("Content-Type:text/html;charset=utf-8");
//账号
$username= "hnxjw";
//验证码
$rand = rand(1000,9999);
//密码
$password= "874639";
//修改为您要发送的手机号
$mobile = I('phone');
//发送地址,请咨询客服
$url = "http://118.178.86.197/cmas/cmasoutapi.do?method=httpSend&username=hnxjw&password=1234&mobil... | true |
fc42b510e1a82254814eb48308ba4692b61018b7 | PHP | 554665488/tp5 | /application/common/Hook.php | UTF-8 | 10,857 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: JnToo
* Date: 2016/11/11
* Time: 22:57
*/
namespace app\common;
use think\Config;
use think\Hook as thinkHook;
use think\Cache;
class Hook
{
/**
* 编译钩子时使用计数器
* @var int
*/
static protected $index = 0;
/**
* 添加引用计数
* @var int
*/
... | true |
4a8fe6f7619b1d2d08b343ae8b6fda73af29fbdc | PHP | brad-jones/wordpress | /wp-config.php | UTF-8 | 6,497 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
// Include composer first up, so we have it available at all times
require('vendor/autoload.php');
/**
* Section: The base dir for wordpress
* =============================================================================
* In case you need to use in any of the config below we define it
* here instead of all... | true |
7fab6ea813f6fd7878f29f14be5d643eb09b9b66 | PHP | dbojdo/price-comparator-ceneo | /lib/Webit/PriceComparator/Ceneo/Provider/CategoryProvider.php | UTF-8 | 1,418 | 2.78125 | 3 | [] | no_license | <?php
namespace Webit\PriceComparator\Ceneo\Provider;
use JMS\Serializer\SerializerInterface;
use Webit\PriceComparator\Ceneo\Model\Category;
use Doctrine\Common\Collections\ArrayCollection;
class CategoryProvider implements CategoryProviderInterface
{
const DEFAULT_SOURCE_PATH = 'http://api.ceneo.pl/Kategor... | true |
788bd89ed76a3fef52bb9704cb59934549028e09 | PHP | thecodingmachine/tdbm | /src/SchemaLockFileDumper.php | UTF-8 | 3,227 | 2.609375 | 3 | [] | no_license | <?php
namespace TheCodingMachine\TDBM;
use BrainDiminished\SchemaVersionControl\SchemaVersionControlService;
use Doctrine\Common\Cache\Cache;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Schema\ForeignKeyConstraint;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\DBAL\Schema\Table;
use Mouf\Database\SchemaAnalyzer\S... | true |
679dc5710bff3e84097aa046c683c61ef9778cd7 | PHP | ACID-Solutions/acidfarm | /acid/tools/facebook.php | UTF-8 | 5,659 | 2.890625 | 3 | [] | permissive | <?php
/**
* AcidFarm - Yet Another Framework
*
* Requires PHP version 5.3
*
* @author ACID-Solutions <contact@acid-solutions.fr>
* @category AcidFarm
* @package Acidfarm\Tool
* @version 0.5
* @since Version 0.5
* @copyright 2012 ACID-Solutions SARL
* @license http://www.acidfarm.net/license
... | true |
9e68cde39a412b9ddf15ffac179372d117586018 | PHP | artovenry/wp | /lib/Artovenry/Wp/CustomPost/Query.php | UTF-8 | 1,990 | 2.640625 | 3 | [] | no_license | <?
namespace Artovenry\Wp\CustomPost;
require_once "errors.php";
trait Query{
static function find($id, $raise= true){
if($post= get_post($id))
return static::build($post);
if($raise) throw new RecordNotFound;
return false;
}
static function all($args=[]){
$args= array_merge([... | true |
09fa333e20eacd8f273f7f04b6c96990fa4b4e38 | PHP | FlashFusionGitHub/LiveChatWebsite | /app/core/Controller.php | UTF-8 | 450 | 2.84375 | 3 | [] | no_license | <?php
class Controller {
protected $view;
protected $model;
protected function model($model, $data = array()) {
if(file_exists(MODEL . $model . '.php')) {
require_once MODEL . $model . '.php';
$this->model = new $model($model, $data);
}
}
pub... | true |
0dc017a9cf260916d14b0ec3347d08c25f8665ec | PHP | Yoobe/yii-spm | /protected/models/ContactForm.php | UTF-8 | 779 | 2.640625 | 3 | [] | no_license | <?php
class ContactForm extends CFormModel {
public $name;
public $email;
public $subject;
public $body;
public $verifyCode;
public function rules() {
return array(
array('name, email, subject, body', 'required'),
array('email', 'email'),
array('ver... | true |
cb579665694d49c208f576516d17536244f074ae | PHP | akram-max/RvR_website | /config/database.php | UTF-8 | 452 | 2.71875 | 3 | [] | no_license | <?php
//var_dump(PDO::getAvailableDrivers());
define('DB_HOST', 'localhost');
define('DB_NAME', 'rvr');
define('DB_USERNAME', 'root');
define('DB_PASSWORD', '');
try {
$db = new PDO("mysql:host=".DB_HOST.";dbname=".DB_NAME,DB_USERNAME,DB_PASSWORD);
$db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
} cat... | true |
3777c7d1e6f4bc6aa3dd4a31ef721a86ac0215a4 | PHP | psrearick/kanbanext | /app/Http/Controllers/CardController.php | UTF-8 | 2,072 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\Card;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Request;
/**
* Class CardController
* @package App\Http\Controllers
*
* @mixin Builder
*/
class CardController extends Controller
{
/**
* return all... | true |
b21f25ec9b421f0fa4627ea2dc3fd87f29302994 | PHP | izhu4o/home24 | /Core/Abstracts/AbstractModel.php | UTF-8 | 2,469 | 2.84375 | 3 | [] | no_license | <?php
namespace Core\Abstracts;
use Core\Container;
abstract class AbstractModel
{
/**
* Container Object
*
* @var Container
*/
protected $container;
/**
* Table name
*
* @var string
*/
protected $table;
/**
* Soft delete flag
*
* @var boo... | true |