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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
6758e7187dfec52da20d4a4364ee14f853e48685 | PHP | HEMMER-FX/hackathon_2 | /src/DataFixtures/UserFixtures.php | UTF-8 | 1,705 | 2.6875 | 3 | [] | no_license | <?php
namespace App\DataFixtures;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Persistence\ObjectManager;
use App\Entity\User;
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
class UserFixtures extends Fixture
{
private $passwordHasher;
/**
* @param UserPasswordHa... | true |
7d3b8622f77233b2b7ffaebc958ec189773b9c1d | PHP | huping112004/gf_work | /Application/Home/Model/CollectModel.class.php | UTF-8 | 772 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Home\Model;
use Think\Model;
class CollectModel extends Model{
/* 自动完成规则 */
protected $_auto = array(
array('school_name', 'htmlspecialchars', self::MODEL_BOTH, 'function'),
array('address', 'htmlspecialchars', self::MODEL_BOTH, 'function'),
array('email', 'email', '邮箱格式不正确'),... | true |
346c160cae6f78f2fc3794adf1fb31eb97bd40ea | PHP | gnlscience/cyphers | /src/src/Site/Config.php | UTF-8 | 736 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Clayton
* Date: 3/4/2018
* Time: 8:13 PM
*/
namespace Bundle\Site;
class Config
{
/** @var boolean */
protected $avatarRequired;
/**
* Constructor.
*
* @param array $config
*/
public function __construct($config)
{
$profil... | true |
97f4a16e65e4fb9e4771eaa7a2ed30edd2d5620b | PHP | derhasi/drupal-org-issue-patch-history | /src/Repository.php | UTF-8 | 2,825 | 2.921875 | 3 | [] | no_license | <?php
/**
* @file
* Repository.php for paragraphs
*/
namespace derhasi\drupalOrgIssuePatchHistory;
class Repository {
protected $project;
protected $branch;
protected $directory;
/**
* @var \GitWrapper\GitWorkingCopy
*/
protected $git;
public function __construct($project, $directory, $bran... | true |
153fbbdb0204ef36c54fef71fecb46aa13865b70 | PHP | irecall/me | /class/UploadFile.php | UTF-8 | 5,312 | 2.953125 | 3 | [] | no_license | <?php
/**
* 文件上传控制器 依类于Yii核心库 CUploadedFile
* @author xiaoke
* *@param string $filepath 文件的路径,例如:‘/aa/bb’=>protected/data/aa/bb
* @param string $filename 文件名称,可以自定义,也可默认,默认为md5时间戳
* @param string $upload_file 前端文件提交的名称
* @param string $is_success 上传成功true 默认为false
* @param string $baseUpload Yii 基础上传类对象
*
* 多... | true |
f0993669d4a12898550717609539fa8b85433740 | PHP | agalem/shopshare | /src/Repository/ListsRepository.php | UTF-8 | 9,455 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Repository;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\DBALException;
class ListsRepository {
protected $db;
public function __construct(Connection $db) {
$this->db = $db;
$this->productsRepository = new ProductsRepository($db);
$this->userRepository = new UserRepository($db);
}
pub... | true |
06b1e9d66b5204a9dea3425096874f4bc8e2750f | PHP | iherak/layouts-core | /lib/Context/ContextInterface.php | UTF-8 | 1,171 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Netgen\BlockManager\Context;
use ArrayAccess;
use Countable;
use IteratorAggregate;
interface ContextInterface extends IteratorAggregate, Countable, ArrayAccess
{
/**
* Sets a variable to the context. Variable value needs to be
* a scalar or an array/hash of sc... | true |
197d7f87b3322ddba5dedfcc379d7e1551d4c605 | PHP | Pakettikauppa/api-library | /src/Pakettikauppa/Shipment/Info.php | UTF-8 | 3,449 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace Pakettikauppa\Shipment;
/**
* Class Info
*
* General information about the shipment and settings
*
* @package Pakettikauppa\Shipment
*/
class Info
{
/**
* @var string A reference number that is printed on the shipping label, an order id is a good choice.
*/
public $reference;
... | true |
76b6624499411fa3eb9324c894abf3ae01268e10 | PHP | rvolz/BicBucStriim | /src/Domain/BicBucStriim/BbsData.php | UTF-8 | 6,327 | 2.65625 | 3 | [
"MIT",
"BSD-3-Clause",
"Apache-2.0"
] | permissive | <?php
/**
* BicBucStriim
*
* Copyright 2012-2013 Rainer Volz
* Licensed under MIT License, see LICENSE
*
*/
require_once 'data_constants.php';
require_once 'calibre_thing.php';
use App\Domain\BicBucStriim\DataConstants;
use App\Domain\Calibre\Utilities;
use RedBeanPHP\R;
class BbsData
{
# Thumbnail dimensi... | true |
a3d7ba878dc61ae5fdad9b08aae844e02f6c5593 | PHP | authlete/authlete-php | /src/Dto/ClientSecretUpdateResponse.php | UTF-8 | 3,049 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | <?php
//
// Copyright (C) 2018 Authlete, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law ... | true |
c6b51fed8a775b81ee17bc44aef3f79e18e4d521 | PHP | realbigplugins/toggl-alert | /core/emails/class-toggl-alert-notification-triggers.php | UTF-8 | 2,751 | 2.796875 | 3 | [] | no_license | <?php
/**
* Notification Triggers for Toggl Alert
*
* @since 1.0.0
*
* @package Toggl_Alert
* @subpackage Toggl_Alert/core/emails
*/
defined( 'ABSPATH' ) || die();
final class Toggl_Alert_Notification_Triggers {
/**
* Toggl_Alert_Notification_Triggers constructor.
*
* @since 1.0.0
*/
function __c... | true |
e89651607c6eaa3d5c905fbad2e9bb8398d114df | PHP | TOGoS/nife | /lib/Nife/DBC/ParameterizedSQLQueryable.php | UTF-8 | 485 | 2.75 | 3 | [] | no_license | <?php
/**
* An alternative to Nife_DBC_Queryable for cases where a
* string+parameters is more convenient than a Query object.
* Most adapters will probably implement both interfaces.
*/
interface Nife_DBC_ParameterizedSQLQueryable
{
/**
* @param string $q SQL statement with {curlyBraceEnclosed} parameter names... | true |
2f8fcdd026195b83b0aa56ea425f3ef96d9d9ad3 | PHP | lsr1237/dsp | /shipin/common/models/Notice.php | UTF-8 | 1,778 | 2.65625 | 3 | [] | no_license | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "notice".
*
* @property int $id
* @property string $title 公告标题
* @property int $state 状态:1:显示 2:不显示
* @property int $type 类型:1:公告 2:banner
* @property string $image 图片
* @property string $url 链接
* @property int $sort 排序
* @prop... | true |
83c82c30503c3739493291f53b44f74f5d345929 | PHP | xiebruce/PicUploader | /vendor/sabre/vobject/tests/VObject/ReaderTest.php | UTF-8 | 15,997 | 2.640625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace Sabre\VObject;
use PHPUnit\Framework\TestCase;
class ReaderTest extends TestCase
{
public function testReadComponent()
{
$data = "BEGIN:VCALENDAR\r\nEND:VCALENDAR";
$result = Reader::read($data);
$this->assertInstanceOf('Sabre\\VObject\\Component', $result);
... | true |
1fd8dd00285afb741e919b8b0862d9adfafcd210 | PHP | Maryam-Tahir99/ebook | /EBOOK/mylib.php | UTF-8 | 1,602 | 2.625 | 3 | [] | no_license | <?php
session_start();
$count = 0;
// connecto database
require_once "./functions/database_functions.php";
$conn = db_connect();
$query = "SELECT b.book_isbn, b.book_image, l.book_title , c.ID
FROM books b,library l, loginform c
WHERE l.book_title=b.book_title AND c.ID=l.ID";
$resul... | true |
668293f1d1f3a61188bac7239e3ba4647cd60795 | PHP | awesome-academy/music-online-02 | /app/Repositories/Category/CategoryRepository.php | UTF-8 | 1,208 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Category;
use App\Category;
use DB;
use App\Music;
use App\Repositories\BaseRepository;
use Illuminate\Database\DatabaseManager;
/**
* Class BaseRepository
*
* @package App\Repositories
*/
class CategoryRepository extends BaseRepository implements CategoryRepositoryInterface
{
... | true |
6e243007c08070b9050f0abf4783077b58850011 | PHP | oqapi/bannerproject | /custom/GifSplit.class.php | UTF-8 | 11,135 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
class GifSplit
{
/*===========================================*/
/*== V A R I A B L E S ==*/
/*===========================================*/
var $image_count = 0;
var $buffer = array();
var $global = array();
var $gif = array(0x47, 0x49, 0x46);
var $logical_screen... | true |
8aa445346a4e843b577dca31b38113f67663ff56 | PHP | alifahfathonah/giblaravel | /database/migrations/2014_10_12_000000_create_users_table.php | UTF-8 | 1,861 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function ... | true |
b93a38805087e6d8f0f14408b76ac408da457bcc | PHP | FlagBg/PhpCourse | /hello/Hi.php | UTF-8 | 546 | 3.015625 | 3 | [] | no_license | <?php
function commercial($letter, $number){
print "asfasfasfa sfd";
print " asdfas kasj fkasj ksafj as";
}
commercial('G', 3);
$another_letter = 'X';
$another_number = 15;
commercial($another_letter, $another_number);
echo compact($commercial);
/*
*
$user1 = array('name' => 'Max Biggel',
'usernam... | true |
365924d88ed2312deda95c2e81f2a0937699181f | PHP | piotrbrzezina/api-platform-presentation | /features/bootstrap/Helper/PropertyTypeResolver.php | UTF-8 | 1,565 | 2.71875 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Tests\Helper;
class PropertyTypeResolver
{
public static function formatToType(string $type, $value)
{
switch ($type) {
case 'bigint':
case 'integer':
case 'smallint':
return (int)round($value);
... | true |
e9c78029e9c0bbd25679e18f7b5e52fe27cbe737 | PHP | rdomingo1986/random-database-data-builder | /config/Example2/Child.php | UTF-8 | 4,212 | 3.125 | 3 | [] | no_license | <?php
/**
* Person Class
*
* Example configuration schema for a single table an various data origins.
*
* @author Domingo Ramirez
* @license http://opensource.org/licenses/MIT MIT License
* @link https://github.com/rdomingo1986
*/
class Child implements ISchema {
/**
* Principal table name.
*
* @var st... | true |
4d7376008dea07fd02dc31ab56c718ba0b7b6196 | PHP | quadrant26/php | /imooc/fn/fn04.php | UTF-8 | 694 | 3.703125 | 4 | [] | no_license | <?php
header("Content-type:text/html; charset=utf-8");
echo "可变函数"."<br /><br />";
/*
所谓可变函数,即通过变量的值来调用函数,因为变量的值是可变的,所以可以通过改变一个变量的值来实现调用不同的函数。
经常会用在回调函数、函数列表,或者根据动态参数来调用不同的函数。可变函数的调用方法为变量名加括号。
*/
function name() {
echo 'jobs';
}
$func = 'name';
$func(); //调用可变函数
// 可变函数也可以用在对象的方法调用上。
class book {
functio... | true |
4edf2f7bf4b874462eefb0b1b5e5d65f30422641 | PHP | ClemUTT/tps_007 | /tp08/tp06_biblio_formulaire_bt.php | UTF-8 | 1,960 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
function form_begin($class, $method, $action){
echo "<form class='$class' method='$method', action='$action'>";
}
function form_nombre($label, $name){
echo "<div class='form-group'>";
echo "<label>$label</label>";
echo "<input required class='form-control' type='number' name='$name'/>";
echo... | true |
d08a3e2739112355eb3412932da9bdee747aca89 | PHP | zanematthew/mybmx.events | /app/Http/Controllers/EventController.php | UTF-8 | 7,645 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class EventController extends Controller
{
protected $paginate = 10;
protected $params = [
'next_month',
'this_month',
'upcoming',
'page',
'state',
'states',
'venue_id',
];
publ... | true |
d674ea604ed4ef82ddd6821b8ad8d29b01734443 | PHP | BlesSka/php-oop | /chapters/automoviles/index.php | UTF-8 | 2,084 | 4.0625 | 4 | [] | no_license | <?php
interface Auto
{
public function encender();
public function apagar();
}
interface gasolina extends Auto
{
public function vaciarTanque();
public function llenarTanque($cant);
}
class Deportivo implements gasolina
{
private $estado = f... | true |
10fd80c2dd60ab8e228500f61ced07e57f6cfb3b | PHP | constantinkraft/mediathek | /backend/edit.php | UTF-8 | 6,784 | 3.15625 | 3 | [] | no_license | <?php
/**
* PHP-Backend zum Bearbeiten der XML-Datenbasis
*
* (c) 2015 Constantin Kraft <ckraft@smail.uni-koeln.de>
*/
/**
* Class for handling API calls
*/
class BackendApi {
private $editor;
private $request_type;
public function __construct($editor) {
// TODO: decide on GET or PO... | true |
14038cb9a49f16699969ddace3682cae06b1e060 | PHP | nemerki/ecoline | /plugins/nemerki/data/transformers/SliderTransformer.php | UTF-8 | 728 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php namespace Nemerki\Data\Transformers;
use Nemerki\API\Classes\Transformer;
use Nemerki\Data\Models\Slider;
/**
* SliderTransformer for Nemerki\Data\Model\Slider
*/
class SliderTransformer extends Transformer
{
// Related transformer that can be included
public $availableIncludes = [
];
// Re... | true |
aeec6399c67459e2f9b53d981a23564f8bca2dcc | PHP | owlj/mvc-sample | /application/controller/contacts.php | UTF-8 | 1,352 | 2.515625 | 3 | [] | no_license | <?php
class Contacts extends Controller
{
public function index()
{
$contact = $this->loadModel('ContactModel');
$contacts = $contact->all();
require 'application/views/_templates/header.php';
require 'application/views/contacts/index.php';
require 'application/views/_templates/footer.php';
}
... | true |
6bf9fbe9c1530f60eb67a85e788203a4cb2467fd | PHP | smamir/webdb-course | /project/backend/registerNew.php | UTF-8 | 10,318 | 2.65625 | 3 | [] | no_license | <?php require 'validation.php'; ?>
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "project";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());... | true |
5666929a244b760229b8e95b511231d4e5c83c2f | PHP | ThreadsStyling/nucleus | /Utils/StreamDecorator.php | UTF-8 | 3,028 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Nucleus - XMPP Library for PHP
*
* Copyright (C) 2016, Some rights reserved.
*
* @author Kacper "Kadet" Donat <kacper@kadet.net>
*
* Contact with author:
* Xmpp: me@kadet.net
* E-mail: contact@kadet.net
*
* From Kadet with love.
*/
declare (strict_types = 1);
/**
* XMPP Library
*
* Copyright... | true |
b67ee280ecc6436c470418417e3ec93786226f04 | PHP | touhidalam09/learningLARAVEL | /app/Http/Controllers/CatagoryController.php | UTF-8 | 2,775 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Catagory;
class CatagoryController extends Controller {
// ONLY DISPLAY START
public function indexCatagory() {
$catagorys = Catagory::all();
return view('Catagory.indexCatagory', ['catagorys' => $catagorys]);
... | true |
3612bdadb263a4d65ca5459b485c28eaf57f6578 | PHP | JovannyRch/sistema_cuestionarios | /consultas.php | UTF-8 | 12,673 | 2.609375 | 3 | [] | no_license | <?php
require "database.php";
class Consultas
{
public function __construct()
{
$this->db = new DB();
}
public function iniciarSesion($correo, $pass){
$usuario_admin = $this->db->row("SELECT * from admin where correo = '$correo' and passw = '$pass'");
i... | true |
3d830a042b4adf08e37b81c71f337a6ae099031b | PHP | eng-mahmoud-nage/ERP_school | /database/migrations/2020_02_10_154735_create_courseStudents_table.php | UTF-8 | 1,085 | 2.640625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateCourseStudentsTable extends Migration {
public function up()
{
Schema::create('courseStudents', function(Blueprint $table) {
$table->increments('id');
$table->timestamps();
$table->integer('student_... | true |
e8f29cef50163134d7936e4180adb480a4c96458 | PHP | luigif/WsdlToPhp | /samples/ebay-trading/Scheduling/Type/EbayTradingTypeSchedulingInfoType.php | UTF-8 | 3,155 | 2.640625 | 3 | [] | no_license | <?php
/**
* Class file for EbayTradingTypeSchedulingInfoType
* @date 04/07/2012
*/
/**
* Class EbayTradingTypeSchedulingInfoType
* Documentation : Contains information for scheduling limits for the user.
* @date 04/07/2012
*/
class EbayTradingTypeSchedulingInfoType extends EbayTradingWsdlClass
{
/**
* The Max... | true |
bcd129a3045d331fa390a3ecc151cfbe3759d63b | PHP | DevKhalyd/cecye_api_rest | /addAccounts/addNumberProfessional.php | UTF-8 | 2,181 | 2.9375 | 3 | [] | no_license | <?php
//Usar bindparams para rellenar todo la tabla
//15420070050084
require '../mysqliconnection.php';
//Entonces el registro solo seria un update de la fila que hiciste, alright //Cause se va a crear el numero de la tarjeta
//y si ya esta ocupada o etc...
//Parametros a pasar
if(isset($_GET["noprofe... | true |
22f17b6ebb4ef7fb2cbd42b27461ec33dfb0dc90 | PHP | NipunSingh/MusicMetadataDatabasesClassProject | /genres.php | UTF-8 | 3,172 | 2.75 | 3 | [] | no_license | <?php session_start();
if (!isset($_SESSION['username'])) {
header("Location: signin.php");
}
include_once 'connection.php';
$user_q = "SELECT id, is_admin FROM `music`.`web_user` where `username`='".$_SESSION['username']."'";
$results = mysqli_query($conn,$user_q);
$user_info = mysql... | true |
95b3d94e626324371cab9d93a590110127514eb5 | PHP | alphachoi/duobaohui | /modules/group/Add_editor.class.php | UTF-8 | 1,354 | 2.578125 | 3 | [] | no_license | <?php
namespace Snake\Modules\Group;
/**
* for bussiness activity, add current user as group editor
* @author Chen Hailong
*/
use \Snake\Package\Group\GroupUser;
class Add_editor extends \Snake\Libs\Controller {
private $groupId = NULL;
private $specialGroupIds = array(16169578);
private $userId = NULL;
publ... | true |
2eb035d0733a325d0b1b942a512a0cddc592c65b | PHP | Katharine/pwdb-website | /utils/QuestReward.php | UTF-8 | 3,263 | 2.765625 | 3 | [] | no_license | <?php
class QuestReward implements Serializable {
public $coins, $exp, $new_quest, $spirit, $rep, $cultivation, $storage_slots;
public $cupboard_slots, $wardrobe_slots, $account_stash_slots, $inventory_slots;
public $pet_bag_slots, $chi, $teleport, $ai_trigger, $pq_quest, $pq_level;
public $pq_rand_min,... | true |
e444aaa5b5f887054f5fa83dbc59daa5135ea3dc | PHP | jeffreylikook/Mockup-Ecommerce-Website | /userProfilePage.php | UTF-8 | 2,006 | 2.859375 | 3 | [] | no_license |
<!-- User Profile Page -->
<?php
// get session data
session_start();
require("header.php");
?>
<!-- User information and some links -->
<div class="py-3 text-center">
<!-- user information and picture -->
<div>
<?php
// Show user name profile
echo "<h2> Your Profile " . "\"" . $_SESSION['username'] ... | true |
2b19f6de932cfb78b73b34f4716eb5aa25db50bc | PHP | justrapheal/newfrontend | /uplift/register.php | UTF-8 | 3,390 | 2.609375 | 3 | [] | no_license | <?php
session_start();
require 'dbcon.php';
$fname = '';
$lname = '';
$email = '';
$email2 = '';
$password = '';
$password2 = '';
$date = '';
$fname = '';
$error_arry = array();
if(isset($_POST['subm'])){
$fname = strip_tags($_POST['fname']);//removes html tags
$fname= ucfirst(strtolower($fnam... | true |
01cf484b1114823b413526bcd409ae04bd3d65e3 | PHP | tumtpk/sadman-ptt | /frontend/models/Undercover.php | UTF-8 | 3,042 | 2.5625 | 3 | [] | no_license | <?php
namespace app\models;
use Yii;
use \yii\web\UploadedFile;
/**
* This is the model class for table "undercover".
*
* @property int $id รหัส
* @property string $undercover_number รหัสประจำตัวสายข่าว
* @property string $name ชื่อสายข่าว
* @property int $unitid หน่วยงาน
* @property string $images รูปภาพ
* ... | true |
53699decb17129826b559f1d22886d4492f33ed1 | PHP | azzedine45/blog_ecrivain | /Manager/ArticleManager.php | UTF-8 | 2,482 | 2.984375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: utilisateur
* Date: 10/12/2017
* Time: 11:40
*/
require 'Connexion.php';
require __DIR__ . '/../Entity/Article.php';
class ArticleManager
{
public function __construct()
{
$this->connexion = new Connexion();
$this->commentManage... | true |
c92fe65102b1b53bd3c7873b666aa44ab2fbb1e2 | PHP | 17eyes/17eyes | /tests/parser/foreach_with_references_001.phpt | UTF-8 | 344 | 3.640625 | 4 | [
"ISC",
"BSD-3-Clause"
] | permissive | --TEST--
foreach() with references
--FILE--
<?php
$arr = array(1 => "one", 2 => "two", 3 => "three");
foreach($arr as $key => $val) {
$val = $key;
}
print_r($arr);
foreach($arr as $key => &$val) {
$val = $key;
}
print_r($arr);
?>
Array
(
[1] => one
[2] => two
[3] => three
)
Array
(
[1] => 1
... | true |
7defae44f36b413f010283a36e4d58a279ab47a5 | PHP | Labs64/laravel-boilerplate | /app/Providers/MetaServiceProvider.php | UTF-8 | 3,243 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Providers;
use App\Helpers\Meta\Meta;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\ServiceProvider;
class MetaServiceProvider extends ServiceProvider
{
/**
* Bootstrap the application services.
*
* @return void
*/
public function boot()
{
/*... | true |
bfab483ac9f6e804f2187085365a06f791a635f6 | PHP | eolabs-io/amazon-mws-client | /src/Support/UrlSigner.php | UTF-8 | 2,876 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace EolabsIo\AmazonMwsClient\Support;
use GuzzleHttp\Psr7\Query;
use EolabsIo\AmazonMwsClient\Support\UrlSignerException;
class UrlSigner
{
/** @var array */
private $parameters;
/** @var string */
private $url;
/** @var string */
private $method = 'POST';
public function... | true |
d16416521a24c10d678b0906f7c4a642f99b74d2 | PHP | abdou70/CreationBanquePOO | /src/controller/creerCompteController.php | UTF-8 | 6,798 | 2.71875 | 3 | [
"CC0-1.0"
] | permissive | <?php
spl_autoload_register('myautoload');
spl_autoload_register('myautoload1');
function myautoload($classname){
$path='../model/';
$extension='db.php';
$full= $path.$extension;
include_once $full;
}
function myautoload1($classname1){
$path1='../Entite/';
$extension1='compteentite.php';
$full1= $p... | true |
4a35d3cdd7e10bd01002105010436080b6829d88 | PHP | lelesys/Lelesys.Plugin.Newsletter | /Classes/Lelesys/Plugin/Newsletter/Domain/Service/PersonService.php | UTF-8 | 12,266 | 2.53125 | 3 | [] | no_license | <?php
namespace Lelesys\Plugin\Newsletter\Domain\Service;
/* *
* This script belongs to the package "Lelesys.Plugin.Newsletter". *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU ... | true |
be87dd724b9a4d0378c98563467c56939b46021d | PHP | capitalJT/syn-theme | /wp-content/themes/synack/lib/Theme/CareersRewrite.php | UTF-8 | 1,345 | 2.703125 | 3 | [] | no_license | <?php
/**
* Adds custom rewrite rules for single career pages
*
* @package WordPress
* @subpackage Synack
* @author Mike Sawicki <msawicki@nerdery.com>
* @since 1.0
*
*/
/**
* The url based where single careers can be accessed from
* @todo This should probably be a global option
*
* @var string
*/
$CAR... | true |
14bee35f893a7e1323a159a344f6b45fffa86e41 | PHP | parshikovpavel/algorithmic-problems | /tests/TwoSumII/SolutionTest.php | UTF-8 | 681 | 3.109375 | 3 | [] | no_license | <?php
namespace ppAlgorithm\TwoSumII;
use PHPUnit\Framework\TestCase;
class SolutionTest extends TestCase
{
function data()
{
return [
[[ 2, 7, 11, 15], 9, [1, 2]],
[[ 1, 3], 4, [1, 2]],
[[ 1, 2, 3, 5], 6, [1, 4]],
[[ 1, 2, 5, 7, 3], 4, [1, 5]],
... | true |
841c837a2f8386ecb29d0ae2771633a61f2521bd | PHP | fallenPineapple/NPFchan | /inc/announcements.php | UTF-8 | 4,947 | 2.640625 | 3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
// Wrap functions in a class so they don't interfere with normal Tinyboard operations
class Announcements {
static public function new_announcement($announcement, $mod_id = false) {
global $mod, $config;
if ($mod_id === false) {
$mod_id = isset($mod['id']) ? $mod['id'] : -1;
}
$qu... | true |
58d22d7f1deffa93b4c00c9c606c11c342861eb2 | PHP | realfredlai/webAssignment | /comp333assn1/StockProcess.php | UTF-8 | 1,656 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
ini_set("error_reporting",E_ALL);
ini_set("log_errors","1");
ini_set("error_log","php_errors.txt");
if(!empty($_POST['name']) && !empty($_POST['pass'])) //make sure there are inputs from login part
{
$conn=mysqli_connect("mysql.cms.waikato.ac.nz","ll245","asdfgzxcvb","ll245"); //connect to database
//avoid sq... | true |
0fe8a4708d75b53053936ed8faf87ed16ed16fb0 | PHP | adeline64/cuisine1 | /index.php | UTF-8 | 5,241 | 2.609375 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
//Autoload charg� AVANT la session pour cr�er les objets stock�s en session
require_once 'include/autoload.php';
/*
* MODE DEBUG:
* - 1: actif
* - 0: inactif
*/
define('_DEBUG_',1);
ini_set('display_errors', '1');
ini_set('error_... | true |
d1bad7b1f49a756ef5f9f3ac3caabb20e1708476 | PHP | f13dev/webDMS-0.3b | /webroot/inc/dms/deleteFolder.php | UTF-8 | 1,531 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
// Stop direct access
if(basename(__FILE__) == basename($_SERVER['PHP_SELF'])){
header("Location: ../../");
}
// Process delete
if (isset($_POST['submit'])) {
if (isset($_POST['token']) && $_POST['token'] == $_SESSION['oldToken']) {
// Check number of files in folder
$count = $dbh->prepare('SELECT ... | true |
bd565622f6e66f85ba204e46cb1139f669206a1d | PHP | fm-labs/cakephp-media | /src/Form/RenameFileForm.php | UTF-8 | 1,073 | 2.734375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Media\Form;
use Cake\Form\Schema;
use Cake\Validation\Validator;
/**
* RenameFileForm.
*/
class RenameFileForm extends FileForm
{
public function _buildSchema(Schema $schema): Schema
{
$schema = parent::_buildSchema($schema);
$schema->addField('new_... | true |
d7c91b037400d0ba6f7338c07eac2575b46125be | PHP | emartinrda/inge4 | /Clase12/Ejercicio1/persona.php | UTF-8 | 1,501 | 3.609375 | 4 | [] | no_license | <?php
//Incluir el archivo telefono en en archivo persona
include 'Telefono.php';
class Persona
{
private $nombre;
private $apellido;
private $cedula;
private $direccion;
private $edad;
private $telefonos = array();
function __construct()
{
}
public function getNombre(){
return $this->nombre;
}
p... | true |
3ce14eb8ea9424f681e31812f5b4bfea38956b55 | PHP | brown-bytes/brown-bytes | /app/controllers/SessionController.php | UTF-8 | 9,640 | 2.890625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* SessionController
*
* Allows to authenticate users
*/
class SessionController extends ControllerBase
{
public function initialize()
{
$this->tag->setTitle('Sign Up/Sign In');
parent::initialize();
}
public function indexAction()
{
if (!$this->request->isPos... | true |
feebb68b4b5f04bd8b7447d4111c180d349f9c64 | PHP | annetrent1/cs313-php | /web/w06/editStack.php | UTF-8 | 1,289 | 2.703125 | 3 | [] | no_license | <?php
$stackid = $_GET['stackid'];
$name = $_GET['name'];
require "./dbConnect.php";
$db = get_db();
if(isset($_POST['submit'])) {
$name = $_POST['edit'];
$id = $_POST['stackid'];
if ($name != "" && $id != ""){
$query = $db->prepare("UPDATE public.stack SET name=... | true |
2255b0171145b27b333db549af81b0c0bdfa8969 | PHP | parthbt143/vsmusicals | /Reports/report-purchase.php | UTF-8 | 3,847 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
include 'connection.php';
$msg="";
if(isset($_POST['supbtn'])){
$sup =$_POST['supp'] ;
$purq= mysqli_query($connection, "SELECT * FROM tbl_purchase where is_delete=0 AND sup_id = '{$sup}' ") or die(mysqli_errno($connection));
$supq = mysqli_query($connection,"select * from tbl_suppli... | true |
a53109ba32fe65f14c8fe99e148a48c2ef9a08eb | PHP | JuhaszAdam/PhPAlapok | /3/Structural/Facade/Monitor.php | UTF-8 | 185 | 3.046875 | 3 | [] | no_license | <?php
namespace DesignPatterns\Structural\Facade;
class Monitor implements MonitorInterface
{
public function crack()
{
echo "Monitor has cracked!" . PHP_EOL;
}
}
| true |
1db313e71d58f26450b421444936ed7c8b69d16f | PHP | flederohr/gdo6 | /GDO/UI/GTD_HTMLPage.php | UTF-8 | 1,297 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace GDO\UI;
use GDO\Core\GDT;
use GDO\Core\GDT_Template;
/**
* This widget renders the ui/page.php template. the index.php of your site.
* It holds all the bars and section hooks to render. calls them early and renders them later.
* Another section is Website::topResponse
* @author gizmore
* @versio... | true |
9d829b0ff5b7ef2d70cf2c8b605e00e1e8f91a86 | PHP | habari-extras/mail_smtp | /mail.php | UTF-8 | 88,761 | 2.765625 | 3 | [] | no_license | <?php
// +-----------------------------------------------------------------------+
// | Copyright (c) 2001-2002, Richard Heyes |
// | All rights reserved. |
// | |
// | R... | true |
4747e878237af2dbc543820c9d92b7d53429908a | PHP | ndthanhduy911/vltk | /web/apps/websites/backend/modules/master/forms/ProfileForm.php | UTF-8 | 2,009 | 2.734375 | 3 | [] | no_license | <?php
namespace Backend\Modules\Master\Forms;
use Phalcon\Forms\Form;
use Phalcon\Forms\Element\Text;
use Phalcon\Forms\Element\Select;
use Phalcon\Forms\Element\Email;
class ProfileForm extends Form
{
public function initialize($entity = null, $options = null)
{
$username = new Text('username');
... | true |
2bce0a54ace3144700b62d3e5967c323a9be1ead | PHP | Algatux/wallet-project | /src/AppBundle/Entity/Contracts/FileAwareInterface.php | UTF-8 | 813 | 2.796875 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace AppBundle\Entity\Contracts;
use Symfony\Component\HttpFoundation\File\UploadedFile;
/**
* Interface FileAwareInterface
*/
interface FileAwareInterface
{
/**
* @return string|null
*/
public function getFilename();
/**
* @return string|null
... | true |
6629113408204931af605be791f17a645de48dca | PHP | Sila-Money/sila-sdk-php | /lib/Domain/RegistrationDataBaseMessage.php | UTF-8 | 919 | 2.765625 | 3 | [] | no_license | <?php
/**
* Registration Data Base Message
* PHP version 7.2
*/
namespace Silamoney\Client\Domain;
use JMS\Serializer\Annotation\Type;
/**
* Registration Data Base Message
* Object used as the base message in [add|update]/<registration-data> endpoints.
* @category Class
* @package Silamoney\Client
* @autho... | true |
fc7c06f3b866cae09d01bca90412edeb141abb88 | PHP | opportus/demo-rest-api | /src/EventSubscriber/EntityValidatorSubscriber.php | UTF-8 | 2,575 | 2.65625 | 3 | [] | no_license | <?php
namespace App\EventSubscriber;
use Doctrine\Common\EventSubscriber;
use Doctrine\Common\Persistence\Event\LifecycleEventArgs;
use Symfony\Component\Validator\Exception\ValidatorException;
use Symfony\Component\Validator\Validator\ValidatorInterface;
/**
* The entity validator subscriber.
*
* @package App\Ev... | true |
9934406de4c399d39a3f29fe4dd09b8a446d656f | PHP | shoiebsamani/Android_Event_Management | /src/newAccount.php | UTF-8 | 1,216 | 2.515625 | 3 | [] | no_license | <?php
include("db.php");
$username = $_POST['username'];
$displayName = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
$phoneNumber = $_POST['phoneNumber'];
$companyTaxNumb = $_POST['companyTaxNumb'];
// $username = "ae";
// $displayName = "hello";
// $password = "p... | true |
6835e2c0b335112d21c7c723e58197ab9066b582 | PHP | llxcyzgh/wamp_demo | /back/hspoop/096-traits.php | UTF-8 | 1,080 | 3.578125 | 4 | [] | no_license | <?php
header("content-type:text/html;charset=utf-8");
/*
自 PHP 5.4.0 起,PHP 实现了代码复用的一个方法,称为 traits。
Traits 是一种为类似 PHP 的单继承语言而准备的代码复用机制。Trait 为了减少单继承语言的限制,使开发人员能够自由地在不同层次结构内独立的类中复用方法集。Traits 和类组合的语义是定义了一种方式来减少复杂性,避免传统多继承和混入类(Mixin)相关的典型问题。
Trait 和一个类相似,但仅仅旨在用细粒度和一致的方式来组合功能。Trait 不能通过它自身来实例化。它为传统继承增加了水平特性的组合;也就是说,应用类的成员... | true |
23713abab625c52a195aa8ecf6188c77de84a68d | PHP | richasinhaa/propertytime-api | /src/Nuada/ApiBundle/Manager/NeighbourhoodEnquiryManager.php | UTF-8 | 4,137 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Nuada\ApiBundle\Manager;
use Doctrine\Bundle\DoctrineBundle\Registry as Doctrine;
use Nuada\ApiBundle\Entity\BadAttributeException;
use Nuada\ApiBundle\Entity\NeighbourhoodEnquiry;
use Symfony\Component\Config\Definition\Exception\Exception;
use Symfony\Component\Security\Core\SecurityContextInterface... | true |
00d9892306112e8c9dd66f16357a170fa30b24ff | PHP | yohstone/proxy-pool | /function.php | UTF-8 | 7,013 | 2.921875 | 3 | [] | no_license | <?php
/*
* 获取指定代理网站的代理ip
* $urls : 需爬取的代理网站数组,其中包括了网站的链接、需爬取内容的正则匹配表达式。
* 详情请看config.php文件
* return : 返回抓取到的代理数据数组
*/
function get_proxy($urls){
$size = count($urls);
for($i=0; $i < $size; $i++){
for($page=1; $page <= $urls[$i]['pages']; $page++){
try {
$url... | true |
84c7d8424819fa6798e51adc9403fa5a969f72b3 | PHP | Hy-Fly/Joomla-Hello-Front-End | /site/controllers/helloexport.raw.php | UTF-8 | 3,513 | 2.578125 | 3 | [] | no_license | <?php
/**
* @package Joomla.Administrator
* @subpackage com_helloworld
*
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die('Restricted access');
/** Include PHPExcel */
require_once $_SERVER['DOCUMENT_ROOT'].'/lib/Classes/PHPExcel.php';
/**
* HelloExp... | true |
04bf830800b23911bf26b61b23dffa8d968e687d | PHP | graphen/ex-framework | /ExFramework/ExFramework/core/ViewResolver/ViewResolver.class.php | UTF-8 | 5,694 | 2.875 | 3 | [] | no_license | <?php
/**
* @class ViewResolver
*
* @author Przemysław Szamraj [BORG]
* @version 1
* @copyright Przemysław Szamraj
*
*/
class ViewResolver implements IViewResolver {
/**
* Obiekt fabryczny widokow
*
* @var object
*
*/
protected $_viewFactory = null;
/**
* Obiekt zadania
*
* @var obje... | true |
5ce62e3e6673988482cba2591b45833804f29464 | PHP | open-source-contributions/web-debug-php-core | /src/Builders/Types/TypeTsMs.php | UTF-8 | 908 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace WebDebug\Builders\Types;
/**
* @see https://web-debug.dev/docs/scheme/types.html#tsms
*/
final class TypeTsMs extends AbstractType
{
/**
* unixtime (GMT) with milliseconds.
*
* @var float
*/
private $value;
/**
* TsMili constructor.
... | true |
ffa03623cd54e307bc679c39c9e2cf1114759376 | PHP | duxphp/duxravel-app | /src/core/UI/Form/Editor.php | UTF-8 | 707 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Duxravel\Core\UI\Form;
/**
* 编辑器
* @package Duxravel\Core\UI\Form
*/
class Editor extends Element implements Component
{
/**
* @param string $name
* @param string $field
* @param string $has
*/
public function __construct(string $name, string $field, string $has = ... | true |
bb5681c23e0fff044b26e280589c6df498e27143 | PHP | juliagre/Vorgurakendused-I | /comment/rate.php | UTF-8 | 600 | 2.65625 | 3 | [] | no_license | <?php
date_default_timezone_set('Europe/Tallinn');
include 'db2.php';
include 'rate2.php';
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title> Rate </title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id= "poll">
<h3> What is your Gender? </h3>
<form metho... | true |
12b673a9ee2adc5892a9d3ce2cc7271e956a9c82 | PHP | Giampaolo1/php-oop-1 | /oop.php | UTF-8 | 1,404 | 3.1875 | 3 | [] | no_license | <!-- TODO TODAY:
REPO: php-oop-1
GOAL: completare il file todoToday.php in modo da stampare tutte le configurazioni presenti del DB, attraverso la programmazione OOP -->
<?php
class Configurazione {
// variabili, no libera scelta ma colonne della tabella del db, rappresentare una realtà coesistente
// variabili d... | true |
3b86c5fc805dc0abca44da955d30f402e8c829ff | PHP | cameronjacobson/SimpleS3 | /examples/puturl.php | UTF-8 | 453 | 2.640625 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
require_once(dirname(__DIR__).'/vendor/autoload.php');
use SimpleS3\SimpleS3;
$s3 = new SimpleS3(array(
'profile'=>'default',
'bucket'=>$argv[1],
'region'=>'us-west-2',
'error'=>function($result){
throw new Exception($result);
}
));
// IN ORDER TO PUT FILE INTO S3 BUCKET, USE FOLLOWING COMMAND:
// cu... | true |
ccd1ec38b145556f40744f0ce9e8829995cbccdd | PHP | anoop-pathak/git-demo | /app/Services/Google/GoogleTasksService.php | UTF-8 | 4,837 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Google;
use App\Traits\HandleGoogleExpireToken;
use Carbon\Carbon;
use Google_Service_Tasks;
class GoogleTasksService
{
use HandleGoogleExpireToken;
protected $client;
public function __construct()
{
$this->client = new \Google_Client();
$this->client->... | true |
2c910dc082268959bc588a5d678ff563d6dca952 | PHP | vgrankin/symfony_4_cli_payment_dates_calculator | /src/Service/PaymentDatesCalculator.php | UTF-8 | 5,916 | 3.140625 | 3 | [] | no_license | <?php
namespace App\Service;
use Symfony\Component\Validator\ConstraintViolationListInterface;
use Symfony\Component\Validator\Constraints as Assert;
class PaymentDatesCalculator extends AbstractBaseService
{
/**
* Get payment dates table for the next $monthsCount months.
*
* @param string $yearMo... | true |
0ca6f9e72374a3e891b50ee11aef197487ba59ce | PHP | tufailkhan5093/OnlinejobPortal | /database/migrations/2021_09_27_054426_create_postjobs_table.php | UTF-8 | 1,367 | 2.578125 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePostjobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('postjobs', fun... | true |
59cc6029b2a2cd9dede7d16e2afe964e905423a9 | PHP | rodriguesrenann/laravelcms | /app/Http/Controllers/AdminController.php | UTF-8 | 1,775 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Visitor;
use App\Models\Page;
use App\Models\User;
class AdminController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
public function home(Request $request) {
//Int... | true |
fe79e3e32ec942a7bc9983784a48c2863e1231ae | PHP | TzepART/examples-of-patterns | /src/StructuralPatterns/Bridge/WebPageInterface.php | UTF-8 | 383 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Patterns\StructuralPatterns\Bridge;
/**
* Interface WebPageInterface
* @package Patterns\StructuralPatterns\Bridge
*/
interface WebPageInterface
{
/**
* WebPageInterface constructor.
* @param ThemeInterface $theme
*/
public function __construct(ThemeI... | true |
17d5d3f53cde0a8380a837f71ea9bed67f633ad1 | PHP | isszz/think-blade | /src/BladeInstance.php | UTF-8 | 5,693 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace think\view\driver;
use Illuminate\Contracts\View\View as ViewInterface;
use Illuminate\View\Compilers\BladeCompiler;
use Illuminate\View\Engines\CompilerEngine;
use Illuminate\View\Engines\EngineResolver;
use Illuminate\View\Engines\FileEngine;
use Illuminate\View\Engines\PhpE... | true |
b3122905d9fe32253c4aff79cb94419ab0406b18 | PHP | iizfrozen/SE_Project | /SE_Project/reportpage/writeCheckinRecords.php | UTF-8 | 1,049 | 2.859375 | 3 | [] | no_license | <?php
//Initial setup...
$user = 'root';
$pass = '';
$db ='seproject';
$table = 'checkin';
$filename = (isset($_GET['filename']) ? $_GET['filename'] : null);
$db = new mysqli('localhost',$user,$pass,$db) or die("Unable to connect");
$sql = "SELECT * FROM ".$table;
$result = $db->query($sql);
if($re... | true |
e3a6c787ade45e5235463c1be2443dcd73ba9314 | PHP | bhagvank/PHPWeb | /write_file.php | UTF-8 | 569 | 3.515625 | 4 | [
"Apache-2.0"
] | permissive | <html>
<head>
<title>Creating a file using PHP</title>
</head>
<body>
<?php
$textfile = "example.txt";
$file = fopen( $textfile, "r" );
if( $file == false ) {
echo ( "Error : opening file" );
exit();
}
$filesize = file... | true |
36e55e4ad119cb0b14bd1b34821479fb833f7380 | PHP | mak-oh-1977/reserve | /21_api_apps/api/200_reserve_frame_api.php | UTF-8 | 1,729 | 2.578125 | 3 | [] | no_license | <?php
//////////////////////////////////////////////////////////////////////////
//
// 予約枠情報API
//
class C200_reserve_frame_api extends api
{
//////////////////////////////////////////////////////////////////////////
//
// 一覧
//
function list_reserve($res, $p)
{
$sql = "
select
EventId... | true |
41f31c99af839323103acb9e8c7039218920e613 | PHP | acanotes/AcaNotes | /web/build/api/v1/content/createNote.php | UTF-8 | 3,076 | 2.671875 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: *");
header("Access-Control-Allow-Methods: POST, GET, OPTIONS, PUT, DELETE");
$data = json_decode(file_get_contents('php://input'), true);
require_once($_SERVER["DOCUMENT_ROOT"] . '/api/inc/base.php');
include '../../inc/connect.php... | true |
4c340c4f2145d35a5d232ebdf76ec31f06f4f835 | PHP | lnidaa/myproj1 | /models/Order.php | UTF-8 | 458 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Dashok
* Date: 19.02.2018
* Time: 15:20
*/
namespace app\models;
use Yii;
use yii\base\Model;
class Order extends Model
{
public $restaurant;
public $date_order;
public function rules()
{
return [
['restaurant', 'trim'],
... | true |
bd1584d7659de983fafd0da79d1491befa4f3eea | PHP | thaifani/meevly | /app/UserRecord.php | UTF-8 | 2,336 | 2.59375 | 3 | [] | no_license | <?php
namespace App;
use Carbon\Carbon;
use App\Events\UserRecordSaving;
use Illuminate\Database\Eloquent\Model as Eloquent;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Collective\Html\Eloquent\FormAccessible;
/**
* @property int $owner_id
* @property string $bankroll
* @property int $games_coun... | true |
2f7fea691e6e61989e75c25d99a23ed1643d3dbb | PHP | SaloEater/php-ton-client-for-itgold | /src/Processing.php | UTF-8 | 3,951 | 2.625 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Extraton\TonClient;
use Extraton\TonClient\Entity\Abi\AbiType;
use Extraton\TonClient\Entity\Abi\CallSet;
use Extraton\TonClient\Entity\Abi\DeploySet;
use Extraton\TonClient\Entity\Abi\Signer;
use Extraton\TonClient\Entity\Processing\ResultOfProcessMessage;
use Extraton\TonCl... | true |
c7a272ea349c9ef0498b7276c338955d05e1d0ae | PHP | shroukshalaby/Elsaraf | /database/migrations/2021_02_09_222322_create_logo_table.php | UTF-8 | 737 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateLogoTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('logo', function (B... | true |
d76f1032120e93a5bb23d2d80b7970b4aa2bd87b | PHP | agence-adeliom/easy-page-bundle | /src/EventListener/LayoutsListener.php | UTF-8 | 3,496 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Adeliom\EasyPageBundle\EventListener;
use Adeliom\EasyPageBundle\Entity\Page;
use Adeliom\EasyPageBundle\Repository\PageRepository;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
use Symfony\Component\HttpKernel\Event\RequestEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Tw... | true |
9b0e15991da7a8d6c877d88d61dbab94f33a72ce | PHP | Lazzytchik/webnews | /article.php | UTF-8 | 1,420 | 2.53125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>News</title>
<link href="css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<?
... | true |
774286c7cab18d0f9a8c959d42aec79a3d8fa752 | PHP | SingingChen/oop | /polymorphism.php | UTF-8 | 1,896 | 3.578125 | 4 | [] | no_license | <?php
interface dataTransferImterface//定義網站傳送資料
{
public function getdataID();//資料ID
public function getdata();//資料內容
}
class dataStorage//網站獲得 存取資料用
{
protected $dataArray =[];//宣告存放資料用的陣列
public function addData(dataTransferImterface $dataTransfer)//取得資料方法
{
$arrayKey= $dataTransfer->getdat... | true |
d025ab6e004413fc4fbb9fbf649bd81120d8cb80 | PHP | HaYToKoRaZ/caseopening | /www/html/includes/db.php | UTF-8 | 5,396 | 2.671875 | 3 | [] | no_license | <?php
function Query($query, $variables = array(), $orderby = null, $format = 'ASC', $limit = null, $groupby = null) {
$db = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME) or die("<p class='error'>Sorry, we were unable to connect to the database server.</p>");
if ($variables) {
$query .= ' WHERE ';
... | true |
bfdef1f77df86ef18b8d5789f36764a85f8fa103 | PHP | MTAugusto/ControleAcesso | /api/persistencia/EntradaVeiculoDAO.php | UTF-8 | 3,154 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
function insert()
{
date_default_timezone_set('America/Sao_Paulo');
global $connection;
$veiculo=$_POST["veiculo"];
$dataAtual=date("Y-m-d H:i:s", time());
$usuarioAtual = getIdUser();
//buscar entrada veiculo -- $entrada[0]->id;
$query2="SELECT * FROM entradas_veiculos WHERE veiculo='... | true |
6756dafb4c8868a877f43b9fc562ca0d6a006d86 | PHP | OISHIChowdhury2/learning_web_technologies_H | /MID_LAB_TASK_PHP_04/task1.php | UTF-8 | 267 | 3.21875 | 3 | [] | no_license | <?php
function rect_area($length = 4, $width = 8)
{
$area = $length * $width;
print("Area Of Rectangle = " . $area);
echo "\n";
$peramiter = 2*($length * $width);
echo("peramiterfor Rectangle=" . $peramiter);
}
rect_area();
?>
| true |
0331ce3d5db21731010672a6e44642db2d0bd926 | PHP | EscuelaIt/php-aplicaciones-profesionales | /App/Models/Manual.php | UTF-8 | 2,504 | 2.90625 | 3 | [] | no_license | <?php
namespace App\Models;
class Manual {
private $connection;
public function __construct() {
$this->connection = Connection::getInstance()->getConnection();
}
public function getAll() {
$ssql = "select * from manuals";
$result = $this->connection->query($ssql);
return $result->fetchAll();... | true |
c1f867260c26c101b4bc2be187b6a1edc1c841dd | PHP | Badoyan/CRUD_LOGIN_REGISTER | /registration.php | UTF-8 | 743 | 2.953125 | 3 | [] | no_license | <?php
// If form submitted, insert values into the database.
if (isset($_REQUEST['username'])){
$auth = new UserAuth();
$auth->register($_POST);
}else{
?>
<div class="form">
<h1>Registration</h1>
<form name="registration" action="" method="post">
<input type="text" na... | true |
e2da1226feb89abcd69e05c68cddae25a331db67 | PHP | mubin-khalid/Boilerplate | /app/Helpers/Hello.php | UTF-8 | 229 | 3.203125 | 3 | [] | no_license | <?php
namespace App\Helpers;
class Hello
{
protected $name;
public function __construct($name)
{
$this->name = $name;
}
public function greet()
{
return "Hello {$this->name}!";
}
}
| true |
7077bb118b03d612ec3df01366ffd15b172d0829 | PHP | DevComSHINE/shine-os-deved | /src/ShineOS/functions/lovs.php | UTF-8 | 745 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
use Shine\Libraries\Utils\Lovs;
/*
* Methods related to Lovs
*
* @package ShineOS+
* @subpackage Lovs
* @version 3.0
*
*/
/**
* Get records from a given table
* @param string $tableName Table Name
* @param array $column an array of column names
* @param string $returnType Data type to r... | true |