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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
f3f9f4ce2b3539d2cc6129324303659ad2b16138 | PHP | sankeerth96/filing | /index.php | UTF-8 | 2,706 | 2.71875 | 3 | [] | no_license | <?php
$connection = mysqli_connect("localhost","root","","filing");
$message;
if(isset($_POST['email']))
{
$email = mysqli_real_escape_string($connection,$_POST['email']);
$passw = mysqli_real_escape_string($connection,$_POST['passw']);
$query = "SELECT email FROM register wh... | true |
92618df328f503cc51345ce0a232e1ab8680437e | PHP | evandojunior/urbem3.0 | /src/Urbem/PrestacaoContasBundle/Service/TribunalStrategy/DataProcessing/DateTimeFormat.php | UTF-8 | 1,020 | 2.78125 | 3 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | <?php
namespace Urbem\PrestacaoContasBundle\Service\TribunalStrategy\DataProcessing;
use Urbem\PrestacaoContasBundle\Enum\FieldsAndData;
/**
* Class DateTimeFormat
* @package Urbem\PrestacaoContasBundle\Service\TribunalStrategy\DataProcessing
*/
class DateTimeFormat extends DataProcessAbstract implements DataProce... | true |
f651921a229a9d353432a36a3f1fe394f6b9133b | PHP | Dalee/pp-core | /lib/Debug/trace.inc | UTF-8 | 984 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
define('BACKTRACE', function_exists('debug_backtrace'));
function PXTrace() {
if (!BACKTRACE) {
return false;
}
$stack = debug_backtrace();
array_shift($stack);
$trace = [];
foreach ($stack as $i => $call) {
$e = [];
$e['file'] = isset($call['file']) ? str_replace(BASEPATH, '', $call['file']) : N... | true |
ac01239034f2e87eddf64adc21310284d737b933 | PHP | KirylMarchanka/cars-api-test | /database/factories/CarModelFactory.php | UTF-8 | 995 | 2.625 | 3 | [] | no_license | <?php
namespace Database\Factories;
use App\Models\CarBrand;
use App\Models\CarModel;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
class CarModelFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model =... | true |
064d84efc673261a0d05a876322902eb7cffa1e3 | PHP | jeremyxie712/opalForm | /opalAdmin-eason/api/post/get.posts.php | UTF-8 | 309 | 2.671875 | 3 | [] | no_license | <?php
/* To get a list of existing posts */
include_once('post.inc');
// Retrieve FORM param
$callback = $_GET['callback'];
$post = new Post; // Object
// Call function
$existingPostList = $post->getPosts();
// Callback to http request
print $callback.'('.json_encode($existingPostList).')';
?>
| true |
8cd9885c6517d560bf4db59a998249d96608fb03 | PHP | mostafaMahfouz25/php-project-level-2 | /core/Request.php | UTF-8 | 1,018 | 2.890625 | 3 | [] | no_license | <?php
namespace Core;
class Request
{
/**
* get post data
* @param string $key
* @param mixid $default
* @return string
*/
public function get($key,$default=null)
{
return array_get($_GET,$key,$default);
}
/**
* get post data
* @param ... | true |
83e8a9673a69a920d25211d994750d4817c53160 | PHP | kunikla/boutell | /playonce.php | UTF-8 | 4,376 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: chamilton
* Date: 5/28/18
* Time: 8:30 PM
*/
#There can be ABSOLUTELY NOTHING before the <?php at the top of this file!
#Otherwise we can't choose to output an MP3 or playlist instead of HTML
#where appropriate.
$mp3Dir = "/home/chamilton/sofiles/";
$tmpDir = "/home/chamil... | true |
33023740e5df08be682f99a137a4571ba67ca400 | PHP | shindakioku/kioku | /src/kioku/Helpers/Arr.php | UTF-8 | 1,605 | 3.0625 | 3 | [] | no_license | <?php
namespace Kioku\Helpers;
class Arr
{
/**
* @param array $keys
* @param $value
* @return mixed
*/
public static function get(array $keys, $value)
{
foreach ($keys as $k) {
$value = $value[$k];
}
return $value;
}
/**
* @param array... | true |
fda8f38121843a15553e3671531fd5ab99ec175e | PHP | Zannatul/authentication-with-php-mysql-angularjs | /inc/db_connection.php | UTF-8 | 973 | 2.9375 | 3 | [] | no_license | <?php
class Db_connection {
private $hostName = 'localhost';
private $userName = 'root';
private $password = '';
private $databaseName = 'angularAuthentication';
public $link = '';
public $error = '';
public function __construct() {
$this->connectDb();
}
private function ... | true |
3f209efcfa311ebd446e5769a4408e8f0704a5ea | PHP | electric-eloquence/fepper-drupal | /backend/drupal/core/lib/Drupal/Core/Cache/ApcuBackend.php | UTF-8 | 7,391 | 2.78125 | 3 | [
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-other-copyleft",
"GPL-2.0-or-later",
"GPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace Drupal\Core\Cache;
use Drupal\Component\Assertion\Inspector;
/**
* Stores cache items in the Alternative PHP Cache User Cache (APCu).
*/
class ApcuBackend implements CacheBackendInterface {
/**
* The name of the cache bin to use.
*
* @var string
*/
protected $bin;
/**
* Prefi... | true |
86b60193339ea21a61d946942e0e3b2757210e3d | PHP | ertprs/delivery-2 | /web/php/control/Motoboy/Insert.php | UTF-8 | 881 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
if (!isset($_SESSION)) {
session_start();
}
include_once $_SESSION['_DIR_'] . '/php/model/motoboy.php';
$Moto = new MotoBoy();
$Valid = true;
$post = $_POST;
$Moto->setId($post['Id']);
$Moto->setNome($post['Nome']);
if ($Moto->getNome() == null || $Moto->getNome() == "") {
echo '<div class="alert a... | true |
ecae7b472a2e0ddaf1e381fde48b649e3c39f71b | PHP | yuweipeng110/daydreaming_php | /library/Business/Script/List.php | UTF-8 | 4,510 | 2.53125 | 3 | [] | no_license | <?php
class Business_Script_List {
public static function GetScriptList() {
$objectList = array ();
$table = new Custom_Adapter ();
$db = $table->getAdapter ();
$table->setTable ( PROJECT . "_301" );
$where = $db->quoteInto ( ' 1 = 1 ', null );
$order = "OTIME DESC";
$data = $table->fetchAll ( $where, ... | true |
2a0f7c55ec5c1b7f239534b6e68d18fe093fb76c | PHP | cfletcher1856/austinspremierleague | /protected/views/site/makeups.php | UTF-8 | 785 | 2.78125 | 3 | [] | no_license | <?php
/* @var $this SiteController */
$this->pageTitle='APL - Make Up Games';
$this->page_header = 'Make Up Games';
$ctr = 1;
?>
<table class="table">
<thead>
<tr>
<th> </th>
<th>Matchup</th>
<th>Date</th>
<th>Week</th>
<th>Board</th>
</tr>
</thead>... | true |
f9e846bfed6a7eaaa573946d40919583631117a4 | PHP | kamal-bisht/codewithbish | /php_CRUD/includes/home.php | UTF-8 | 2,340 | 2.640625 | 3 | [] | no_license | <!-- Header -->
<?php include "../header.php"?>
<div class="container">
<h1 class="text-center" >Data to perform CRUD Operations</h1>
<a href="create.php" class='btn btn-outline-dark mb-2'> <i class="bi bi-person-plus"></i> Create New User</a>
<table class="table table-striped table-bordere... | true |
b8f469d86d47271a838690f2b8a5b4049a733fa7 | PHP | assistunion/oxygen | /serializer/serializer.class.php | UTF-8 | 345 | 2.703125 | 3 | [] | no_license | <?
class Oxygen_Serializer extends Oxygen_Object {
private $array = array();
public function add(&$item) {
$count = count($this->array);
$this->array[$count] = &$item;
}
public function put_data() {
echo serialize($this->data);
}
public function put_if_needed() {
if(count($this->array)) $thi... | true |
2826c97f6f19de50e08384d474d0a141a523eae8 | PHP | uxll/uxll.php.lib.v2.01 | /uxll/system/lib/cores/Register.php | UTF-8 | 699 | 2.828125 | 3 | [] | no_license | <?php
/**
* @version: 2.01
* @date: 2012-12-13
* @author: uxll@qq.com
* @file: Register.php
*/
class CRegister{
private static $_instance = null;
private $key = 'UXLL_REGISTER';
private function __construct(){
$GLOBALS[$this -> key] = array();
}
static public function getInstance(){
if (null === self... | true |
691f1028c23442033e508c86a1f2d8f435b8acec | PHP | ligianoazzi/php-autoloader-example | /Animal.php | UTF-8 | 114 | 2.953125 | 3 | [] | no_license | <?php
/**
*
*/
class Animal
{
function __construct()
{
echo "<div> Class Animal instancied </div>";
}
} | true |
1c9026800f7e6aef88fe308d6261d2c152bcecf1 | PHP | PhpEssential/PHP-MVC | /ui/Checkbox.class.php | UTF-8 | 341 | 2.71875 | 3 | [
"Beerware"
] | permissive | <?php
namespace framework\ui;
class Checkbox extends Input {
public function __construct(string $name) {
parent::__construct("checkbox", $name, "custom-control-input");
}
/**
*
* @param bool $checked
* @return Checkbox
*/
public function setChecked(bool $checked) {
$this->putArguments("checked");
... | true |
760160e7fd23a7a4890434d765d043a9b520a895 | PHP | ajipratama11/skripsi | /admin/application/controllers/Admin.php | UTF-8 | 43,112 | 2.609375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') or exit('No direct script access allowed');
date_default_timezone_set("Asia/Jakarta");
class Admin extends CI_Controller
{
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welc... | true |
f8023d3e5760c9f26ac848f91adfd15475f2b015 | PHP | pr0pellerhead/swt-2017 | /static.php | UTF-8 | 708 | 2.953125 | 3 | [] | no_license | <?php
class Kompjuter {
public static $CPU;
public static $GPU;
public static function Info(){
return 'Kompjuter CPU: '.self::$CPU.', GPU: '.self::$GPU;
}
}
Kompjuter::$CPU = 'Intel';
Kompjuter::$GPU = 'NVidia';
echo Kompjuter::Info();
class Validate {
public static function Email($email){
return self::Va... | true |
9b1ed58b009aad72387ce02d9ce00db87c127de6 | PHP | weisd/sso | /app/controllers/BlogController.php | UTF-8 | 620 | 2.5625 | 3 | [] | no_license | <?php
/**
* 博客系统
*/
class BlogController extends BaseController
{
/**
* 主页
*/
public function getIndex()
{
return '博客主页';
}
/**
* 新建
*/
public function getCreate()
{
return '新建页面';
}
/**
* 保存新建
*/
public function postCreate()
{
return '保存新建';
}
/**
* 修改页面
*/
public function g... | true |
4cbeff2508d0f579e1b138dbe45518266d645d6b | PHP | rssr/Rssr.Feeds | /src/Story/Collection.php | UTF-8 | 1,474 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
namespace Rssr\Feed\Story;
class Collection implements \IteratorAggregate, \Countable
{
/**
* @var \ArrayIterator
*/
protected $stories = null;
public function __construct()
{
$this->stories = new \ArrayIterator;
}
/**
* Get an iterator for the stories
* @re... | true |
4a3b9b8c0815011b969efa5a6d6fa99926981936 | PHP | fadewalk/alarm-dog-noticer | /src/Exception/NoticeException.php | UTF-8 | 606 | 2.96875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Dog\Noticer\Exception;
use Exception;
use Throwable;
class NoticeException extends Exception
{
/**
* 上下文信息.
*
* @var array
*/
protected $context = [];
public function __construct(string $message, int $code = 0, array $context = [], ?Throwable... | true |
1b4a57ae8e4d8821a598881eefeb1379f10a1dc0 | PHP | johurulHaque/larabook | /app/Http/Controllers/databaseController.php | UTF-8 | 1,218 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\product;
class databaseController extends Controller
{
public function store(Request $request){
$request -> validate([
'category' => 'required',
'name' => 'required',
'price' => 'required'
],
[... | true |
24e7e833ca79fafdfd220dcd47ce128b8c24c086 | PHP | ArnaudOs/bio | /Panier/cart.php | UTF-8 | 1,604 | 2.65625 | 3 | [] | no_license |
<?php
session_start();
require_once('connect.php');
include('header.php');
include('nav.php');
?>
<div class="container">
<?php
$items = $_SESSION['cart'];
$cartitems = explode(",", $items);
?>
<div class="row">
<table class="table">
<tr>
<th>S.NO</th>
<th>Item Name</th>
<th>Quantité</th>
... | true |
acd3ad409f8e1f03f7a82d500e49b88955f5ceb6 | PHP | weew/http | /src/Weew/Http/IBasicAuthParser.php | UTF-8 | 1,626 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Weew\Http;
/**
* Parser for authorization headers.
*
* Class BasicAuthParser
*/
interface IBasicAuthParser {
/**
* @param IHttpHeaders $headers
*
* @return string
*/
function getHeader(IHttpHeaders $headers);
/**
* @param IHttpHeaders $headers
* @param $he... | true |
05f9ab9e31a0c16ac375bcae2422f73bb3660597 | PHP | dbierer/sample-data-generator | /Application/Csv.php | UTF-8 | 1,188 | 3.265625 | 3 | [
"CC-BY-3.0"
] | permissive | <?php
namespace Application;
use Exception;
use SplFileObject;
class Csv
{
const ERROR_FILE = 'ERROR: file does not exist';
protected $csvFile;
protected $headers;
protected $numHeaders;
protected $delimiter;
public function __construct($fn, $delimiter = ',')
{
if (!file_exists($fn)... | true |
954b67f83b8a2e1436c5eaba80d5f40a2da0e7af | PHP | TenzinRabjam/Web-Development | /forum/DataBaseConnection.php | UTF-8 | 448 | 2.671875 | 3 | [] | no_license | <?php
$host="127.0.0.1";
$user="root";
$password="dbpass";
$dbname="Library";
$con = new mysqli($host, $user, $password, $dbname)
or die ('Could not connect to the database server' . mysqli_connect_error());
if($con->errno==true){
echo"<h2>We connected</h2><br>";
}
function mysql_fix_string($conn, $string)
{
... | true |
2152c311c3c7c6d74bc496d2ae99080844f460a4 | PHP | paulosergioferreira/projeto | /banco.php | UTF-8 | 498 | 2.828125 | 3 | [] | no_license | <?php
require_once "model.php";
class Banco extends PDOException
{
public static function getCon(){
try{
$conn = new PDO("mysql:host=localhost;dbname=cadastre", "root", "");
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$conn->setAttribute(PDO::ATTR_... | true |
17c91e6da81c85cb20aefc47a9a5ea545da26dd7 | PHP | shinracoder/CoreBundle | /Service/FlashMessageService.php | UTF-8 | 1,016 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: peteratkins
* Date: 04/05/2016
* Time: 22:23
*/
namespace App\Oni\CoreBundle\Service;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\Translation\TranslatorInterface;
class FlashMe... | true |
9ba7cd24ddf36de8dfe44e494219fedf705e6311 | PHP | VasylievHennadii/CodewarsPHP | /8kyu_DifferenceVolumesCuboids.php | UTF-8 | 901 | 4.15625 | 4 | [] | no_license | <?php
// In this simple exercise, you will create a program that will take two lists of integers, a and b. Each list will consist of 3 positive integers above 0, representing the dimensions of cuboids a and b. You must find the difference of the cuboids' volumes regardless of which is bigger.
// For example, if the pa... | true |
c5d0263cd1ab35e05ddf2a12d56d98499223007d | PHP | ProjectsLaravel/HireMe | /app/HireMe/Entities/Candidate.php | UTF-8 | 529 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php namespace HireMe\Entities;
class Candidate extends \Eloquent {
protected $fillable = [];
protected $perPage = 10;
public function user()
{
return $this->hasOne( 'HireMe\Entities\User', 'id', 'id' );//el candidato con id=3 esta relacionado con el usuario id=3
}
public function category()
{
return $thi... | true |
147c85dd75c514a8351ea59804c52f223a368e2e | PHP | MrFibunacci/Framy | /app/framework/Component/Config/Config.php | UTF-8 | 1,430 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Framey Framework
*
* @copyright Copyright Framey
*/
namespace app\framework\Component\Config;
use app\framework\Component\StdLib\SingletonTrait;
use app\framework\Component\StdLib\StdLibTrait;
/**
* This class is used to interact with config files
*
* @package app\frame... | true |
63854e641ecd34cdd930951e5a42260515dacd2c | PHP | alan-hall26/paperless_repair | /graph.php | UTF-8 | 3,364 | 2.625 | 3 | [] | no_license |
<?php
include('header.php');
?>
<style>
table, th, td {
border: 0px solid black;
width:25%;
}
</style>
<?php
$month = $_GET["month"];
$year = $_GET["year"];
$pre = $_GET["db"];
$data = "$dir\\$pre\\repair_db.sqlite3";
$conn = new SQLite3($data) ;
if (empty($pre)){
echo "please select board code";
}
else {
if ... | true |
bbe84ba2c68b0d9d39a5b754322a43376be50c64 | PHP | franckysolo/scales-calculator | /ScaleCalculator.php | UTF-8 | 4,559 | 3.203125 | 3 | [] | no_license | <?php
/**
* @category ScaleCalculator - PHP class for calculate musics scales
* @version 1.0.0
* @author franckysolo <franckysolo@gmail.com>
* @license http://creativecommons.org/licenses/by-sa/3.0/ CC BY-SA 3.0
* @package scale-calculator
* @filesource ScaleCalculator.php
*/
class ScaleCalculator {
/**
... | true |
277046efe38af37f07b95fd3a598811a5de84bf7 | PHP | NoelBradford/Tournament-Factory | /src/Entity/TFMatch.php | UTF-8 | 4,814 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\TFMatchRepository")
*/
class TFMatch
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column... | true |
96c0651313b3a1f7dc5b912dccba2ecb0dad4d28 | PHP | robksawyer/api_generator | /Test/Case/Lib/FunctionDocumentorTest.php | UTF-8 | 2,184 | 2.8125 | 3 | [] | no_license | <?php
App::import('Lib', 'ApiGenerator.FunctionDocumentor');
/**
* my_random_test_function
*
* @param string $param this is a param
* @param string $one this is one
* @param string $two this is two
* @return void
*/
function my_random_test_function($param, $one = 'foo', $two = 'param') {
}
/**
* FunctionDocume... | true |
32e5599ea562231c9735a17f550a551d1ab74ef4 | PHP | VISPdevteam/UBO-API-SDK-PHP | /lib/Model/ApiTokenPayload.php | UTF-8 | 7,828 | 2.75 | 3 | [] | no_license | <?php
namespace Ubo\Client\Model;
use \ArrayAccess;
class ApiTokenPayload implements ArrayAccess
{
/**
* The original name of the model.
* @var string
*/
protected static $uboModelName = 'ApiToken_payload';
/**
* Array of property to type mappings. Used for (de)serialization
... | true |
39ea06df18e4a76964be471dd5aa9e72b135a917 | PHP | mleong25/eecs448-lab05 | /exercise06/ViewUserPosts.php | UTF-8 | 556 | 2.53125 | 3 | [] | no_license | <?php
$mysqli = new mysqli("mysql.eecs.ku.edu", "m723l052", "yuuCoh4r", "m723l052");
$user = $_POST["user"];
echo "<h1>Posts from " . $user . "</h1>";
$query = "SELECT * FROM Posts WHERE author_id = '$user';";
if ($result = $mysqli->query($query)) {
echo "<table>";
while ($row = $result->fetch_assoc())
{
echo "... | true |
41f121ea3e2c4cf7ed3472ec99248a6da3247ec9 | PHP | LacunaSoftware/PkiExpressPhp | /src/CadesSignatureStarter.php | UTF-8 | 10,624 | 3.125 | 3 | [] | no_license | <?php
namespace Lacuna\PkiExpress;
/**
* Class CadesSignatureStarter
* @package Lacuna\PkiExpress
*
* @property $encapsulateContent bool
*/
class CadesSignatureStarter extends SignatureStarter
{
private $fileToSignPath;
private $dataFilePath;
private $dataHashesPath;
private $_encapsulateContent... | true |
fcece29911f331cc8b46dd8aae3104de4fe3022c | PHP | KonstantinFilin/RandData | /src/examples/datasets/boolean.php | UTF-8 | 411 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
require '../init.php';
$fabric = new \RandData\Fabric\DataSet\Str();
$dataSetInteger = $fabric->create("boolean");
printData("No parameters", $dataSetInteger);
$dataSetInteger2 = $fabric->create("boolean:valTrue=Male;valFalse=Female");
printData("Other names", $dataSetInteger2);
$dataSetInteger3 = $fabric->cr... | true |
aba6211be97cc01c2192384ba7c62bdf06f8c024 | PHP | olvrcrls/brats_capstone | /app/bus_assignment.php | UTF-8 | 646 | 2.515625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class bus_assignment extends Model
{
public $primaryKey = "BusAssignment_Id";
public $table = "busassignment";
public $timestamps = false;
public function buses()
{
return $this->belongsTo(bus::class, 'Bus_Id', 'Bus_Id');
}
public func... | true |
a6f51dcfc770d457859092cd3ab8e6786a673e02 | PHP | Aziz-kabre/gestion-of-bank | /models/transaction.php | UTF-8 | 2,877 | 2.859375 | 3 | [] | no_license | <?php
class transactionmodel{
public $numero_transaction;
public $date_transaction;
public $heure_transaction;
public $montant_transaction;
public $frais;
public $montant_total;
public $expediteur;
public $destinataire;
public $type_transaction;
public $etat_transaction;
public $code_secret;
function ... | true |
b0a40cbf8366a52347ddaef373e6a34fcbf4cbc4 | PHP | walknight/blogEngine | /application/modules/blog/models/blog_model.php | UTF-8 | 9,402 | 2.625 | 3 | [] | no_license | <?php
class Blog_model extends CI_Model
{
// Protected or private properties
protected $_table;
// Constructor
public function __construct()
{
parent::__construct();
// Load needed models, libraries, helpers and language files
$this->load->model('blog/categories_model', 'categories');
$this->_table = $... | true |
a38479e48ae3a64abbab81bfd56b9f21ef765003 | PHP | dbojdo/message-bus-amqp | /src/Listener/Registry/Exception/ListeningNotFoundException.php | UTF-8 | 586 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Webit\MessageBus\Infrastructure\Amqp\Listener\Registry\Exception;
class ListeningNotFoundException extends \OutOfBoundsException
{
/**
* @param string $targetName
* @param int $code
* @param \Exception|null $previous
* @return ListeningNotFoundException
*/
public stati... | true |
329fcb5929272f4573744c7d90a49ba51b8981ef | PHP | ooflorent/molyjam2013 | /assets/maps/tmx2xml.php | UTF-8 | 719 | 2.640625 | 3 | [] | no_license | #!/usr/bin/php
<?php
$dir = new GlobIterator('*.tmx');
foreach ($dir as $file) {
$file = ltrim($file, '/');
$map = '<map>';
$xml = simplexml_load_file($file);
foreach ($xml->layer as $layer) {
$data = preg_replace("/,\n/", "\n", trim($layer->data));
$data = explode("\n", $data);
$map .= '<layer na... | true |
61a94eb8f002956623ae8e2585cef5d98d3b99b7 | PHP | FrancescoDesogus/bellescarpe | /mvc/model/Database.php | UTF-8 | 1,799 | 3.5 | 4 | [] | no_license | <?php
/**
* Classe che contiene variabili e metodi ricorrenti durante l'uso del database
*/
class Database
{
//Web
public static $DB_HOST = 'localhost';
public static $DB_USER = 'bellescarpecod';
public static $DB_PASSWORD = 'albero';
public static $DB_NAME = 'my_bellescarpecod';
... | true |
f266f63b2393219ab86f846a14299209ea0cdf57 | PHP | pasqualeSamuele/info | /vettore/pasqualeVettore.php | UTF-8 | 405 | 2.796875 | 3 | [] | no_license | <html>
<head>
<title>Profeti</title>
</head>
<body>
<?php
//vettore
$profeti = ['Elia', 'Geremia', 'Ezechiele ', 'Daniele', 'Osea', 'Gioele', 'Amos', 'Abdia', 'Giona', 'Michea', 'Naum', 'Abacuc', 'Sofonia', 'Aggeo', 'Zaccaria ', 'Malachia'];
echo "vettore Profeti :" . '<br>';
foreac... | true |
fdbd5a8cee6c1d735faa1b9d6caceeea01dbb3db | PHP | aphay/alfred-office-assist-workflow | /src/ip.php | UTF-8 | 1,402 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
$items = [];
// 获取ip地址,子网掩码,组播地址
exec('ifconfig | grep "inet "|grep -v 127.0.0.1', $out, $stats);
if (!empty($out)) {
$outArr = explode(" ", $out[0]);
if (sizeof($outArr) >= 2) {
$items[] = [
"title" => $outArr[1],
"subtitle" => "本机ip",
"icon" => "icon... | true |
9c72ddd3afee7a931c71fba427c57c36562317e9 | PHP | brunofalcaodev/eduka | /src/Mail/ResetYourPassword.php | UTF-8 | 1,486 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Eduka\Mail;
use Eduka\Models\User;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class ResetYourPassword extends Mailable implements ShouldQueue
{
use Queueable, SerializesModels;
public $link;
... | true |
e748b50dedc395ef982dc3a5cc33213fc92a017c | PHP | becksonq/Yboard2 | /extensions/YoutubeHelper.php | UTF-8 | 1,190 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
Yii::import('application.vendors.*');
require_once('youtube.php');
class YoutubeHelper {
/**
* Save video to youtube.
* @param Bulletin $model
* @param CUploadedFile $video
*/
public static function processBulletin($model, $video) {
if (!empty($video)) {
if (is... | true |
5c811459a8e1ef5fb290f7c9208e57ccc1be0147 | PHP | alinpop/Scrabble | /backend/tests/Unit/Application/DisplayBoardServiceTest.php | UTF-8 | 729 | 2.609375 | 3 | [] | no_license | <?php
namespace MySelf\Scrabble\Tests\Unit\Application;
use MySelf\Scrabble\Application\DisplayBoardService\DisplayBoardService;
use MySelf\Scrabble\Domain\Boards\Board;
use MySelf\Scrabble\Domain\Boards\SquareFactory;
use MySelf\Scrabble\Domain\Letters\Letter;
use PHPUnit\Framework\TestCase;
class DisplayBoardServi... | true |
3147f6b3058cf38d5bd4bb4be2e659e6ab45d117 | PHP | Dric/Onawes | /classes/Content/Theme.php | UTF-8 | 6,235 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Dric
* Date: 24/01/2016
* Time: 14:58
*/
namespace Content;
use FileSystem\File;
use FileSystem\Fs;
use Template;
class Theme {
protected $title = 'Administration';
/**
* @var string[]
*/
protected $cssFiles = array();
protected $path = null;
protected $urlTheme... | true |
9d3d548e57a0b4e3b0cd8dafda937ce826a390f4 | PHP | RadmirXAn/Quick_Resto | /test_3.php | UTF-8 | 709 | 2.8125 | 3 | [] | no_license | <?php
// Создайте таблицу: city_id, city_name, city_forecast
$result = "Сервис недоступен";
//Замените на актуальные значения
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "radmirxan";
@$conn = new mysqli( $servername, $username, $password, $dbname);
if (!$conn->connect_error) {
$resul... | true |
c7ca96ca1434e8a9dc36212205f728e75ae4d248 | PHP | bssphp/dto | /src/Exceptions/InvalidDeclarationException.php | UTF-8 | 373 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace bssphp\dto\Exceptions;
use bssphp\dto\Property;
class InvalidDeclarationException extends \RuntimeException
{
public static function fromProperty(Property $property): self
{
return new self("The property `{$property->getName()}` has been declared as nullable ... | true |
b709d03e0dc943dd510e4756fa713b5ccaa89632 | PHP | onachassi/Laravel-eCommerce | /app/Http/Controllers/ProductController.php | UTF-8 | 1,313 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Product;
use Illuminate\Http\Request;
/**
*
*/
class ProductController extends Controller
{
// all products
public function getShop()
{
$products = Product::all();
return view('shop')->with('products', $products);
}
// product show page
public function showPr... | true |
5c1436420920917f388f3ed7db6b74140785a155 | PHP | jonit-dev/empregueme | /cron_jobs/date_management.php | UTF-8 | 1,039 | 3 | 3 | [] | no_license | <?php
class date_management
{
function gera_data($time_unix,$formato,$com_horario = false,$delimiter = "-")
{
$data = getdate($time_unix);
if($com_horario == false)
{
$horario = '';
}
if($com_horario == true)
{
$horario = $data['hours'].':'.$data['minutes'].':'.$data['seconds'];
}
... | true |
0ee198ab4af66a263d8b6386109cebe0c64bdaeb | PHP | hecmonn/laso | /adminpis/includes/User.php | UTF-8 | 4,561 | 2.75 | 3 | [] | no_license | <?php //AUTHOR: HECTOR E. MONARREZ ARAUJO
require_once("sessions.php");
require_once("Database.php");
class User {
public $user_id;
public $user_username;
public $supp_name="";
public $supp_id;
public $supp_cont;
public $supp_address;
public $supp_email;
public $supp_cell;
public function __construct(){
$th... | true |
325e1dc6ddcf85aaf99861003c73d3bbad017199 | PHP | nemesis-platform/platform | /src/NemesisPlatform/Modules/Game/Core/Entity/RatingRecord.php | UTF-8 | 1,180 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Pavel
* Date: 2014-05-01
* Time: 17:55
*/
namespace NemesisPlatform\Modules\Game\Core\Entity;
use NemesisPlatform\Game\Entity\Team;
class RatingRecord
{
/** @var int|null */
private $id;
/** @var Team */
private $team;
/** @var Period */
private... | true |
8add4d8ab37a56589504f0e0c8ccd70036ea6cb8 | PHP | sos-mls/MLS-PHPLibrary | /src/RandomString.php | UTF-8 | 3,987 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Contains the RandomString class, simply creates a random string.
*
* @package Common
* @author Christian Micklisch <christian.micklisch@successwithsos.com>
*/
namespace Common;
/**
* RandomString class.
*
* Creates random values from PBKDF2's hasing system and removes unecessary
* characters fr... | true |
3411d1fde80dedfeeaa877c7c9b2bced8c8a06da | PHP | zwmcfarland/MSEF | /src/project_signup_action.php | UTF-8 | 705 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Name: Project signup
* Description:
* This page signs a user up for a project
* Arguments:
* None
* Modifications:
* 11/09/2014 - Created file.
* 12/12/2014 - Created Comments.
*/
///Ensure we can get to session variables.
... | true |
8f5ac6ed1e0ad3fe95b52c336f8cfe5c337fa2ad | PHP | thgsantos16/pocketManager | /actions/login.php | UTF-8 | 703 | 2.640625 | 3 | [] | no_license | <?php
session_start();
include "../common/conn.php";
$error = "";
$user = $_POST['user'];
if(empty($user)) $error .= "<p>User is Required!</p>";
$pass = $_POST['pass'];
if(empty($pass)) $error .= "<p>Password is Required!</p>";
if($error == "") {
$sql = "SELECT * FROM users WHERE user = '".$user."' AND pass = '"... | true |
e462bed0eed4992f2e3011b4aaf4688102785b27 | PHP | quytcam2107/do_an_1 | /customer/modules/common/change_profile.php | UTF-8 | 3,701 | 2.625 | 3 | [] | no_license | <?php
$error = $success ='';
$id = $_SESSION['user']['id'];
$sql = "SELECT * FROM customer WHERE id = '$id'";
$result = mysqli_query($conn,$sql);
if ($result == false) {
echo "ERROR".mysqli_error($conn);
}else if(mysqli_num_rows($result) == 1){
$row = mysqli_fetch_assoc($result);
$name = ... | true |
996443c2310faf3fefdb3d05b258b2125329a8e7 | PHP | 25ji/Flowpack.TwitterApi | /Classes/Authentication/TwitterOAuthProvider.php | UTF-8 | 5,371 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Flowpack\TwitterApi\Authentication;
use TYPO3\Flow\Annotations as Flow;
use TYPO3\Flow\Http\Client\RequestEngineInterface;
use TYPO3\Flow\Http\Request;
use TYPO3\Flow\Http\Uri;
use TYPO3\Flow\Reflection\ObjectAccess;
use TYPO3\Flow\Security\Account;
use TYPO3\Flow\Security\AccountRepository;
use TYPO3\... | true |
654ce71f60978b568350ce335e0332d8dbc9ee4c | PHP | andrewl/brewery_stats | /send_brewery_readings.php | UTF-8 | 1,679 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
require 'vendor/autoload.php';
use Aws\DynamoDb\Exception\DynamoDbException;
use Aws\DynamoDb\Marshaler;
date_default_timezone_set('UTC');
try {
$required_env_vars = [
'FERMENTRACK_URL',
'AWS_REGION',
'DYNAMODB_TABLE'
];
foreach($required_env_vars as $env_var) {
if (empty(getenv($env_va... | true |
5ab32c530c7345137cc51b15c60c35d930ae628c | PHP | ninggf/wula-common | /common.php | UTF-8 | 27,689 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/**
* 从数组取值,如果数组中无指定key,则返回默认值.
*
* @param string $name
* @param array $array
* @param mixed $default
*
* @return mixed
*/
function aryget($name, array $array, $default = '') {
if (isset ($array [ $name ])) {
return $array [ $name ];
}
return $default;
}
/**
* 将以',',' ',' ','-',';... | true |
798e3e97d227330b66b972ae981e36f83b7adaf3 | PHP | aramboyajyan/drupal8-boilerplate | /drush/boilerplate.drush.inc | UTF-8 | 1,392 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @file
* Drush integration.
*/
/**
* Implements hook_drush_command().
*/
function boilerplate_drush_command() {
$items = [];
// The key in the $items array is the name of the command.
$items['boilerplate'] = [
'callback' => 'drush_boilerplate_callback',
'description' => dt('Sample Drush... | true |
70a9544ec7f4b8cd6ff1f6dc25d9c9d2a4a851c4 | PHP | kunalmestri9/websocket-core | /com/laurus/core/websocket/WSMainServer.inc | UTF-8 | 803 | 2.59375 | 3 | [] | no_license | <?php
import("com.laurus.core.websocket.WebSocketConfigurationReader");
import("com.laurus.core.websocket.ServerInitiator");
/**
* Description of WSMainServer
*
* @author Kunal Mestri
*/
class WSMainServer {
private $config;
private $logger;
public function __construct() {
$this->l... | true |
ac4703ca15ee5eb757789f6da504b610e767b49b | PHP | ssriera/Codeup_Excercises | /search_arrays.php | UTF-8 | 683 | 3.328125 | 3 | [] | no_license | <?php
// first names
$names = ['Tina', 'Dana', 'Mike', 'Amy', 'Adam'];
$compare = ['Tina', 'Dean', 'Mel', 'Amy', 'Michael'];
$needle = 'Tina';
function findname($result) {
if ($result == 'Tina') {
return 'TRUE';
echo "You found: {haystack[$result]}" . PHP_EOL;
} else {
return 'FALSE';
}
}
echo fi... | true |
73536a72a5aa6022355eef6cf06e18d2e685d49f | PHP | bulgariamitko/SoftUniHomeWordsAndMore | /3.0PHPFundaments/09OOPAdvanced/03ferrari.php | UTF-8 | 1,430 | 3.265625 | 3 | [] | no_license | <?php
interface IFerrarable
{
public function useBrake();
public function pushPedal();
}
Class Ferrari implements IFerrarable
{
protected $driver;
protected $model;
public function __construct($driver, $model = "488-Spider")
{
$this->driver = $driver;
$this->model = $model;
}
/**
* Gets the valu... | true |
7d9e3ca654472e84cab06e04b285e47606bd316e | PHP | seclu/statemachine | /StateMachine/StateInterface.php | UTF-8 | 1,966 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the state_machine package
*
* (c) Michal Wachowski <wachowski.michal@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace StateMachine;
/**
* Interface StateInterface implemented by all ... | true |
58c477ca3a9c9de5d2d5bbe090d173042362a36a | PHP | Zepcon/quiz | /quiz_achievement_normal.php | UTF-8 | 11,029 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
/**
* We extend the normal quiz with new functions like achievements and management of the achievements
* Class quiz_achievement_normal
*/
class quiz_achievement_normal extends quiz_control implements iAchievement
{
//class variables
public $achieve_array = [[], [], [], [], [], []];
public $achiev... | true |
9ffae92666fc4608aa2415b83c7318a518f7c61b | PHP | veridu/idos-sdk-php | /src/idOS/Auth/StringToken.php | UTF-8 | 893 | 3.34375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace idOS\Auth;
class StringToken extends AbstractAuth {
/**
* The token name.
*
* @var string
*/
private $name;
/**
* The token.
*
* @var string
*/
private $token;
/**
* Class constructor.
*
* @param st... | true |
c417ed9a6f69e0a677f12d424316a69af99dabb3 | PHP | santymoreira/frwsmartq | /apps/smartq-voces/controllers/servicio_controller.php | UTF-8 | 20,502 | 2.53125 | 3 | [] | no_license | <?php
/**
* Controlador Servicio
*
* @access public
* @version 1.0
*/
class ServicioController extends ApplicationController {
/**
* id
*
* @var int
*/
public $id;
/**
* nombre
*
* @var string
*/
public $nombre;
/**
* letra
*
* @var str... | true |
64909cc375ccd0de9b1f69be6b15fab249b4414f | PHP | valentinefrolov/evo | /vendor/evo/Interfaces/Module.php | UTF-8 | 705 | 2.546875 | 3 | [] | no_license | <?php
namespace Evo\Interfaces;
interface Module
{
function __construct($config);
function render($content); // вывод
function load(); // загрузка блоков / компонентов
function getController(); // возвращает объект контроллера
function getAction(); // возращает название метода контроллера
func... | true |
719002f4d2b7db5b37b8eb05e66a58d26722d3e0 | PHP | phpbench/phpbench-reports | /src/Framework/Auth/Provider.php | UTF-8 | 353 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Framework\Auth;
use League\OAuth2\Client\Provider\ResourceOwnerInterface;
use League\OAuth2\Client\Token\AccessToken;
interface Provider
{
public function resourceOwner(AccessToken $token): ResourceOwnerInterface;
public function accessToken(string $code): AccessToken;
public functi... | true |
1f08f2421b159d4d452bf173e5554833a9691f97 | PHP | EvgeniyLitvin/RED | /core/lib/MySQL.php | UTF-8 | 2,860 | 2.625 | 3 | [] | no_license | <?php
class MySQL extends RED{
public $host;
public $name;
public $login;
public $pass;
public $SQL;
public $tables;
public $db;
function __construct(){
$var=array_filter(explode('/',file_get_contents("resourses/conf/database.conf")));
$link=mysql_connect($var[3], $var[1], $var[2]);
$db=mysql_select_db(... | true |
bbf827b63af8a2e32b28adbf6966262dda7f3d60 | PHP | omerkocaoglu/SMSService | /src/ServiceBase.php | UTF-8 | 533 | 2.703125 | 3 | [] | no_license | <?php
namespace OmerKocaoglu\SMSService;
use OmerKocaoglu\SMSService\Error\ErrorDetailModel;
use OmerKocaoglu\SMSService\Error\ErrorDetailInterface;
class ServiceBase implements ErrorDetailInterface
{
/**
* @param int $status_code
* @param string $message
* @return ErrorDetailModel
*/
pub... | true |
d665a66551b4cace71c4b8cd12dcd5434bcfc546 | PHP | tranthienbinh1989/zcpe | /querystring.php | UTF-8 | 927 | 2.890625 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of querystring
*
* @author thienbinh
*/
$firstName = "John";
$homePage = "http://www.example.com/";
$f... | true |
28cf60c3e45e533e74c14e52fc8636cbd4c03be3 | PHP | gargn3/githubTest- | /posts/app/View/Posts/view.ctp | UTF-8 | 1,361 | 2.59375 | 3 | [] | no_license | <!-- File: /app/View/Posts/view.ctp -->
<div class = 'posts form'>
<h1><b><label><?php echo h($post['Post']['title']); ?></label></b></h1>
<fieldset>
<p></p>
<p><?php echo($post['Post']['body']); ?></p>
<small><?php echo 'Created by '.$post['Post']['user_name'].' on '.$post['Post']['created']; ?></small>
</fieldset>... | true |
7ead4e0d1141b420c1d9f44ac2409ab62dbd8b40 | PHP | 15302160404/tp5 | /application/index/controller/NoticeController.php | UTF-8 | 2,135 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\index\controller;
use think\Controller;
/**
*
*/
class NoticeController extends Controller
{
/**
* 显示记录
* @return [type] [description]
*/
public function index()
{
$notices = model('notice')->getNotice();
return $this->fetch('',['notices'=>$notices]);
}
/**
* 添加记录
*/
public fun... | true |
90109b70f81f0ac99b384857a67e97532e0d0d48 | PHP | g23guy/lab-system | /web/form-os-static.php | UTF-8 | 366 | 2.546875 | 3 | [] | no_license | <?PHP
include 'form-os-array.php';
if ( isset($static_os) ) {
foreach ( $os_array as $this_os ) {
if ( $static_os == $this_os ) {
echo " <OPTION SELECTED>$this_os</OPTION>\n";
} else {
echo " <OPTION>$this_os</OPTION>\n";
}
}
} else {
foreach ( $os_array as $this_os ) {
echo " <OPTION>$this_... | true |
effdf2cf02e7f7963534f4e773955829bff24dbd | PHP | mikekeesee/LCG-KC-Weekend-Website | /db-sub-reg-housing-guests.php | UTF-8 | 1,662 | 2.734375 | 3 | [] | no_license | <?php
// Get the database connection information
include("db-connect.php");
$id = $_GET['id'];
$link = mysqli_connect(localhost, $username, $password, $database);
$SQL = " SELECT r.registration_id as reg_id,
IFNULL(p.first_name, 'Not Specified') as first_name,
p.last_name,
IFNULL(p.email, 'None')... | true |
f6b732a0af1ce5df862ef12efb1d86613fa65073 | PHP | AndeGrotto/Gerenciador-de-Estoque | /Programa/Model/CategoriaDAO.php | UTF-8 | 2,879 | 3.296875 | 3 | [] | no_license | <?php
class CategoriaDAO {
public $c = null;
public $erro = null;
public function __construct() {
$this->c = new Conect_BD();
$this->c->exec("set names utf8");
}
public function Inserir($categoria){
try {
$stmt = $this->c->query("SELECT * FROM categoria WHERE nome = '$categoria->nome'... | true |
1f10734d887420c22876af3a2fb97bf116a1cce6 | PHP | Aarif123456/hogwartslibraryAPI | /repository/renewRepo.php | UTF-8 | 2,252 | 2.671875 | 3 | [] | no_license | <?php
/* Imports */
require_once __DIR__ . '/error.php';
require_once __DIR__ . '/fineCalculator.php';
require_once __DIR__ . '/statusConstants.php';
function renewBook($renewerID, $bookBarcode, $conn, $debug = false)
{
try {
return
$conn->beginTransaction() &&
/* calculating overd... | true |
c15281d17f01e8fd5dcc8a43e64cbea2a7dd00d8 | PHP | rewake/babs | /src/AliasBuilder.php | UTF-8 | 1,743 | 3.09375 | 3 | [] | no_license | <?php
namespace Rewake\AliasBuilder;
use RecursiveArrayIterator;
/**
* Class AliasBuilder
* @package Rewake
*/
class AliasBuilder
{
/**
* @var array
*/
protected $aliases;
/**
* Parses alias config files in aliases directory and generates
* proper aliases, which are stored in $t... | true |
d5be0c7bff7ca156ebde208578118d156e2927ac | PHP | gribblee/Text-Qualifier | /app/Http/Middleware/LanguageCookieCheck.php | UTF-8 | 2,348 | 2.75 | 3 | [] | no_license | <?php
namespace Qualifier\Http\Middleware;
use Closure;
/**
* Class LanguageCookieCheck
* Requires domain value from config/app.php
*
* @package DatabaseBrowser\Http\Middleware
*/
class LanguageCookieCheck {
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
... | true |
fa51c5386da1ddbb1f492eb8bf1bd1ab70dfc29d | PHP | fernando2892/corredor | /ApiCorredor/app/financiamiento.php | UTF-8 | 1,433 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use DB;
use Illuminate\Database\Eloquent\Model;
class financiamiento extends Model {
//
protected $table = 'financiamiento';
public $id;
public $inicial;
public $cuotas;
/**
* Gets the value of id.
*
* @return mixed
*/
public function getId() {
return $this->id;
}
/**
* ... | true |
7751f80f6c44d5ae3655b2cf9b69a19a57222817 | PHP | fredochieng/ticketing-system | /database/migrations/2020_06_17_093742_create_tickets_table.php | UTF-8 | 1,019 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTicketsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tickets', function(Blueprint $table)
{
$table->bigInteger('ticket_id', true... | true |
c786457e79339606d2b8962bfb6704a3eca2a63a | PHP | vulcandigital/silverstripe-pagefeedback | /src/Extensions/PageFeedbackExtension.php | UTF-8 | 1,985 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Vulcan\PageFeedback\Extensions;
use SilverStripe\Forms\FieldList;
use SilverStripe\Forms\GridField\GridField;
use SilverStripe\Forms\GridField\GridFieldConfig_RecordViewer;
use SilverStripe\Forms\ReadonlyField;
use SilverStripe\ORM\DataExtension;
use SilverStripe\ORM\HasManyList;
use Vulcan\PageFeedba... | true |
d14ae41377c1051e20b77f597cd340b187a98225 | PHP | joeldevlearning/sloganwall-db | /app/Models/SloganRequest/SloganRequestInterface.php | UTF-8 | 396 | 2.828125 | 3 | [] | no_license | <?php
namespace App\Models\SloganRequest;
use Illuminate\Http\Request;
/**
* Interface SloganRequestInterface
* @package App\Models\SloganRequest
*/
interface SloganRequestInterface
{
/**
* @return string
*/
public function getInput() : string;
/**
* SloganRequestInterface constructor.
*
* @param st... | true |
8e1463d09faf5d1b41f1b8a7c8e5bce17a3c08ab | PHP | ca7erina/php-exampe | /diary.php | UTF-8 | 3,670 | 2.78125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/lab6/diary_style.css">
<script type="text/javascript" src="/lab6/diary.js"></script>
<title>Diary</title>
</head>
<body>
<div id = 'warn'>
<?php
if (isset($_POST["submit"])){
$servername = "localhost";
$username = "root";
... | true |
0b269375d6e267d8285a81c512b7b97f796eb43c | PHP | satiric/lift | /src/Movement/Engine/Service/EngineCalculatorInterface.php | UTF-8 | 561 | 2.71875 | 3 | [] | no_license | <?php
/**
* Date: 14.09.19
* Time: 21:15
* @author Konstantin Maruhnich <nocturneumbra@gmail.com>
* Runple
*/
namespace Decadal\Lift\Movement\Engine\Service;
use Decadal\Lift\Movement\Engine\Collection\EnginesCollection;
/**
* Interface EngineCalculatorInterface
* @package Decadal\Lift\Movement\Engine\Servic... | true |
22e146a3e439e81de1e576ab9931103ee9d49736 | PHP | txmiao/yuanhang-laravel | /app/Models/PartnerStore.php | UTF-8 | 697 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Models;
use App\Transformers\PartnerStoreTransformer;
use Illuminate\Database\Eloquent\Model;
class PartnerStore extends Model
{
protected $table = 'partner_stores'; //合伙人商铺表,Cart 模型为了展示店铺分类而构建,保证数据完整性
protected $guarded = ['_token'];
public function order()
{
return $thi... | true |
887ac01788f957390e7d34f0970f841dd2b5e007 | PHP | michael-dev/polling-station | /lib/database.php | UTF-8 | 1,189 | 2.734375 | 3 | [] | no_license | <?php
require_once "config.php";
function dblog($msg) {
execStm(newStm("INSERT INTO auszaehllog (message) VALUES (:msg)"), Array(":msg" => $_SERVER['REMOTE_ADDR'].":".$msg));
}
function login() {
global $pdo, $db_uri;
try {
$pdo = new PDO(
$db_uri,
$_SERVER['PHP_AUTH_USER'],
$_SERVER['PHP_AUTH_PW... | true |
053b88cda6d31bc4554f61e5c27500686d68f25e | PHP | alexfio/concursos | /app/Model/Repositories/CandidatosRepositoryInterface.php | UTF-8 | 302 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Concursos\Model\Repositories;
interface CandidatosRepositoryInterface {
public function findBy(string $coluna, string $valor) : array;
public function findByCriteria(array $criterios, int $offset, int $limit) : array;
public function saveOrUpdate(array $dados) : int;
}
| true |
4f64562445720e629e28dd8c28fb3d63f7f336fe | PHP | anbentley/LXF | /library/crypt.php | UTF-8 | 2,990 | 3.046875 | 3 | [] | no_license | <?php
/**
* CRYPT provides a generalized encryption solution by providing a simplified interface to the mcrypt PHP module.
*
* @author Alex Bentley
* @history 1.0 initial release
*/
class CRYPT {
/** encrypt a complete block of data
*
* @param $data data
* @param $key
* @param $base64 base64 encode
... | true |
e55dad7be6934d6c489e155342ed3f1e789dc88a | PHP | Spherepack/bot-creator | /src/Traits/KeyboardTrait.php | UTF-8 | 538 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Bot\Traits;
trait KeyboardTrait
{
public function setKeyboard(array $array, $resize = true, $oneTime = true)
{
$replyMarkup = json_encode([ 'keyboard' => [$array], 'resize_keyboard' => $resize, 'one_time_keyboard' => $oneTime ], JSON_UNESCAPED_UNICODE);
$this->addField('reply_m... | true |
9548e800668347bece7c113c9c2cc8fef76d3358 | PHP | leanbs/php2 | /app/Merk.php | UTF-8 | 960 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Merk extends Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'master_merk';
/**
* Override default primary key used by laravel ('id')
*
* @var string
*/
... | true |
5b5bc9ea95a18893faf0c930b65fe9ea573c5f2b | PHP | xbrny/FYP-using-PHP | /core/surveys_operation.php | UTF-8 | 2,871 | 2.546875 | 3 | [] | no_license | <?php
// --------------------surveys----------------------
function getSurveys() {
global $db;
$sql = "SELECT * FROM surveys ORDER BY id DESC";
$surveys_result = $db->query($sql) or die("Select surveys failed: " . mysqli_error($db));
return $surveys_result;
}
function getSurvey($id) {
global $db;
$sql = "SE... | true |