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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
8085e70da5d31874b8ab017f192d3a7602a40209 | PHP | isabella232/jquery-tofield | /tests/internal-only/endpoint.php | UTF-8 | 3,428 | 2.546875 | 3 | [] | no_license | <?php
$text = isset($_GET['text']) ? $_GET['text'] : '';
$maxSuggestions = isset($_GET['maxSuggestions']) ? $_GET['maxSuggestions'] : -1;
$fullNames = isset($_GET['fullNames']) ? true : false;
$forRelease = isset($_GET['forRelease']) ? true : false;
$js = file_get_contents('all.js');
$chunks = explode('gNameData.', ... | true |
0418876ef1c8b9d22f1a076fa1af10bfb6fff72e | PHP | visakhms/error | /Attendance-Management-System-master/signup.php | UTF-8 | 3,065 | 2.640625 | 3 | [] | no_license |
<?php
include('connect.php');
try{
if(isset($_POST['signup'])){
if(empty($_POST['email'])){
throw new Exception("Email cann't be empty.");
}
if(empty($_POST['uname'])){
throw new Exception("Username cann't be empty.");
}
if(empty($_POST['... | true |
128e7ab2a7f0c2460fcac4c18bcf27359d6ab7ec | PHP | dilawar/OldHippo | /user_aws_search.php | UTF-8 | 1,323 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
include_once 'header.php';
include_once 'database.php';
include_once 'tohtml.php';
include_once 'check_access_permissions.php';
// Show it only if accessed from intranet or user have logged in.
if( ! (isIntranet( ) || isAuthenticated( ) ) )
{
echo printWarning( "To access this page, either use Intranet or l... | true |
fdad243a3dadfc4e41e692ef788a0ee4ec895e69 | PHP | mSnehithReddy/Resume_registry | /blog.php | UTF-8 | 3,831 | 2.921875 | 3 | [] | no_license | <?php
require_once "pdo.php";
session_start();
if ( ! isset($_SESSION['name']) ) {
die('ACCESS DENIED');
}
// If the user requested logout go back to index.php
if ( isset($_POST['cancel']) ) {
header('Location: index.php');
return;
}
//checks if save is clicked or not
if(isset($_POST['save'])){
//chec... | true |
a2d6e819f60837393479ec167278662d8ed9ca57 | PHP | gabrodhic/samesub | /protected/modules/api/controllers/v1/CommentController.php | UTF-8 | 1,306 | 2.703125 | 3 | [] | no_license | <?php
class CommentController extends ApiController
{
//Notice that default filters are defined in ApiController class
/**
* Specifies the access control rules.
* This method is used by the 'accessControl' filter.
* @return array access control rules
*/
public function accessRules()
{
return array(
... | true |
701b5ff5467d9b012175e6e50d7786fb88e0aea5 | PHP | nait001/traffic | /pages/process/print_reports.php | UTF-8 | 2,826 | 2.734375 | 3 | [] | no_license | <?php
require_once "../config/config.php";
$type = $_GET['type'];
$min_year = 2010;
$max_year = date('Y');
$reports = array();
if($type == 'yearly') {
$sql = 'select count(*) from violator_offense where extract(year from date_apprehend) = ?';
$query = $theConnection->prepare($sql);
while($min_year <= $max_year) {
... | true |
7ac0436469629bcbcf0f32e249a66c858e617f98 | PHP | dfsense/homeworks | /arrays_loops_tasks/10.php | UTF-8 | 292 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: kovalev
* Date: 14.11.16
* Time: 11:31
*/
// Выведите столбец чисел от 11 до 33
$html = '<table><tbody>';
for($i=11; $i<=33; $i++){
$html .= '<tr><td>' . $i . '</td></tr>';
}
$html .= '</tbody></table>';
echo $html; | true |
f0d3967edae2b8dc061180482a6f449179120dfd | PHP | stew1995/web_coursework | /lib/registerInsert.php | UTF-8 | 1,764 | 2.734375 | 3 | [] | no_license | <?php // CREATE NOT NULL ON UNIQUE KEY
//INSERT INTO user
echo "Data pulled";
if(isset($_POST['registerBasicInfoBtn'])){
function validate_data($data) {
$data = trim($data);
$data = stripslashes($data);
$data = strip_tags($data);
$data = htmlspecialchars($data);
return $data;
}
$servername = "... | true |
f386badf02db2aadd8c396e2759b477ddc9b1a3c | PHP | AscetaProject/asceta | /wp-restful/API Client PHP/WP-API.php | MacCentralEurope | 7,344 | 2.546875 | 3 | [] | no_license | <?php
// Copyright 2010 WP-API by Jos P. Airosa. All Rights Reserved.
//
// Based on Abraham Williams work (abraham@abrah.am) http://abrah.am
//
// +---------------------------------------------------------------------------+
// | WP-API Platform PHP5 client |
// +---------... | true |
1e3c190c8af8b52386314e2e98c245d18b67a7c9 | PHP | LordDeveloper/jeely | /src/Jeely/TL/Methods/GetMe.php | UTF-8 | 789 | 3.03125 | 3 | [
"Unlicense"
] | permissive | <?php
namespace Jeely\TL\Methods;
use Jeely\Telegram;
use Jeely\TL\Types\User;
/**
* @class GetMe
* @description A simple method for testing your bot's authentication token. Requires no parameters. Returns basic information about the bot in form of a User object.
*
*
*
* @see https://api.telegram.org/bots/api#... | true |
98ca7d950d4cecba7429973079305310e853db45 | PHP | wj008t/beaconphp | /beacon/core/SqlSelector.php | UTF-8 | 10,120 | 2.875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: wj008
* Date: 2018/1/5
* Time: 1:37
*/
namespace beacon;
class SqlItem
{
public $sql = '';
public $args = null;
public function __construct(string $sql, $args = null)
{
$this->sql = trim($sql);
$this->args = $args;
}
public functi... | true |
d4fb40414af92ee531cdf41548a93dba3b5a7526 | PHP | curzio-della-santa/dfw-fileconversion | /src/Processing/Adapter/BaseJobCreator.php | UTF-8 | 826 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Detail\FileConversion\Processing\Adapter;
abstract class BaseJobCreator
{
/**
* @var array
*/
protected $options = [];
/**
* @param array $options
*/
public function __construct(array $options = [])
{
$this->options = array_merge($this->options, $option... | true |
a2f7fa5031b6bbfdbfc39da78a5232a1c3ec7388 | PHP | prolic/awesomeness | /src/EventStore/Data/PersistentSubscriptionUpdateResult.php | UTF-8 | 436 | 2.546875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Prooph\EventStore\Data;
class PersistentSubscriptionUpdateResult
{
/** @var PersistentSubscriptionUpdateStatus */
private $status;
/** @internal */
public function __construct(PersistentSubscriptionUpdateStatus $status)
{
$this->status = $status;
... | true |
e6da2efbf86db703c382861ec01537d5ce550e55 | PHP | Sulaymon-dev/met-project-7 | /database/migrations/2021_01_04_051215_create_olympics_table.php | UTF-8 | 1,397 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateOlympicsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('olympics', fun... | true |
91717462d06e103449656f2eb9cc96b9bc14abfe | PHP | nhoening/polypager | /lib/PolyPagerLib_Utils.php | UTF-8 | 26,077 | 2.5625 | 3 | [] | no_license | <?php
/*
PolyPager - a lean, mean web publishing system
Copyright (C) 2006 Nicolas Hoening
polypager.nicolashoening.de
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License,... | true |
98de32cbc19d2f906c184b8b8f5eebaa8172ffd6 | PHP | spalax/zf2-libs | /src/Zf2Libs/Paginator/DojoRestStore/Paginator.php | UTF-8 | 1,968 | 2.75 | 3 | [] | no_license | <?php
namespace Zf2Libs\Paginator\DojoRestStore;
use Zend\Http\Headers;
use Zend\Paginator\Adapter\AdapterInterface;
use Zf2Libs\Paginator\PaginationInterface;
class Paginator implements PaginationInterface
{
/**
* @var int
*/
protected $offset = 0;
/**
* @var int
*/
protected $co... | true |
a71dce230fdb6a8db283395c77430d10b0d41abb | PHP | ajanthvi/store | /database/migrations/2019_11_21_053224_create_clothes_table.php | UTF-8 | 1,275 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateClothesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('clothes', funct... | true |
8cf6a5a4d9dd10edc23dfd7b91655ecff2a50627 | PHP | megawilddaddy/linode-api | /Request/AbstractNodeRequest.php | UTF-8 | 722 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace Megawilddaddy\Linode\Request;
use Megawilddaddy\Linode\Node;
abstract class AbstractNodeRequest
{
/**
* @var Node
*/
private $node;
/**
* AbstractNodeRequest constructor.
* @param Node $node
*/
public function __construct(Node $node)
{
$this->node... | true |
a3a30ef2a93b37fabad4c7f9ef36fc17a16bf220 | PHP | rajak68amit/vsci | /src/ValidatePassword.php | UTF-8 | 263 | 3.046875 | 3 | [] | no_license | <?php
/**
*
*/
class ValidatePassword
{
const MIN_LENGTH = 6;
CONST MAX_LENGHT = 28;
public function validLength($password){
$passLength = strlen($password);
return $passLength >= self::MIN_LENGTH && $passLength <= self::MAX_LENGHT;
}
}
?> | true |
c337e97f447168e9b059e20a52b474d477916078 | PHP | senthilmpro/PHP_Programming | /welcome.php | UTF-8 | 753 | 2.90625 | 3 | [] | no_license | <html>
<head>
<title> Validate PHP </title>
</head>
<body>
<?php
session_start();
echo "<h3>COOKIES</h3>";
echo "<br/>";
echo "<br/>";
if(isset($_COOKIE["user"]))
{
echo "Welcome, <i>".$_COOKIE["user"]."</i>";
echo "<br/>";
}
if(isset($_COOKIE["email"])){
echo "Your Email Id(using Cookies) is <... | true |
e7cc319c0489420ee891c9a346816c4293ab8ad2 | PHP | acoustep/component-generator | /src/Acoustep/ComponentGenerator/Generators/ComponentAppender.php | UTF-8 | 1,194 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php namespace Acoustep\ComponentGenerator\Generators;
use Illuminate\Filesystem\Filesystem as File;
class ComponentAppender {
protected $file;
protected $config;
public function __construct(File $file, $config)
{
$this->file = $file;
$this->config = $config;
}
public function make($name, $file)
{
$... | true |
ec5a1f3625911edfe513bcd69f575e5a06eef8d6 | PHP | falgun/validation | /tests/Rules/MaxFileSizeTest.php | UTF-8 | 2,003 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Falgun\Validation\Tests\Rules;
final class MaxFileSizeTest extends AbstractFileRuleTestHelper implements RuleTestInterface
{
public function testBlankData()
{
$this->validator->file('photos')->maxSize(500);
$this->performTest(['photos' => []], ['photo... | true |
e657ebeb73afde1af11a8206c600182b404f8ecc | PHP | kslimani/heartbeat | /app/Notifications/Customizable.php | UTF-8 | 435 | 2.5625 | 3 | [
"MIT",
"CC-BY-3.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace App\Notifications;
use App\Support\Locale;
use App\Support\Settings;
use App\User;
trait Customizable
{
/**
* Apply user customizations
*
* @param \App\User $user
* @return $this
*/
public function customize(User $user)
{
$settings = Settings::get($user)... | true |
412cb4cab35ec0e73e3a67140c6252bce60f810f | PHP | luigif/WsdlToPhp | /samples/xignite-historical/Dividend/History/XiHistoricalTypeDividendHistory.php | UTF-8 | 1,558 | 2.921875 | 3 | [] | no_license | <?php
/**
* Class file for XiHistoricalTypeDividendHistory
* @date 08/07/2012
*/
/**
* Class XiHistoricalTypeDividendHistory
* @date 08/07/2012
*/
class XiHistoricalTypeDividendHistory extends XiHistoricalTypeCommon
{
/**
* The Symbol
* Meta informations :
* - minOccurs : 0
* - maxOccurs : 1
* @var s... | true |
dee4b9cddaa58cf0449af293390af5f9e6001432 | PHP | Milligan-Information-Systems/Athletic-Department-Travel-System | /includes/databasefilter.inc.php | UTF-8 | 613 | 2.578125 | 3 | [] | no_license | <?php
if(isset($_POST['search']))
{
$valueToSearch = $_POST['valueToSearch'];
// search in all table columns
// using concat mysql function
$query = "SELECT * FROM `databasefiltertest` WHERE CONCAT(`id`, `fname`, `lname`, `age`) LIKE '%".$valueToSearch."%'";
$search_result = filterTable($query);
... | true |
3fded7934cd74d176b5fc3c9908a8cf9f85d2029 | PHP | AlexBerg82/myprojects | /bck-end/shop/www/reg/handler_reg.php | WINDOWS-1251 | 2,346 | 2.515625 | 3 | [] | no_license | <?php
if($_SERVER['REQUEST_METHOD'] == "POST"){
session_start();
include("../include/db_connect.php");
include("../func/functions.php");
$error = array();
$login = iconv("UTF-8", "cp1251",strtolower(clear_string($_POST['reg_login'])));
$pass = iconv("UTF-8", "cp1251",strtolower(clear_string($_POST['reg_pass'])));
$... | true |
17f3ec725070a40582fb718e5a9bd35847439c8d | PHP | Axol44/appweb | /actividad4/agradecer.php | UTF-8 | 1,064 | 2.59375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gracias por votar</title>
<link rel="stylesheet" href="./compartido.css" />
<link rel="stylesheet" href="./agradecer.css" />
</head>
<body>
<?php
$id... | true |
8658bfddd075207efa47636bbe09d4cfb5c5fde4 | PHP | wuqinghua1109/mvc | /core/lib/route.php | UTF-8 | 1,180 | 2.515625 | 3 | [] | no_license | <?php
namespace core\lib;
use core\lib\conf;
class route
{
public $ctrl;
public $action;
public function __construct(){
//xxx.com/index/index
/**
* 1、隐藏index.php
* 2、获取url 参数部分
* 3、返回对应控制器和方法
*/
if(isset($_SERVER['REDIRECT_URL']) && $_SERVER['REDIRECT_URL'] !='/'){
$path=$_S... | true |
f222f892ec20b8664d6dd9b4b1a2f6befc3073f6 | PHP | dnetix/sicv | /app/Models/Articles/Actions/UpdateArticleLocationCommand.php | UTF-8 | 291 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models\Articles\Actions;
class UpdateArticleLocationCommand
{
public $article_id;
public $location;
public function __construct($article_id, $location)
{
$this->article_id = $article_id;
$this->location = strtoupper($location);
}
}
| true |
d779d20490ff98ef9791d7c7061bbc7c6ae75fe7 | PHP | danijel3/ClarinSpeechToolsWeb | /web/util/tasks.php | UTF-8 | 1,892 | 2.625 | 3 | [] | no_license | <?php
require_once 'settings.php';
require_once __DIR__.'/../../vendor/autoload.php';
use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Message\AMQPMessage;
$task = new Task();
class Task
{
private $connection;
private $channel;
public function __construct()
{
global $rmq_host, ... | true |
54359dd25a20f8ffb373408b87efba202b5a4053 | PHP | ericdowell/resource-controller | /tests/src/Models/TestPost.php | UTF-8 | 1,902 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace ResourceController\Tests\Models;
use Illuminate\Database\Eloquent\Model;
/**
* ResourceController\Tests\Models\TestPost.
*
* @property-read \ResourceController\Tests\Models\TestUser $user
* @mixin \Illuminate\Database\Eloquent\Builder
*
* @property int $id
* @property... | true |
6af517c058ec7ea40fef17d737b0134dc1d71560 | PHP | vfremaux/moodle-block_teams | /renderer.php | UTF-8 | 14,343 | 2.515625 | 3 | [] | no_license | <?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle ... | true |
32e2e7677522041e49701c71204b1f71e1479635 | PHP | Huck9/bloczkek | /notification_show.php | UTF-8 | 4,295 | 2.671875 | 3 | [] | no_license | <?php
require_once("config.php");
global $config;
session_start();
if (isset($_SESSION) && isset($_SESSION['name']) && $_SESSION['role'] == "user" or "worker") {
$infoUser = "Aktualnie zalogowany: {$_SESSION['name']}, ID sesji: " . session_id() . ", rola: {$_SESSION['role']} ";
$pdo = new PDO($config['dsn'],... | true |
175daa119c375c98754514cece7c432037798ad3 | PHP | hasnainclub/school | /18 fall NIU/csci 466 databases/assign10/em/publisherbooks.php | UTF-8 | 1,010 | 3.015625 | 3 | [] | no_license | <?php
echo "<head><title>Publishers & Titles</title></head>";
$username = "z1831554";
$password = "1992May14";
$host = "courses";
$database ="henrybooks";
$connection = new mysqli("$host", "$username", "$password", "$database");
$sql1 = "SELECT PublisherName FROM Publisher;";
$result = $connection->query($sql1);
echo... | true |
ac9ee2775657e8df828012aa347210290a80af8e | PHP | zhangfangxiong/yhtx | /iyaoshow/library/Util/File.php | UTF-8 | 16,831 | 2.625 | 3 | [] | no_license | <?php
class Util_File
{
/**
* Mime定义
*
* @var array
*/
private static $_aMimeType = array(
'application/msword' => 'doc',
'application/octet-stream' => '',
'application/pdf' => 'pdf',
'application/vnd.ms-excel' => 'xls',
'application/vnd.ms-publisher... | true |
d10c96c8e6b4727794f610d8cf2ef29588d52c73 | PHP | OULibraries/oulib_bootstrap | /templates/views-view-summary-unformatted.tpl.php | UTF-8 | 992 | 2.984375 | 3 | [] | no_license | <?php
/**
* @file
* Default simple view template to display a group of summary lines.
*
* This wraps items in a span if set to inline, or a div if not.
*
* @ingroup views_templates
*/
?>
<?php
$total = 0;
$letters = range ('A', 'Z');
foreach($rows as $id => $row){
$existing_letters[] = $row->link;
$urls[$ro... | true |
f6574f14af4f14522532e2165ab0d93d18ba6470 | PHP | DmytroKrav/shortlinker | /app/Services/Blacklists/DomainsBlacklistService.php | UTF-8 | 480 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Blacklists;
use App\Repositories\BaseRepository;
use App\Repositories\Blacklists\DomainsBlacklistRepository;
class DomainsBlacklistService extends BaseRepository
{
private $repository;
public function __construct(DomainsBlacklistRepository $blacklistRepository)
{
$th... | true |
f850c69a97252dcf14d342018d9ea213ccb57367 | PHP | mpscl/test | /core/src/Validator/Constraints/AllowedFieldsToFilterValidator.php | UTF-8 | 1,111 | 2.53125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Validator\Constraints;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
class AllowedFieldsToFilterValidator extends ConstraintValidator
{
public function validate($filters, Constraint $constraint)
{
$allowed... | true |
5693e0a86504fbc59656b8637c8d6bcafbd6c0ac | PHP | xqueue/maileon-php-api-client | /src/transactions/ImportContactReference.php | UTF-8 | 1,622 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace de\xqueue\maileon\api\client\transactions;
/**
* A class for wrapping contact references.
*
* @author Viktor Balogh | Wanadis Kft. | <a href="balogh.viktor@maileon.hu">balogh.viktor@maileon.hu</a>
*/
class ImportContactReference
{
/**
*
* @var integer
* the Maileon ID of the co... | true |
339f883c7fa1f344a8503167c54dddee3c899cb6 | PHP | bignerdranch/client-validation-generator | /src/NpmWeb/ClientValidationGenerator/BaseJqueryValidationGenerator.php | UTF-8 | 3,063 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace NpmWeb\ClientValidationGenerator;
/**
* Abstract class for a jQuery validation generator. Defines how to
* output jQuery validation rules; subclasses must implement how to get
* those rules.
*
* This class does not include the jQuery and jQuery Validation JS files
* in your page--do that separat... | true |
79bd2ffb15616e580c02af137fa17f8c210d3dbd | PHP | miholeus/loyalty-club-api | /src/Zenomania/CoreBundle/Event/Listener/OrderListener.php | UTF-8 | 1,651 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: igor
* Date: 16.11.17
* Time: 12:41
*/
namespace Zenomania\CoreBundle\Event\Listener;
use Zenomania\CoreBundle\Entity\Order;
use Zenomania\CoreBundle\Event\Order\OrderWasCancelledEvent;
use Zenomania\CoreBundle\Repository\PersonPointsRepository;
use Zenomania\CoreBundle\... | true |
1e8c1ff8e701ebbec5673e168d334f045a9bbf12 | PHP | williamzmacdonald/seniorprojectrpg | /app/Http/Controllers/NotesController.php | UTF-8 | 1,128 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\note;
class NotesController extends Controller
{
public function store(Request $request)
{
//require title and description
$this->validate(request(), [
'title' => 'required',
'body' => 'required',
'user_id' => 'required',
... | true |
96dfcfa8dce17b4180a8cc31b3b93c5ec1c0ef5f | PHP | nmramalho/PHP_MySQL_Exemplos | /listareditar/formeditardepartamento.php | UTF-8 | 2,114 | 3.15625 | 3 | [
"MIT"
] | permissive | <html>
<head>
<title>Editar Departamento</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<?php
/* Verificar se foi enviado o pedido para eliminar */
if ($_SERVER["REQUEST_METHOD"] == "GET"... | true |
50cf8865244543711f9b6d88241f711a15b1b66d | PHP | victorspivak/projects | /Learn/LearnPhp/src/basic/Variables.php | UTF-8 | 157 | 2.734375 | 3 | [] | no_license | <?php
$a = "Hello";
$a = 5;
printf ("Value %d\n", $a);
$a1 = $a?:10;
printf ("Value %d\n", $a1);
$a1 = $aaa?:10;
printf ("Value %d\n", $a1);
?> | true |
131678a34fc234c3cb901f8a2b95cc2939fd6c15 | PHP | Ecodev/newsletter | /Classes/ViewHelpers/ExtDirectProviderViewHelper.php | UTF-8 | 2,083 | 2.609375 | 3 | [] | no_license | <?php
namespace Ecodev\Newsletter\ViewHelpers;
use Ecodev\Newsletter\MVC\ExtDirect\Api;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Object\ObjectManager;
/**
* View helper which allows
*
* = Examples =
*
* <newsletter:be.moduleContainer pageTitle="foo">
* <newsletter:includeDirectApi />... | true |
496f26516c23967e8f2b6ca31336a7b5552e11c5 | PHP | umpirsky/PermissionsHandler | /src/PermissionsHandler/PermissionsSetter.php | UTF-8 | 1,422 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Umpirsky\PermissionsHandler;
use Symfony\Component\Process\Exception\ProcessFailedException;
use Symfony\Component\Process\Process;
abstract class PermissionsSetter implements PermissionsSetterInterface
{
private $process;
public function __construct(Process $proces... | true |
67a32033c46cfd80a3cf099a811c18f987f1810c | PHP | naghamghanim/tamkeen | /app/Http/Controllers/EmployeeController.php | UTF-8 | 3,738 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use DB;
use Session;
class EmployeeController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$items=DB::table("employee")->get();... | true |
db6f399a9ad567b8a00c399853cb9b6ad678e0e5 | PHP | Big-Shark/forked-php-orm-benchmark | /maghead/vendor/corneltek/sqlbuilder/SQLBuilder/Raw.php | UTF-8 | 636 | 3.109375 | 3 | [
"BSD-4-Clause-UC"
] | permissive | <?php
namespace SQLBuilder;
class Raw
{
public $value;
public function __construct($rawValue)
{
$this->value = $rawValue;
}
/**
* @codeCoverageIgnore
*/
public function getRaw()
{
return $this->value;
}
public function __toString()
{
return ... | true |
2f1b0be85eb5c872dafc418465229df51732f809 | PHP | vcn/symfony-autofactory | /examples/autowire.php | UTF-8 | 1,674 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
use Symfony\Component\DependencyInjection\Compiler\Compiler;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Vcn\Symfony\AutoFactory\Annotation\Autowire;
use Vcn\Symfony\AutoFactory\Annotation\IsPublic;
use Vcn\Symfony\AutoFactory\AutoFactory;
use Vcn\Symfony\AutoFactory\AutoFactoryParser;
use Vc... | true |
bec4c330af6160be5ade0d26d7a92fd9eba77fc9 | PHP | ariefhidayatullah/kelompok6 | /PrintOnline/PrintOnline/admin/databahan/function.php | UTF-8 | 2,048 | 2.828125 | 3 | [] | no_license | <?php
//untuk koneksi
$conn = mysqli_connect('localhost', 'root', '', 'printonline');
//membuat function agar jadi satu, supaya jadi efektif dan efisien
function query($query)
{
//untuk memasukkan variabel $conn karena kalau langsung tidak bisa, grgr scope
global $conn;
//membuat array kosong untuk menampung data
... | true |
fa654638c0bacbb4bc4ed8813e9ca17a7fcdd6e1 | PHP | EricRabil/dna-to-rna | /models/AboutModel.php | UTF-8 | 160 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class AboutModel implements IModel {
public $steel;
public function __construct(\Steel\Steel $steel) {
$this->steel = $steel;
}
}
| true |
05dbb0da1000163ce70e3f269f4a3ee9c0e3d25a | PHP | etrias-nl/bol-com-connector | /src/Model/OrderItemTrait.php | UTF-8 | 1,502 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace Etrias\BolComConnector\Model;
trait OrderItemTrait
{
protected ?string $id = null;
protected ?int $quantity = null;
protected ?int $quantityShipped = null;
protected ?int $quantityCancelled = null;
protected ?bool $cancellationRequest = null;
public f... | true |
18131d53f987e9ac3709ad37a084865929eb151b | PHP | abbnaseri/news-website | /view/includes/newsshow.php | UTF-8 | 1,037 | 2.6875 | 3 | [] | no_license | <?php
$sql = "SELECT * FROM news where id=$id";
$pquery = $db->query($sql);
?>
<div class="col-12 col-md-6 col-lg-8">
<?php while ($news = mysqli_fetch_assoc($pquery)) : ?>
<!-- Single Featured Post -->
<p class="lead text-right"><i class="fa fa-user"></i><?php echo $news['sourc... | true |
958f41c0a7786e7fd6d321db4da53ea575b61823 | PHP | matheuxknight/review | /sansspace/ui/lib/quickview.php | UTF-8 | 1,696 | 2.546875 | 3 | [] | no_license | <?php
function canQuickContent($object)
{
if(!$object) return false;
if(!empty($object->ext->doctext)) return true;
if($object->type != CMDB_OBJECTTYPE_FILE) return false;
$file = $object->file;
if($file->filetype == CMDB_FILETYPE_URL) return true;
if($file->filetype == CMDB_FILETYPE_PDF) return true;
if($f... | true |
7bfdfd6fa34de2fe4e17192a7cc285952ad77506 | PHP | at69/beta-nestbox | /model/Classes/Element.class.php | UTF-8 | 5,667 | 3.03125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Crocell
* Date: 25/04/14
* Time: 10:59
*/
/**
* Class Element
* @author Alban Truc
*/
class Element
{
/** @var string|MongoId $_id identifiant unique de l'élément */
private $_id;
/** @var int $state
* 0 = élément inaccessible
* 1 = élément acces... | true |
0addb48cdaba9cb3bc94d676903ee23da5eeeaf5 | PHP | Finixian/ServTec | /Models/Bo/examenBo.php | UTF-8 | 323 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Model\Bo;
use Model\Dao\Examen\ExamenDao as ExamenDao;
class ExamenBo {
var $dao;
function __construct() {
$this->dao = new ExamenDao();
}
function registrarResultadoBo($examen) {
$resultado= $this->dao->registrarResultadoDao($examen);
return $resultado;
... | true |
009324cb09a6d151924c691217231266d21dec51 | PHP | psenough/wl_clot | /europe3vs3/server.php | UTF-8 | 11,063 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
//error_reporting(E_ALL);
//ini_set('display_errors', '1');
require('../common/auth.php');
require('../common/dopostrequest.php');
require('../common/warlight_gameapi.php');
require('../common/savejsonbackup.php');
date_default_timezone_set('UTC');
$now = new DateTime("now");
//echo 'now: '.$now->format('Y/m... | true |
1710a72228e316039f267327fc4af461cd442a2b | PHP | Eniid/MDG2 | /vendor-old/thijssimonis/nova-list-card/src/NovaListCard.php | UTF-8 | 854 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace ThijsSimonis\NovaListCard;
use Laravel\Nova\Card;
use Laravel\Nova\Nova;
use Illuminate\Support\Collection;
class NovaListCard extends Card
{
public $width = '1/3';
public function __construct()
{
$this->withMeta([
'title' => __(Nova::humanize($this)),
'he... | true |
ad554517728d070da47f572f943434ba21012586 | PHP | dinhlt-kimei/doan | /classes/comments.php | UTF-8 | 689 | 2.546875 | 3 | [] | no_license | <?php $filepath = realpath(dirname(__FILE__)); ?>
<?php require_once ($filepath.'/../helpers/format.php');?>
<?php require_once ($filepath.'/../lib/database.php');?>
<?php
class comments
{
private $db ;
private $fm ;
public function __construct()
{
$this->db = new Da... | true |
2e5c9f11debe7e71548509ff3363f795bc3a7ada | PHP | dmbs335/ctf | /gatecrasher/gatecrasher/src/common.php | UTF-8 | 1,242 | 2.625 | 3 | [] | no_license | <?php
function redirect($action) {
header("Location: index.php?action=$action");
}
function is_login() {
return isset($_SESSION['id']);
}
function pdo_query($query, $param) {
global $config;
try {
$db = new PDO("mysql:host=localhost;dbname={$config['db']};charset=utf8",$config['username'],$config['password']);
... | true |
4100a223689b335eff10b007df0fb5d57e276422 | PHP | KaterynaKuzmenko/Andruew | /ht_23_07_2016/table2.php | UTF-8 | 594 | 3.171875 | 3 | [] | no_license | <?php
$cols = 10;
$rows = 10;
?>
<html>
<head>
<style>
table{
width: 250px;
height: 250px;
}
</style>
</head>
<body>
<table border="1">
<?php
for($tr = 1; $tr <= $cols; $tr++){
echo '<tr>';
for($td = 1; $td <= $rows; $td++) {
$style ... | true |
514ad9efe87184ec21e5b464aa813df5b4da809f | PHP | codememory1/database-schema | /Interfaces/UpdateInterface.php | UTF-8 | 1,420 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Codememory\Components\Database\Schema\Interfaces;
use Codememory\Components\Database\Schema\StatementComponents\Expression;
use Codememory\Components\Database\Schema\StatementComponents\Join;
use Codememory\Components\Database\Schema\StatementComponents\Order;
/**
* Interface UpdateInterface
*
* @... | true |
42ddbb4ada040f6a70c89ce1f3ef83248d496b2e | PHP | ingenerator/authorquot.es | /application/classes/Model/Author.php | UTF-8 | 839 | 2.84375 | 3 | [] | no_license | <?php
/**
* Models a single author
*
* @author Andrew Coulton <andrew@ingenerator.com>
* @copyright 2013 inGenerator Ltd
*/
/**
* Models a single author
*
* @property int $id The id
* @property string $name The author's name
* @property Model_Recording $Recordings Recor... | true |
26536567d789bb57f510356635e0e7d59507c0d4 | PHP | Ivan-DaGreat/RESTapi_Example | /app/Http/Middleware/AccessUser.php | UTF-8 | 606 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
use Auth;
use App\User;
class AccessUser
{
/**
* Check User Access
* - Editors can do anything
* - Users can only view/edit their own profile
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mix... | true |
6024353f1868e51be4ede72308294be85459ebef | PHP | noikiy/Bunxious-Website | /Core/Htmlform/.documentation/examples/lists.php | UTF-8 | 3,104 | 2.953125 | 3 | [] | no_license | <?php
/*
* Load the library...
*/
require_once ('../../Htmlform.php');
/*
* Create the example form 'listsExampleForm'
*/
$form = new depage\htmlform\Htmlform ( 'listsExampleForm' );
/*
* Multiple input element with checkbox skin, set required Contrary to HTML5
* specs, a required multiple-checkbox only needs o... | true |
ca63cfab6b065a729fc7633504f7e32933284af7 | PHP | FrankZiWANG-dev/PHP-challenge-2 | /models/Company/CompanyInterface.php | UTF-8 | 235 | 2.8125 | 3 | [] | no_license | <?php
interface CompanyInterface
{
public function create(array $form_vars = array());
public function update(array $form_vars = array());
public function getCompanyById($company_id);
public function delete($company_id);
} | true |
a2e0c87c67dde5b75ab3bbd12ff9dc06dd70c0a7 | PHP | fiiraz/Cola | /Cabinet.php | UTF-8 | 2,867 | 3.328125 | 3 | [] | no_license | <?php
include_once 'Cola.php';
class Cabinet {
private $shelf1 = [];
private $shelf2 = [];
private $shelf3 = [];
private $door = false;
function addRaf1($cola) {
if((!is_a($cola, 'Cola')) && !($cola->get_size() == "33")){
return "please add cola 33cl!";
}... | true |
677cd24809dc6908fcd9efdb4f8b23bba14b6670 | PHP | Icinga/ipl-sql | /src/Cursor.php | UTF-8 | 2,133 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace ipl\Sql;
use ipl\Stdlib\Contract\Paginatable;
use IteratorAggregate;
use Traversable;
/**
* Cursor for ipl SQL queries
*/
class Cursor implements IteratorAggregate, Paginatable
{
/** @var Connection */
protected $db;
/** @var Select */
protected $select;
/** @var array */
... | true |
e36b1fdc00e06f17de28e8324f64183a691edf6a | PHP | mumingv/php | /func/regex/sql_regcase.php | UTF-8 | 497 | 2.625 | 3 | [] | no_license | <?php
/***********************************************************
* FileName: sql_regcase.php
* Desc: 产生用于匹配的正则表达式,不区分大小写
* Author: Jie Yin
* Email: mumingv@163.com
* HomePage: https://github.com/mumingv
* Version: 0.0.1
* LastChange: 2016-10-20 14:07:09
* History:
***... | true |
30cd39e93061dd1b26f5ac940e6c4d75323aa336 | PHP | maidmaid/numberplate | /tests/NumberPlate/SearcherTest.php | UTF-8 | 1,602 | 2.84375 | 3 | [] | no_license | <?php
namespace NumberPlate;
use PHPUnit_Framework_TestCase;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\GenericEvent;
require_once __DIR__.'/../../vendor/autoload.php';
class SearcherTest extends PHPUnit_Framework_TestCase
{
public function testSearch()
{
$searcher = new... | true |
fda1b1770c220103a38830cd8fc273eb8fcb28ec | PHP | ushahidi/tenfour | /app/Http/Controllers/MailController.php | UTF-8 | 5,770 | 2.640625 | 3 | [
"AGPL-3.0-only",
"MIT"
] | permissive | <?php
namespace TenFour\Http\Controllers;
use Log;
use Route;
use App;
use TenFour\Contracts\Repositories\ReplyRepository;
use Illuminate\Http\Request;
use Aws\Sns\Message;
use Aws\Sns\MessageValidator;
use Aws\Sns\Exception\InvalidSnsMessageException;
use Zend\Mail\Storage\Message as EmailMessage;
use EmailReplyPa... | true |
72085c083d8cfbb6aa1ed4400a32e5790716d562 | PHP | hiend/deploy | /src/Command/DownCommand.php | UTF-8 | 680 | 2.546875 | 3 | [] | no_license | <?php
/*
* This file is part of the Deploy.
*
* (c) Dmitry Averbakh <adm@ruhub.com>
*/
namespace Deploy\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* DownCommand
*
* Author: Dmitry Averbakh <adm@ruhub.com>
*/
class DownCommand extends... | true |
b8888e3ffeb6a514c7a3d9a8d88cb46a4929b7a8 | PHP | italolelis/EasyFramework | /src/Easy/Configure/Loader/IniLoader.php | UTF-8 | 2,191 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
// Copyright (c) Lellys Informática. All rights reserved. See License.txt in the project root for license information.
namespace Easy\Configure\Loader;
use Symfony\Component\Config\Loader\FileLoader;
/**
* Handles Yml config files
*/
class IniLoader extends FileLoader
{
public function load($resource, ... | true |
5547490c33c7a3f6bcf0473cddc723dd121f94cd | PHP | oevandro/laravel-relationship | /app/Http/Controllers/OneToManyController.php | UTF-8 | 2,155 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Country;
use App\Models\State;
use App\Models\City;
class OneToManyController extends Controller
{
//
public function OneToMany(){
//$country = Country::where('name','Brasil')->get()->first();
$keySearch = "a";
... | true |
7a4753937b45db40d4f7e7b36fc1d34c08c77046 | PHP | SutapCedcoss/test_LI | /src/SoapClient/WebStoreClient.php | UTF-8 | 1,049 | 2.734375 | 3 | [] | no_license | <?php
namespace klyp\LightingIllusion\SoapClient;
/**
* Class RetailExpressClient
*
* @method customerCreateUpdate(array $data, string $rootElement, string $root)
*/
class WebStoreClient
{
public const WSDL_FILE = 'WebStore.xml';
public BaseSoapClient $client;
public function __construct()
{
... | true |
e18f161f684a665b1b927c20b0e0975eab7028c8 | PHP | florianv/exchange | /src/ExchangeRate.php | UTF-8 | 1,043 | 3.171875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/*
* This file is part of Exchanger.
*
* (c) Florian Voutzinos <florian@voutzinos.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Exchanger;
use Exchanger\Contract\ExchangeRate as ExchangeRateContract;
/**
... | true |
7c7e1f2483fc3b70e86da4f5ef8446e7c7a82611 | PHP | openpne/OpenPNE3 | /lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/lib/Doctrine/Cli.php | UTF-8 | 21,255 | 2.6875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause",
"MIT",
"Apache-2.0",
"BSD-2-Clause",
"ICU",
"LGPL-2.0-or-later",
"LGPL-2.1-only"
] | permissive | <?php
/*
* $Id: Cli.php 2761 2007-10-07 23:42:29Z zYne $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO... | true |
3ecb34ddad1b8e7921d0639baa74696899cdde5b | PHP | fumi46/NOTICE-BOARD | /Notice-Board/after_main/main.php | UTF-8 | 6,466 | 2.625 | 3 | [] | no_license | <?php //ログイン後(メイン)画面
session_start(); //session = 1ユーザーのログインからログアウトまでの管理
// ini_set( 'display_errors', 1 );
// ini_set( 'error_reporting', E_ALL );
require_once '../classes/UserLogic.php';
require_once '../classes/security.php';
//ログインフォームのチェック
if(isset($_POST['reg'])){
$error_message = array();
//ログイン画面... | true |
348632ce6c056efc20855d5bf4c3b8158c93a753 | PHP | giero/symfony-rest-bundle | /Repository/GetSingleOperation.php | UTF-8 | 738 | 2.546875 | 3 | [] | no_license | <?php
namespace Eyja\RestBundle\Repository;
use Doctrine\ORM\NoResultException;
use Eyja\RestBundle\Exception\NotFoundException;
/**
* Returns single entity
*/
class GetSingleOperation extends AbstractOperation {
/** @var string|int */
protected $id;
public function setId($id) {
$this->id = $id;
return $th... | true |
daa0eec95df3148a1e7fc0b3145642ec4bffef84 | PHP | shaimaa-maher/laravel | /app/Http/Controllers/PostController.php | UTF-8 | 1,467 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\post;
use App\Http\Requests\StorePostRequest;
use App\User;
class PostController extends Controller
{
public function index()
{
return view('posts.index', [
'posts' => post::all()
]);
}
public fu... | true |
ee5ad206869e85b8a35ef0206420e095077576cf | PHP | ThiagoKrug/resolucao-de-problemas-V | /application/models/Horario.php | UTF-8 | 7,283 | 2.671875 | 3 | [] | no_license | <?php
/**
* Description of Horario
*
* @author thiago
*/
class Application_Model_Horario extends Zend_Db_Table_Row_Abstract {
private $turma;
private $periodoLetivo;
private $disciplina;
private $professores;
private $dias = array(Application_Model_Data::SEGUNDA_STRING,
Application_Mod... | true |
070b5665c9343902b51262660c5e738d438cff87 | PHP | wesleyromualdo/PIM | /www/SSDWsAuth.class.php | UTF-8 | 22,449 | 2.84375 | 3 | [] | no_license | <?php
require_once(SSD_PATH."SSDConnector.class.php");
require_once(SSD_PATH."TO/AppletTicketInfo.php");
require_once(SSD_PATH."TO/UserAuthInfo.php");
/**
* Classe de acesso aos servicos de autenticao do SSD.
*
* Estao disponiveis metodos para os tres modos de autenticacao da applet e um
* metodo para a recuperaca... | true |
0963bbc92f278930f0dec9e0b2dd97d9fc141c19 | PHP | ustrugany/zend-example | /application/forms/City.php | UTF-8 | 812 | 2.609375 | 3 | [] | no_license | <?php
class Application_Form_City extends Zend_Form
{
public function init()
{
$country = new Application_Model_DbTable_Country;
$countries = $country->fetchAllOrderedByName();
$countriesForSelect = array();
foreach($countries as $countryElement){
$countrie... | true |
c6b4d74e9645d0231e32afd31cbf62ef781e0b06 | PHP | Crix4lis/cart-product-api | /tests/ExampleData/CatalogueProductBuilder.php | UTF-8 | 1,164 | 2.9375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Task\Tests\ExampleData;
use Task\App\Catalogue\Domain\Product;
use Task\App\Common\Price\Price;
class CatalogueProductBuilder
{
private string $id;
private string $title;
private string $priceAmount;
public static function product(): CatalogueProductBuilder
... | true |
7fe2011b870b1a3d7bab97588a6008ee13cb251a | PHP | alcidesrh/tour-agency | /vendor/friendsofphp/php-cs-fixer/src/Fixer/Import/NoUnusedImportsFixer.php | UTF-8 | 8,602 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/*
* 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\Fixer\Import;
use PhpCsFixer\... | true |
9dc661b8b98f887cd954d8a4b3458b0fc125def8 | PHP | wesandradealves-jobs/abla | /dao/CidadeCarroDao.php | UTF-8 | 1,544 | 2.671875 | 3 | [] | no_license | <?php
class CidadeCarroDao {
function listarCidades($estado) {
$servicedb = new ServiceDB();
$cf = ConnectionFactory::singleton();
try{
$sql = "select cidade.id, cidade.cidade, cidade.estado from cidade, locadoras where estado='$estado' and cidade.id=locadoras.id_cidade and ID_STATUS = 1... | true |
35389bdaed709f4246463ecc88c659e73dc5be57 | PHP | radicalray/brothers-training | /portal/admin/reset_code.php | UTF-8 | 1,281 | 2.578125 | 3 | [] | no_license | <?php
include_once '../../includes/db_connect.php';
include_once '../../includes/functions.php';
sec_session_start();
if (login_check($mysqli) == true) {
$logged = 'in';
} else {
$logged = 'out';
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Secure Login: Log In</title>
<script type="text/Java... | true |
9d97ee544ecd5b7e074f69ac4f50e97ca4e28c5e | PHP | pleasedance/shop | /nginx-php/code/shop/app/Models/OrderInvoiceModel.php | UTF-8 | 641 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2018/12/20
* Time: 17:37
*/
namespace App\Models;
class OrderInvoiceModel extends BaseModel
{
protected $table = "order_invoice";
protected $primaryKey = 'order_invoice_id';
const electronicInvoice = 0;//电子发票
const paperInvoice = 1;... | true |
ac17adfbb8c75dea903f409f7cb55c1f0155cea0 | PHP | kazi00/Online | /app/Http/Controllers/StaffController.php | UTF-8 | 3,778 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Staff;
use Illuminate\Http\Request;
use function PHPUnit\Framework\fileExists;
class StaffController extends Controller
{
/**
* @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
*... | true |
56f3417d5f7cd1c97219c6aa0c5875023b953746 | PHP | kschroeder/PusherLogger | /test/test.php | UTF-8 | 767 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
require_once '../vendor/autoload.php';
if (!file_exists('config.php')) {
die('Please create a config.php file that creates a properly defined Pusher object called $pusher and places it in the global scope. <?php $pusher = new Pusher("123123", "12312, "123123"); ?>. You can probably just copy it from your ... | true |
736a968996c144f2e4af57ec21b32035619df492 | PHP | tonymcghie/CamDev | /features/bootstrap/BehatException.php | UTF-8 | 886 | 2.8125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: mgoo
* Date: 2/12/17
* Time: 10:04 AM
*/
class BehatException extends Exception {
/**
* BehatException constructor.
* @param Exception|string $cause
* @param \Behat\Mink\Session $session
* @param int $time
*/
public function __construct($c... | true |
7c01aaffc114b3ddb877298ac9c7dad9ed53820d | PHP | RaulOG/flexinvoices | /app/InvoiceCollection.php | UTF-8 | 549 | 3.375 | 3 | [] | no_license | <?php
class InvoiceCollection
{
private array $invoices = [];
public function add(Invoice $invoice)
{
$this->invoices[] = $invoice;
}
public function count(): int
{
return count($this->invoices);
}
public function toArray(): array
{
return $this->invoices;
}
public function slice(int $offset, int ... | true |
1f887b0beedc987d11ab9796a9fc41ab9ec5673f | PHP | swellstores/swell-php | /lib/Collection.php | UTF-8 | 4,512 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Swell;
/**
* Represents a client resource containing a collection of records
* Primarily used in paginatte record results
*/
class Collection extends Resource
{
/**
* @var int
*/
public $count;
/**
* @var array
*/
public $pages;
/**
* @var int
*/
public $page;
/**... | true |
f0839fbd2156c9f328a81b80dc21c2b4eab6a94b | PHP | schmunk42/StackExchangeApiClient | /src/Model/Post.php | UTF-8 | 1,606 | 2.828125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/*
* This file is part of the Stack Exchange Api Client library.
*
* Copyright (c) 2015 Beñat Espiña <benatespina@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace BenatEspina\StackExchangeApiClient\Model... | true |
5b148f019bc94495d81ec3d4272ec7497607bfe8 | PHP | ch000618/php_redis | /lib/test.redis.php | UTF-8 | 4,107 | 2.71875 | 3 | [] | no_license | <?php
include_once('class.redis.php');
include_once('../config/sys_config.php');
//建立 redis 簡單連線
$redis=mke_redis_link($redis_set);
test_set();
test_get();
//test_fork_redis_set();
//test_fork_redis_get();
//test_fork_redis_del();
//test_multi_redis_set();
//test_multi_redis_get();
//test_multi_redis_del();
//set key v... | true |
4e65aa29e79c5fc0e350f8de2adec1eb2632abb5 | PHP | Phargelm/Quotes | /app/src/Core/Validation/CompanySymbolExistsValidator.php | UTF-8 | 1,119 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Core\Validation;
use App\Service\QuotesService\QuotesService;
use Symfony\Component\HttpFoundation\File\Exception\UnexpectedTypeException;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
class CompanySymbolExistsValidator extends ConstraintValidato... | true |
cd49d9c868603e18866923a650307e9504489cde | PHP | ljqian1990/ljqian | /namespace/A.php | UTF-8 | 307 | 2.828125 | 3 | [] | no_license | <?php
namespace A;
class news {
public function __construct(){
echo 'A news<br/>';
}
}
class app {
public function __construct(){
echo 'A app<br/>';
}
}
class comment {
private $news;
private $app;
public function __construct(){
$this->news = new news();
$this->app = new app();
}
} | true |
6f6a75e3bf61198f8abe661d645bf2c07eaa091a | PHP | jdefez/laravel-csv | /src/Csv.php | UTF-8 | 727 | 3.015625 | 3 | [] | no_license | <?php
namespace Jdefez\LaravelCsv;
use Jdefez\LaravelCsv\Csv\Readable;
use Jdefez\LaravelCsv\Csv\Writable;
use Jdefez\LaravelCsv\Csv\Reader;
use Jdefez\LaravelCsv\Csv\Writer;
use SplFileObject;
class Csv implements Csvable
{
public static function reader(SplFileObject $file): Readable
{
return new Re... | true |
98aa928d8cc0f42895872d788694084db5bd0572 | PHP | MJK618/PHP | /College Programs/Ans12.php | UTF-8 | 575 | 3.25 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<form class="" action="Ans12.php" method="post">
<h1>Prime Number</h1>
Enter the number : <input type="number" name="num">
<input type="submit" name="submit">
</form>
<?php
function Pri... | true |
729c937d4ae403076b56b890a409609423bdbb96 | PHP | BjornHansson/arngrim | /src/classes/PageController.php | UTF-8 | 2,001 | 3 | 3 | [
"MIT"
] | permissive | <?php
class PageController
{
private $errorIdMessage = "ID is not numeric";
private $db;
public $htmlPage;
public function __construct()
{
$this->htmlPage = new HtmlPage();
$this->db = new DatabaseHandler();
}
public function closeIssue($id)
{
if(!is_numeric($id... | true |