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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
942ae590c6f70647140f18afea286c9aec1b71b8 | PHP | NathanAtkinson/project5 | /app/controllers/validators/validator_factory.class.php | UTF-8 | 717 | 3.09375 | 3 | [] | no_license | <?php
class ValidatorFactory {
public function createValidator($type) {
if ($type == 'email') {
return new EmailValidator();
} elseif ($type == 'number') {
return new NumberValidator();
} elseif ($type == 'phone') {
return new PhoneNumberValidator();
} elseif ($type == 'username') {
... | true |
8c2151638d41f566f0607bf0500a604645b51369 | PHP | MartinSilverio/php-demo | /_practical-app/3.php | UTF-8 | 986 | 3.40625 | 3 | [] | no_license | <?php include "functions.php"; ?>
<?php include "includes/header.php";?>
<section class="content">
<aside class="col-xs-4">
<?php Navigation();?>
</aside><!--SIDEBAR-->
<article class="main-content col-xs-8">
<?php
/* Step1: Make an if Statement with elseif and else to finally display string saying, I... | true |
b1bba29a0b155b22d1c6e6b6211ef362b53c5b4c | PHP | floran40/gepi-csl | /fonctions_aid.php | UTF-8 | 9,069 | 2.625 | 3 | [
"BSD-3-Clause",
"OFL-1.1",
"MPL-1.1",
"MIT",
"LGPL-2.1-or-later",
"GPL-2.0-or-later",
"GPL-2.0-only",
"LGPL-2.1-only",
"GPL-3.0-or-later",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/*
* Copyright 2015-2019 Régis Bouguin, Stephane Boireau
*
* This file is part of GEPI.
*
* GEPI 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, or
* (at your op... | true |
b06d183eb99704b50ec9cf68abaae1253c3adb40 | PHP | BR0kEN-/TqExtension | /src/Utils/Wysiwyg/Wysiwyg.php | UTF-8 | 4,675 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Sergii Bondarenko, <sb@firstvector.org>
*/
namespace Drupal\TqExtension\Utils\Wysiwyg;
// Contexts.
use Drupal\TqExtension\Context\RawTqContext;
abstract class Wysiwyg
{
/**
* @var RawTqContext
*/
private $context;
/**
* @var string
* JS code that return an inst... | true |
9d5a12d23b5699b1ef223087ab408212a1d63637 | PHP | rolandocaldas/social-shared-counter | /backend/src/Domain/Entity/EntityId.php | UTF-8 | 477 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Domain\Entity;
use Ramsey\Uuid\Uuid;
class EntityId
{
private $id;
public function __construct($id = null)
{
$this->id = $id ?: Uuid::uuid4()->toString();
}
public function id() : string
{
return $this->id;
}
public function equals(EntityId $enti... | true |
285da79117271e4b3c00cf2a2cf2b64f7508c4f2 | PHP | ningzhang422/real-estate-bot | /src/Command/RunCrawlerCommand.php | UTF-8 | 3,674 | 2.78125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Command;
use Crawler\CrawlerContainer;
use Database\DatabaseInterface;
use DateTime;
use Event\CrawlingUrlEvent;
use Formatter\CLIFormatter;
use Notification\NotificationManager;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\ProgressBar;
... | true |
edc06f2c37ff00d907c83f91336728816395d485 | PHP | dima925/CityTaxi | /CityTaxiServer/Login.php | UTF-8 | 1,533 | 2.5625 | 3 | [] | no_license | <?php
header('Content-Type: application/json');
/* This is develop by Juan Huertas */
require_once(dirname(__FILE__)).'/assets/core/init.php';
// get content from url post
$foo = file_get_contents("php://input");
// Decode json result into array
$json = json_decode($foo, true);
// Extract values that you n... | true |
1f7f2d147f2b70b49ad191a41432ced7ed0b1f76 | PHP | AndreRicarti/Beta_Labs | /controller/Autenticador.class.php | UTF-8 | 537 | 2.5625 | 3 | [] | no_license | <?php
final class Autenticador {
public static function autenticaLogin($conexao,$nomeUser,$senhaUser){
$objUsuarioDAO = new UsuarioDAO();
if($objUsuarioDAO->autenticar($conexao, $nomeUser, $senhaUser)){
// echo "<script type='text/javascript'>window.location='sistema.php</script>";
... | true |
2258c725995ec8fef0de7887e86861baccff1a44 | PHP | gleidsonduarte/alura-vinicius-dias-object-calisthenics-exercitando-orienta-o-objetos | /src/Domain/Student/WatchedVideos.php | UTF-8 | 749 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Alura\Calisthenics\Domain\Student;
use Alura\Calisthenics\Domain\Video\Video;
use Countable;
use DateTimeImmutable;
use DateTimeInterface;
class WatchedVideos implements Countable
{
private Map $videos;
public function __construct()
{
$this->videos = new Map();
}
pub... | true |
9069bbbb47d892a519170e0c3cef825162290b0b | PHP | luizhata/curso_php | /arrays/CalculaMedia.php | UTF-8 | 197 | 3.203125 | 3 | [] | no_license | <?php
// php CalculaMedia
$argv;
$soma = 0;
for ($i=1; $i < count($argv); $i++) {
$soma += $argv[$i];
}
echo "Soma dos elementos: " . ($soma/(count($argv) - 1)) . PHP_EOL;
?>
| true |
aa393e0128fa994f4f097cab7c7a2412b00e1b23 | PHP | plepe/CGA-Backup | /www/inc.php | UTF-8 | 2,087 | 2.953125 | 3 | [] | no_license | <?
# Die einzelnen Zeilen der Config sind : getrennt
# Feld 1: Welcher Benutzer darf hier lesen?
# "": alle
# username: Benutzer <username> darf lesen
# @group: alle, die in Gruppe sowieso sind duerfen lesen
# Feld 2: Fuer welchen Pfad gilt dies?
# %u wird durch Benutzername ersetzt
# * gilt fuer alle matche... | true |
14a6144483f36122f50874ee5be710b21b71c472 | PHP | milankabjelic2626/IT255-PZ | /Desktop/IT255-PZ-Milanka-Aleksandar/phpprojekat/shared.php | UTF-8 | 1,984 | 2.640625 | 3 | [] | no_license | <?php
include("config.php");
function tokenToId($token)
{
$token = str_replace('"', "", $token);
global $conn;
$query = 'SELECT id FROM korisnici WHERE token = ?';
$result = $conn->prepare($query);
$result->bind_param('s', $token);
$id = array();
if ($result->execute()) {
... | true |
862de6a8d4f6fe6423c93e7624aac6807b1dd96c | PHP | ananyacleetus/uschs-reservation-system | /app/controllers/ReservationController.php | UTF-8 | 830 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
class ReservationController extends \BaseController {
/**
* Display the specified resource.
* GET /reservation/{id}
*
* @param int $id
* @return Response
*/
public function show($id)
{
return Response::json(array("status" => "ok", "reservation" => Reservation::find($id)));
}
/**
* Show t... | true |
6fb46b1b09fa4d7597362e3d48686ee9e274227c | PHP | asonni/tpb | /application/controllers/api_fromToDo.php | UTF-8 | 2,050 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php defined('BASEPATH') OR exit('No direct script access allowed');
require APPPATH.'/libraries/REST_Controller.php';
class Api extends REST_Controller
{
function __construct()
{
// Construct our parent class
parent::__construct();
}
// get all tasks if no parameter supplied
... | true |
933cae1049752a110a9add015db0a53bc3bdcf3d | PHP | Torniojaws/Crud | /classes/class-filecrud.php | UTF-8 | 978 | 3.328125 | 3 | [] | no_license | <?php
class FileCrud {
private $path;
private $data;
private $separator;
public function __construct($path, $separator) {
$this->path = $path;
$this->separator = $separator;
$this->data = file($this->path, FILE_IGNORE_NEW_LINES);
}
public function createRow($data) {
$fp = fopen($this->pa... | true |
ea0d79a6bf270ed3b74b43f54d96da9b3fdcd939 | PHP | NouranOo/Api-BeauityIn | /app/Http/Controllers/ProviderController.php | UTF-8 | 5,360 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Interfaces\ProviderInterface;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use validator;
use App\Models\Provider;
use App\Helpers\ApiResponse;
class ProviderController extends Controller
{
public $provider;
public $user;
public $apiResp... | true |
cd1d78c59a00a5de70b15d8ada2d745ed7b3f959 | PHP | zhangs919/kdniao | /src/Base.php | UTF-8 | 1,294 | 2.78125 | 3 | [] | no_license | <?php
namespace Laravelvip\Kdniao;
use GuzzleHttp\Client;
use Laravelvip\Kdniao\Exceptions\InvalidArgumentException;
class Base
{
protected $app_id;
protected $app_key;
protected $guzzleOptions = [];
public function __construct()
{
$app_id = config('kdniao.app_id');
$app_key = ... | true |
e3a7c2e195a1a3b8172a2009f6f1f23cd0ca925b | PHP | MahmoudRabee/QuestionBank | /addQuestion.php | UTF-8 | 4,325 | 2.890625 | 3 | [] | no_license | <?php
session_start(); #resume the session
if (isset($_SESSION["profName"])){
include 'connectDB.php' ; #connect database
$numberOfChupter =getNOchapter($_SESSION["course"],$db);
// echo "the number of ".$_SESSION["course"]." table os :".getNOchapter( $_SESSION["course"],$db);
?>
<form action="<?php echo $_SERVER[... | true |
fc17ebb1ef34266bb7f4655729e8491ca5f3b170 | PHP | dinithkodithuwakku-zero/Room-Reservation-Web-system | /Client-Panel/api/repo/FacilityDetailRepo.php | UTF-8 | 374 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by IntelliJ IDEA.
* User: dinit
* Date: 12/2/2018
* Time: 6:54 PM
*/
require_once __DIR__ . "/../core/FacilityDetail.php";
interface FacilityDetailRepo
{
public function setConnection(mysqli $connection): void;
public function addFacilityDetail(FacilityDetail $facilityDetail): bool;
... | true |
608fbce47a496dce01aa9e3441873f31efb3d526 | PHP | MirzaazriM/Spartan-Exercises-MS | /src/Model/Service/CachingCheckerFacade.php | UTF-8 | 1,561 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: mirza
* Date: 8/11/18
* Time: 3:32 PM
*/
namespace Model\Service;
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
use Symfony\Component\Cache\Adapter\PhpArrayAdapter;
class CachingCheckerFacade
{
/**
* Check if there is already cached response
*
... | true |
41f1076571da414158ea868ee57722692259211c | PHP | betterde/sdlc | /app/Http/Controllers/TableController.php | UTF-8 | 2,772 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Exception;
use App\Models\Table;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
/**
* 数据表逻辑控制器
*
* Date: 2018/11/4
* @author George
* @package App\Http\Controllers
*/
class TableController extends Controller
{
/**
* 获取数据表
*
* Date: 2018/11/4
*... | true |
7ec36dce750474d4dbc65044b8ffe1fdebe7e96c | PHP | vvk2001github/leetcodetrain | /php/String/1047-removeDuplicates.php | UTF-8 | 960 | 4.09375 | 4 | [] | no_license | <?php
// 1047. Remove All Adjacent Duplicates In String
// You are given a string s consisting of lowercase English letters.
// A duplicate removal consists of choosing two adjacent and equal letters and removing them.
// We repeatedly make duplicate removals on s until we no longer can.
// Return the final string... | true |
d81425791d3e79078e90210c2029185644bb3db1 | PHP | Adam-Rollo/Kohana-ORM-Lock | /database/query/builder/select.php | UTF-8 | 3,446 | 2.8125 | 3 | [] | no_license | <?php defined('SYSPATH') or die('No direct script access.');
class Database_Query_Builder_Select extends Kohana_Database_Query_Builder_Select {
protected $_for_update = false;
/**
* Adds "AND ..." conditions for the last created JOIN statement.
*
* @param mixed column name or array($colum... | true |
90b9df2dfeb480b919133c2fe8446d181f296cc8 | PHP | llseng/cms | /Cen/common/logic/Card.php | UTF-8 | 2,137 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\common\logic;
use \Db;
use \Addons\Aliyun as Aliyuns;
class Card
{
//数据表名
static public $dbName = "card";
//创建记录
static public function create(array $data)
{
//记录
$insert = [];
//身份证号
$insert['idcard'] = $data['idcard'];
//真实姓名
$insert['real_name'] = $data['real_name'];
//认... | true |
936009f638dfd3961aba4acb09cbb95b2528452a | PHP | BaranovArtyom/my_ciframe | /PHP/Homework/hw№3.php | UTF-8 | 929 | 2.8125 | 3 | [] | no_license | <?php
/**
* Найдите в документации функции для работы с датой и временем time () и mktime (), ознакомьтесь с возможностями, которые предоставляют эти функции. С использованием календарных функций выведите текущие дату и время в следующем формате: '10.07.2018 14:10'
*/
// $time = time()+ (7 * 24 * 60 * 60);
// echo ... | true |
f08e6d0935dbb828410812afe4edce50d795ff36 | PHP | pomle/cordless | /framework/class/Cordless/Event/Artwork.class.php | UTF-8 | 253 | 2.640625 | 3 | [] | no_license | <?
namespace Cordless\Event;
class Artwork
{
public static function createFromArtist(\Cordless\Artist $Artist)
{
if( $LastFM = \Cordless\getLastFM() )
if( $Image = $LastFM->getArtistImage($Artist->name) )
return $Image;
return false;
}
} | true |
6af7d6e1cc65eebc86261db467bd90396e0888ac | PHP | trevorassaf/delphi | /src/php/access_layer/Season.php | UTF-8 | 2,375 | 3.046875 | 3 | [] | no_license | <?php
// -- DEPENDENCIES
require_once(dirname(__FILE__)."/DelphiObject");
class Season extends DelphiObject {
// -- CLASS CONSTANTS
const SEASON_TABLE_NAME = "Seasons";
const TEAMID_DB_KEY = "teamId";
const WINS_DB_KEY = "wins";
const LOSSES_DB_KEY = "losses";
const TIES_DB_KEY = "ties";
const GAMESPLAYED... | true |
fb21238225a825782c976ab4e226cde3407a541d | PHP | djfm/SymSlate | /src/FM/SymSlateBundle/Entity/CountryLanguage.php | UTF-8 | 3,343 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace FM\SymSlateBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* CountryLanguage
*
* @ORM\Table()
* @ORM\Entity(repositoryClass="FM\SymSlateBundle\Entity\CountryLanguageRepository")
*/
class CountryLanguage
{
/**
* @ORM\ManyToOne(targetEntity="Country", inversedBy="country_languages")
* @O... | true |
229640b7e07001bd60cf5d24a648aa6536cef05a | PHP | comdexxsolutionsllc/dcas-archives | /MoondayFramework_old/xmlrpc.php | UTF-8 | 3,426 | 2.59375 | 3 | [] | no_license | <?php
/**
*
*
* @version $Id$
* @copyright 2011
*/
require_once('engine\xmlrpc\lib\xmlrpc.inc');
//$xmlrpc_client = new xmlrpc_client("xmlrpc.php", 'http://localhost/managedNOC/xmlrpc.php', 80);
//$xmlrpc_client->setDebug(1); //this will print all the responses as they come back
//$xmlrpc_message = new xmlrpcms... | true |
0b16ad275e7b4dcf1d832228e3fb798bb50b9225 | PHP | raedionisio/posweb-php-oo | /abstratos/index.php | UTF-8 | 290 | 2.875 | 3 | [] | no_license | <?php
require_once "autoload.php";
//use Classes\Animal;
use Classes\Carnivoro;
use Classes\Herbivoro;
$tipoCarn = new Carnivoro("Carne");
$tipoHerb = new Herbivoro("Legumes");
$tipoCarn->habitoAlimentar();
$tipoHerb->habitoAlimentar();
?> | true |
4b712fb2a0cdede95d52562a3e6204095573f58b | PHP | KAY53N/design_patten | /Interpreter/Amount/Expression.class.php | UTF-8 | 82 | 2.890625 | 3 | [] | no_license | <?php
class Expression {
public function interPreter($str)
{
return $str;
}
} | true |
42f53ae26a39bd70f4136d8fe6d33557c1e19ec8 | PHP | jpomeroy-94/phpincludes | /ajaxObject.php | UTF-8 | 24,706 | 2.578125 | 3 | [] | no_license | <?php
class ajaxObject {
//dont use this
var $statusMsg;
var $callNo = 0;
var $ajaxLines=array();
//====================================================
function ajaxObject() {
$this->incCalls();
$this->statusMsg='tag Object is fired up and ready for work!';
}
//====================================... | true |
f646aa56f6468772194d06c27849af9cc1e90d00 | PHP | sippar/wemir | /app/controllers/dashboard/SessionsController.php | UTF-8 | 1,231 | 2.625 | 3 | [] | no_license | <?php namespace App\Controllers\Dashboard;
use DashboardController;
use Sentry;
use Input;
use Redirect;
use View;
class SessionsController extends DashboardController
{
/**
* @return mixed
*/
public function getLogin()
{
if( Sentry::check()) {
return Redirect::route('dashbo... | true |
f502ba1323e5eedf4929edd1b0c0a3b4b1d73ac9 | PHP | manhduong1002/php | /success/class/CM_Material.php | UTF-8 | 887 | 3.015625 | 3 | [] | no_license | <?php
class CM_Material {
private $id;
private $name;
private $selection;
private $color;
private $nutrients;
function __construct($id,$name,$selection,$color,$nutrients){
$this->id =$id;
$this->name =$name;
$this->selection =$selection;
$this->color =$color;
$this->nutrients =$nutrients;
}
public function ... | true |
e602a875216103eb19ae92c1ebdc42544fb54415 | PHP | JorgeSidgo/crudsini | /app/model/Conexion.php | UTF-8 | 350 | 2.90625 | 3 | [] | no_license | <?php
class Conexion {
public static $host = "localhost";
public static $dbUser = "root";
public static $dbPass = "";
public static $dbName = "crudsini";
public static function conectar() {
$con = new mysqli(self::$host, self::$dbUser, self::$dbPass, self::$dbName);
if($con)
... | true |
563c4da977e7c1d26df9ae4b726743a273c1d106 | PHP | tenorok/tenframe | /tenframe/classes/join.php | UTF-8 | 13,946 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
/** doc
*
* # Объединение файлов
*
* Методы класса могут принимать относительные пути до файлов и директорий.
*
* ## Примеры
*
* ### Объединение точечно указанных файлов
*
* Простое объединение нескольких файлов.
*
* $join = new ten\join();
* $result = $join->combine([
* 'a.html',
... | true |
1ba8f9c9e89bd6e945c96b7366dcb3dff13a5c1a | PHP | oldfoot/fantasysoccer | /modules/wc/classes/fixture_id.php | UTF-8 | 6,247 | 3.25 | 3 | [] | no_license | <?php
/*
THIS CLASS IS USED TO CREATE A NEW USER
*/
require_once $GLOBALS['dr']."include/functions/db/row_exists.php";
class FixtureID {
public function __construct() {
$this->errors = "";
}
/* THIS FUNCTION ALLOWS US TO SET VARIABLES DYNAMICALLY*/
public function SetVariable($var,$value) {
//echo $var." =... | true |
c30fb1b7a2deef1de63968374e35685268a9f859 | PHP | DawidMazurek/design-patterns | /DesignPatterns/Creational/AbstractFactory/Html/Product.class.php | UTF-8 | 709 | 3.578125 | 4 | [] | no_license | <?php
namespace DesignPatterns\Creational\AbstractFactory\Html;
use DesignPatterns\Creational\AbstractFactory\Renderable;
/**
* Class Product
* @package DesignPatterns\Creational\AbstractFactory\Html
*/
class Product implements Renderable
{
/**
* @var string
*/
private $name;
/**
* @v... | true |
8d0fa9957f390542075eb9bac90b00e57af540a3 | PHP | monstra-cms/monstra | /plugins/captcha/captcha.plugin.php | UTF-8 | 880 | 2.515625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* Captcha plugin
*
* @package Monstra
* @subpackage Plugins
* @author Romanenko Sergey / Awilum
* @copyright 2012-2014 Romanenko Sergey / Awilum
* @version 1.0.0
*
*/
// Register plugin
Plugin::register( __FILE__,
__('Captcha', 'captcha'),
__('Captcha plugin fo... | true |
abc145309ff921c87ab11fc0638e520c1135c864 | PHP | abnerflores04/didadpol-bienes | /modelos/usuarioModelo.php | UTF-8 | 1,504 | 2.671875 | 3 | [] | no_license | <?php
require_once "mainModel.php";
class usuarioModelo extends mainModel
{
/* Modelo agregar usuario*/
protected static function agregar_usuario_modelo($datos)
{
$sql = mainModel::conectar()->prepare("INSERT INTO tbl_usuarios(rol_id, puesto_id, unidad_id, nom_usuario, usu_password, nombre, apellido... | true |
37ab9af9dfe13f2b34e55d0f6ce4cf5c7ada772d | PHP | WsdlToPhp/PackageEws365 | /src/StructType/EwsReferenceAttachmentType.php | UTF-8 | 9,174 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace StructType;
use InvalidArgumentException;
use WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for ReferenceAttachmentType StructType
* @package Ews
* @subpackage Structs
* @author WsdlToPhp <contact@wsdltophp.com>
*/
class EwsReferenceAttachmentType ex... | true |
ddf126056358fab9331e73fc5a6ba296ac902bf9 | PHP | shinya-nexseed/object_oriented_20160215 | /sample_robot.php | UTF-8 | 2,305 | 3.578125 | 4 | [] | no_license | <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<?php
//Robotクラスのインスタンス化
$doraemon = new Robot('ドラえもん', 'どら焼き');
$doramichan = new Robot('ドラミちゃん', 'パンケーキ');
// クラスから生成したインスタンスにあるプロパティに直接アクセスして値を代入
// $doraemon->name = 'ドラえもん';
// $doraemon->food = 'どら焼き';... | true |
b2ea4dd6ccb6658ca01859abc17f087fc92c902d | PHP | JacobPineda/IS | /list/delete/delete-enrollment.php | UTF-8 | 2,548 | 2.78125 | 3 | [] | no_license | <?php
error_reporting (E_ALL ^ E_NOTICE);
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link href="/IS/css/topnav.css" rel="stylesheet">
</head>
<body>
<?php
include("../../topnav.php");
//get param cpr_no - selected record from the generated table
$id = null;... | true |
81ca09946abc994b85a0e518872b9edca1d44c80 | PHP | Th3-C0d3-I3r34k3r/PHP-SCRIPTS-4-ABSOLUTE-BEGINNERS | /23_php_create_own_function.php | UTF-8 | 356 | 2.96875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>23_php_create_own functions</title>
</head>
<body>
<?php
echo "Create New Function :";
echo"</br>";
function greeting($name)
{
echo "welcome,". $name;
}
echo "</br>";
greeting("dev... | true |
6e96bd96c182bddea52bfb6cd4282591f0c9f390 | PHP | Al-Namrood/symflo | /src/Entity/HistoryMatchStats.php | UTF-8 | 698 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\HistoryMatchStatsRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=HistoryMatchStatsRepository::class)
*/
class HistoryMatchStats
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $i... | true |
5790b7418ba7fe9f12693d1c54f561afe73a6a47 | PHP | pagantis/magento-1X | /test/common/AbstractRegister16.php | UTF-8 | 1,894 | 2.515625 | 3 | [] | no_license | <?php
namespace Test\Common;
use Facebook\WebDriver\WebDriverBy;
use Facebook\WebDriver\WebDriverExpectedCondition;
use Test\Magento16Test;
/**
* Class AbstractRegister16
* @package Test\Register
*/
abstract class AbstractRegister16 extends Magento16Test
{
/**
* String
*/
const TITLE = 'Home pag... | true |
b3f9510ee1e77e3bffcae3f3c5b9c1987ff8e158 | PHP | ngmautri/nhungttk | /module/Inventory/src/Inventory/Model/Deprecated/SparepartCategory.php | UTF-8 | 723 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Inventory\Model;
/**
*
* @author nmt
*
*/
class SparepartCategory
{
public $id;
public $name;
public $description;
public $parent_id;
public $created_on;
public $members;
public function exchangeArray($data)
{
$this->id... | true |
91a8845f5cfc5e047385498870c5d37532f8643f | PHP | clousale/amazon-sp-api-php | /lib/Api/FeesApi.php | UTF-8 | 11,560 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* FeesApi.
*
* @author Stefan Neuhaus / ClouSale
*/
/**
* Selling Partner API for Product Fees.
*
* The Selling Partner API for Product Fees lets you programmatically retrieve estimated fees for a product. You can then account for those fees in your pricing.
*
* OpenAPI spec version: v0
*/
names... | true |
27f56b55fe9edb2d12ea7cb55060983389ef3db0 | PHP | tranmanhtien/phphocthem | /day7/CRUD/update1.php | UTF-8 | 880 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: tien tran
* Date: 5/30/2019
* Time: 9:04 PM
*/
include "config.php";
if(isset($_POST['id'])&&isset($_POST['name'])&&isset($_POST['quantity'])&&isset($_POST['brand'])&&isset($_POST['created_at'])){
if($_POST['name']&&$_POST['quantity']&&$_POST['brand']&&$_POST['created_a... | true |
3984c11295779bc543ad0ff8cf40391d0dd7f2ab | PHP | zhuliangbing/TopicCards-lib | /src/Search/TopicSearchAdapter.php | UTF-8 | 2,077 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace TopicCards\Search;
use TopicCards\Interfaces\TopicInterface;
// TODO add an interface
class TopicSearchAdapter extends PersistentSearchAdapter
{
/** @var TopicInterface */
protected $topic;
/**
* TopicSearchAdapter constructor.
*
* @param TopicInterface $topic
*/
... | true |
c1c6b5c64e5dfa5eff5f1087b84b43f406a7f5e8 | PHP | renoki-co/jetstream-cashier-billing-portal | /src/Contracts/HandleSubscriptions.php | UTF-8 | 2,137 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace RenokiCo\BillingPortal\Contracts;
use Illuminate\Http\Request;
use RenokiCo\CashierRegister\Plan;
interface HandleSubscriptions
{
/**
* Mutate the checkout object before redirecting the user to subscribe to a certain plan.
*
* @param \Illuminate\Database\Eloquent\Model $billable
... | true |
5794842f8b309905a49f1ac611c9d1f7cc346227 | PHP | idoplay/sogaQuantChart | /app-charts/core/MY_Bll.php | UTF-8 | 2,816 | 2.71875 | 3 | [] | no_license | <?php
class MY_Bll
{
private $dao_list = null;
private $bll_list = null;
public function __construct() {
}
function __get($key)
{
$CI = & get_instance();
return $CI->$key;
}
public function get_dao ($dao_name) {
$object_name = str_replace('/','_',$bll_name);
... | true |
822b524334b21b11ccae77d67e24dbe69152d727 | PHP | samhol/samiholck.com | /samiholck/pages/tester.php | UTF-8 | 607 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Sphp\Mail\ContactMessage;
use Sphp\Mail\ContactMailer;
$data = [
'subject' => 'Hello foo',
'message' => 'Foo is foo-ish',
'fname' => 'Sami',
'lname' => 'Holck',
'email' => 'sami.holck@gmail.com',
'street' => 'Rakuunatie 59 A 3',
'zipcode' => '20720',
'city' => 'Turku',
'co... | true |
c2e807b75d2638947a83c1ce8f4070778fe09702 | PHP | jeff-99/exact-php-client | /src/Picqer/Financials/Exact/Query/Resultset.php | UTF-8 | 1,829 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace Picqer\Financials\Exact\Query;
use Picqer\Financials\Exact\Connection;
/**
* Class Resultset.
*/
class Resultset
{
/**
* @var Connection
*/
protected $connection;
/**
* @var string
*/
protected $url;
/**
* @var string
*/
protected $class;
... | true |
74bc1a230741fecbc86d4dcc70aee20878061a0b | PHP | VAB1998/php-snacks-b1 | /index.php | UTF-8 | 6,402 | 3.09375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CSS Import -->
<link rel="stylesheet" href="css/style.css">
<title>Snack 14.10</title>
</head>
<body>... | true |
e737c84b4ef2a7424e94109836f2c6d15998e16e | PHP | pritom-dip/todo-lists-for-wordpress | /todo-lists-for-wordpress.php | UTF-8 | 7,322 | 2.546875 | 3 | [] | no_license | <?php
/**
* Plugin Name: Todo lists for WordPress
* Plugin URI:
* Description: A todo lists for users
* Version: 1.0.0
* Author: Pritom Chowdhury Dip
* Author URI: http://pritom-dip.web.app/
* License: GPLv2+
* Text Domain: todo-lists-for-wordpress
* Domain Path: /i18n/languages/
*/
/**
* C... | true |
93038c478ac0d898fc8af928fce0d98f45a9c66a | PHP | KittenEar/stock | /Common.php | UTF-8 | 1,630 | 2.875 | 3 | [] | no_license | <?php
require_once "autoload.php";
/**
* 株価共通クラス
*
*/
final class Common
{
/**
* 株価CSVファイル取得URL
*
* @var string
*/
const STOCK_CSV_URL = "http://k-db.com/stocks/%s?download=csv";
/**
* CSVファイル保存パス
*
* @var string
*/
const CSV_FILE_PATH = './stocks/';
/*... | true |
7d9e359ab46f63399ab3657da351e5442776bd5a | PHP | nmtrut/Campus | /Campus/favorates.php | UTF-8 | 1,405 | 2.65625 | 3 | [] | no_license | <?php
require_once('./functions.php');
session_start();
// ログインしていなかったらログイン画面に遷移
redirectIfNotLogin(); // ※ この関数はfunctions.phpに定義してある
/*
* 普通にアクセスした場合: GETリクエスト
* 登録フォームからSubmitした場合: POSTリクエスト
*/
// POSTリクエストの場合
// if ($_SERVER["REQUEST_METHOD"] === "POST") {
//
// お気に入り登録
$db = connectDb... | true |
a07180de20d3aee4738f8a902a742eacfeed4666 | PHP | take-work/EventManagement | /app/Http/Controllers/CirclePDFController.php | UTF-8 | 1,437 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use App\Models\CirclePDFCreator;
use App\Models\Event;
use App\Models\Circle;
use Illuminate\Http\Request;
class CirclePDFController extends Controller {
public function pdfCreate($id) {
$circlePDFCreator = new CirclePDFCreator(... | true |
a7f56c449c50bc69f352df142566e35e5ddde681 | PHP | peterojo/bouquet-factory | /src/Entity/BouquetDesign.php | UTF-8 | 2,875 | 3.03125 | 3 | [] | no_license | <?php
namespace Bouquet\Entity;
use Bouquet\Exception\InvalidRepresentationException;
class BouquetDesign
{
private $spec;
private $name;
private $size;
private $requiredFlowers = [];
private $requiredQuantities = [];
private $requiredTotal;
/**
* @var Bouquet
*/
private $bo... | true |
f5ce91142dbb441af1ba468fe77f859157fedd1e | PHP | 0xAiKang/laravel-api-init | /app/Http/Requests/Admin/RolesRequest.php | UTF-8 | 1,307 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Http\Requests\Admin;
use App\Http\Requests\BaseRequest;
/**
* Class RolesRequest
*
* @package App\Http\Requests\Admin
*/
class RolesRequest extends BaseRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function aut... | true |
627320d1cd4d38e99b7d00fc165cd9bf3817bfbf | PHP | JanBrugg/Noten | /noten - Kopie/aenderung_erfolgreich.php | UTF-8 | 6,502 | 2.703125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<title>Erfolgreiche Datenänderung - Jan D. Login Projekt</title>
<link rel="stylesheet" href="aussehen.css">
<link rel="icon" type="image/png" href="http://jan.ginf.ch/noten/favicon.png">
</head>
<body>
<?php
// was wird geände... | true |
8f1b0e32e1260e4a19e9ffe39ab5f1d4933a42f9 | PHP | CHANG-CHING-CHUNG/mentor-program-4th-CHANG-CHING-CHUNG | /homeworks/week11/hw2/includes/public_functions.php | UTF-8 | 4,062 | 2.65625 | 3 | [] | no_license | <?php
function getAllPosts() {
global $conn;
// $sql = "SELECT * FROM posts where is_deleted = 0;";
$sql = "SELECT * FROM John_blog_posts where is_deleted = 0;";
$result = mysqli_query($conn, $sql);
$posts = mysqli_fetch_all($result, MYSQLI_ASSOC);
$final_posts = array();
foreach ($posts as $post) {
... | true |
51ac72881acd262a8d3bab975a286221e64cf67a | PHP | MarwanNabil/AcademicCentre | /essentials/student.php | UTF-8 | 8,954 | 3.515625 | 4 | [] | no_license | <?php
require_once 'database.php';
class student{
private $id;
private $firstName;
private $lastName;
private $password;
private $phoneNumber , $parentOnePhoneNumber , $parentTwoPhoneNumber;
private $telephoneNumber;
private $gradeID;
public func... | true |
8a22aba195af68bb13a110b807b0ba78a96ccdbb | PHP | NEHAL9687/e-commerce | /view-cart-plain.php | UTF-8 | 1,483 | 2.609375 | 3 | [] | no_license | <?php
require './admin/class/atclass.php';
session_start();
if(isset($_GET['remove']))
{
$key = $_GET['remove'];
unset($_SESSION['productcart'][$key]);
unset($_SESSION['qtycart'][$key]);
}
if(isset($_SESSION['productcart']) && !empty($_SESSION['productcart']))
{
//Fetch Products from Session
... | true |
970f0654052a01619a6df0d621ab9ab92fc77900 | PHP | hrefjeff/lightbright_phpsite | /process.php | UTF-8 | 1,571 | 2.859375 | 3 | [] | no_license | <?php
//---------------------------------------------------------------------------
// Main
//---------------------------------------------------------------------------
require('header.php');
if(array_key_exists('submitCheck', $_POST)) {
processForm();
} else {
errorForm();
}
... | true |
1030d7109a292c0ea19a07d9d9ca6b55b688fec0 | PHP | yoshikyoto/lol-personal-data | /app/GraphQL/Queries/ChampionMastery.php | UTF-8 | 2,025 | 2.703125 | 3 | [] | no_license | <?php
namespace App\GraphQL\Queries;
use GraphQL\Type\Definition\ResolveInfo;
use Nuwave\Lighthouse\Support\Contracts\GraphQLContext;
use SummonersKyoto\Torii\ChampionMasteryNoTorii;
use SummonersKyoto\Zen\LegendZen;
use SummonersKyoto\Kami\ChampionMastery as KamiChampiomMastery;
use SummonersKyoto\Kami\SummonerName;... | true |
244db1f9d1b08738e80fc5463bc9e979bb20ab8c | PHP | adxlv/timetracker | /app/controllers/BranchesController.php | UTF-8 | 3,611 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Eloquent\ModelNotFoundException;
class BranchesController extends \BaseController {
/**
* Display a listing of the resource.
* GET /branches
*
* @return Response
*/
public function index()
{
App::error(function(ModelNotFoundException $e)
{
return Response::json( ar... | true |
34394f6376cd5cdbff7f44347ef096a516e276e4 | PHP | LeoHugues/tennis | /src/OrganisationBundle/Command/InsertPaysCommand.php | UTF-8 | 1,075 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: julien_mathe
* Date: 07/06/2017
* Time: 14:49
*/
namespace OrganisationBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component... | true |
819a56e53605929afdd6f14a32dc96a1c0a93199 | PHP | ESCOJ/ESCOJ | /app/Policies/ContestPolicy.php | UTF-8 | 919 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace ESCOJ\Policies;
use EscojLB\Repo\User\User;
use EscojLB\Repo\Contest\Contest;
use Illuminate\Auth\Access\HandlesAuthorization;
class ContestPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can perform some operations with the contest.
*
* @param ESCOJ\User ... | true |
b2ed23d7ef11485e4722a18d1ea28ba87fc232c0 | PHP | BobrovD/vktech.backend | /func/helper.php | UTF-8 | 3,891 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Orange
* Date: 20.08.17
* Time: 10:39
*/
function printr($var)
{
echo '<pre>';
print_r($var);
echo '</pre>';
}
function validate_input_data($type, $data)
{
$pattern = '/^$/';
switch($type)
{
case 'fname' :
$pattern = '/^[a-zA-Zа... | true |
e3f8f91aac9449d9694426b5cd86ffd1949c8f42 | PHP | nikolaposa/version | /src/Exception/CollectionIsEmpty.php | UTF-8 | 468 | 2.78125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Version\Exception;
use OutOfBoundsException;
final class CollectionIsEmpty extends OutOfBoundsException implements VersionException
{
public static function cannotGetFirst(): self
{
return new self('Cannot get the first Version from an empty collection');
... | true |
0425c5088c64b8bc39ae15cb1803166e19aa1c98 | PHP | ksovrela0/rentservice_trip | /rus/php/func.php | UTF-8 | 3,905 | 2.625 | 3 | [] | no_license | <?php
include("class.Mysqli.php");
$db = new dbClass();
function getDefaultLocations(){
GLOBAL $db;
$db->setQuery(" SELECT *
FROM `locations`
WHERE actived = 1");
$locations = $db->getResultArray();
$options = '';
foreach($locations['result'] AS $locati... | true |
ab0dadc3ac714ffa7397fe14365dfccf7f1c961c | PHP | Ahantuon/Forum | /core/clanek.class.php | UTF-8 | 1,577 | 2.78125 | 3 | [] | no_license | <?php
class clanek extends db{
public function clanek($connection){
$this->connection = $connection;
}
public function InsertClanek($clanek){
$table_name = "clanek";
$this->DBInsert($table_name, $clanek);
}
public function UpdateClanek($nazev, $obsah, $clanek_id){
$table_na... | true |
ac919f777e2e0372cf61e50959bdec0e836fb5d7 | PHP | Indigerd/yii2-ddd-boilerplate | /src/Infrastructure/Repository/IdentityRepository.php | UTF-8 | 457 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Infrastructure\Repository;
use Domain\Entity\IdentityInterface;
use Domain\Repository\IdentityRepositoryInterface;
class IdentityRepository extends Repository implements IdentityRepositoryInterface
{
public function persist(IdentityInterface $entity): void
{
i... | true |
b2d457c0703e5fda5568b7af24bb96d6028319b6 | PHP | drichardson/examples | /php/sqlite.php | UTF-8 | 1,075 | 3.109375 | 3 | [
"Unlicense"
] | permissive | <?php
/*
if ($db = sqlite_open('mysqlitedb', 0644, $sqliteerror)) {
#sqlite_query($db, 'CREATE TABLE foo (bar varchar(10))');
sqlite_query($db, "INSERT INTO foo VALUES ('fnord')");
$result = sqlite_query($db, 'select bar from foo');
var_dump(sqlite_fetch_array($result));
} else {
die($sqliteerror)... | true |
36b494fe168a65d9c9243cf78432b37ff3a99869 | PHP | doan281/edupham_laravel_api | /app/User.php | UTF-8 | 1,715 | 2.5625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Tymon\JWTAuth\Contracts\JWTSubject;
class User extends Authenticatable implements JWTSubject
{
use Notifiable;
/**
* The attributes th... | true |
032d76e4974856b0bdf0d1fde9171ced31233215 | PHP | DrupalHub/drupalhub | /drupalhub/modules/drupalhub/drupalhub_restful/plugins/validator/node/youtube/DrupalHubVideosValidator.class.php | UTF-8 | 1,274 | 2.578125 | 3 | [] | no_license | <?php
/**
* @file
* Contains EntityValidatorExampleArticleValidator.
*/
class DrupalHubVideosValidator extends EntityValidateBase {
/**
* Overrides EntityValidateBase::getFieldsInfo().
*/
public function publicFieldsInfo() {
$fields = parent::publicFieldsInfo();
$fields['field_address']['valida... | true |
e541791a995913ab9e1b5e5a0bceb58001632f9e | PHP | mrcrmn/framework | /src/Framework/Filesystem/UploadedFile.php | UTF-8 | 1,168 | 3.078125 | 3 | [] | no_license | <?php
namespace Framework\Filesystem;
use Framework\Support\ParameterBag;
class UploadedFile
{
/**
* The raw uploaded file.
*
* @var \Framework\Support\ParameterBag
*/
protected $file;
/**
* Makes a new parameter bag of the uploaded file.
*
* @param array $file
*... | true |
dd1092cb1fdec3bb749b30e802d06e88492b1bb0 | PHP | scott2lsb/hlj_service | /wxapi_pack/getAc.php | UTF-8 | 780 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
function std_class_object_to_array($stdclassobject)
{
$_array = is_object($stdclassobject) ? get_object_vars($stdclassobject) : $stdclassobject;
foreach ($_array as $key => $value) {
$value = (is_array($value) || is_object($value)) ? std_class_object_to_array($value) : $value;
$array[$key... | true |
7f50a3da468df094248883f6f01c46d521d25ac8 | PHP | moavaz/map_test | /application/models/HomeModel.php | UTF-8 | 944 | 2.6875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class HomeModel extends CI_Model{
function createCustomer($data){
$query = $this->db->insert('customer',$data);
if ($this->db->affected_rows() > 0) {
return true;
}
else{
return false;
}
}
function getAllCustomers(){
$query = $this->db->query("select * from customer");
if ($query->num_row... | true |
98544ae5d0b3b5e1d719be103cf780d8a0cc62cd | PHP | psprawka/Php_piscine | /day01/ex02/oddeven.php | UTF-8 | 531 | 3.203125 | 3 | [] | no_license | #!/nfs/2017/p/psprawka/.brew/opt/php70/bin/php
<?php
while (1)
{
echo "Enter a number: ";
if ($line = fgets(STDIN))
{
$line = trim($line);
$x = intval($line);
if (!(is_numeric($line)))
echo "'$line' is not a number\n";
else... | true |
6c67c80b068e213386d1ebb2e80c000e4f5d75be | PHP | AndersLarsen/web1000 | /includes/login.php | UTF-8 | 4,721 | 2.625 | 3 | [] | no_license | <?php
/**
* Login
* Tar imot et brukernavn og passord fra brukeren og kjører
* dette gjennom SHA512 kryptering for å så sende et kall til
* database serveren for å sjekke om dette er gyldig, hvis dataene
* stemmer så får man lov til å logge inn på siden.
*
* PHP version 5
*
* LICENSE: This source fi... | true |
e5ce5a587aa9c3e554e10cc2e44fc7e804c69bc6 | PHP | maduhu/df-core | /src/Database/Pgsql/Connection.php | UTF-8 | 1,060 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace DreamFactory\Core\Database\Pgsql;
/**
* Connection represents a connection to a PostgreSQL database.
*/
class Connection extends \DreamFactory\Core\Database\Connection
{
public static function checkRequirements($driver, $throw_exception = true)
{
if (!extension_loaded('pgsql')) {
... | true |
977ed7280ebbe76504c669e7abaa3af8db181117 | PHP | draxis-environmental/google-hashcode-2017 | /src/Video.php | UTF-8 | 1,063 | 3.015625 | 3 | [] | no_license | <?php
require_once 'Request.php';
class Video
{
protected $id;
protected $size;
protected $requests = [];
public $numberOfRequests;
public function __construct($id, $size)
{
$this->id = $id;
$this->size = $size;
$this->numberOfRequests;
}
public functi... | true |
c487ad90733c1eabc75659fc2c427a4aeda95d46 | PHP | qiye5757/qiye-study | /base-study/DesignPatternsPHP/Structual/Proxy.php | UTF-8 | 785 | 3.1875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: root
* Date: 18-11-25
* Time: 下午11:02
*/
Interface Subject{
public function request();
}
class RealSubject implements Subject{
public function request(){
echo "这个是真实主题\n";
}
}
class Proxy implements Subject{
public $realSubject;
public funct... | true |
eaa7f1686cfb0f9dd1c90ff7b37f248d4c26a99b | PHP | okaruto/cryptonator | /src/Exceptions/JsonException.php | UTF-8 | 440 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Okaruto\Cryptonator\Exceptions;
/**
* Class JsonException
*
* @package Okaruto\Cryptonator\Exceptions
* @author Okaruto Shirukoto <okaruto@protonmail.com>
* @license http://opensource.org/licenses/MIT
*/
final class JsonException extends \RuntimeException
{
public f... | true |
0be2536d031a17dcd5eb90a7bb775de62b8a4c56 | PHP | osnysantos/quintal-de-trocas | /system/libraries/Prearray.php | UTF-8 | 1,521 | 2.8125 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Prearray
{
function Prearray()
{}
public function estado()
{
$estados = array(
'ac' => 'AC - Acre',
'al' => 'AL - Alagoas',
'ap' => 'AP - Amapá',
'am' => 'AM - Amazonas',
'ba' => 'BA - Bahia'... | true |
e81fe6aa56bd27ec36bfe041b147198ed3689e8d | PHP | nachoe/practicesymfony2 | /src/Yoda/CarpoolBundle/Entity/BaseEntity.php | UTF-8 | 1,886 | 2.609375 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace Yoda\CarpoolBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\Common\Util\ClassUtils;
use Gedmo\Mapping\Annotation as Gedmo;
/**
* Base entity all other entities derive from
*
* @ORM\MappedSuperclass
*/
abstract class BaseEntity
{
/**
* var \DateTime $created_at
*
*... | true |
edd04e49a7e59b95817cb876724f5f26920edfe6 | PHP | huya1010/videodb | /core/security.php | UTF-8 | 1,102 | 2.71875 | 3 | [] | no_license | <?php
/**
* Security functions
*
* @package Core
* @author Andreas Goetz <cpuidle@gmx.de>
* @author tREXX <www.trexx.ch>
* @version $Id: security.php,v 1.2 2008/01/05 13:50:58 andig2 Exp $
*/
/**
* Allow these tags
*/
$allowedTags = '<h1><h2><h3><h4><b><strong><i><a><ol><ul><li><pre><hr><blockqu... | true |
89100d8f2f15546c30c4e1fd9f06fa9b17437f5d | PHP | GiveToken/Bacon | /Database/RecruitingCompanyVideo.php | UTF-8 | 3,239 | 2.96875 | 3 | [] | no_license | <?php
namespace Sizzle\Bacon\Database;
/**
* This class is for interacting with the recruiting_company_video table.
*/
class RecruitingCompanyVideo extends \Sizzle\Bacon\DatabaseEntity
{
protected $recruiting_company_id;
protected $source;
protected $source_id;
/**
* This function creates an en... | true |
6c0fd017b6dc971208ec5d71a2e7e93d298ad9cc | PHP | gq957534377/xyxxfbpt | /app/Store/AdminStore.php | UTF-8 | 1,553 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* 后台数据仓库层
* User: Twitch
* Date: 2016/11/4
* Time: 10:05
*/
namespace App\Store;
use Illuminate\Support\Facades\DB;
/**
* Class AdminStore
* 后台数据处理仓库层
*
* @package App\Store
*/
class AdminStore{
// 表名
protected static $table = 'data_admin_login';
/**
* 查询一条数据
* @param array ... | true |
9be5d72b693a07ba4f5034a22be7788b968eda35 | PHP | komaltech/RPPv2 | /app/models/User.php | UTF-8 | 465 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Auth\UserInterface;
class User extends Eloquent implements UserInterface{
protected $primaryKey = 'id';
protected $table = 'user';
public function getAuthIdentifier()
{
return $this->getKey();
}
public function getAuthPassword()
{
return $this->getpassword;
}
public funct... | true |
b059d16b91ebb953fc736ee6a63a453e4130363e | PHP | lasarian27/symfony-blog2 | /src/Entity/Item.php | UTF-8 | 1,196 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\ItemRepository")
*/
class Item
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string")
*/
pr... | true |
27bfc0cfc85b077b965c09c0c8f228177234820d | PHP | agonbar/SubastasIu | /src/controlador/notificaciones/ConsultarNotificacionesControlador.php | UTF-8 | 1,129 | 2.59375 | 3 | [] | no_license | <?php
/**
* Clase controladora del caso de uso Consultar Notificaciones
* @author Almudena Novoa
*/
class ConsultarNotificacionesControlador extends PrivadoControlador
{
public function __construct()
{
}
/**
* Ejecuta las acciones del controlador.
*/
protected function ejecutar($accion) {
switch(... | true |
de9de0d8e7ff220065b1b3e96e7aec7a207f9c69 | PHP | irpcpro/tele-link | /src/Helpers/Helpers.php | UTF-8 | 1,214 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
// create uuid
function generate_uuid() {
return bin2hex(openssl_random_pseudo_bytes(3));
}
// check if string is url
function checkURL($url){
$regex = "((https?|ftp)\:\/\/)?";
$regex .= "([a-z0-9+!*(),;?&=\$_.-]+(\:[a-z0-9+!*(),;?&=\$_.-]+)?@)?";
$regex .= "([a-z0-9-.]*)\.([a-z]{2,3})";
$re... | true |
86d352319534cde4efeaafe1d8ff58ece337c842 | PHP | UFOP-CSI477/2020-01-remoto-atividades-nesks | /Projeto/projetoFinal/app/Models/Aluno.php | UTF-8 | 477 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Aluno extends Model
{
use HasFactory; //traits -> caracteristicas, eu consigo utilizar os metodos dessa classe como se fosse extensão da classe principal.
protected $fillable= ['... | true |
beaec3c61fc3d5538af54560d972fbe77028d136 | PHP | takeshi474/address | /database/seeds/UserTableSeeder.php | UTF-8 | 909 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class UserTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// admin
$user = User::create
([
'name' => '管理者',
'email' => 'admin@localhost',
... | true |
dad85237ece7bd525ea71781b806c27506eefbac | PHP | RodrigoBarrios88/farasi | /ROOT/Clases/ClsSector.php | UTF-8 | 2,637 | 2.71875 | 3 | [] | no_license | <?php
require_once ("ClsConex.php");
class ClsSector extends ClsConex{
/* Situacion 1 = ACTIVO, 2 = INACTIVO */
///////////////////////////// SECTOR //////////////////////////////////////
function get_sector($codigo, $sede = '', $nombre = '', $sit = '') {
$nombre = trim($nombre);
$sede = ($sede == "")... | true |
7f792f5cee1934e71f46bd4c8180078fa805bed7 | PHP | thivu9669/crm_yes | /app/Http/Controllers/Business/EventDataRecepsController.php | UTF-8 | 5,363 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Business;
use App\Http\Controllers\Controller;
use App\Models\EventData;
use App\Tables\TableFacade;
use App\Tables\Business\EventDataRecepTable;
use Illuminate\Http\Request;
class EventDataRecepsController extends Controller
{
/**
* Tên dùng để phân quyền
* @var... | true |