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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
f9ac62be743dc1104c40d0008afe0ca4c42745f5 | PHP | sin0r/kaffeeAdministrierung | /generateGraph.php | UTF-8 | 2,704 | 2.625 | 3 | [] | no_license | <?php
require_once ('jpgraph-4.2.0/src/jpgraph.php');
require_once ('jpgraph-4.2.0/src/jpgraph_line.php');
require_once ('database.php');
$DB_host = "localhost";
$DB_user = "root";
$DB_pass = "";
$DB_name = "coffeeAdministration";
$DB_con = new PDO("mysql:host={$DB_host};dbname={$DB_name}", $DB_user, $DB_pass);
$DB_co... | true |
b131dd21e3f305dd2894faade95a554949855c87 | PHP | thbsfortest/test | /application/model/Customer.php | UTF-8 | 677 | 3 | 3 | [] | no_license | <?php
/**
* Customer model
*
* @category TechTest
* @package TechTest
* @copyright 2011 Everything Everywhere
*/
/**
* Customer model
*
* This class represents a single customer within the system.
*
* @category TechTest
* @package TechTest
* @author Customer Interactions <tactical.cs@everythingever... | true |
50907cd2dd8d38d9af64ca9b865b8110af586594 | PHP | tranduc-06/web-phu-kien-dien-thoai | /page/main/dangky.php | UTF-8 | 1,237 | 2.578125 | 3 | [] | no_license | <?php
if(isset($_POST['dangky']))
{
$tenkhachhang = $_POST['hovaten'];
$email = $_POST['email'];
$sodienthoai = $_POST['sodienthoai'];
$diachi = $_POST['diachi'];
$matkhau = md5($_POST['matkhau']);
$sql_dangky = "INSERT INTO dangki(tenkhachhang,diachi,email... | true |
85c265ff69cb99130739272be9429d667537321e | PHP | creode/csmt-dashboard | /src/app/Http/Controllers/ProjectController.php | UTF-8 | 2,535 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use App\Project;
use App\Rules\AuthenticateCsmt;
use Illuminate\Http\Request;
class ProjectController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
... | true |
9cfdfdf47451f7e9099de4363f6479cb4c2ad219 | PHP | mostafajamali1997/mazandgaz | /application/models/Tickets.php | UTF-8 | 2,060 | 2.8125 | 3 | [] | no_license | <?php
class Tickets extends CI_Model
{
private $id;
private $createdBy_username;
private $createdDateTime; //current timestamp database
private $department;
private $level;
private $status;
private $viewStatus;
private $doesSeeByCompany;
public function __construct()
{
parent::__construct();
}
publi... | true |
1ccf6f7f9fa6be771dd00220b6d0c69170ee6bad | PHP | Shop2market/Magento2 | /Model/Queue.php | UTF-8 | 2,007 | 2.625 | 3 | [] | no_license | <?php
namespace Adcurve\Adcurve\Model;
use Adcurve\Adcurve\Api\Data\QueueInterface;
class Queue extends \Magento\Framework\Model\AbstractModel implements QueueInterface
{
public const QUEUE_STATUS_NEW = 'new';
public const QUEUE_STATUS_UPDATE = 'update';
public const QUEUE_STATUS_COMPLETE ... | true |
1ea99d5878dd37f96938e49b908ddd3051f3aac6 | PHP | verbanent/eloquent-binary-uuid | /tests/Grammars/MySqlGrammarTest.php | UTF-8 | 1,303 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Verbanent\Uuid\Test\Grammars;
use PHPUnit\Framework\TestCase;
use ReflectionException;
use ReflectionMethod;
use Verbanent\Uuid\Grammars\MySqlGrammar;
/**
* Unit tests for class \Verbanent\Uuid\Grammars\MySqlGrammar.
*/
class MySqlGrammarTest extends TestCase
{
/**
... | true |
b74b8947c417af1a34d482d03f2800bbc364ec60 | PHP | BluRay/eduline | /apps/classroom/Lib/Model/ZyVideoModel.class.php | UTF-8 | 3,050 | 2.59375 | 3 | [] | no_license | <?php
/**
* 课程模型 - 数据对象模型
* @author wayne <idafoo@sina.com>
* @version TS3.0
*/
class ZyVideoModel extends Model {
var $tableName = 'zy_video';
protected $error = '';
/**
* 获取课程列表
* @param $limit 记录数量
* @param $is_activity 课程是否通过审核
*/
public function getVideosList($limit = 20, $is_activit... | true |
a79156374cddd1f08ef4d630bae8c4eb6df2e455 | PHP | lathspe11/AWS-Backup | /cpnam2tc.php | UTF-8 | 5,342 | 2.65625 | 3 | [] | no_license | #!/usr/bin/php5
<?php
//######################################################################################
//This will copy the tar balls created from backuppc to the proper encrypted container.
// Run after allstar.sh / createvol.php / mount.php script
//Define directory paths and standard container and file nam... | true |
98d4fbb8f7a425bd6608beff9d8cd1754ee92b65 | PHP | ramonaerts/LibraryDashboard | /XLSXUpload.php | UTF-8 | 18,586 | 2.84375 | 3 | [] | no_license | <?php
function UploadFunction()
{
$conn = mysqli_connect('localhost', 'root', '', 'asmlcompare');
include_once 'Classes/PHPExcel/IOFactory.php';
if ($_FILES['file']['name']) {
$inputfilename = strtolower($_FILES['file']['name']);
$exceldata = array();
// Read your Excel work... | true |
7f4ed99f1fad67e32b1108c2baff073e94862a2e | PHP | kavin851018/tutorSystem | /clinic/booking_system/delete_overdue.php | BIG5 | 3,224 | 2.75 | 3 | [] | no_license | <?php
$target = "login.htm";
include 'check_login.php';
if( $valid )
{
include '../../connect_db.php';
$period = array ("2048" => "9:00~10:00", "1024" => "10:00~11:00", "512" => "11:00~12:00", "256" => "12:00~13:00", "128" => "13:00~14:00", "64" => "14:00~15:00", "32" => "15:00~16:00", "16" => "16:00~17:00", "8" => ... | true |
b45ebdacd90d8884633b936cb2ea7feb3be05093 | PHP | suvorovis/transactions | /app/Route.php | UTF-8 | 1,774 | 3.4375 | 3 | [] | no_license | <?php
namespace transactions;
class Route
{
/**
* @var string
*/
private $type;
/**
* @var string
*/
private $path;
/**
* @var string
*/
private $controller;
/**
* @var string
*/
private $method;
/**
* @var array
*/
private $rol... | true |
138a4cde20796bebf070d28655b1f2029626a539 | PHP | inabahtrg/KalturaServerCore | /alpha/apps/kaltura/lib/access_control/model/rules/kAccessControlSessionRestriction.php | UTF-8 | 1,283 | 2.625 | 3 | [] | no_license | <?php
/**
* @package Core
* @subpackage model.data
*
* Old session restriction for backward compatibility
*/
class kAccessControlSessionRestriction extends kAccessControlRestriction
{
/**
* @var kAuthenticatedCondition
*/
private $condition;
/**
* @param accessControl $accessControl
*... | true |
4d89b04632be448370e6e857f749d3aeccd16b12 | PHP | lethidiem/Automation_LoginWordpress | /tests/acceptance/LI_16Cest.php | UTF-8 | 284 | 2.515625 | 3 | [] | no_license | <?php
use Step\Acceptance\First as LI_16Step;
class LI_16Cest
{
/**
* @param LI_16Step $I
* check if a user be able to press enter key instead of use mouse
*/
public function checkLI_16(LI_16Step $I)
{
$I->LI_16('thidiem257@gmail.com','diemle30071998');
}
} | true |
e280dedd3e0080ee24e624ae6eb23f2cf412d592 | PHP | HackerFellow/apiHackDay | /index.php | UTF-8 | 4,957 | 2.890625 | 3 | [] | no_license | <?PHP
//All requests go here, and set the GET page to tell us what they want
//Some very questionable decisions are made here, to meet the requirements.
//JSON is passed from the search page into the button, which throws it via
// an ajax post call to the API, which stores it in database.
ini_set('display_errors', 1);
... | true |
9b1399d18247e6473a44fa3c1360931f74194f4a | PHP | mammawhy9/urlMonster | /app/lib/application.php | UTF-8 | 2,226 | 2.890625 | 3 | [] | no_license | <?php
namespace app\lib;
/**
* class for application
*/
class application {
/**
* application instance
* @var application
*/
private static $selfInstance;
/**
* controller of application
* @var mixed
... | true |
a3f9a18933f2b948bd48f9761b39058d69382357 | PHP | nestauk/DSI4EU | /src/DSI/Entity/ProjectPost.php | UTF-8 | 2,103 | 2.9375 | 3 | [] | no_license | <?php
namespace DSI\Entity;
class ProjectPost
{
/** @var int */
private $id;
/** @var Project */
private $project;
/** @var User */
private $user;
/** @var string */
private $time,
$title,
$text;
/** @var int */
private $commentsCount;
/**
* @retur... | true |
e5ae83fcb49df12a6990b78612a0462a6560d356 | PHP | purpen/phenix | /src/Sher/Core/Model/Follow.php | UTF-8 | 2,594 | 2.578125 | 3 | [] | no_license | <?php
/**
* 粉丝、关注
*/
class Sher_Core_Model_Follow extends Sher_Core_Model_Base{
protected $collection = "follow";
protected $mongo_id_style = DoggyX_Model_Mongo_Base::MONGO_ID_SEQ;
//单项关注
const ONE_TYPE = 1;
//互相关注
const BOTH_TYPE = 2;
//最多能关注的人数
const MAX_FOLLOW = 2000;
... | true |
6f84cf0a05a2e412d12efb25307520c4a5c33330 | PHP | md-adil/schema-builder | /src/Contracts/ColumnInterface.php | UTF-8 | 127 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Contracts;
interface ColumnInterface {
public function getName();
public function parse($defination);
}
| true |
050dd2dda4a04db922162f5bb264570bc9262099 | PHP | nekrasovdmytro/imageGallery | /src/GalleryBundle/GalleryPusher/BaseGalleryPusher.php | UTF-8 | 997 | 2.953125 | 3 | [] | no_license | <?php
namespace GalleryBundle\GalleryPusher;
class BaseGalleryPusher
{
/**
* @var array
*/
protected $callbacks;
public function __construct()
{
}
/**
* @param string $event
* @param callable $callback
*/
public function addCallback($event, callable $callback)
... | true |
51b4f1b760455c7b90460eca209edb9de2696102 | PHP | alekseyMaksarov/t4 | /framework/Http/Helpers.php | UTF-8 | 1,665 | 2.65625 | 3 | [] | no_license | <?php
namespace T4\Http;
class Helpers
{
protected static function getUniversalDomainName($domain)
{
if (false !== strpos($domain, '.')) {
return preg_replace('~^(www\.|)(.*)$~', '.$2', $domain);
} else {
// @fix Chrome security policy bug
return '';
... | true |
548a6c0a9ade65854132a959a10ae9747ef3d35f | PHP | argob/drupal-argentina-distro | /modules/argentinagobar/argentinagobar_bloques/templates/campo/argentinagobar_bloques_campo_store.tpl.php | UTF-8 | 2,219 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
$grilla= sizeof($campo) == 1 ? "col-md-12" : (sizeof($campo) == 2 ? "col-md-6" : (sizeof($campo) == 3 ? "col-md-4" : "col-md-3"));
?>
<div class="row numbers text-center">
<?php
//caso Android:
if (isset($campo['android'][0]["value"]) && ($campo['android'][0]["value"] <> null)) {
?>
<div class="col-xs-12 c... | true |
b21446091b6fb6d921547bddc9bde156a9994c50 | PHP | Soupydrek/PHP-Learning | /Chapter03/Ex3-11.php | UTF-8 | 187 | 2.984375 | 3 | [] | no_license | <?php
$pi = "3.1415927";
$radius = 5;
echo $pi * ($radius * $radius);
echo "<br>";
echo "This is line " . __LINE__ . " of file " . __FILE__; /* Util para cuando se tiene que testear */
?> | true |
44c081967f07da09cea70e097b3c07e6a2098ab4 | PHP | diegomosela/wp-erp | /modules/hrm/includes/functions-designation.php | UTF-8 | 3,699 | 2.875 | 3 | [] | no_license | <?php
/**
* Create a new designation
*
* @param array arguments
*
* @return int|false
*/
function erp_hr_create_designation( $args = array() ) {
global $wpdb;
$defaults = array(
'id' => 0,
'title' => '',
'description' => '',
'status' => 1
);
... | true |
c099c48ef01d8776d5edd3343aec884f420dac83 | PHP | bolt/bolt | /src/Storage/Query/SelectQuery.php | UTF-8 | 6,635 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Bolt\Storage\Query;
use Doctrine\DBAL\Connection;
use Doctrine\DBAL\Query\Expression\CompositeExpression;
use Doctrine\DBAL\Query\QueryBuilder;
/**
* This query class coordinates a select query build from Bolt's
* custom query DSL as documented here:.
*
* @see https://docs.bolt.cm/templates/co... | true |
24819443d681d00099af1df437a1177612a8b4f5 | PHP | rindi/Prime-Estate | /last-successful/rindi_demo/last-successful/rindi_demo/M2/public_html/pdotest.php | UTF-8 | 3,318 | 3 | 3 | [] | no_license | <?php
require ("Database.php");
$db = new Database();
/**
* UserData SAMPLE
*/
//GET USERS
echo '<p>GET</p>';
$dataSet = $db->getUsers();
foreach($dataSet as $data)
{
echo "<p>";
echo "UserName: ".$data->getUserName();
echo "PassWord: ".$data->getUserPassword();
echo "UserID: ".$data->getUserId()... | true |
7aad9e96de278e1b13bb453616b3b54b7db46f2f | PHP | fzed51/spicy-mash | /test/SpicyMashTest.php | UTF-8 | 968 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Helper;
use Helper\Exception\BadKeySpicyMashException;
/**
* Class SpicyMashTest
* @package Helper
*/
class SpicyMashTest extends TestCase
{
/**
* test de RandomBytes
*/
public function testRandomBytes(): void
{
$mash = new SpicyMash();
$rndByt = $mash->random... | true |
45fb90dba670a3aa056501e715812667333e0f16 | PHP | georgi-dev/maistori | /src/Controllers/Receiver.php | UTF-8 | 313 | 2.671875 | 3 | [] | no_license | <?php
namespace Controllers;
class Receiver {
use Companies;
use Periods;
public function logout() {
\Services\Auth::logout();
return true;
}
/**
* Not callable method
*
*/
static function __callStatic($method, $params) {
return "Method \"" . $method . "\" was not found";
}
} | true |
e0bb1702592fb0885443f5df2deccefc50f0eed3 | PHP | cloudman1978/new | /app/Http/Controllers/SearchController.php | UTF-8 | 9,079 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\User;
use App\Speciality;
use App\Establishment;
use App\EstablishmentHasSpeciality;
use App\UserHasEstablishment;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
function distance($lat1, $lon1... | true |
b326179cfb1babf5c9e53aa25a69014bbf07a870 | PHP | reekoheek/php-fw | /apu/db/Exp.php | UTF-8 | 1,192 | 3.375 | 3 | [] | no_license | <?php
class Exp extends BaseClass {
const MATCH_BOTH = "BOTH";
const MATCH_LEFT = "LEFT";
const MATCH_RIGHT = "RIGHT";
const MATCH_NONE = "NONE";
var $expressions;
function __construct($operand1, $operand2, $operator) {
$this->expressions = array();
$expression["operand1"] = $operand1;
$expres... | true |
318dd18f0d8044748fcda25f492deaed54c47e6c | PHP | hansaka5599/Blog | /Model/BlogMediaFactory.php | UTF-8 | 1,283 | 2.640625 | 3 | [] | no_license | <?php
/**
* Netstarter Pty Ltd.
*
* @category CameraHouse
*
* @author Netstarter Team <contact@netstarter.com>
* @copyright Copyright (c) 2016 Netstarter Pty Ltd. (http://www.netstarter.com.au)
*/
namespace CameraHouse\Blog\Model;
use Magento\Framework\ObjectManagerInterface;
class BlogMediaFactory
... | true |
5d44c9aad89d3c97b1a0c309f13d3e567bea70b0 | PHP | vxuandai0212/artificial-intelligence | /product_recommend/vnfootwear/database/seeds/OrdersTableSeeder.php | UTF-8 | 1,726 | 2.625 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use App\Order;
use App\OrderDetail;
use App\User;
class OrdersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// Seed orders
$path = "/home/lam/Desktop/vini-intern/product_recom... | true |
02e868146f3cb0c17abf4eaa53efcfd087d1e6b6 | PHP | FormHandler/FormHandler | /src/Utils/FormUtils.php | UTF-8 | 11,738 | 3.3125 | 3 | [
"MIT"
] | permissive | <?php
namespace FormHandler\Utils;
use Exception;
use FormHandler\Form;
use UnexpectedValueException;
use FormHandler\Field\UploadField;
/**
* This class contains some static helper methods which can be handy.
*
* @package form
*/
class FormUtils
{
const MODE_RENAME = 1;
const MODE_OVERWRITE = 2;
... | true |
517252850bde2aaaa6d76317ed7fd466bc8cc431 | PHP | JohnMidity/snugger | /app/Controllers/HomeController.php | UTF-8 | 763 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Snugger - A PHP boilerplate based on Slim
*
* @package snugger
* @author John Zandbergen <john@office4.in>
*/
namespace App\Controllers;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
/**
* Responsible for the home page
*
* @author johnz
*/... | true |
e7e6428110282ddcf24b201556dd1abcd2f75ecc | PHP | nthdat2704/book-store-mvc | /admin/models/CategoriesModel.php | UTF-8 | 779 | 2.828125 | 3 | [] | no_license | <?php
class CategoriesModel extends DB{
function getAllCategory(){
$query = "SELECT * FROM categories";
$this->setQuery($query);
return $this->fetchAll();
}
function addCategories($name,$anhien){
$query="INSERT INTO categories(tenLoai, anHien) values('$name', '$anhien')";
... | true |
17357896da392c7587d2bfbb3d0dc06902766f40 | PHP | jasherai/libwebta | /library/Data/DB/MySQL/class.MySQLTool.php | UTF-8 | 8,929 | 2.625 | 3 | [] | no_license | <?php
/**
* This file is a part of LibWebta, PHP class library.
*
* LICENSE
*
* This source file is subject to version 2 of the GPL license,
* that is bundled with this package in the file license.txt and is
* available through the world-wide-web at the following url:
* http://w... | true |
086fb4b2fab74d9e5311781c3eb115cfcecbbd60 | PHP | dryj/bus-time-display | /src/Parser/CenteredFigletParser.php | UTF-8 | 608 | 3.21875 | 3 | [] | no_license | <?php
namespace Buses\Parser;
class CenteredFigletParser implements FigletParserInterface
{
protected $consoleWidth = 80;
public function __construct($consoleWidth = 80)
{
$this->consoleWidth = $consoleWidth;
}
/**
* @param string $text
* @return string
*/
public funct... | true |
111c30cffea069f2b32e02e61405b0c16e14c4f8 | PHP | AltairJames/Racoon | /system/Core/Cache/CacheRoute.php | UTF-8 | 585 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Racoon\Core\Cache;
use Racoon\Core\Utility\Collection;
class CacheRoute extends CacheUtil {
private $data;
public function __construct(CacheFactory $factory) {
$cache_enable = $factory->configData('routes') ?? false;
if($factory->exist() && $factory->enabled() && $cache_enab... | true |
6b421f7cc25dc9c12261a486a1ba1597501d7ff6 | PHP | miguelrb22/icleaning | /app/controllers/OcupacionController.php | UTF-8 | 2,118 | 2.765625 | 3 | [] | no_license | <?php
$path = substr($_SERVER['DOCUMENT_ROOT'],0,15);
include_once $path.'/icleaning/app/models/Ocupacion.php';
include_once $path.'/icleaning/app/database/DBAccess.php';
/**
* @author Juan Serna Jaen <nyoronsheppard@gmail.com>
* @package controllers
*/
class OcupacionController {
//Properties
... | true |
39be8144f78554eb1d8e1989eb2fdb82a72f48c9 | PHP | bakame-php/http-structured-fields | /src/OuterList.php | UTF-8 | 8,028 | 2.765625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Bakame\Http\StructuredFields;
use ArrayAccess;
use DateTimeInterface;
use Iterator;
use Stringable;
use function array_filter;
use function array_map;
use function array_replace;
use function array_splice;
use function array_values;
use function count;
use function implode;
u... | true |
bc89a8a53cce219e9f95da97500d776745b482e3 | PHP | ahmadAtrach/jadwa_Backend | /app/Http/Controllers/FulltimerController.php | UTF-8 | 1,855 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Resources\AboutTheBusinessDir\FulltimersResource;
use App\Http\Resources\AboutTheBusinessDir\FulltimersResourceCollection;
use App\Models\Fulltimer;
use Illuminate\Http\Request;
class FulltimerController extends Controller
{
/**
* Display a listing of the r... | true |
061cfa49c657f6ce11916c71244fc91c0cbac510 | PHP | tostrander/food-controller | /model/validate.php | UTF-8 | 1,445 | 3.375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: laptop
* Date: 1/29/2020
* Time: 11:31 AM
*/
class Validate
{
/* Return a value indicating if the param is a valid food
Valid foods are not empty and do not contain numbers
@param String $food
@return boolean
*/
function validFood($food)
... | true |
bbae56a339fab6ad1f2fd115143f3120be1fc8fe | PHP | hasithlakshan/E-Procurement | /backend/signin.php | UTF-8 | 1,460 | 2.515625 | 3 | [] | no_license | <?php
include('connection.php');
$tablename="";
$uname=mysqli_real_escape_string($conn, $_POST['username']);;
$password=mysqli_real_escape_string($conn, $_POST['password']);
function checkTable($uname){
if(strcmp($uname[0],"b") or strcmp($uname[0],"B") ){
$tablename="Bidder";
}elseif(strcmp($uname[0],"o") or st... | true |
4a02f414cfabd4a5c9455f2a74ba6946f3ccbdd3 | PHP | SCS-Labs/eramba_community | /app/Module/Trash/Controller/Crud/View/TrashView.php | UTF-8 | 1,821 | 2.640625 | 3 | [] | no_license | <?php
App::uses('ClassRegistry', 'Utility');
App::uses('CrudView', 'Controller/Crud');
App::uses('AdvancedFiltersObject', 'AdvancedFilters.Lib');
class TrashView extends CrudView {
/**
* Count of deleted objects within a model.
*
* @var integer
*/
protected $_count;
/**
* Initialize callback logic that... | true |
240a7855f4e974429a306841b57da21fda69bbd6 | PHP | Adamghosam/webdas | /Praktikum II/praktikum/for.php | UTF-8 | 379 | 3.640625 | 4 | [] | no_license | <?php
// contoh satu
for ($i = 1; $i <= 10; $i++) {
echo "$i";
}
echo "<br><br>";
// contoh duwa
for ($i = 1;; $i++) {
if ($i > 10) {
break;
}
echo "$i";
}
echo "<br><br>";
// contoh tiga
$i = 1;
for (;;) {
if ($i > 10) {
break;
}
echo "$i";
$i++;
}
echo "<br><br>";
... | true |
8140a37b8312c50d77aaae3aa822f782bcfbb622 | PHP | judiroren/projet_tutore | /projet_tutore/fonctions.inc.php | WINDOWS-1250 | 2,936 | 2.828125 | 3 | [
"Apache-2.0"
] | permissive | <?php
//Permet d'obtenir le tableau des absences
function absence($nomE, $id_employe, $connexion){
$tab = tableauDate();
$rqtDonnees = $connexion->prepare('SELECT * FROM '.$nomE.'_planning
WHERE code_employe = "'.$id_employe.'"');
$rqtDonnees->execute();
$donnees=$rqtDonnees->fetch(PDO::FE... | true |
a47a3bb1cf0a79cebcf05de188fe0ae60397aee6 | PHP | dalailomo/ace | /src/Setup/Section/ExecutorSection/ExecutorGroupSection.php | UTF-8 | 1,140 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace DalaiLomo\ACE\Setup\Section\ExecutorSection;
use DalaiLomo\ACE\Command\ExecuteCommand;
use DalaiLomo\ACE\Helper\CommandOutputHelper;
use DalaiLomo\ACE\Setup\Section\AbstractSection;
use Symfony\Component\Console\Input\ArrayInput;
use Symfony\Component\Console\Output\ConsoleOutput;
class ExecutorGroup... | true |
59169e7c518258ac37dd2101b1a0fd9a6fd06f19 | PHP | asteph/Codeup_Web_Exercises | /public/national_parks.php | UTF-8 | 5,156 | 2.65625 | 3 | [] | no_license | <?php
define('DB_HOST', '127.0.0.1');
define('DB_NAME', 'parks_db');
define('DB_USER', 'parks_user');
define('DB_PASS', '');
require_once '../db_connect.php';
require_once '../Input.php';
$limit = 4;
$errors = array();
$lastPage = ceil(($dbc->query('SELECT count(*) FROM national_parks')->fetchColumn())/$limit);
$pag... | true |
a94d528993a2224aa1f034c6ebd62b4f6e2609a9 | PHP | MinhTriet2104/callie-laravel | /app/Http/Middleware/Admin.php | UTF-8 | 800 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use Closure;
use Auth;
class Admin
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$role = "";
/... | true |
5994012372cf7ce8e49a3e922e4fbb6855ec8142 | PHP | maple-nishiyama/MNWebsocket | /Libs/Utils.php | UTF-8 | 341 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace MNWebsocket\Libs;
class Utils {
public static function arrayGet($array, $key) {
if (!is_array($array)) {
return null;
}
if (is_null($key)) {
return null;
}
if (!isset($array[$key])) {
return null;
}
return $... | true |
036e74ddb50c0c4d65c71a0b5184febb75a0cbcb | PHP | phn007/tools | /sitecreator/textsite/app/traits/category/categoryPaginator_trait.php | UTF-8 | 3,609 | 2.828125 | 3 | [] | no_license | <?php
trait CategoryPaginator {
use PageUrl;
use PageStatus;
function getPagination( $params, $pageNumberList, $catType ) {
$currentPageNumber = $this->getCurrentPageNumber( $params ); //CategoryItems Trait | BrandItems Trait
$lastPageNumber = $this->getLastPage( $pageNumberList );
$catKey = $this->ge... | true |
d8732428fc7980a528c666de451998547ca12881 | PHP | ejenfransuavidok/ogame | /module/Universe/src/Model/CelestialContainerInterface.php | UTF-8 | 581 | 2.90625 | 3 | [] | no_license | <?php
/**
*
* @ author Jigulin V.V.
* @ 07.02.2017
*
*/
namespace Universe\Model;
use Universe\Geometry\Point;
interface CelestialContainerInterface
{
/**
*
* Set coordinate of body
* @param int
*
*/
public function setBasis($basis);
/**
*
* Get coord... | true |
f6891942bc9d648ccc70bffdf979efaeece5e93d | PHP | joyhooei/u591 | /travel/system/admin/protected/models/RoleUser.php | UTF-8 | 729 | 2.59375 | 3 | [] | no_license | <?php
/**
* 角色管理员关联表
* 13-08-22 17:00
*/
class RoleUser extends CActiveRecord{
public static function model($className = __CLASS__){
return parent::model($className);
}
public function tableName(){
return '{{role_user}}';
}
function delRoleUser($roleId){
if(empty($roleId)) return false;... | true |
f75a8a338bf9209d6ef26164a381551356bffbb2 | PHP | LeCodeurDuDimanche/php-wishlist | /src/models/Utilisateur.php | UTF-8 | 1,003 | 2.6875 | 3 | [] | no_license | <?php
namespace mywishlist\models;
class Utilisateur extends BaseModel{
protected $table = 'user';
protected $primaryKey = "id";
protected $fillable = ['id' , "pseudo", "prenom", "nom", "mdp", "updated_at", "created_at"];
public function listesCrees()
{
return $this->hasMany(Liste::class, "user_id");
}
pu... | true |
b91d0fe9d87fbdf7fa1516cc9a7a1a4f24a36781 | PHP | michaelluo2018/crm2.jckk.net | /application/bi/model/Contacts.php | UTF-8 | 1,002 | 2.671875 | 3 | [] | no_license | <?php
// +----------------------------------------------------------------------
// | Description: 联系人
// +----------------------------------------------------------------------
// |
// +----------------------------------------------------------------------
namespace app\bi\model;
use think\Db;
use app\admin... | true |
16f1e11bc90f57f1692f8c847d34fa65556d7313 | PHP | agik-stw/ut2017 | /backend/models/User2.php | UTF-8 | 1,164 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "tbl_user".
*
* @property string $data_id
* @property int $userid
* @property string $nama
* @property string $username
* @property string $password
* @property string $password2
* @property int $level_id
*/
class User2 extends \y... | true |
e2b0242c434f2a44e5e44bcdeb73680aa31ec3f9 | PHP | SayujSingh/ciWebApp | /platform/common/Modules/Renderers/Renderers.php | UTF-8 | 14,919 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Common\Modules\Renderers;
class Renderers
{
protected static $sharedConfig = [];
public function __construct()
{
if (empty(self::$sharedConfig)) {
$this->loadValidDrivers();
$this->loadDriverTypes();
$this->loadFileExtensions();
$th... | true |
9bc20f7532565967662eb6a61d2e0594a224c996 | PHP | laravel/valet | /cli/Valet/Upgrader.php | UTF-8 | 2,968 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Valet;
use Configuration;
use Site;
class Upgrader
{
public function __construct(public Filesystem $files)
{
}
/**
* Run all the upgrades that should be run every time Valet commands are run.
*/
public function onEveryRun(): void
{
$this->pruneMissingDirecto... | true |
4500ecb35402136c7afcac041d391ef8f2159c13 | PHP | JaffeMarques/laravel_jwt_login_api | /app/Http/Controllers/UserController.php | UTF-8 | 9,345 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Services\ResponseService;
use Hash;
use Illuminate\Support\Facades\Validator;
use App\Http\Requests\User\StoreUser;
use App\Transformers\User\UserResource;
use App\Transformers\User\UserResourceCollection;
use App\Models\User;
use JWTAuth;
cl... | true |
51e0d23ffc1f58462696519c89ccac5e75078186 | PHP | ali-syria/ldog-platform | /app/View/Components/Components/Tab.php | UTF-8 | 535 | 2.640625 | 3 | [] | no_license | <?php
namespace App\View\Components\Components;
use Illuminate\View\Component;
class Tab extends Component
{
public string $active;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct(string $active)
{
$this->active=$active;
}
/*... | true |
9072161d169b50bb3a7317d06ad717266aa490e9 | PHP | youngdev/classid | /application/models/user_model.php | UTF-8 | 4,592 | 2.609375 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class User_model extends CI_Model {
public function __construct ()
{
parent::__construct();
$this->load->database();
}
public function authenticate_user($login_data = '')
{
$query = "
SELECT
UserAccountID,
FirstName,
... | true |
b6bdec73e994de14cac7b31bc77fb2bc2c10441d | PHP | crtoledo/qualitytours4 | /qualitytours/default/app/controllers/administrador_controller.php | UTF-8 | 10,429 | 2.59375 | 3 | [] | no_license | <?php
load::model('administrador');
load::model('usuario');
load::model('cliente');
load::model('solicitud');
class AdministradorController extends AppController {
public function index() {
}
public function ingresar($id, $leng) {
if (Auth::is_valid()) {
if (A... | true |
bbe1e1cda7940c8403ba064c15b3854a7ca3cb14 | PHP | joaotorresmarques/CRUD-codeigniter-jquery-upload | /application/controllers/dashboard/Usuarios.php | UTF-8 | 4,787 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Usuarios extends CI_Controller {
public function __construct(){
parent:: __construct();
//Carrega o model M_usuarios atribuindo um apelido 'Model_usuarios'
//Escrito dentro de um construtor pois será usado por todos os metodos.
$thi... | true |
b6b7451cef91b1f8a2d7ecc3f8a4b6099d1a110b | PHP | eMAGTechLabs/SynchronizedBundle | /Decorator.php | UTF-8 | 3,875 | 2.671875 | 3 | [] | no_license | <?php
namespace Emag\SynchronizedBundle;
use Emag\SynchronizedBundle\Event\LockEvent;
use Emag\SynchronizedBundle\Exception\CannotAquireLockException;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class Decorator
{
/**
*
* @var Lock[]
*/
private $locks = array();
private... | true |
8ca4815b2f51d92714f3a50768b227fa067211b8 | PHP | VolunteerTeam/volunteer-translators | /application/libraries/Seo.php | UTF-8 | 1,299 | 2.734375 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Seo{
/**
* CodeIgniter global
*
* @var string
**/
protected $ci;
/**
* __construct
*
* @return void
* @author Ben
**/
public function __construct()
{
$this->ci... | true |
600fe18e5dcad3f0ebdf34ec400a6be75c93c361 | PHP | eyarijk/GK-HW-1 | /src/Service/BaseNoSql.php | UTF-8 | 539 | 2.859375 | 3 | [] | no_license | <?php
namespace Evrey\NoSql\Service;
class BaseNoSql
{
/**
* @var array
*/
protected static $_instance = [];
/**
* @return NoSqlInterface
*/
public static function getInstance(): NoSqlInterface
{
$class = static::class;
if (!isset(static::$_instance[$class])) ... | true |
1e2ee7c0d19d2fc4beab063c8537acd8ad99a407 | PHP | AdamKyle/flare | /app/Game/PassiveSkills/Values/PassiveSkillTypeValue.php | UTF-8 | 4,088 | 3.078125 | 3 | [
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | <?php
namespace App\Game\PassiveSkills\Values;
use Exception;
class PassiveSkillTypeValue {
/**
* @var string $value
*/
private $value;
const KINGDOM_DEFENCE = 0;
const KINGDOM_RESOURCE_GAIN = 1;
const KINGDOM_UNIT_COST_REDUCTION = 2;
const KINGDOM_BU... | true |
62fd0b6c5a77f8e4d49041234793b1609a595f7d | PHP | luckyfu/suning | /suning-sdk-php/request/netalliance/FavoritesQueryRequest.php | UTF-8 | 1,148 | 2.515625 | 3 | [] | no_license | <?php
/**
* 苏宁开放平台接口 -
*
* @author suning
* @date 2021-2-1
*/
class FavoritesQueryRequest extends SuningRequest{
/**
*
*/
private $favoritesid;
/**
*
*/
private $pageIndex;
/**
*
*/
private $size;
public function getFavoritesid() {
return $this->favoritesid;
}
public functio... | true |
b9f9642f9d606bd89a48cbfdff810bbe826d8d51 | PHP | djuhnix/phpml | /tests/functionnal/test_window_drawing.php | UTF-8 | 1,268 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
require_once __DIR__ . '/../../vendor/autoload.php';
use PHPML\Enum\Color;
use PHPML\Graphics\Drawable\Shape\CircleShape;
use PHPML\Graphics\Drawable\Shape\ConvexShape;
use PHPML\Graphics\Drawable\Shape\RectangleShape;
use PHPML\Graphics\Drawable\Text\Text;
use PHPML\Graphics\Event;
use PHPML\Graphics\VideoMode;... | true |
5cc87af05a0dfceb8d4470b6ca8f7c1c8c80fa4a | PHP | nathanaelmartel/citation-ou-proverbe.fr | /lib/task/cleanAuthorTask.class.php | UTF-8 | 3,086 | 2.671875 | 3 | [] | no_license | <?php
class cleanAuthorTask extends sfBaseTask
{
protected function configure()
{
// // add your own arguments here
// $this->addArguments(array(
// new sfCommandArgument('my_arg', sfCommandArgument::REQUIRED, 'My argument'),
// ));
$this->addOptions(array(
new sfCommandOption('applica... | true |
6b52d07038eb581b2f0362f4d4571394c891cec0 | PHP | SeungMin0628/-September-2017-PhpBoard | /model/Model_UpdateDAO.php | UTF-8 | 3,152 | 2.90625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* Title : Model_SelectDAO
* Content : define class to update board data
* User : 2-WDJ 1401213 Seungmin Lee
* Date : 2017-09-20 22:18
*/
class UpdateDAO
{
// 1. update board
function updateBoard(Board $argBoardObj) ... | true |
f81869f4f6be700f789f9f84b96832c34a30c49b | PHP | bryantAXS/thegoodlab-website | /system/expressionengine/third_party/ep_better_workflow/libraries/ep_status_transition.php | UTF-8 | 17,041 | 2.5625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Ep_status_transition
*
* ----------------------------------------------------------------------------------------------
* @package EE2
* @subpackage ThirdParty
* @author Andrea Fiore / Malcolm Elsworth
* @link http://electricputt... | true |
a3750bd3dc260df4616cbf8d15535479bdf10b75 | PHP | cristiantorr/php7-mysql-udemy | /seccion17-ejemplos-ejercicios/03enviar-mensaje-html.php | UTF-8 | 1,079 | 2.546875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Enviar correo HTML</title>
<meta charset="utf-8">
</head>
<body>
<?php
$para = "correo1@misitio.com, correo2@misitio.com";
$subject = "Recordatorio de cumpleaños del mes";
$mensaje = "<html>
<head><title>Recordatorio de cumpleaños del mes de Abril</title></head>
... | true |
a3df8bdae5c1ba3bdd7b532f06bc0f77d502c39c | PHP | LoneWolf1227/PHP_OOP_MVC_BLOG | /MVC/Controllers/AbstractController.php | UTF-8 | 446 | 2.515625 | 3 | [] | no_license | <?php
namespace MVC\Controllers;
use Core\UsersAuth;
use MVC\Views\Views;
use MVC\Models\Users\User;
abstract class AbstractController
{
/** @var Views */
protected $view;
/** @var User|NULL */
protected $user;
public function __construct()
{
$this->user = UsersAuth::getUserByTok... | true |
a0cab0be708b0895f428eb26401131cc7811530f | PHP | Vivify-Ideas/laravel-boilerplate | /src/app/Mail/User/ForgotPasswordMail.php | UTF-8 | 919 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Mail\User;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
class ForgotPasswordMail extends Mailable {
use Queueable, SerializesModels;
private $_token;
/**
* Create a new message instance.
*
* @param string $token
... | true |
a45fa746cde1d14ddafeef95e807f1e7fdf29d3e | PHP | michaeljdufresne/hw_data_models | /src/Edumedics/DataModels/Eloquent/ViimedProgramPathwayAssignment.php | UTF-8 | 2,135 | 2.515625 | 3 | [] | no_license | <?php
namespace Edumedics\DataModels\Eloquent;
use Edumedics\DataModels\Events\ViimedProgramPathwayAssignment\ViimedPathwayAssignmentCreate;
use Edumedics\DataModels\Events\ViimedProgramPathwayAssignment\ViimedPathwayAssignmentDelete;
use Edumedics\DataModels\Events\ViimedProgramPathwayAssignment\ViimedPathwayAssign... | true |
5f91288ae0016ce1b3c29f30fdf96ce617b1b578 | PHP | GustavoMeloWebjump/curso-php | /project-desafio04/src/index.php | UTF-8 | 614 | 2.625 | 3 | [] | no_license | <?php
use Alura\Banco\Exceptions\InvalidBalanceException;
use Alura\Banco\Model\Accounts\SavingAccount;
use Alura\Banco\Model\Address;
use Alura\Banco\Model\Cpf;
use Alura\Banco\Model\Holder;
require 'autoload.php';
$cpf = new Cpf('123.123.123-1');
$address = new Address('sp', 'sp', 'rua la', '123');
$holder = new H... | true |
badb25f664d660b49ae74fe652fbe9041c5c3f72 | PHP | Mattias-Viklund/Sites | /Nav/htdocs_bak/createsub.php | UTF-8 | 4,493 | 2.90625 | 3 | [] | no_license | <?php
// Initialize the session
session_start();
require_once "utils.php";
check_login();
// Include config file
require_once "config.php";
// Define variables and initialize with empty values
$subname = "";
$subname_err = "";
$username = $_SESSION["username"];
// Processing form data when form is submitted
if($_... | true |
c326d9a956e983d7255e144a3dee43b3b20f4b7f | PHP | andalisolutions/anaf-php | /src/Responses/Info/RetrieveResponseVatRegistration.php | UTF-8 | 1,352 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Anaf\Responses\Info;
final class RetrieveResponseVatRegistration
{
/**
* @param array<int, RetrieveResponseVatPeriods> $vatPeriods
*/
private function __construct(
public readonly bool $status,
public readonly array $vatPeriods,
) {
... | true |
23f554394e50600ddc26c1b7af6a2f7c04775b57 | PHP | miaomiao1992/PBatis | /src/Extend.php | UTF-8 | 1,575 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created By Yang333 *
* 2021-02-08对非主干业务集中管理
*/
namespace pbatis;
//这里引入aop业务名字空间
use pbatis\extend\session;
use pbatis\extend\permission;
use pbatis\extend\log;
class Extend
{
private static $before;
public static $beforeMessage;
private static $when;
private sta... | true |
502b1149edd87320a7b5ee559427d6c77a298f55 | PHP | pdenooijer/hook_event_dispatcher | /modules/user_event_dispatcher/src/Event/User/UserCancelEvent.php | UTF-8 | 1,850 | 2.65625 | 3 | [] | no_license | <?php
namespace Drupal\user_event_dispatcher\Event\User;
use Drupal\Core\Session\AccountInterface;
use Drupal\hook_event_dispatcher\Event\EventInterface;
use Drupal\hook_event_dispatcher\HookEventDispatcherInterface;
use Symfony\Component\EventDispatcher\Event;
/**
* Class UserCancelEvent.
*/
final class UserCance... | true |
d485452e984b4904e14ad6f28a1b8bc36a937ed1 | PHP | headlesslaravel/headlesslaravel | /src/DateInterval.php | UTF-8 | 2,310 | 2.921875 | 3 | [] | no_license | <?php
namespace HeadlessLaravel;
use Carbon\CarbonImmutable;
class DateInterval
{
public static function make()
{
$today = CarbonImmutable::today();
return [
'all' => [
'display' => 'All Time',
'from' => '',
'to' => '',
... | true |
22f5acc2e6a1227cc8338606fae583dbd3456c48 | PHP | Wu4D/pt | /framework/db/ActiveRecord.php | UTF-8 | 430 | 2.890625 | 3 | [] | no_license | <?php
namespace framework\db;
class ActiveRecord {
private $dbORM = array();
public function __get($table){
//If database object dosen't exist create a new one
if(!isset($this->dbORM[$table])){
$this->dbORM[$table] = new DBObject(compact('table')); //Create a new o... | true |
b5ac16efcb0548b97319eb8118e0b4bfcb7c10f2 | PHP | fritzGit/SoftwareSuperStore | /app/code/local/SOFTSS/Topseller/Block/Topsellers.php | UTF-8 | 2,178 | 2.546875 | 3 | [] | no_license | <?php
/*
* Software property of Pcfritz.de. Copyright 2013.
*/
/**
* Topsellers.php (UTF-8)
*
* Feb 15, 2013
* @author Juan Galvez :: juanjogalvez@gmail.com
* @package SOFTSS
* @subpackage
*
*
* */
class SOFTSS_Topseller_Block_Topsellers extends Mage_Catalog_Block_Product_Abstract
{
const DEFAULT_PROD... | true |
1499b8dfd222cb36803173bfb554cb58c3b4fef2 | PHP | de1mos242/HSAFinder | /UnitTests/Entities/HSAProductTest.php | UTF-8 | 799 | 2.75 | 3 | [] | no_license | <?php
/**
* Description of HSAProductTest
*
* @author de1mos <de1m0s242@gmail.com>
*/
require_once 'PHPUnit/Autoload.php';
require_once 'Entities/HSAProduct.php';
class HSAProductTest extends PHPUnit_Framework_TestCase {
public function testCreateProduct() {
$id = "5";
$type = "type1";
... | true |
90861d59c5c12c19eee17800ef0d0f767aecf897 | PHP | wordenfan/zdj | /application/controllers/test/fsockopen_test.php | UTF-8 | 2,780 | 2.515625 | 3 | [] | no_license | <?php
/*
* 1.在根目录建立log.txt用于记录请求是否成功接收
* 2.
* and open the template in the editor.
*/
/**
* Description of Fsockopen_test
*
* @author worden
*/
class Fsockopen_test {
public function __construct() {
}
public function test_fsockopen() {
//Post
$param = array(
... | true |
f203121bb82c64943c60a7a9bcf6ba20028f91d9 | PHP | alanjholiveira/montadora-project | /app/DataTables/AutomobileDataTable.php | UTF-8 | 2,070 | 2.640625 | 3 | [] | no_license | <?php
namespace App\DataTables;
use App\Model\Automobile;
use Yajra\DataTables\Html\Column;
use Yajra\DataTables\Services\DataTable;
class AutomobileDataTable extends DataTable
{
/**
* Build DataTable class.
*
* @param mixed $query Results from query() method.
* @return \Yajra\DataTables\Data... | true |
d57ba0951d9b932b346313e11fe972623b4ac3e9 | PHP | PHP-CS-Fixer/PHP-CS-Fixer | /src/Fixer/ClassUsage/DateTimeImmutableFixer.php | UTF-8 | 4,886 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <fabien@symfony.com>
* Dariusz Rumiński <dariusz.ruminski@gmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace PhpCsFixer\Fixe... | true |
c2d8f2c22be65b028405086087260e5fd912a405 | PHP | landlordlycat/wechatAlliance | /app/Models/SendMessage.php | UTF-8 | 1,675 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/5/14 0014
* Time: 14:49
*/
namespace App\Models;
use Carbon\Carbon;
class SendMessage extends BaseModel
{
const TABLE_NAME = 'send_messages';
protected $table = self::TABLE_NAME;
/** Field id */
const FIELD_ID = 'id';
/**... | true |
345b878f3b797308ebdad3e6a91baf9d4b1a9cd4 | PHP | Sukrit249/TechQuest | /www/public/quiz-git/quiz_git.php | UTF-8 | 2,085 | 2.96875 | 3 | [] | no_license | <?php
session_start();
include '../quiz/regular/git/create.php';
require_once '../php/includes/header.inc.php'; // Includes the header
require_once '../php/functions.php'; // Includes the functions.php
require_once '../quiz/regular/git/create.php'; // Path to the php file where the ... | true |
f9cb77aeca6226fd54439056b684a72595983986 | PHP | SaraJenny/doggie-zen-online | /ajax/addDog.php | UTF-8 | 636 | 2.8125 | 3 | [] | no_license | <?php
/*
* Sara Petersson - Web 2.0, DT091G
* Lägger till ny hund
*/
// Läser in config-filen
include("../includes/config.php");
// Kollar att alla parametrar har satts
if(isset($_POST['dogname']) && isset($_POST['dob']) && isset($_POST['dogInfo'])) {
$dogname = $_POST['dogname'];
$dob = $_POST['d... | true |
514aa5ff6591abdd0ad6b2db32e1fff98be466cc | PHP | Lorenzo9A/PHP-BASIC | /2-Variabelen-en-datatype/taak09/index.php | UTF-8 | 281 | 2.734375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<title>Document</title>
</head>
<body>
<?php
$voornaam = "Lorenzo";
$leeftijd = 17;
echo "Jouw naam is " . $voornaam . " en je bent " . $leeftijd . "jaar oud";
?>
</body>
</html> | true |
07526bd1b2c1c82f7d09c6095b78b80f21972fc4 | PHP | watamyon/techbase_project | /TECH_BASE_Project/github_m5-1.php | UTF-8 | 7,096 | 3.125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>mission_5-01</title>
</head>
<body>
<?php
// 【サンプル】
// ・データベース名:tb219876db
// ・ユーザー名:tb-219876
// ・パスワード:ZzYyXxWwVv
// の学生の場合:
// DB接続設定
$dsn = 'データベース名';
$user = 'パスワード';
$password = 'ユーザー名';
$pdo = new PDO($dsn, $user, $passw... | true |
167aebcfd7261b224272a56dac315b626db56329 | PHP | MuhammadArsalan7/AdvanceLaravelLearning | /app/Jobs/csvParsingJob.php | UTF-8 | 1,264 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Jobs;
use App\Http\Controllers\DialedNumberApiController;
use App\Models\DialedNumber;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldBeUnique;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use I... | true |
40a9a69e49bfd38016bc0d0aee48d7ceac218570 | PHP | dinos80152/php-tutorial | /benchmark/User.php | UTF-8 | 1,863 | 3.203125 | 3 | [] | no_license | <?php
class User
{
private $users = [];
public function __construct()
{
$this->setUsers();
}
private function setUsers()
{
$this->users = json_decode(file_get_contents('users.json'), true);
}
public function all()
{
return $this->users;
}
public f... | true |
8163dab6f83ce44a8a751d3a0c3be3ebb96c2c8e | PHP | alex-mich/GetAPet | /database/DatabaseConnection.php | UTF-8 | 555 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: A.Michailidis
* Date: 23/12/2016
* Time: 2:57 μμ
*/
class DatabaseConnection
{
private static $connection;
private static $host = "localhost";
private static $uname = "root";
private static $psswd = null;
private static $dbname = "getapet";
publ... | true |
0458b7d0a033f17dcf419cbaf08c351139778554 | PHP | IrfanJulaihi/SADDU | /homepage.php | UTF-8 | 11,173 | 2.59375 | 3 | [] | no_license | <?php require_once('Connections/Connection1.php'); ?>
<?php
session_start();
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theVa... | true |
c6e87835541c8fa9e833da1880b57bcc91e02814 | PHP | kamatchipannerselvam/boe_des | /database/migrations/2021_03_21_141632_create_mproduct_table.php | UTF-8 | 898 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateMProductTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('m_product', fu... | true |
8288861170a4b0fcaa71a40ab3c8f9eaad0bff72 | PHP | FixerGaming2020/Pruebas-Codigo- | /app/proveedores/vistas/PConsultarProveedor.php | UTF-8 | 2,667 | 2.625 | 3 | [] | no_license | <?php
require_once '../../principal/modelos/Constantes.php';
require_once '../../principal/modelos/AutoCargador.php';
AutoCargador::cargarModulos();
$controlador = new ControladorProveedor();
session_start();
if ($_POST['peticion']) {
/* SE COMPLETO EL FORMULARIO Y SE PRESIONO EL BOTON */
$nombre = $_POST['n... | true |
2d646755d6e3667cc95341be1146231cc705b7c9 | PHP | anastasiabruzgina/dev.bx | /readfromconsole.php | UTF-8 | 305 | 2.953125 | 3 | [] | no_license | <?php
function readFromConsole($result = '')
{
if ($result ==='')
{
$result = trim(fgets(STDIN));
}
switch ($result)
{
case 'true':
return true;
case 'false':
return false;
case '!stop':
return null;
case is_numeric($result):
return +$result;
default:
return $result;
}
} | true |