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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
70d52bce060700cf8d1f72e9d1dc734dbdaacccd | PHP | a3020/quiz | /src/Controller/QuizController.php | UTF-8 | 3,175 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controller;
use App\Models\JsonQuiz;
use App\Models\QuizInterface;
class QuizController extends AbstractController {
/**
* Shows a page with available quizzes.
*
* @param $request
* @param $response
* @return string Parsed Twig template
*/
public function get... | true |
5303701ee92cece0ec182cc02658342b0cd6fd5e | PHP | jitesoft/loauthd | /src/Entities/AuthCode.php | UTF-8 | 2,236 | 2.5625 | 3 | [
"MIT",
"CC-BY-3.0"
] | permissive | <?php
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
AuthCode.php - Part of the loauthd project.
© - Jitesoft 2018
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
namespace Jitesoft\Loauthd\Entities;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrin... | true |
810db5b0c72dc3189f9a39ac837120e144b6a6a8 | PHP | DavidsonGomes/devbarber_api | /app/Http/Controllers/AuthController.php | UTF-8 | 3,275 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Validator;
use App\Models\User;
class AuthController extends Controller
{
public function __construct()
{
$this->middleware('auth:api', ['except' => ['create', 'login... | true |
93f77194b2ef4ada11f4d418a6f0841c016308f2 | PHP | Free5Dev/Elephorm | /2-Syntaxe/variable.php | UTF-8 | 906 | 3.640625 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Bonjour en php</title>
</head>
<body>
<?php
// les variables et leurs types en php
$ret... | true |
2ea946766acb817aa9d8332cae89230c6efbb146 | PHP | santhosh-ssk/e-commerce | /Server/src/DAO/ProductVariantDao.php | UTF-8 | 3,817 | 2.671875 | 3 | [] | no_license | <?php
namespace App\DAO;
use App\Utils\SqlConn;
use App\Models\ProductVariant;
use App\Models\Variant;
use App\Models\VariantValue;
class ProductVariantDao extends ProductVariant
{
public $db_connect;
public function __construct(){
$this->db_connect = new SqlC... | true |
eaeec4e69faec8efc68a6c0d92434499c5a20ebe | PHP | abdibr116/omnipay-hyperpay | /src/Message/PurchaseResponse.php | UTF-8 | 2,514 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* HyperPay Purchase Response
*/
namespace Omnipay\HyperPay\Message;
use Omnipay\Common\Message\AbstractResponse;
use Omnipay\Common\Message\RequestInterface;
/**
* HyperPay Purchase Response
*/
class PurchaseResponse extends AbstractResponse
{
protected $statusCode;
public function __construct... | true |
fde096416f1330a2fed168357332872d0056c74a | PHP | emiliojva/phpwoman-oficina-php | /aula5-vamos-programar/index.php | UTF-8 | 1,253 | 3.46875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Exemplo</title>
<style>
body { padding: 0px; margin:0p... | true |
5853029f8bf27c8860cd54775809e4433e81ea69 | PHP | Stroncii/fknt_site | /site/objects/plans/read.php | UTF-8 | 2,688 | 2.6875 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
//header("Cache-control: public");
//header("Expires: " . gmdate("D, d M Y H:i:s", time() + 14*60*60*24) . " GMT");
// include database and object files
include_once '../../config/database.php';
include_once 'plan.... | true |
1928a1495d690731a7497cb9cc598d9e6eee90ea | PHP | auroragg/aprendemas | /models/Idiomas.php | UTF-8 | 1,182 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "idiomas".
*
* @property int $id_idioma
* @property string $descripcion
* @property string $icono
*
* @property Niveles[] $niveles
* @property Sesiones[] $sesiones
*/
class Idiomas extends \yii\db\ActiveRecord
{
/**
* {@in... | true |
ced3e0c1e87117931b1ce842e856851bd2453681 | PHP | kotur43/igraonica | /application/models/Komentari.php | UTF-8 | 967 | 2.609375 | 3 | [] | no_license | <?php
class Application_Model_Komentari
{
public $id_komentar;
public $radionica;
public $korisnik;
public $datum;
public $tekst;
public function getId_komentar() {
return $this->id_komentar;
}
public function setId_komentar($id_komentar) {
$this->id_komentar = $id... | true |
7397235f6a37aa049e4c1e6fc6ab2ff6c443b233 | PHP | tedslittlerobot/frb-cli | /src/Tasks/FridayJumper.php | UTF-8 | 2,419 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Tlr\Frb\Tasks;
use Carbon\Carbon;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Question\ConfirmationQuestion;
u... | true |
2bc2fbe917b3a9595b7faec5e109dc3dff7131fc | PHP | zainengineer/yii-dressing | /yii-dressing/components/YdUrlReader.php | UTF-8 | 2,711 | 2.71875 | 3 | [] | no_license | <?php
/**
* Class YdUrlReader
*
* @package dressing.components
*/
class YdUrlReader
{
/**
* @param $url
* @param null $referer
* @param bool $follow
* @param bool $return
* @return bool|mixed
*/
public function getUrl($url, $referer = null, $follow = true, $return = true)
{... | true |
77c681088197a979decdfab3b48ef4346a06c849 | PHP | WilliamZheng27/Meet | /regist.php | UTF-8 | 1,887 | 2.796875 | 3 | [] | no_license | <?php header("Content-Type: application/xml; charset=utf-8");
$servername = "localhost";
$username = "root";
$password = "zhengyuxiao12345";
$database = "user_db";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " ... | true |
19951ae7df852cb979895f30ce5c3963c88fb630 | PHP | Alabuja/scholamania | /app/Http/Controllers/Individuals/ScoreController.php | UTF-8 | 833 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Individuals;
use App\Individuals\Score;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Individuals\Guest;
class ScoreController extends Controller
{
public function index()
{
$data = [
'guests' => Guest::all()
];
... | true |
df2d544e4851fa7acb825dd5747b2e7127eb7c49 | PHP | maxwebstar/secco | /app/Services/PipeDrive/Organization.php | UTF-8 | 902 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\PipeDrive;
use Exception;
class Organization extends Core
{
public function __construct()
{
parent::__construct();
}
public function getByID($id)
{
$url = self::BASE_URL_COMPANY_V1 . "organizations/$id?api_token=";
$result = $this->curlGet(... | true |
9b80685488ae75264c6e8e8ccafb14f573b4a79e | PHP | JustinJiahaoLiu/forum-php | /showorder.php | UTF-8 | 4,408 | 2.609375 | 3 | [] | no_license | <?php
session_start();
//connect to database
include 'ch21_include.php';
doDB();
//check for cart items based on user session id
$get_cart_sql = "SELECT st.id, si.item_title, si.item_price,
st.sel_item_qty, st.sel_item_size, st.sel_item_color FROM
store_shoppertrack AS st LEFT JOIN store_items AS si ON
si.id = st.sel... | true |
7db2381bfbe9afc9a1a41d703f0778c0758e8329 | PHP | iammuhit/shipping-module | /src/Origin/Contract/OriginInterface.php | UTF-8 | 1,438 | 2.53125 | 3 | [] | no_license | <?php namespace Anomaly\ShippingModule\Origin\Contract;
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
/**
* Interface OriginInterface
*
* @link http://pyrocms.com/
* @author PyroCMS, Inc. <support@pyrocms.com>
* @author Ryan Thompson <ryan@pyrocms.com>
*/
interface OriginInterface extends EntryI... | true |
891c1bbfe5d8b1a9355f80f6021753a90585b944 | PHP | sm1I3/legendbattles | /css/fr/geme.style.css.php | UTF-8 | 632 | 2.609375 | 3 | [] | no_license | <?php
if($_GET['status']=="del"){echo "del";
$f = fopen('styles.css.php', 'w');
fclose($f);
file_put_contents('styles.css.php', '');
exit();}
$file=$_GET['file'];
$amely = mkdir($file, 0777);
$fp = fopen("styles.css.php", "a"); // Открываем файл в режиме записи
$mytext = $_GET['text']; ... | true |
9789c2369d8b2cdbb144c8369202d87fdebb5607 | PHP | Remdran/Guestbook | /controllers/MessageController.php | UTF-8 | 672 | 2.796875 | 3 | [] | no_license | <?php
require('Message.php');
class MessageController {
/**
* @var DatabaseConfig
*/
protected $query;
/**
* Message constructor.
* @param $query
*/
public function __construct(QueryBuilder $query)
{
$this->query = $query;
}
public function getComment()
... | true |
510fc0e7b4025a551cd05af3949bb5f8dd63b964 | PHP | MuhammadAbdullah899/my_symfony_project | /src/Controller/UserController.php | UTF-8 | 1,957 | 2.5625 | 3 | [] | no_license | <?php
// src/Controller/UserController.php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Response;
use Psr\Log\LoggerInterface;
class UserController extends AbstractController
{
/**
... | true |
44fd8f3c01f8cbc54af26a62dfc73e945a8debff | PHP | bubbstore/Webservice-1.5-php | /src/Cielo/Serializer/TransactionRequestSerializer.php | UTF-8 | 6,297 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Cielo\Serializer;
use Cielo\Transaction;
use DOMDocument;
class TransactionRequestSerializer extends RequestSerializer
{
/**
* {@inheritDoc}
*/
public function serialize($transaction)
{
libxml_use_internal_errors(true);
$document = new DOMDocument('1.0', 'utf-8'... | true |
6838d358a3292f2e796c4dc52d7caeb91dafaf89 | PHP | cobaltcrm/cobalt | /src/Cobalt/Helper/DateHelper.php | UTF-8 | 13,972 | 2.59375 | 3 | [] | no_license | <?php
/*------------------------------------------------------------------------
# Cobalt
# ------------------------------------------------------------------------
# @author Cobalt
# @copyright Copyright (C) 2012 cobaltcrm.org All Rights Reserved.
# @license - http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
# Website... | true |
ffe57f60aa5e6cc1b7f0fd40c4f8f86cc35fba59 | PHP | wdkunrath/BDO | /app/Services/Candidate/CandidateService.php | UTF-8 | 4,120 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace BDO\Services\Candidate;
use Ixudra\Curl\Facades\Curl;
use BDO\Mapper\CandidateMapper;
use BDO\Infrastructure\Eloquent\Candidate\Candidate;
use BDO\Repositories\Candidate\CandidateRepositoryInterface;
class CandidateService{
/** @var CandidateRepositoryInterface */
private $candidateRepository... | true |
6c56d8c408b1f9d4d3e52e197fd202bc7fa522d9 | PHP | vaseninm/hb | /grabber/src/importer/AbstractImporter.php | UTF-8 | 1,415 | 3.0625 | 3 | [] | no_license | <?php
namespace grabber\importer;;
abstract class AbstractImporter implements ImporterInterface
{
const NAMESPACE = '';
protected $title = null;
/**
* @var \GearmanClient
*/
protected $gearmanClient = null;
/**
* @return $this
*/
public static function create() {
$... | true |
a0eaaa69d9a54a6ad68da152e120d1cb222a9f5e | PHP | UtyEmma/homely-back | /app/Http/Libraries/Functions/StringFunctions.php | UTF-8 | 466 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Http\Libraries\Functions;
trait StringFunctions {
protected function createExcerpt($text, $word_count){
$explodeText = explode(" ", $text);
$wordsArray = array_slice($explodeText, 0, $word_count);
return implode(' ', $wordsArray);
}
protected function createDe... | true |
0fd8aa23036e8f266c6b069a7728d82b610e880e | PHP | mkhairul/skynature | /database/seeds/MembershipTableSeeder.php | UTF-8 | 962 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class MembershipTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$this->command->info('Seeding Memberships');
$membership = [
[
'name' => 'Sky Member',
'direct_bonus' =>... | true |
2e62a09d9822c580a9efc8348787c6d300be2b12 | PHP | nans/RequestPrice | /Api/Data/RequestApiInterface.php | UTF-8 | 328 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Nans\RequestPrice\Api\Data;
interface RequestApiInterface
{
/**
* @param string $email
* @param string $name
* @param string $comment
* @param string $sku
* @return string
*/
public function makeRequest(string $email, string $name, string $comment, string $sku): s... | true |
e2a19230ff7a1037c33c4b9bd652e056ce68f03d | PHP | heitorhdasilva/tcc-andre | /TCC-SIGE/sige/models/CrudUser.php | UTF-8 | 3,001 | 2.890625 | 3 | [] | no_license | <?php
require 'DBConnection.php';
require 'Cad_user.php';
class CrudUser
{
private $conexao;
public function getUsers()
{
$this->conexao = DBConnection::getConexao();
$sql = 'select * from cad_user';
$resultado = $this->conexao->query($sql);
$cad_user = $resultado->fetch... | true |
3418197e10f86ea3479148eff952262733445f71 | PHP | abrardev99/samples | /CMS for internal managment for Aviation Acedamy UAE/Controllers/StudentFinalLevelController.php | UTF-8 | 756 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\StudentFinalLevel;
use Carbon\Carbon;
use Illuminate\Http\Request;
class StudentFinalLevelController extends Controller
{
public function store(Request $request){
$request->validate([
'student_id' => ['required'],
'assessment_id' => ['... | true |
4b416454b290304a8f9528a0e104008f7ea1d58e | PHP | derkurier100/igl | /sitecake/2.4.10/src/Sitecake/Content/ContentManagerAwareTrait.php | UTF-8 | 2,909 | 2.9375 | 3 | [] | no_license | <?php
namespace Sitecake\Content;
use Sitecake\Content\DOM\Query\SelectorInterface;
trait ContentManagerAwareTrait
{
/**
* @var ContentManager
*/
protected $contentManager;
/**
* Returns list of content containers
*
* @param string|callable|array|null $filter
*
* @retu... | true |
85caf83b5dd97a4c8be935567bd38058a62f67f5 | PHP | OpenWebGroup/owurl | /urls/openweb-backup.php | UTF-8 | 3,854 | 2.546875 | 3 | [] | no_license | <?php
define('URLS_OPENWEB_EXEMPLE', '/articles/xhtml_une_heure');
function urls_openweb_dist($i, &$entite, $args='', $ancre='') {
if (is_numeric($i))
return _generer_url_openweb($entite, $i, $args, $ancre);
// Chercher les valeurs d'environnement qui indiquent l'URL Openweb
if (isset($_SERVER['REDIRECT_ur... | true |
d5b57a9e1f587771d97110fcfa5f04dfbd891911 | PHP | klasJakub/ZWA | /app/Presenters/ForumPresenter.php | UTF-8 | 4,916 | 2.65625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Presenters;
use App\Components\AddForum\AddForum;
use App\Components\AddPost\AddPost;
use App\Components\Sign\Sign;
use App\Models\Model;
use Nette;
final class ForumPresenter extends Nette\Application\UI\Presenter
{
/** @var \Nette\Database\Context */
public $data... | true |
75945ca4b6117027ce3720d094fc26bfe3d174be | PHP | Flutterwave/Flutterwave_OSS_Invoice | /app/Models/User.php | UTF-8 | 678 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Models;
use App\Models\Base\User as BaseUser;
use Carbon\Carbon;
class User extends BaseUser
{
protected $fillable = [
'f_name',
'l_name',
'phone',
'email',
'password',
'country_id',
'created_at',
];
public function setCreatedAt... | true |
32ad74cc9f5e6519c00d8f5d857fb2337de5ec0c | PHP | AaronGreenDev/rr-breeze | /app/Http/Controllers/StockController.php | UTF-8 | 5,326 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Medicine;
use App\Models\MedCategory;
use App\Models\MedName;
use App\Models\MedPack;
use App\Models\TemplateMed;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
class StockController extends Controller
{
/**
* Display a listing of the M... | true |
03c0e5d7c92e1d5395df1aba3189c3ebc46e81eb | PHP | Johndeleon/ecommerce | /shoppingcart/database/seeds/insert_into_product_prices.php | UTF-8 | 1,883 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use App\ProductPrice;
use Illuminate\Database\Seeder;
class insert_into_product_prices extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
ProductPrice::insert(
[
["product_id" => 1,
"description" => "econo... | true |
33bca99484a790d68e3945ed12b34170a67ecacb | PHP | bondhupabel120/news-portal | /app/Comment.php | UTF-8 | 1,469 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Session;
class Comment extends Model
{
protected $fillable = ['visitor_id','blog_id','comment'];
public static function saveCommentInfo($request){
$comment = new Comment();
$comment->visitor_id = $request->visitor_id;
... | true |
e4195a250e86750c35a2876dbfaabdcffd7ca0f1 | PHP | russjohnson09/php-quizlet | /app/database/seeds/CardTableSeeder.php | UTF-8 | 279 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Faker\Factory as F;
class CardTableSeeder extends Seeder {
const MAX = 100;
public function run()
{
$f = F::create();
DB::table('cards')->delete();
for ($i=0;$i<self::MAX;$i++) {
Card::create(array(
'front' => $f->name
));
}
}
}
| true |
1d9367caebd4e352bb0a197e0dbdea44937dcc8b | PHP | neo-p/http-message | /src/Message.php | UTF-8 | 3,535 | 3.09375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace NeoP\Http\Message;
use Psr\Http\Message\MessageInterface;
use Psr\Http\Message\StreamInterface;
use NeoP\Http\Message\Stream\Stream;
class Message implements MessageInterface
{
protected $protocolVersion = "1.1";
protected $headers = [];
protected $body;
function __cons... | true |
2962bd740d92493aefa1488528408104aa765fc1 | PHP | jozefgrencik/validator | /src/Validator.php | UTF-8 | 1,023 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace JozefGrencik\Validator;
use JozefGrencik\Validator\Rules\Encoding;
use JozefGrencik\Validator\Rules\Integer;
use JozefGrencik\Validator\Rules\Math;
use JozefGrencik\Validator\Rules\Net;
use JozefGrencik\Validator\Rules\Strings;
class Validator
{
const VERSION = 0.1;
const VERSION_ID = 100;
... | true |
2310517aa27433daaab0db57ac7fe36e6224d53e | PHP | garbetjie/http-request-logger | /helpers.php | UTF-8 | 596 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Garbetjie\RequestLogging\Http;
use EndyJasmi\Cuid;
use function implode;
use function is_array;
use function str_replace;
use function strtolower;
function normalize_headers(array $headers) {
$formatted = [];
foreach ($headers as $key => $value) {
$key = str_replace('_', '-', strtolo... | true |
b282773cfaa15418aa4e86c0fc9afb3fab5b34a2 | PHP | hatice-akcali/projet3 | /Controleur/ControleurSecurise.php | UTF-8 | 356 | 2.578125 | 3 | [] | no_license | <?php
require_once 'Framework/Controleur.php';
/**
* Classe parente des contrôleurs soumis à authentification
*
* Vérifie si les informations utilisateur sont présents dans la session
*/
abstract class ControleurSecurise extends Controleur
{
public function executerAction($action)
{
parent::ex... | true |
e06fa6c0394a9cbf30cbe8b3cc1facce315fa1d4 | PHP | piripasa/takeaway-homework-assignment | /app/Services/Reader/Reader.php | UTF-8 | 905 | 3.390625 | 3 | [] | no_license | <?php
namespace App\Services\Reader;
abstract class Reader
{
protected $filePath;
protected $data = [];
/**
* Reader constructor.
* @param string $filePath
* @throws \Exception
*/
function __construct(string $filePath)
{
$this->setFilePath($filePath);
}
/**
... | true |
7ea120a304a4871edb3b48e697816fdfa4c3772b | PHP | crobert/LogicielTrez | /application/models/exercice_model.php | UTF-8 | 874 | 2.703125 | 3 | [] | no_license | <?php
class Exercice_model extends CI_Model
{
/*
* CRUD avec un item
*/
public function get_exercice($id)
{
$sql = 'SELECT * FROM exercice WHERE exe_id = ?';
return $this->db->query($sql, array($id))->row();
}
public function list_exercice()
{
$sql = 'SELECT * FROM ... | true |
9f6f3ff6ce60fa1c51eed8ae69c6a43455cf01d5 | PHP | Mediagone/twig-powerpack | /src/Tags/RegisterNode.php | UTF-8 | 2,006 | 2.703125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php declare(strict_types=1);
namespace Mediagone\Twig\PowerPack\Tags;
use Twig\Compiler;
use Twig\Node\Node;
final class RegisterNode extends Node
{
//========================================================================================================
// Properties
//==============================... | true |
d58e9297913ce782ecee58a47f8fa7bfe8eb6407 | PHP | JCID/webservices.nl | /src/StructType/KadasterNietNatuurlijkPersoon.php | UTF-8 | 5,086 | 2.859375 | 3 | [] | no_license | <?php
namespace Webservices\StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for kadasterNietNatuurlijkPersoon StructType
* @subpackage Structs
* @author JCID <info@jcid.nl>
*/
class KadasterNietNatuurlijkPersoon extends AbstractStructBase
{
/**
* The naam
* Meta i... | true |
b56e374e7f4dcbf23809a2fe7bde90e17ea00768 | PHP | SignpostMarv/strayFw | /src/RocknRoot/StrayFw/Database/Postgres/Mutation/DeleteForeignKey.php | UTF-8 | 760 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace RocknRoot\StrayFw\Database\Postgres\Mutation;
use RocknRoot\StrayFw\Database\Database;
/**
* Representation for foreign key deletion operations.
*
* @author Nekith <nekith@errant-works.com>
*/
class DeleteForeignKey extends Mutation
{
/**
* Prepare and return according PDO statement.
... | true |
543ef6a3982fd8003e03626e8b9168589a542039 | PHP | SulaimanSP/WU-International-Coastal-Cleanup | /paeg2.php | UTF-8 | 263 | 3.203125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<body>
<?php
echo "My first page PHP script!";
$x = 15985;
var_dump(is_numeric($x));
$x = 15985;
var_dump(is_numeric($x));
$x = "59.85" + 100;
var_dump(is_numeric($x));
$x = "Hello";
var_dump(is_numeric($x));
?>
</body>
</html>
</html> | true |
cf6d48fc7704f0e3f26a3915e1e54cc8fe5c741b | PHP | I0T/EPGT | /Server/tags/release-130710.8679/lib/task/onevideocrawlerTask.class.php | UTF-8 | 19,587 | 2.65625 | 3 | [] | no_license | <?php
/**
* 供后台维基模块抓取单个视频使用
* @author wn
*
*/
class onevideocrawlerTask extends sfMondongoTask
{
protected function configure()
{
$this->addOptions(array(
new sfCommandOption('application', null, sfCommandOption::PARAMETER_REQUIRED, 'The application name', 'frontend'),
new sf... | true |
359f7c5fe7631cdebf6207724bf113ed82a8afe0 | PHP | LechDutkiewicz/pkpk | /src/shortcodes.php | UTF-8 | 3,566 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/*===============================================
= Custom report shortcode =
===============================================*/
/*---------- Register and add tinymce button ----------*/
// init process for registering our button
add_action('admin_init', 'report_tinymce_button');
functio... | true |
1930637f88a7502713022c5fdddbf2d8029109f6 | PHP | Seeyko/poissonClown | /dev/algo.php | UTF-8 | 17,666 | 2.78125 | 3 | [] | no_license | <?php
require_once 'Lagon.php';
require_once 'Anemone.php';
require_once 'Horloge.php';
require_once 'Utils.php';
require_once 'Event.php';
ini_set('max_execution_time', 300);
class algo
{
private $horloge;
private $lagons;
private $anemones;
public function __construct ()
{
$l_file = ... | true |
86feeba9e4d09735cf61f8bdfff3c5e83b427e9c | PHP | josefm09/facebookBot | /class/gestion_propuesta.php | UTF-8 | 3,449 | 2.609375 | 3 | [] | no_license | <?PHP
class propuesta
{
function crear_propuesta($mysqli, $titulo, $solucion, $problema)
{
$estatus = 1;
$query = "INSERT INTO propuesta(id_propuesta, titulo, problematica, solucion, estatus, fecha_creacion, ultima_modificacion)
VALUES
(NULL,?,?,?,?,now(),now())";
if ($stmt = ... | true |
f72354a838cba91dca4321591ac91933824bb6f5 | PHP | tegarpratama/crud-oop-php | /index.php | UTF-8 | 2,293 | 2.5625 | 3 | [] | no_license | <?php
$page_title = 'List of Employee';
require_once 'init.php';
$db = new Database();
$pagination = new Pagination();
$employee = new Employee();
$data = $pagination->showDataPaging();
if(isset($_POST['search'])){
$data = $employee->searchEmployee();
}
?>
<div class="container">
<h2 class="mt-5">List of Emplo... | true |
e009e860d2aeb753a73af61a8f7a4801c5bcd1e9 | PHP | HoDuongNhatDuy/ktpm_final | /app/Models/MsgBroker/FlexibleObject.php | UTF-8 | 476 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: hoduo
* Date: 1/14/2018
* Time: 21:57
*/
namespace App\MsgBroker;
class FlexibleObject {
protected $attributes = [];
public function initAttributes($attributes) {
$this->$attributes = $attributes;
}
public function setAttribute($key, $value) {
$this->attributes... | true |
5dd4c1fee4385f9d7b5ab4daf9a9df122126abd8 | PHP | bupyc9/laravel-proxy-list | /app/Console/Commands/ProxyParseCommand.php | UTF-8 | 1,343 | 2.96875 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use App\Parser\ParserContext;
use App\Parser\ParserException;
use App\Parser\StrategyInterface;
use Illuminate\Console\Command;
class ProxyParseCommand extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected... | true |
53991f9c61704e4a1021841f09a19c23c8e130ef | PHP | heddi/bootigniter | /app/helpers/user_helper.php | UTF-8 | 4,121 | 2.671875 | 3 | [] | no_license | <?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
/**
* Styles
*
* Generates Styles link.
* @access public
* @param string/array
* @return string
*/
if (!function_exists('current_username')) {
function current_username() {
if (!user::id()) {
retu... | true |
8d8c960831d4019e85c0100402790c0a177c6c97 | PHP | m4rkw/autoinvoice | /libraries/Calendar.php | UTF-8 | 8,494 | 2.5625 | 3 | [] | no_license | <?php
class Calendar {
function __construct() {
$config = dirname(__FILE__)."/../config/config.php";
if (!file_exists($config)) {
die("Missing config file config/config.php\n");
}
include($config);
$this->config = $config;
require_once 'Zend/Loader.php';
require_once dirname(__FILE__)."/BankHolidays... | true |
8ccbaf4759571aff01399ddb979263c3b8355cd2 | PHP | stuncy/docker-magento2 | /app/code/Magento/Newsletter/Controller/Subscriber/Unsubscribe.php | UTF-8 | 1,509 | 2.53125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"AFL-2.1",
"AFL-3.0",
"OSL-3.0",
"MIT"
] | permissive | <?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Newsletter\Controller\Subscriber;
use Magento\Framework\App\Action\HttpGetActionInterface as HttpGetActionInterface;
/**
* Controller for unsubscribing customers.
*/
class Unsubscribe extends \M... | true |
13b5e9c321cfbbafa809374fc6e8981a5ca8f69c | PHP | harshadzagade/DanceAcademy | /update2_workshop.php | UTF-8 | 588 | 2.625 | 3 | [] | no_license | <?php
if(isset($_POST['sub']))
{
$id=$_POST['id'];
$name=$_POST['name'];
$phone=$_POST['phone'];
//print("$bid $date $time");
//Step 1-Connect to db
include_once "database.php";
//Step 2-Create query
$sql="UPDATE workshop SET name='$name',phone='$phone' WHERE id='$id'";
//Step 3-... | true |
b435236ad4d481b47fd8ce2ae38e8452b8a0368a | PHP | dawguy/Lcancel | /app/User.php | UTF-8 | 3,240 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Support\Facades\Response;
use Auth;
use Log;
use DB;
class User extends Authenticatable
{
/**
* The attributes that are mass assi... | true |
d2cb690ea7a0f78f44ef27cbd03a5b578638796a | PHP | mmalek007/munircrm | /app/Http/Controllers/Admin/EmployeeController.php | UTF-8 | 3,681 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Http\Requests\EmployeeStoreRequest;
use App\Models\Companies;
use App\Models\Employees;
use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Session;
class EmployeeController extends Controller
{
/**
... | true |
91f4e87225a1397720bd5a79b52db3a9e6628448 | PHP | ProklUng/wp.migrations | /src/Migrator.php | UTF-8 | 11,892 | 2.890625 | 3 | [] | no_license | <?php
namespace Arrilot\BitrixMigrations;
use Arrilot\BitrixMigrations\Interfaces\DatabaseStorageInterface;
use Arrilot\BitrixMigrations\Interfaces\FileStorageInterface;
use Arrilot\BitrixMigrations\Interfaces\MigrationInterface;
use Arrilot\BitrixMigrations\Storages\FileStorage;
use Arrilot\BitrixMigrations\Storages... | true |
e64f2b2cdc0acbcd0936419a8d8d0a24f104264c | PHP | CosminIorga/Equinox | /app/Models/Storage.php | UTF-8 | 2,312 | 2.875 | 3 | [] | no_license | <?php
namespace Equinox\Models;
use Carbon\Carbon;
use Illuminate\Support\Collection;
/**
* Class Storage
* @package Equinox\Models
* @property Collection $columns
* @property Carbon $referenceDate
*/
abstract class Storage extends NonPersistentModel
{
/**
* The pattern name used by interval columns
... | true |
147ac1d73d50cee5a1868d3f4db3b022a8c2bd5c | PHP | MLupinski/AllegroSynch | /lib/database.php | UTF-8 | 485 | 3.28125 | 3 | [] | no_license | <?php
class Database {
public $pdo;
function __construct() {
$host = 'localhost';
$dbname ='synch';
$username = 'root';
$password = '';
$charset = 'utf8';
$pdo = '';
try {
$this->pdo = new PDO('mysql:host='.$host.';dbname='.$dbname.';charset='.$charset, $username, $password);
$this->pdo->setA... | true |
44133d60af9440adc7881d64de896c40c0f4f29d | PHP | MarinaChizh/cripto | /mvc/controllers/basicController.php | UTF-8 | 365 | 2.640625 | 3 | [] | no_license | <?php
class basicController extends Controller {
function test () {
echo "Class Conrtoller is working!!!<br>";
}
function actionAbout() {
echo "actionAbout is working!!!<br>";
}
function About() {
echo "About is working!!!<br>";
}
function actionClassNameNP () {
... | true |
cdbe6ae756ee2348b43236668c1dc10c259d6b94 | PHP | 007mehrab/PHP | /31_12_20_16th_class/strip_tag.php | UTF-8 | 163 | 2.515625 | 3 | [] | no_license | <?php
$text = '<p>Test paragraph.</p>
<a href="$fragment">Other text</a>';
echo strip_tags($text); //no other parameter use
//echo strip_tags($text, '<p>');
?> | true |
895f2491eff76777bddef2c7622e8b482ad78660 | PHP | wuhan005/Eggplant | /utils/Check.php | UTF-8 | 497 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace EP\Utils;
// Security part
class Check{
public function __construct(){
}
public function has_key($element, array $source = []){
if(is_array($element)){
foreach($element as $value){
if(!key_exists($value, $source)){
return false;
... | true |
89f5582585711b92dbe3edda9c3c3fae1562479a | PHP | dimiri-quadrupede/gatcha | /src/AppBundle/Entity/UploadableFile.php | UTF-8 | 6,965 | 2.625 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\HttpFoundation\File\UploadedFile;
/**
* @ORM\Entity()
* @ORM\HasLifecycleCallbacks
* @ORM\Table(name="uploaded_file")
* @Gedmo\Upl... | true |
ebf47311f95903a7253b6579278d5d387d036373 | PHP | realcahsowan/laravel-bulma-form | /src/Console/FormBuilderMakeCommand.php | UTF-8 | 1,529 | 2.5625 | 3 | [] | no_license | <?php
namespace RealCahsowan\LaravelBulmaForm\Console;
use Illuminate\Console\GeneratorCommand;
use Str;
class FormBuilderMakeCommand extends GeneratorCommand
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'make:form';
/**
* The console command descripti... | true |
9ecd83518d988f6ef45ff449ffa0697df658763d | PHP | PavitraPednekar/IMPLANT | /family.php | UTF-8 | 132 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
function familyName($fname)
{
echo"$fname hello <br>";
}
familyName("jgjj");
familyName("lkj");
familyName("uyut");
?> | true |
acc646ea06710346e2b34542e3838aa22cec426e | PHP | DamienMer/Web_table_tennis | /web/sport/sport_principal/Visualisation/get_pseudos.php | UTF-8 | 976 | 2.921875 | 3 | [] | no_license | <!--Fichier qui a pour but de créer un tableau (a envoyer au fichier js visualisation) contenant le nom de tous les utilisateurs. On pourra par la suite récupérer les données de chaque gestes pour chaque personne-->
<?php
//pas de session start car le fichier est inclut dans un autre ou la session est déjà lancée... | true |
2aa20716a20f7d30c5f1c36e426c3c3d862a2687 | PHP | maniekcz/rst-rabbit | /backend/src/Consumer/OrderConsumer.php | UTF-8 | 968 | 2.75 | 3 | [] | no_license | <?php
namespace App\Consumer;
use App\Entity\Order;
use App\Repository\Orders;
use App\Services\EmailProvider;
use OldSound\RabbitMqBundle\RabbitMq\ConsumerInterface;
use PhpAmqpLib\Message\AMQPMessage;
class OrderConsumer implements ConsumerInterface
{
/**
* @var Orders
*/
private $orders;
/**... | true |
c087c0e5044b0cb62e44c45773b4843e47a4d06a | PHP | vit017/cleaner | /api_integration/protected/common/components/console/TaxiConsole.php | UTF-8 | 695 | 2.96875 | 3 | [] | no_license | <?php
class TaxiConsole extends TaxiObject
{
protected $_currentColor;
public $isPreStyle = true;
private function createLine($text, $color)
{
$preStyle = $this->isPreStyle ? 'white-space:pre;' : '';
return "<p style=\"color: {$color}; {$preStyle} font-size: ... | true |
75238b01b7d9a2c6e8b4b15d3d9939f5563afd8f | PHP | slkxmail/App | /tests/AppTest/Filter/PriceTest.php | UTF-8 | 2,125 | 2.703125 | 3 | [] | no_license | <?php
namespace AppTest\Filter;
use AppTest\Filter\TestCase as ParentTestCase;
use App\Filter\Price;
class PriceTest extends ParentTestCase
{
public function setUp()
{
$this->filter = new Price();
}
public function testFilter()
{
$price = new Price();
$this->assertEquals(float... | true |
5826271e7c6fbfb6a277a217b41f23430c2c9df4 | PHP | lucaswilliameufrasio/rating-doctors-ionic-laravel | /API/app/Http/Controllers/User/UserController.php | UTF-8 | 1,351 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\User;
use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class UserController extends Controller
{
public function registerUser(Request $request)
{
$validator = Validator::make($request... | true |
eb37242d0ebe6338f96ae2b67ac9583dcb5f5a2d | PHP | Ambujbharati/attandance | /after_register.php | UTF-8 | 920 | 2.6875 | 3 | [] | no_license | <?php
include "header.php";
?>
<?php
include "connect_db.php";
?>
<div class="after_register_body">
<?php
$name = $_POST['name'];
$course = $_POST['course'];
$sem = $_POST['sem'];
$sec = $_POST['sec'];
$rollno = $_POST['roll'];
connect_db();
$query1 = "SELECT * FROM student WHERE... | true |
aa8cd2b9dcac6aed14d623c61924c5afd0be0435 | PHP | jahui/workfriends | /serverscripts/get_users.php | UTF-8 | 702 | 2.796875 | 3 | [] | no_license | <?php
/*
* Following code will list all Users
*/
// array for JSON response
$response = array();
// include db connect class
require_once dirname(dirname(__FILE__)) . '/workfriends/db_connect.php';
// get all users from user table, or kill the link if the query has problems
$query = "SELECT * FROM user";
//... | true |
d7efd0c6eb06eea787b267e525c0a71a4e11af3a | PHP | szepeviktor/w3-total-cache-fixed | /Cdnfsd_Limelight_Popup.php | UTF-8 | 1,519 | 2.546875 | 3 | [
"GPL-2.0-or-later",
"MIT"
] | permissive | <?php
namespace W3TC;
class Cdnfsd_Limelight_Popup {
static public function w3tc_ajax() {
$o = new Cdnfsd_Limelight_Popup();
add_action( 'w3tc_ajax_cdnfsd_limelight_intro',
array( $o, 'w3tc_ajax_cdnfsd_limelight_intro' ) );
add_action( 'w3tc_ajax_cdnfsd_limelight_save',
array( $o, 'w3tc_ajax_cdnfsd_lim... | true |
50708671830441b691dddd31a1891da559c69af4 | PHP | mutabix/member-register | /src/Scs/Controllers/Controller.php | UTF-8 | 1,865 | 2.703125 | 3 | [] | no_license | <?php
namespace Scs\Controllers;
use Scs\Scs;
use Ng\Core\Controllers\Controller as SuperController;
class Controller extends SuperController
{
protected $viewPath;
protected $layout;
protected $session;
protected $pageManager;
protected $str;
protected $validator;
protected $app;
pu... | true |
f972f4bf836597d913c6dc89b913ecdeecc04dbf | PHP | rafalkot/pet-feeder-api | /src/Application/Query/PetQuery.php | UTF-8 | 313 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Application\Query;
use App\Application\Exception\NotFoundException;
interface PetQuery
{
public function getPets(string $personId): array;
/**
* @throws NotFoundException
*/
public function getPetById(string $personId, string $id): array;
}
| true |
d01bd99364300298692c0da480d9ff5a4e8e4442 | PHP | dan-da/php2js | /phpwt_tests/test_runner | UTF-8 | 1,352 | 2.703125 | 3 | [] | no_license | #!/usr/bin/env php
<?php
$files = (count($argv) > 1) ? array( $argv[1] ) : glob( '*.js' );
// check for js interpreter (spidermonkey) in path.
$prog = null;
if( `which js241` ) {
$prog = 'js241';
}
else if( `which node` ) {
$prog = 'node';
}
else {
die( "Could not find javascript interpreter in path. ... | true |
77b6533c3c6e79b7caf4c1128add2a0c31164bd0 | PHP | paslandau/php-sandbox | /src/WhitelistVisitor.php | UTF-8 | 1,620 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace paslandau\PhpSandbox;
use Exception;
use PhpParser\Node;
use PhpParser\Node\Expr\FuncCall;
use PhpParser\NodeVisitorAbstract;
class WhitelistVisitor extends NodeVisitorAbstract
{
/**
* @var string[]
*/
private $nodeWhitelist;
/**
* @var string[]
*/
private $funcW... | true |
5ae491591c5c48dff947ec955936e0b88197c5e4 | PHP | jaz303/base-php | /inc/image.php | UTF-8 | 11,173 | 3.21875 | 3 | [] | no_license | <?php
class UnsupportedImageTypeException extends Exception {}
/**
* Image class - simple chainable wrapper around GD.
*
* Quick usage example:
*
* $i = new Image('test.png');
* $i->type('jpg')->constrain(160, 90)->grayscale()->output();
*
* @author Jason Frame
* @package BasePHP
*/
class Image
{
private... | true |
aab3e4b74d0e4cfabb78d3688bb0741b527d025f | PHP | jamiefeng/backstage | /framework/Library/Phalcon/Mvc/Model/Validator/PassPort.php | UTF-8 | 2,723 | 2.8125 | 3 | [] | no_license | <?php
namespace Phalcon\Mvc\Model\Validator;
use Phalcon\Mvc\Model\Exception;
use Phalcon\Mvc\Model\Validator;
use Phalcon\Mvc\Model\ValidatorInterface;
/**
* Phalcon\Mvc\Model\Validator\Idcard
*
* Allows to validate if Idcard fields has correct values
*
* @link http://www.soso.io/article/34001.html
*
*... | true |
d9a6444c603ee3ddadfb4e38660f02a02122160b | PHP | BarryKerr/4th_Year_Project | /login.php | UTF-8 | 1,091 | 2.78125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: barry
* Date: 26/02/2017
* Time: 23:07
*/
require_once('conn.php');//get connection to the database
$result='';
//get values posted from the login.php page
if(isset($_POST['username']) && isset($_POST['password']))
{
$username = $_POST['username'];
$password = $_P... | true |
f337b3771010e3f617b7d9961da0bdad079f4003 | PHP | Yunori/Search-algorithms | /dicho.php | UTF-8 | 746 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | <?php
// dicho.php for nox in /home/bertoc_t/PROJ/nox
//
// Made by Bertocco Thomas-Killian
// Login <bertoc_t@etna-alternance.net>
//
// Started on Mon Nov 10 09:54:18 2014 Bertocco Thomas-Killian
// Last update Mon Nov 10 09:54:27 2014 Bertocco Thomas-Killian
//
function dicho($tab = NULL, $find = NULL)
{
$... | true |
c8b429b6c3400cfa75d43648b9303ec2cf7568d2 | PHP | Zawatsuka/RevisionPHP | /EX7/index.php | UTF-8 | 504 | 4.21875 | 4 | [] | no_license | <?php
function inverseArray($a){
foreach($a as $value){
echo $value . " et son inverse est " . strrev($value)."</br>";
}
}
$tableau = array(
"Marc",
"Sophie",
"Maguy",
"Jonathan",
"Jennifer");
$color = array(
"green",
... | true |
a731d539125147be0c1256892932a8fecce02218 | PHP | hixio-mh/mariesartwork | /Pub/login/VisitorDataClass.php | UTF-8 | 1,257 | 2.609375 | 3 | [] | no_license | <?php
class VisitorData {
var $mysqldb;
function VisitorData() {
require_once($_SERVER['DOCUMENT_ROOT']."/OSA/login/libfunctions.php");
include_once($_SERVER['DOCUMENT_ROOT']."/OSA/login/mysqlClass.php");
include_once($_SERVER['DOCUMENT_ROOT']."/OSA/logFileClass.php");
include_once($_SERVER['DOCU... | true |
b9fe99ca7c723f7e074cabe00856f4887125705b | PHP | jarbor23/pagosPSE | /app/Custom/PSETransactionResponse.php | UTF-8 | 2,437 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Custom;
class PSETransactionResponse
{
private $transactionID;
private $sessionID;
private $returnCode;
private $trazabilityCode
private $transactionCycle;
private $bankCurrency;
private $bankFactor;
private $bankURL;
private $responseCode;
private $response... | true |
f612499225d0f0990ffdc84e4ef1a6334a14b46b | PHP | xlch88/xlchClassbook | /Function/VCode/VCode.NoCore.php | UTF-8 | 10,242 | 2.8125 | 3 | [] | no_license | <?php
/*
炫酷的动态验证码
By.绚丽彩虹 QQ787700998 / 悦咚 / Dark495
仅在PHP5.6及以上版本才能显示动态效果
*/
session_start();
$_vc = new ValidateCode();
if (version_compare(PHP_VERSION, '5.6') >= 0) {
for ($a = 0; $a < 5; $a++) {
ob_start();
$_vc->doimg();
$_vc->outPut();
$imagedata[] = ob_get_clean();
... | true |
a9cc24ec46fd666a2dd896729043dc5edf0417c2 | PHP | baamenabar/fly-image | /src/Core/Controller/DefaultController.php | UTF-8 | 762 | 2.53125 | 3 | [] | no_license | <?php
namespace Core\Controller;
use Symfony\Component\HttpFoundation\Response;
class DefaultController extends CoreController
{
public function indexAction()
{
return 'Hello from ' . $this->app->escape('Docker!');
}
/**
* @param $options
* @param null $imageSrc
* @return Res... | true |
c3d90f0844abfbf3771e877c10620270f3e65256 | PHP | sergio-l/bustickets | /app/Admin/Http/Sections/Buses.php | UTF-8 | 3,042 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Admin\Http\Sections;
use AdminColumn;
use AdminDisplay;
use AdminDisplayFilter;
use AdminForm;
use AdminFormElement;
use AdminColumnFilter;
use SleepingOwl\Admin\Contracts\Display\DisplayInterface;
use SleepingOwl\Admin\Contracts\Form\FormInterface;
use SleepingOwl\Admin\Contracts\Initializable;
u... | true |
92c876fabe2ca62c334013df6dafa4cc55cf91bc | PHP | alphazento/ecommerce | /src/Contracts/helpers.php | UTF-8 | 2,485 | 2.5625 | 3 | [] | no_license | <?php
if (!function_exists('zento_assert')) {
function zento_assert($obj, $interface = false)
{
if (app()->environment(['local', 'staging'])) {
if (!$obj) {
$errorMessage = sprintf('Assert object is null');
trigger_error($errorMessage, E_USER_ERROR);
... | true |
a5f97a14ae83321fc21f227383f1d017e8fdc65e | PHP | omsec/racing-api | /listChampionships.php | UTF-8 | 3,849 | 2.578125 | 3 | [] | no_license | <?php
include_once './config/database.php';
include_once './config/api.php';
require "./vendor/autoload.php";
use \Firebase\JWT\JWT;
$apiService = new ApiService();
$secret_key = null;
$secret_key = $apiService->getApiKey();
$jwt = null;
// Read Headers
$headers = getallheaders();
$authHeader = $headers["Authorizatio... | true |
ad0208412a3a09f471c6c370a837d56d82d2a582 | PHP | AnnijaSve/Articles_for_auth_users_only | /app/Repositories/CommentRepository.php | UTF-8 | 1,459 | 2.84375 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Models\Comment;
class CommentRepository
{
public function getByArticleId(int $id): array
{
$commentsQuery = query()
->select('*')
->from('comments')
->where('articles_id = :articleId')
->setParameter('articleId'... | true |
643fa86eca563086820cef957f456efe517323f2 | PHP | wamania/php-snowball | /test/Unit/StringCommandTest.php | UTF-8 | 1,951 | 2.640625 | 3 | [] | no_license | <?php
namespace Wamania\Snowball\Tests;
use PHPUnit\Framework\TestCase;
use Wamania\Snowball\StringCommand;
use Wamania\Snowball\Type\Grouping;
use Wamania\Snowball\Type\Non;
use Wamania\Snowball\Context;
use Wamania\Snowball\Type\Stringdef;
class StringCommandTest extends TestCase
{
public function setUp(): voi... | true |
9803d12b072b9666a4ef069206718676c7a98fdf | PHP | akiluyumar/icase | /load_bail_info.php | UTF-8 | 1,063 | 2.515625 | 3 | [] | no_license | <?php
require_once("config.php");
if(isset($_REQUEST['bailSuspect']) && isset($_REQUEST['bailCase'])) {
$suspect = $_REQUEST['bailSuspect'];
$case = $_REQUEST['bailCase'];
$bail_query = "SELECT * FROM tbl_bails WHERE susp_id='$suspect' AND crno='$case'";
$bail_result = mysqli_query($conn, $bail_query)... | true |
f8d1a1cb13789a3b9066c71801d34fd8de1689b7 | PHP | rafaelrosalessanch/ModuloInventario | /modelo/connect.php | UTF-8 | 1,537 | 2.671875 | 3 | [] | no_license | <?php
class Connect{
protected $usuario;
protected $contracenna;
protected $servidor;
protected $enlace = null;
protected $BaseDatos;
protected $puerto;
public function __construct() {
$this->usuario='desarrolladorvistas';
$this->contracenna='desarrollo';
$this->serv... | true |
9fb4d7e0ea88e56b3ffe48d2dd770eb50a544713 | PHP | ex2life/Finansist | /script/functions.php | UTF-8 | 7,628 | 2.890625 | 3 | [] | no_license | <?php
//---------------------------------------------------------------------
// Добавление одного или нескольких календарных месяцев к TIMESTAMP
//---------------------------------------------------------------------
function Add_month($time, $num=1) {
$d=date('j',$time); // день
$m=date('n',$time); // меся... | true |
6b418c23c5ae5784b5648cdca74d88220e976b9a | PHP | 17eyes/17eyes | /tests/parser/bug43323.phpt | UTF-8 | 319 | 2.65625 | 3 | [
"ISC",
"BSD-3-Clause"
] | permissive | --TEST--
Bug #43323 (Wrong count abstract methods)
--FILE--
<?php
abstract class bar {
abstract public function bar();
}
class foo extends bar {
}
?>
Fatal error: Class foo contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (bar::bar) in %sbug43323.php on line 7
| true |
adbc1e2344b9644c542191929c4dad324577fc12 | PHP | psrearick/prwebblog | /app/Http/Controllers/RegisterController.php | UTF-8 | 543 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Requests\RegisterRequest;
use App\Models\User;
use Illuminate\Http\Request;
use Inertia\Inertia;
use Redirect;
class RegisterController extends Controller
{
public function create() : \Inertia\Response
{
return Inertia::render('Auth/Register');
}... | true |