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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ca6b32a78b22430f0d015edbf4ac8d1e2ba0c88e | PHP | jaimevendrame/pronap2 | /app/Models/Painel/Role.php | UTF-8 | 565 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models\Painel;
use App\Models\Painel\Permission;
use Illuminate\Database\Eloquent\Model;
class Role extends Model
{
//Declara quais atributos o usuario nao pode inserir
protected $guarded = ['id','action'];
//Declara as regras para submissao de dados
public $rules = [
'nam... | true |
07a4ac97a163a4105eba62b648508304a7770b1e | PHP | NeilHoang/classicmodels | /index.php | UTF-8 | 1,405 | 2.703125 | 3 | [] | no_license | <?php
include_once "Class/DBConnect.php";
include_once "Class/manager.php";
include_once "Class/classManager.php";
$manager = new classManager();
$student = $manager->getAll();
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-sc... | true |
4a39ce0c93fa89452b4ac0941faba32293062efe | PHP | lulinyang/pedigree-api | /app/Repositories/Eloquent/CommentRepository.php | UTF-8 | 3,832 | 2.671875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Repositories\Eloquent;
use GuzzleHttp\Client;
use Illuminate\Container\Container as App;
use DB;
class CommentRepository extends Repository
{
public function __construct(Client $http, App $app)
{
parent::__construct($app);
$this->http = $http;
... | true |
f5f183d4f7366b4a95f0e6aa61cad361bb873149 | PHP | ogueta93/vascoframework | /app/core/database/VascoStatement.php | UTF-8 | 967 | 3.015625 | 3 | [] | no_license | <?php
namespace Core\database;
/**
* VascoStatement Class
**/
class VascoStatement extends \PDOStatement
{
/* Constants */
/* Object Properties */
/* Class Properties */
public $dbh;
/* Default Constructor */
protected function __construct( $dbh )
{
$this->dbh = $dbh;
}
/**
* Se... | true |
8d2b1f444a103c5ee05ce36804cedfd0fe3c12dc | PHP | piter75git/simple-test-api | /app/Services/Timezone.php | UTF-8 | 2,049 | 3.171875 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace App\Services;
use DateTime;
use DateTimeZone;
class Timezone
{
/**
* Current datetimezone object.
*
* @var DateTimeZone|null
*/
private $datetimezone;
/**
* Set the PHP DateTimeZone object
* based on given timezone.
*
* ... | true |
48fdd9fb2f3c8928ea31481556577f0001efd4f1 | PHP | lbausch/php-ceph-radosgw-admin | /src/Client.php | UTF-8 | 3,655 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace LBausch\CephRadosgwAdmin;
use Aws\Credentials\Credentials;
use Aws\S3\S3Client;
use GuzzleHttp\Client as HttpClient;
use GuzzleHttp\ClientInterface as HttpClientInterface;
use GuzzleHttp\HandlerStack;
use InvalidArgumentException;
use LBausch\CephRadosgwAdmin\Middlewares\SignatureMiddleware;
use LBaus... | true |
f1eaa3dce17486f221db87574569043b3e7d8f93 | PHP | HKZ99/HKZ99 | /Medical Centre Website/MedicalNotes.php | UTF-8 | 1,547 | 2.828125 | 3 | [] | no_license | <?php
session_start();
include("Connect.php");
if ( isset( $_SESSION['doctor'] ) )
{
} else
{
header("location: doctor.php");
}
if(isset($_POST['submit'])){
$Name = $conn->real_escape_string($_REQUEST['Medicinename']);
$Instructions = $conn->real_escape_string($_REQUEST['Instructions'])... | true |
204f6f277590b151fc491632fce72b44023d3260 | PHP | MarHai/dissertation | /rest/lib_get.php | UTF-8 | 10,542 | 2.5625 | 3 | [] | no_license | <?php
/**
* TOC
* - latest
* - find/{sQuery}
* - ping
* - mention/{nUid} setup mentions post-hoc for given nSnsId and return mentions
* + list all from one table
* - media
* - sns
* + get specific entry from one table including its children
* - article/{nArtId}
* - media/{nMedId}
* - homepage/{nH... | true |
829a6087c182d5f46f406d71888c721f34e7e484 | PHP | erikgreasy/webtech2-zadanie6-API | /app/models/Holiday.php | UTF-8 | 1,747 | 3.09375 | 3 | [] | no_license | <?php
namespace app\models;
use database\repositories\DayRepository;
class Holiday implements \JsonSerializable {
private $id;
private $name;
private $country_id;
private $day_id;
/**
* Get the value of name
*/
public function getName()
{
return $this->name;
}
... | true |
9af9b772614b71fd46d255b10ce63f7ee8e7bc70 | PHP | cns-connect/gstandaard-bundle | /Model/map/GsRzvAanspraakTableMap.php | UTF-8 | 4,296 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace PharmaIntelligence\GstandaardBundle\Model\map;
use \RelationMap;
use \TableMap;
/**
* This class defines the structure of the 'gs_rzv_aanspraak' table.
*
*
*
* This map class is used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of ... | true |
f2480125722e75ad5170a02d42bc6acacc91ba4e | PHP | celial-net/DreamJournal | /migrations/m200201_190331_add_dream_period_account_setting.php | UTF-8 | 516 | 2.515625 | 3 | [] | no_license | <?php
use yii\db\Migration;
/**
* Class m200201_190331_add_dream_period_account_setting
*/
class m200201_190331_add_dream_period_account_setting extends Migration
{
// Use up()/down() to run migration code without a transaction.
public function up()
{
$this->addColumn('dj.account_settings', 'default_d... | true |
2ef0d1c685458b6998c503a183568e5bc9536f43 | PHP | chrismathew87/test | /test-signup-review.php | UTF-8 | 4,010 | 2.59375 | 3 | [] | no_license | <?php
session_start();
include 'functions.php';
$teacherName = '';
$className = '';
$testName = '';
$test_date = $_SESSION["selected_date"];
$test_slot = $_SESSION["selected_slot"];
$res=mysql_query("SELECT time_slot_id FROM time_slots WHERE test_date='$test_date' AND test_slot='$test_slot'");
$ro... | true |
20ae60fd71585861bde11cae17fe63a5c9cf777b | PHP | basil16/imageUploader | /model/FormValidation.php | UTF-8 | 2,416 | 3.421875 | 3 | [] | no_license | <?php
/*----------------------
* Description: This class will support the form fields for validation purpose.
*--------------------*/
class FormValidation
{
private $errors = array();
public function __construct()
{
}
/*----------------------------------------
* @desc The function will check if use... | true |
6290cbf9dbecec703ed7809d130975b6a0132189 | PHP | Leinh/exercice_PHP_bibliotheque | /site_livres/contentPret.php | UTF-8 | 3,502 | 2.953125 | 3 | [] | no_license | <h1 class="titreContenu">Prêts:</h1>
<?php
// Tout d'abord, on va se connecter à la base de données:
$mysqli = new mysqli("localhost", "root", "root", "dblivre");
// Le menu déroulant du livre:
$requete = 'select id,titre
from
livre;'
;
// On créé un formulaire qui va envoyer la sélection pour en manipuler les donn... | true |
609f0c29bce9613c29bf6b7e982da4f376146f38 | PHP | ingcabo/P_D_Templates | /Creation/singleton/singleton_a.php | UTF-8 | 506 | 3.078125 | 3 | [] | no_license | <?php
//singleton
class Log{
private static $INSTANCE = NULL;
private function __construct(){
//codigo para el constructor
}
public funtion getInstance(){
//si nuestra variables INSTANCE es una instancia de nuestra clase log
if(self::$INSTANCE instanceof LOG){
return self::$INSTANCE;
}else{
//reg... | true |
077eb38b92ab5e76e9859871e76b2ed2093861d6 | PHP | andrkuu/veebiprogrammeerimine | /tund14/news.php | UTF-8 | 2,550 | 2.53125 | 3 | [] | no_license | <?php
require("../../../config.php");
require("functions_news.php");
require("functions_main.php");
$error = null;
$newsTitle = null;
$newsContent = null;
$expiredate = null;
$titleError = null;
$contentError = null;
$dateError = null;
require("classes/Session.class.php");
SessionManager::sessionStart("vp",0,"/~andr... | true |
d5ea258ad68185eb46ef31511cdb50c403ee5b97 | PHP | Spe11/test-drugs | /app/Http/Requests/SubstanceRequest.php | UTF-8 | 718 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
/**
* @property string $name
* @property bool $visible
*/
class SubstanceRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function au... | true |
d92843aa9d276ee16706358260f76e83ded91a82 | PHP | pkodal/keystone | /engine/install/SchemaUpdater.inc | UTF-8 | 591 | 2.5625 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
class SchemaUpdater
{
/** @var SchemaTool*/
private $tool;
/** @var EntityManager*/
private $entityManager;
public function __construct()
{
$this->entityManager = Registry::g... | true |
8eb4e4a520c53b6970581a3843126eefca6edff9 | PHP | anroots/kohana-diagnostic | /classes/controller/maintenance/diagnostic.php | UTF-8 | 1,122 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php defined('SYSPATH') or die('No direct script access.');
/**
* Example controller for Kohana-Diagnostic.
* The controller extends the Diagnostic module's abstract controller and
* contains a number of `test_` methods. All methods prefixed by `test_` will be
* automatically called by the parent class.
* Each te... | true |
29433c7fdfeee50da86c2daffefb78ad33071b44 | PHP | zhyale/book1 | /code/Ch06-vulnweb/Case18-MULTI-SQL.php | UTF-8 | 686 | 2.765625 | 3 | [] | no_license | <?php
require_once('config.ini.php');
$id=$_GET['id'];
if($id)
{
$conn=mysqli_connect($host,$dbreader,$dbpassword, "vulnweb");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
$SQL="select * from userinfo where id=".$id... | true |
01a11cba8c72ed6a6bdb0f5a262faf204df16e2f | PHP | Sabrina-baust/cafetionary | /create_json.php | UTF-8 | 796 | 2.515625 | 3 | [] | no_license | <?php
require_once('admin/db/connect.php');
final class createJson{
public static function get_data() {
global $pdo;
$sql="SELECT * FROM foods";
$qry=$pdo->prepare($sql);
$qry->execute();
$rslt=$qry->fetch(PDO::FETCH_BOTH);
//print_r... | true |
a0184295aa3bf6d2dc0dfbe062405d81309a953e | PHP | mythteam/yii2-schedule | /src/Schedule.php | UTF-8 | 1,739 | 2.796875 | 3 | [
"MIT",
"BSD-2-Clause"
] | permissive | <?php
/*
* This file is part of the mytheam/yii2-schedule.
*
* (c) mytheam <mytheam@hotmail.com>
*
* This source file is subject to the BSD license that is bundled
* with this source code in the file LICENSE.
*/
namespace mythteam\schedule;
use yii\base\Component;
use yii\base\Application;
class Schedule ext... | true |
65b155924a042e1934e04d577448372ea8e1303a | PHP | IrfanJulaihi/Litigation-Tracking-System-LiTracks- | /PrintAllSearchStatus.php | UTF-8 | 2,979 | 2.71875 | 3 | [] | no_license | <?php require_once('Connections/localhost.php'); ?>
<?php
session_start();
error_reporting(E_ERROR|E_WARNING);
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ... | true |
d3768060368c161255832e681d4798791ab6beee | PHP | adamhajari/archived | /Foodsy/useadd_dialog.php | UTF-8 | 1,309 | 2.625 | 3 | [] | no_license | <?php
session_start();
//calendar_connect.php includes the following line with appropriate values for
//the calendar mysql database:
// $sqlserver=mysql_connect(HOST,USER,PASSWORD);
// mysql_select_db(DATABASE,$sqlserver);
include("foodsy_connect.php");
if(isset($_SESSION["username"])){
$username = $_SESSION["usernam... | true |
9fff481cbe52c1f8f7d37916142890d3775e7e96 | PHP | dennis-tmeinc/tdweb | /livechinfo.php | UTF-8 | 2,988 | 2.546875 | 3 | [] | no_license | <?php
// livechinfo.php - get live preview channel info
// Requests:
// phone : phone id (for dvr)
// Return:
// json object, array of enabled channel name
// By Dennis Chen @ TME - 2016-12-19
// Copyright 2016 Toronto MicroElectronics Inc.
$nodb=1;
require_once 'session.php' ;
header("x-lchi-1:1");
re... | true |
9f0c12144856261c59490594ee22f0b44b7945a3 | PHP | uniqcle/Yii2 | /frontend/controllers/TestController.php | UTF-8 | 1,672 | 2.640625 | 3 | [] | no_license | <?php
namespace frontend\controllers;
//Подключили глобальный класс Yii
use Yii;
use yii\web\Controller;
use frontend\models\Validation;
class TestController extends Controller
{
public function actionIndex(){
//Получили данные свойства params глобального объекта приложения
$email = Yii... | true |
27d8359f52e2cdbc1936c9f55bc6a3b4702d0694 | PHP | robbiechicago/donatemate_core1 | /app/Http/Controllers/AppUserAuthController.php | UTF-8 | 1,631 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\AppUser;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
class AppUserAuthController extends Controller
{
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request ... | true |
c2098ba9af0a79b2fa04112c9e37b63bf68006cb | PHP | SpecialVacancierCodeur/Hermann-web.svc.2020.php.tpanswers | /SvC_Training/Php/Exam/WeeklyExam/exo2.php | UTF-8 | 295 | 3.78125 | 4 | [] | no_license | <?php
//affichage de 1 à 10
$j = 1;
while($i <= 10){
echo $i, " ";
$i ++;
}
echo "<br>";
for ($i = 1; $i<=10; $i++){
echo $i, " ";
}
//affichage de 1 à n
echo "<br>", "<br>" ;
function compter($n){
for ($i = 1; $i<=$n; $i++){
echo $i, " ";
}
}
compter(20);
?> | true |
8b91fbe6b34de03670ebb858328967a9fa7b7bf7 | PHP | Bribin/officelife | /app/Http/ViewHelpers/Company/Project/ProjectTasksViewHelper.php | UTF-8 | 5,173 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace App\Http\ViewHelpers\Company\Project;
use App\Helpers\DateHelper;
use App\Helpers\TimeHelper;
use App\Models\Company\Company;
use App\Models\Company\Project;
use Illuminate\Support\Collection;
use App\Models\Company\ProjectTask;
use App\Models\Company\ProjectTaskList;
class ProjectTasksViewHelper
{
... | true |
e704dc3d557128ea0b30118be0b489fe7474a84f | PHP | melbrins-swisse/lazyload | /Helper/ImageParse.php | UTF-8 | 2,440 | 2.71875 | 3 | [] | no_license | <?php
/**
* Class ImageParse
* @package HandH\Lazyload\Helper
*
* This class allows dynamic insertion of padding-top onto the parent element of an image.
* When combined with the .ratio class, this will eliminate any page re-flow caused by the images lazy loading.
*/
namespace HandH\Lazyload\Helper;
use \Magent... | true |
6c9b659cf4e9bb4c7206645701614ce87def201a | PHP | 2012mjm/b2p | /protected/infrastructures/Encrypt.php | UTF-8 | 282 | 2.953125 | 3 | [] | no_license | <?php
class Encrypt {
/**
* @return hash string.
*/
public static function encryptPassword($password = "") {
if (strlen($password) == 0) return false;
$firstChar = substr($password, -1, 1);
$hash = md5(md5($password) . $firstChar . md5($firstChar));
return $hash;
}
} | true |
c666935d09d3492d4e92520b4a531bd8f670d396 | PHP | pagarme/pagarme-magento | /tests/acceptance/Helper/SessionWait.php | UTF-8 | 1,613 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace PagarMe\Magento\Test\Helper;
trait SessionWait
{
/**
* @param callable $lambda
* @param int $wait
*
* @return bool
*/
public function spin($lambda, $wait)
{
for ($i = 0; $i < $wait; $i++) {
try {
if ($lambda($this)) {
... | true |
9f8adebc2be780cd9efe3780aa8a11e9e095379f | PHP | walkwel-tech/alpha-tests-laravel | /tests/Feature/LevelZeroTest.php | UTF-8 | 892 | 2.65625 | 3 | [] | no_license | <?php
namespace Tests\Unit;
use App\Models\User;
use Tests\TestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\RefreshDatabase;
class LevelZeroTest extends TestCase
{
use DatabaseMigrations;
use RefreshDatabase;
private $admins;
private $customers;
... | true |
8bf4576512f92bc6bcafff2841931cb9597ac496 | PHP | bacacosta/Curioteca | /classes/classBD.php | UTF-8 | 1,213 | 2.859375 | 3 | [] | no_license | <?
class BD
{
//atributos de BD
var $conexao;
var $consulta;
//construtor de BD
function BD()
{
//localhost
$this->set_conexao(mysql_connect("localhost", "root", "root"));
mysql_select_db("curioteca", $this->get_conexao());
}
//métodos de atribuição
function set_conexao($c)
{
$this... | true |
7bb747d0c51c383511c411aa946e544442fac387 | PHP | Almad0/laravel-boolpress | /database/seeds/CategorySeeder.php | UTF-8 | 532 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
use Faker\Generator as Faker;
use App\Category;
use Illuminate\Database\Seeder;
class CategorySeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run(Faker $faker)
{
for ($i=0; $i < 5 ; $i++) {
$newCat = new Category();
... | true |
b2e5e24820d94c599339ee28ab327ea254751faa | PHP | DolmatovNick/tasker | /Core/Environment.php | UTF-8 | 576 | 2.984375 | 3 | [] | no_license | <?php
namespace Core;
class Environment
{
protected static $settings = [];
public static function bind($key, $value)
{
if (array_key_exists($key, static::$settings)) {
throw new \Exception("Key {$key} exists and you try rewrite it");
}
static::$settings[$k... | true |
9a6d2782d4dd597f6a55fa9d59d299087cd24334 | PHP | Valant/field-technician | /web/advanced/common/models/SSLockTable.php | UTF-8 | 1,368 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "SS_LockTable".
*
* @property integer $LockTable_Id
* @property string $Table_Name
* @property string $Code
* @property string $LockedByUser
* @property string $LockedTime
* @property string $Form
* @property string $Description... | true |
e534b8e81f841b6e2a0525b87cc016ace8595acc | PHP | sepbin/framework | /Frame/Hook/IMvcRenderHook.php | UTF-8 | 612 | 2.8125 | 3 | [] | no_license | <?php
namespace Sepbin\System\Frame\Hook;
interface IMvcRenderHook
{
/**
* 渲染器创建之前
* 这个Hook将允许更改render类型,框架的AutoController就是通过此接口将渲染器换成autoViewRender
*
* @param string $render_name 将要使用的渲染器名称
* @param \Sepbin\System\Mvc\AbsController $controller 将要执行的控制器实例
* @param string $action 执行的方法名称
* @return s... | true |
72a7a84b6895c3c61b724feebb3f190729e5471d | PHP | yuanshaoyue/openapi-sdk-php | /src/Jaq/V20161123/AfsAppCheck.php | UTF-8 | 815 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | <?php
namespace AlibabaCloud\Jaq\V20161123;
use AlibabaCloud\Rpc;
/**
* Api AfsAppCheck
*
* @method string getSession()
* @method string getCallerName()
*/
class AfsAppCheck extends Rpc
{
public $product = 'jaq';
public $version = '2016-11-23';
public $method = 'POST';
/**
* @param strin... | true |
f261c2668d8d65f12f22c3a1bfa216b18d4fb968 | PHP | dreamer-lh/blog | /App/Model/Category.class.php | UTF-8 | 2,849 | 2.921875 | 3 | [] | no_license | <?php
//category表模型
namespace Model;
//引入空间元素
use \Core\Model;
class Category extends Model{
//属性
protected $table = 'category';
//获取所有分类
public function getAllCategories($stop_id=0){
//组织sql
$sql = "select c.*,a.a_number from {$this->getTableName()} as c left join (select count(*) as a_number,c_id from b... | true |
88ebebda686fc67b3887eeead6c41a162e81aa9c | PHP | yunzhiclub/yunzhicms | /application/model/PluginModel.php | UTF-8 | 3,592 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\model;
use app\Common;
class PluginModel extends ModelModel
{
protected $config = null; // 配置信息
protected $filter = null; // 过滤器信息
protected $PluginTypeModel = null; // 插件类型MODEL
/**
* 区域:插件 = n:1
*/
public function PluginTypeModel()
... | true |
01f227563af9e344955cf62f53cf21f8990984d4 | PHP | TwinklePHP/TwinkleUCenter | /php/services/AddressService.php | UTF-8 | 2,615 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: huanjin
* Date: 2017/11/22
* Time: 20:59
*/
/**
* 地址服务
*/
namespace app\services;
use app\base\Service;
use app\models\UserAddress;
class AddressService extends Service
{
/**
* 获取用户地址列表
*
* @param int $userId
* @return array
*/
public ... | true |
5f916744b98b01b9090f2565c665265facc82698 | PHP | ignacioito/HelloWorld | /exercicioaula10cdados.php | UTF-8 | 1,054 | 2.609375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="_css/estilo.css">
<style>
h2{
font-family: arial;
}
</style>
<title>Exercício10b</title>
</head>
<body>
<div>
... | true |
517d582c6f9198b00aa2ecdd7f6fd607d5ce132c | PHP | rmillerd/gridiron_suicide | /app/Week.php | UTF-8 | 613 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Week extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = ['name','startDate','endDate'];
protected $dates = ['startDate', 'endDate'];
/**
* Get the user that... | true |
34b118fec60fd8ff89ec2fcc64c2c8c5238c4b08 | PHP | iyaalfiryal/php-dasar-smk-semester-2 | /TipeData/TipeData.php | UTF-8 | 93 | 2.71875 | 3 | [] | no_license | <?php
echo "tipe data int : ";
var_dump(1234);
echo "tipe data float : ";
var_dump(0.1234);
| true |
ddf3a9a1d5c72339c0ad0c286efff967fdbe7be5 | PHP | YajanaRao/OnDemand | /dashboard/register.php | UTF-8 | 1,665 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | <?php
// Start the session
session_start();
?>
<?php
$servername = "localhost:3306";
$username = "Yajana";
$password = "1password4all";
$db="WebApp";
$firstname = test_input($_POST['firstname']);
$lastname = test_input($_POST['lastname']);
$email = $_POST['email'];
$pswd = $_POST['password'];
funct... | true |
4abb650af2c1c17d0cf07de988fe3d1c479f487b | PHP | thielpeter/php-feed-writer | /src/Entities/Spotify/Channel.php | UTF-8 | 2,110 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace Lukaswhite\FeedWriter\Entities\Spotify;
/**
* Class Channel
*
* @package Lukaswhite\FeedWriter\Entities\Spotify
*/
class Channel extends \Lukaswhite\FeedWriter\Entities\Itunes\AbstractChannel
{
/**
* A limit on the number of episodes.
*
* @var int
*/
protected $limit;
... | true |
b22a0accae0af830f4d84a053bc6bd99e5da3065 | PHP | gitter-badger/fluentkit | /app/Http/Controllers/Api/Controller.php | UTF-8 | 2,184 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: leemason
* Date: 28/02/16
* Time: 21:54
*/
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller as BaseController;
use Illuminate\Http\Request;
class Controller extends BaseController
{
protected $allowedWheres = [];
protected $allowedInclude... | true |
5344498271da1d6cff74e5bd4dcafd90ba6ec30d | PHP | xp-framework/xp-framework | /core/src/main/php/remote/reflect/BeanDescription.class.php | UTF-8 | 1,889 | 2.90625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/* This class is part of the XP framework
*
* $Id$
*/
uses('util.collections.HashSet');
define('HOME_INTERFACE', 0);
define('REMOTE_INTERFACE', 1);
/**
* Describes an EJB
*
* @see xp://remote.Remote
* @purpose Reflection
*/
class BeanDescription extends Object {
publi... | true |
c8b25546e069cee8f94ad7751e8dad4dd2eb5fce | PHP | dimitriBouteille/wp-orm | /src/Orm/Database.php | UTF-8 | 10,994 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Dbout\WpOrm\Orm;
use Illuminate\Database\ConnectionInterface;
use Illuminate\Database\Query\Grammars\Grammar;
use Illuminate\Database\Query\Processors\Processor;
use Illuminate\Database\Query\Expression;
use Illuminate\Database\QueryException;
use Illuminate\Support\Arr;
/**
* Class Database
* @pack... | true |
bd2247013aa336b36663068458a1273dc040e3e5 | PHP | mohamedsharaf/accounting | /database/migrations/2020_03_20_192737_create_receipts_table.php | UTF-8 | 1,322 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateReceiptsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('receipts', fu... | true |
2eb431db07b8162ad1b522c98fac250c8b774cb4 | PHP | RegioneLombardia/Open20 | /vendor/lispa/amos-core/interfaces/SearchModelInterface.php | UTF-8 | 629 | 2.515625 | 3 | [] | no_license | <?php
/**
* Lombardia Informatica S.p.A.
* OPEN 2.0
*
*
* @package lispa\amos\core\interfaces
* @category CategoryName
*/
namespace lispa\amos\core\interfaces;
interface SearchModelInterface {
/**
* @param array $searchParamsArray Array of search words
* @param int|null $pageSize
* @... | true |
2459f1cf2f788e5b608fbfe037be44f47816c4bd | PHP | massilva/hackathon-jusbrasil | /model/empresaModel.php | UTF-8 | 11,223 | 2.953125 | 3 | [] | no_license | <?php
include_once 'baseModel.php';
class empresaModel extends baseModel {
public $id,
$name;
public function __construct()
{
parent::__construct();
$this->id = -1;
$this->name = '';
}
function getTresMaiores(){
$pessoa = array();
try{
... | true |
b12a3ca57b3df4d3a2d8c2112a6c9eb8d2b4bbd8 | PHP | jasala/ALBERTOPRIMAVERA-landing | /default/app/libs/email.php | UTF-8 | 773 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class Email {
/**
* Realiza el envio del correo.
*
* @param $destino correo receptor
*/
public static function enviar($destino, $from, $asunto, $html){
//$from = "jasal@bitmedia.com.ar";
$header = "From:" . $from . "\nReply-To:" . $from . "\n";
$header = $header . "X-M... | true |
dbbd40048780961abe8f93b932dc98f7ad4c323f | PHP | GeneFHSU/INF653VC-HW4 | /index.php | UTF-8 | 4,835 | 2.96875 | 3 | [] | no_license | <?php
require('database.php');
/*First check if we are adding or deleting items. Once table updates are complete, return current table.*/
/*Check if we are adding a toDoItem*/
if(isset($_POST["addToDoItem"]))
{
/*Sanitize the title and description*/
$toDoTitle = filter_input(INPUT_POST, "title",FILTE... | true |
dbf629df2386aabd5c9881c9eb2b01ed4f905a7a | PHP | rojoangel/2016-12months-12katas | /02-yahtzee-php/src/Yahtzee/UserInterface.php | UTF-8 | 604 | 2.96875 | 3 | [] | no_license | <?php
namespace Yahtzee;
interface UserInterface
{
/**
* @param Category $category
*/
function printCategory($category);
/**
* @param array $dice
*/
function printDiceLine($dice);
/**
* @param Category $category
* @param int $categoryScore
*/
function printC... | true |
4a0750a5567af36a9bbb279fd56d4db5eb62e18c | PHP | jennyadamsnz/RentRave | /public_html/App/Models/ReviewModel.php | UTF-8 | 377 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Models;
use PDO;
Class ReviewModel extends DatabaseModel
{
protected static $tablename = 'review';
protected static $columns = [
'id',
'listing_id',
'user_id',
'review_title',
'review_text',
'review_date_time'
];
protected static $validationRules = [
'review_title' => 'm... | true |
0c50d2aeae072aceba2603e99e61e6e3fb32e31e | PHP | paulbouaffou/register-member | /index.php | UTF-8 | 1,172 | 2.65625 | 3 | [] | no_license | <?php
require 'database.php';
$sql = 'SELECT * FROM membres';
$statement = $connection->prepare($sql);
$statement->execute();
$membres = $statement->fetchAll(PDO::FETCH_OBJ);
?>
<?php require 'header.php'; ?>
<?php require 'nav.php'; ?>
<div class="container">
<div class="card mt-5">
<div class="card-hea... | true |
46dba9f95afbcace6878c27dbc6385157aa90967 | PHP | sampayo123/carrito | /pagar.php | UTF-8 | 2,134 | 2.5625 | 3 | [] | no_license | <?php
include 'global/config.php';
include 'global/conexion.php';
include './carrito.php';
include 'templates/cabecera.php';
?>
<?php
if(isset($_POST)){
$total=0.00;
$ID=session_id();
$correo=$_POST['email'];
if(empty($correo)){
echo "<script>alert('Conectado...')</script>";
... | true |
8af4d0992b415e480233d47e29443907574660f6 | PHP | nsbucky/echosignv3 | /src/Interfaces/RequestEntity.php | UTF-8 | 516 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Echosign\Interfaces;
/**
* Interface RequestEntity
* @package Echosign\Interfaces
*/
interface RequestEntity
{
/**
* @return string|null
*/
public function getRequestUrl();
/**
* @return array
*/
public function getHeaders();
/**
* @return string
*... | true |
1a03b77a02bcd9df702f97007219cd3b1f73aad8 | PHP | LavaToaster/laravel-tactician | /src/Middleware/ValidateCommandMiddleware.php | UTF-8 | 1,373 | 2.875 | 3 | [] | no_license | <?php
namespace Lavoaster\LaravelTactician\Middleware;
use Illuminate\Container\Container;
use League\Tactician\Middleware;
class ValidateCommandMiddleware implements Middleware
{
/**
* @var Container
*/
private $container;
public function __construct(Container $container)
{
$this-... | true |
6de2110f903a95bca08c450ac26b9478480e77fe | PHP | ThinkUpLLC/upstart | /tests/TestOfSubscriptionOperationMySQLDAO.php | UTF-8 | 3,403 | 2.53125 | 3 | [] | no_license | <?php
require_once dirname(__FILE__) . '/init.tests.php';
class TestOfSubscriptionOperationMySQLDAO extends UpstartUnitTestCase {
public function setUp() {
parent::setUp();
}
public function tearDown() {
parent::tearDown();
}
public function testConstructor() {
$dao = new... | true |
ebc19e38eeea4d9987859caef1638d2f319a250f | PHP | evuru/chintua-php-mvc-framework | /controllers/siteController.php | UTF-8 | 1,029 | 2.625 | 3 | [] | no_license | <?php
namespace app\controllers;
use evuru\chintuaphpmvc\Application;
use evuru\chintuaphpmvc\controller;
use evuru\chintuaphpmvc\request;
class siteController extends Controller {
public function __construct(){
$this->setLayout('main');
}
public function home(){
$params = [
"... | true |
434ef2bb46a70295c9b8ff922f1bcaacff081126 | PHP | clvarley/swiftly-test | /src/Swiftly/utilities/polyfills.php | UTF-8 | 1,061 | 3 | 3 | [
"MIT"
] | permissive | <?php
/**
* Provides polyfilled functions and interfaces
*
* @author clvarley
*/
if ( !interface_exists( 'Stringable', false ) ) {
/**
* Indicates the implementing class can be represented as a string
*/
interface Stringable
{
public function __toString() : string;
}
}
if ( !f... | true |
c0fd253c0740107a4c2c2560e77b7932b541410c | PHP | lucianobapo/exemplo-package-tdd- | /src/Cart.php | UTF-8 | 773 | 3.140625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: luciano
* Date: 22/04/16
* Time: 17:14
*/
namespace ErpNET\App;
use ErpNET\App\Entities\ProductInterface;
class Cart
{
protected $products;
public function __construct()
{
$this->products = new \ArrayObject();
}
/**
* @return \ArrayObje... | true |
e5203aef0e1a9b8ac8755bd5de84ec299e4a3d62 | PHP | vicente-cruz/cursophp_modulo6_avancado | /aula48_expressoes_regulares_routes.php | UTF-8 | 2,779 | 3.125 | 3 | [] | no_license | <?php
$routes = array();
$routes['/galeria/{id}/{titulo}'] = '/galeria/abrir/:id/:titulo';
$routes['/news/{id}'] = '/noticia/abrir/:id';
$routes['/n/{titulo}'] = '/noticia/abrirTitulo/:titulo';
$url = "/galeria/25/teste";
echo "URL digitada: <strong>".$url."</strong><br/><br/>";
foreach ($routes as $route => $newu... | true |
318d1bf601bf07f63bb7c07c0109ac0d49a37733 | PHP | johnkrovitch/Sam | /Filter/Filter.php | UTF-8 | 3,104 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace JK\Sam\Filter;
use JK\Sam\Configuration\ConfigurationInterface;
use JK\Sam\Event\NotificationEvent;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Finder\Finder;
use SplFileInfo;
abstract class Filter implements Filte... | true |
3244df9b345df6bf65bbcc2a3285f3d0a96cce69 | PHP | w001y/laratest | /app/models/PusherWebSockets.php | UTF-8 | 574 | 2.9375 | 3 | [] | no_license | <?php
class PusherWebSockets {
public $app_id;
public $app_key;
public $app_secret;
public $pusher;
public function __construct()
{
$this->app_id = $_ENV['PUSHER_APP_ID'];
$this->app_key = $_ENV['PUSHER_APP_KEY'];
$this->app_secret = $_ENV['PUSHER_APP_SEC... | true |
44ba050f9962fbd1939d56dbc173400e828bdcf1 | PHP | musfiqur552608/Ecommerce | /db/connection.php | UTF-8 | 533 | 2.890625 | 3 | [] | no_license | <?php
CLass Connection{
public static function Connect(){
define('server','localhost');
define('db_name','ecommerce');
define('user','root');
define('password','');
$options=array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8');
try{
$connection = ... | true |
afaacc73a7eb3cbd7a1e946804ff83c68ea1bdc0 | PHP | saulocastrolp/instagram-user-feed | /src/Instagram/Hydrator/ReelsHydrator.php | UTF-8 | 1,866 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Instagram\Hydrator;
use Instagram\Model\Reels;
use Instagram\Model\ReelsFeed;
class ReelsHydrator
{
/**
* @var ReelsFeed
*/
private $reelsFeed;
/**
* Hydration is made manually to avoid shitty Instagram variable names
*/
public function _... | true |
9ef79f440dd5d44c860e941b6af05b1ea6c37ba7 | PHP | humbertocruz/AuthBootstrap | /Admin/Controller/UsuariosController.php | UTF-8 | 3,371 | 2.546875 | 3 | [] | no_license | <?php
/**
* Usuarios
* Alteração: 09/12/2013
* Humberto Cruz - desenvolvimento@apaebrasil.org.br
*
* Variáveis
*
* data - variável gerada pelos métodos e enviada a view
*/
class UsuariosController extends AdminAppController {
public $uses = array('Admin.Usuario');
public function beforeFilter() {
paren... | true |
93f07cafac3bf32e1e7561f845002192abcd5398 | PHP | mineirim/pas | /application/models/Atividades.php | UTF-8 | 5,255 | 2.640625 | 3 | [] | no_license | <?php
/**
* Atividades
*
* @author hugo
* @version
*/
require_once 'Zend/Db/Table/Abstract.php';
class Model_Atividades extends App_DefaultModel {
protected $_rowClass = "Model_Row_Atividade";
/**
* The default table name
*/
protected $_name = 'atividades';
protected $_dependentTables = array('... | true |
083ad1766275f09d867262de4a4a10e331d11c19 | PHP | webdesign021pk/BookLendingSystem | /application/models/Reportmodel.php | UTF-8 | 10,523 | 2.515625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') or exit('No direct script access allowed');
class Reportmodel extends CI_Model
{
public function printCatalogue($cat)
{
$q=$this->db->select('*')
->from('lm_tbl_books')
->join('lm_tbl_category', 'lm_tbl_category.subCatIdPK = lm_tbl_books.subCatId')
... | true |
0603a07fb4144537ad624dc4f9bf46d63e45431e | PHP | pabloss222/crud2 | /pintor.entidad.php | UTF-8 | 248 | 2.6875 | 3 | [] | no_license | <?php
class Pintor
{
private $nombre;
private $ciudad;
private $pais;
private $fecha_nacimiento;
private $fecha_muerte;
private $foto;
public function __GET($k){ return $this->$k; }
public function __SET($k, $v){ return $this->$k = $v; }
} | true |
473981733516e7501d85f052d0485743444e3cbd | PHP | ggjersund/zyte-framework | /Zyte/classes/Url.php | UTF-8 | 1,457 | 3.078125 | 3 | [] | no_license | <?php
/**
*
* The ZyteFrameworks URL class
*
* @package ZyteFramework
* @subpackage classes
* @author ZyteFramework Open Source Team
* @copyright Copyright (c) 2017 - 2017, ZyteFramework
* @license Open Source
* @link https://zyteframework.com/
*
*/
name... | true |
1899e17dfdafbdae59bcddea285d3565a9a381a2 | PHP | dangvantri113/laravel-ecommerce-application | /database/seeds/ProductsTableSeeder.php | UTF-8 | 4,711 | 2.546875 | 3 | [] | no_license | <?php
use Faker\Factory;
use Illuminate\Database\Seeder;
use App\Models\CategoryLv1;
use \App\Enums\ProductColor;
class ProductsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$lv1s = CategoryLv1::all();
$shop = DB:... | true |
8b33d306a89098a25680234be145782dca519d1d | PHP | Dinookys/wp_micro_framework_theme | /inc/lib/core/inputs.php | UTF-8 | 2,272 | 3.078125 | 3 | [] | no_license | <?php
namespace lib\core;
/**
* Class para criar inputs de formularios
*/
class inputs
{
public static function input( array $args = array() )
{
$input = "\n\t" . '<input ';
foreach( $args as $key => $arg ){
$input .= ' ' . $key . '="'. $arg .'" ';
}
if( ! i... | true |
c4ca5ca46ba39321733748bfcdc43e8ac08f0648 | PHP | tomson2001/refmodmine | /classes/process-model-mapping/MappingViewOptions.php | UTF-8 | 638 | 2.890625 | 3 | [] | no_license | <?php
class MappingViewOptions {
public $posted = null;
private $viewOptions = array(
'levenshtein_mapping' => 'Levenshtein-Mapping',
'identity' => 'Identity-Mapping'
);
public function __construct() {
$this->posted = isset($_POST['view']) ? $_POST['view'] : 'levenshtein_mapping';
}
... | true |
abb37fa1457d4a80d1894c9088674c021c07b7cd | PHP | Nothing-Works/talk-cake | /app/Inspections/InvalidKeyWords.php | UTF-8 | 535 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Inspections;
use Exception;
class InvalidKeyWords implements ISpam
{
protected $keyWords = ['yahoo customer support'];
private $value;
public function __construct($value)
{
$this->value = $value;
}
/**
* @throws \Exception
*/
public function detect... | true |
22ef6f297323e263e669269f0822398916c22888 | PHP | carlossepulveda/elfoapp-php-client | /elfoapp/src/elfoapp_client.php | UTF-8 | 1,412 | 2.703125 | 3 | [] | no_license | <?php
namespace Elfoapp\APIClient;
require('api_client.php');
require('resources/resource.php');
require('resources/delivery_resource.php');
use Elfoapp\APIClient\Resources\DeliveryResource as DeliveryResource;
class ElfoappClient {
protected $apiClient;
public function __c... | true |
bd4cac66394f2a23e0e874ffd7428ab56fedbf11 | PHP | SilasKenneth/evaluationPHP | /super/Admin/changepass.php | UTF-8 | 1,532 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
include_once 'nav.php';
include_once 'sidenav.php';
$oldpass = $_SESSION['administrator']['password'];
$id = $_SESSION['administrator']['id'];
$error = NULL;
$success = NULL;
if(isset($_POST['save'])){
if(isset($_POST['currentpass']) && isset($_POST['newpass'])){
$pass = $_POST['currentpass'];
... | true |
6e861c56409b63bae395e761ca730817dc55ba1c | PHP | gogetssl/blesta-module | /components/modules/mg_go_get_ssl/Facade/Settings.php | UTF-8 | 586 | 2.609375 | 3 | [] | no_license | <?php
namespace MgGoGetSsl\Facade;
final class Settings
{
private function __clone() {}
private function __wakeup() {}
private function __construct() {}
/**
* @param string $key
* @param mixed $default
* @return mixed
*/
public static function setting($key, $default = null)
... | true |
c9a3b78bb4abeb6bff39cf8653d15b09e3685fba | PHP | adamcameron/php | /general/test/phpunit/mockobject/service/SomeServiceUsingMockBuilderTest.php | UTF-8 | 2,058 | 2.703125 | 3 | [] | no_license | <?php
namespace me\adamcameron\phpunit\test\mockobject\service;
use me\adamcameron\phpunit\mockobject\repository\SomeRepository;
use \me\adamcameron\phpunit\mockobject\service\SomeService;
use PHPUnit\Framework\TestCase;
class SomeServiceUsingMockBuilderTest extends TestCase
{
private $someService;
private ... | true |
db9641290de9f5dd7119a71008f2fad364bd4abb | PHP | dasilvahankar/POO | /Exercices/Personnage/lib/php/fonctions.php | UTF-8 | 823 | 2.890625 | 3 | [] | no_license | <?php
// fonction de connection à la BD
function connectBD()
{
try // essai de connection à la BD
{
// essai de connection à la BD avec PDO
$connection = new PDO('mysql:host=127.0.0.1;dbname=monjeu', 'root', '');
// on oblige mysql a prendre en compte le UTF8
$connection->exec('SET NAMES utf8');
... | true |
6d7eb27088c5ed4b7adaa6c4d15a3ef7689c402e | PHP | harshit2202/Online-FIR-Portal | /index.php | UTF-8 | 6,314 | 2.53125 | 3 | [] | no_license | <?php session_start();
if(isset($_SESSION['username']) && isset($_SESSION['type']))
{
$type = $_SESSION['type'];
if($type == "cop")
{
header('Location: http://localhost/DBMS-Project/copmainpage.php');
exit();
}
elseif($type == "user")
{
header('Location: http://localhost/DBMS-Project/usermainpage... | true |
9a4b536b912c01f31acbb17bedba389572272eda | PHP | danielkbx/poundation | /Server/PConfig.php | UTF-8 | 374 | 2.546875 | 3 | [] | no_license | <?php
namespace Poundation\Server;
class PConfig
{
/**
* Returns true if cURL is enabled.
*
* @return bool
*/
static function isCurlEnabled()
{
return function_exists('curl_version');
}
/**
* Returns true if allow_url_fopen is enabled.
*
* @return bool
*/
static function isURLOpeningAllowed... | true |
b2172940d02e993074556d6ac6daf35ca4563a07 | PHP | antoanpopov/pearlskin2 | /Modules/Pearlskin/Repositories/Eloquent/EloquentEmailMessageRepository.php | UTF-8 | 1,034 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php namespace Modules\Pearlskin\Repositories\Eloquent;
use Modules\Core\Repositories\Eloquent\EloquentBaseRepository;
use Modules\Pearlskin\Entities\EmailMessage;
use Modules\Pearlskin\Repositories\EmailMessageRepository;
class EloquentEmailMessageRepository extends EloquentBaseRepository implements EmailMessageRep... | true |
089b7e361d8edbaa0092c2b01da7b24231c71fe0 | PHP | ianfleon/pariwisata-bursel | /artikel.php | UTF-8 | 1,891 | 2.59375 | 3 | [] | no_license | <?php
require_once 'app/config/handler.php';
$page = 1;
$perpage = 4;
$artikels = get_data_page("SELECT * FROM artikel", $page, $perpage);
if (isset($_GET['baca'])) {
$id = $_GET['baca'];
$artikel = query_get("SELECT * FROM artikel WHERE id = '$id'")[0];
if (count($artikel) == 0) {
header("Location: ar... | true |
34009e9fd9734e92f885d87a79c48646b860b6b1 | PHP | dinhducduong/BirdyStore | /app/Http/Controllers/SettingController.php | UTF-8 | 4,658 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Setting;
use App\Message;
use App\Review;
use App\Order;
use Illuminate\Http\Request;
class SettingController extends Controller
{
public function index()
{
$settings = Setting::first();
//get unread user messages for the navbar
$messages... | true |
38bcbd50797cba05671d4bc12a53e48864add48f | PHP | jesign/ReservationSystem | /editItem.php | UTF-8 | 9,406 | 2.796875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?php
include 'function.php';
include 'menu.php';
if($user_level !=1){
header('location: index.php');
}
if(isset($_POST['add'])){
$target_dir = "uploads/";
$target_file = $target_dir . basename($_FILES["... | true |
8a98f6cbc016528da8eaf593397c79e94c025ed4 | PHP | shadow-warlock/kolebnORM | /src/Entity/EntityInterface.php | UTF-8 | 181 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Entity;
interface EntityInterface {
public function getId(): int;
public function load(): ?EntityInterface;
public function loadArray(): array;
} | true |
77550e3fedb6e9b3f81c6616339cae1a236d7902 | PHP | vimeo/psalm | /src/Psalm/Type/Atomic/TKeyedArray.php | UTF-8 | 22,178 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Psalm\Type\Atomic;
use Psalm\Codebase;
use Psalm\Internal\Analyzer\StatementsAnalyzer;
use Psalm\Internal\Type\TemplateInferredTypeReplacer;
use Psalm\Internal\Type\TemplateResult;
use Psalm\Internal\Type\TemplateStandinTypeReplacer;
use Psalm\Internal\Type\TypeCombiner;
use Psalm\Type;
use Psalm\Type... | true |
350804ff277a6e532c74fd85f3ecf4bc9884105c | PHP | mahmoudoudi/projetweb | /livreurC.php | UTF-8 | 2,990 | 2.625 | 3 | [] | no_license | <?php
include "C:/wamp/www/tameplate/config.php";
/**
*
*/
class livreurC
{
function ajouterLivreur($livreur)
{
$sql="INSERT INTO livreur (login,nom,prenom,dispo,secteur,tel,date_naiss,mail,mdp,num_permis) VALUES(:login,:nom,:prenom,:dispo,:secteur,:tel,:date_naiss,:mail,:mdp,:num_permis)";
$d... | true |
887a37ceed25156adae50ac7f6b436de308466c9 | PHP | hvt/psl | /src/Psl/Math/median.php | UTF-8 | 654 | 3.1875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Psl\Math;
use Psl\Iter;
use Psl\Vec;
/**
* Returns the median of the given numbers.
*
* @param iterable<int|float> $numbers
*/
function median(iterable $numbers): ?float
{
$numbers = Vec\values($numbers);
$numbers = Vec\sort($numbers);
$count = Iter\count($... | true |
375c0ba97824e8817b2089e30015310befc7e606 | PHP | ikitby/yii2-cms | /common/models/Visit.php | UTF-8 | 1,997 | 2.734375 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "visit".
*
* @property int $id ID
* @property int $created_at Время создания
* @property int $document_id Документ
* @property string $ip IP
* @property string $user_agent Данные браузера
* @property int $user_id Пользователь
*
... | true |
ff7e45f416aca1ff7e7f95b4984aa401087bb95d | PHP | fytinnovations/clashfreaks | /plugins/fytinnovations/clashfreaks/components/TopBuilderVillageClanList.php | UTF-8 | 1,001 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php namespace Fytinnovations\ClashFreaks\Components;
use Cms\Classes\ComponentBase;
use Fytinnovations\ClashFreaks\Classes\ClashOfClans;
class TopBuilderVillageClanList extends ComponentBase
{
private $request;
public function componentDetails()
{
return [
'name' => 'Builder ... | true |
0edab4819da448edddad14250d6f4836abdec155 | PHP | joey2017/shang-hai-2 | /log.php | UTF-8 | 1,858 | 2.640625 | 3 | [] | no_license | <?php
// vim: set expandtab cindent tabstop=4 shiftwidth=4 fdm=marker:
// +----------------------------------------------------------------------+
// | The CompanyName Inc |
// +----------------------------------------------------------------------+
// | Copyright (c) 20... | true |
b2621d6bae060aed113573f8e0f6969e48fc529d | PHP | klasharr/ssc-weather | /classes/class-request.php | UTF-8 | 2,179 | 2.625 | 3 | [] | no_license | <?php
namespace SSCW;
use Exception;
use WP_Error;
if ( ! defined( 'ABSPATH' ) ) exit;
require_once( SSC_WEATHER_PLUGIN_DIR . 'classes/class-weather-object.php' );
class Request {
const LOCATION = '353786'; // Swanage
const THREE_HOUR_FORECAST = 'http://datapoint.metoffice.gov.uk/public/data/val/wxfcs/all/json/... | true |
48d314d037c407322512bb119087d80aa0aa0265 | PHP | szymski/HotelCenter | /api/ApartamentApi.php | UTF-8 | 3,399 | 2.65625 | 3 | [] | no_license | <?php
include "model/apartament.php";
function AddApartament($id_hotelu, $ilosc_miejsc, $lozka_jednoOS, $lozka_dwaOS, $wolne, $cena) {
$stmt = Database::$db->prepare("INSERT INTO `apartamenty` (`id_hotelu`, `ilosc_miejsc`, `lozka_jednoOS`, `lozka_dwaOS`, `wolne`, `cena`) VALUES (?, ?, ?, ?, ?, ?)");
... | true |
f06c031c6ae558f48d96a02507dc1268e7bf8652 | PHP | warapolj/php-pdo-crud-basic | /update.php | UTF-8 | 390 | 2.765625 | 3 | [] | no_license | <?php
include 'connect.php';
$fname = "kang";
$lname = "rak";
$id = 1;
$sql = "update users set fname = ?, lname = ? where id = ?";
$stm = $con->prepare($sql);
$stm->bindParam("1",$fname);
$stm->bindParam("2",$lname);
$stm->bindParam("3",$id);
try {
$stm->execute();
echo "update success"... | true |