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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
1b1a8b2c25da52706ffb343b9379403392832aac | PHP | themichaelhall/bluemvc-forms | /src/Interfaces/IntegerFieldInterface.php | UTF-8 | 1,109 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is a part of the bluemvc-forms package.
*
* Read more at https://bluemvc.com/
*/
declare(strict_types=1);
namespace BlueMvc\Forms\Interfaces;
/**
* Interface for IntegerField class.
*
* @since 1.0.0
*/
interface IntegerFieldInterface extends SetFormValueElementInterface
{
/**
... | true |
d0c5ae849b4d77eed86eecf120a14dc56dc1dc7b | PHP | Sparsh759/Automated-Malware-Analysis | /Web/upload.php | UTF-8 | 2,043 | 2.796875 | 3 | [
"Unlicense"
] | permissive | <?php
$target_dir = "/home/sanket/Desktop/uploads/";
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
$uploadOk = 1;
#$imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION));
// Check if file already exists
if (file_exists($target_file)) {
echo "Sorry, file already exi... | true |
034d7e11e05a12a1f47d958e4d7811d931b45868 | PHP | orchestra-io/sample-symfony2 | /vendor/symfony/src/Symfony/Component/Form/ToggleField.php | UTF-8 | 928 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Form;
use Symfony\Component\Form\ValueTransformer\Boo... | true |
ec08291ada945d9d1288a9be856be2cb3456e715 | PHP | Niwata2080/GEEKJOB_challange | /CampChallenge_PHP/008.オブジェクト指向1/8-4util.php | UTF-8 | 1,509 | 3.15625 | 3 | [] | no_license | <?php
require_once '8-4define.php';
//データベースハンドラ/PDOインスタンス
function create_pdo() {
$dsn = DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_DBNAME . ';charset=utf8';
$obj_pdo = new PDO($dsn, DB_USER, DB_PWD);
$obj_pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); //エラーが出たら例外投げる
return $obj_p... | true |
58e2d46e83d1e2e467a8f30042c7cb19e7e9c1a0 | PHP | Supericy/steam-website | /app/lib/Icy/Steam/ISteamIdRepository.php | UTF-8 | 225 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php namespace Icy\Steam;
/**
* Created by PhpStorm.
* User: Chad
* Date: 8/31/14
* Time: 5:49 AM
*/
interface ISteamIdRepository {
public function getBySteamId($steamId);
public function save(SteamId $steamId);
} | true |
2fb59ced551dd61746e93d13aa855828a48bf58e | PHP | moussia/matcha | /src/M/filter_bd.php | UTF-8 | 3,978 | 2.6875 | 3 | [] | no_license | <?php
function filter($age, $tag, $location, $popularity){
$id_tags = get_id_tags($tag);
$id_age = get_id_age($age);
$id_location = get_id_city($location);
$id_popularity = get_id_popularity($popularity);
$id_non_bloque = get_id_non_bloque();
return array_intersect($id_tags, $id_popularity, $id... | true |
078ad31d05cb1ae50a16f6244e3f84a7c0f3bed6 | PHP | Houdaifi/Complete-Tickets-editor-project | /Data/edit.inc.php | UTF-8 | 1,467 | 2.515625 | 3 | [] | no_license | <?php
include "database.php";
if (isset($_POST['title'])) {
$title = $_POST['title'];
$desc = $_POST['description'];
$category = $_POST['category'];
$statut = $_POST['statut'];
$ticketid = $_POST['ticketid'];
$file = $_FILES['image'];
$fileName = basename($_FILES[... | true |
811fbbc50407bb18bb6a14d11522a677fc9eed54 | PHP | Substance-z/limesurvey-api-client | /tests/Exception/UnknownInstanceOfResultItemTest.php | UTF-8 | 2,231 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* (c) Meritoo.pl, http://www.meritoo.pl
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Meritoo\LimeSurvey\Test\ApiClient\Exception;
use Generator;
use Meritoo\Common\Test\Base\BaseTestCase;
use Meritoo\Common\Typ... | true |
e3998e9f581f8a393f5dcd6b071bdf8ff7fb5131 | PHP | tjbp/laravel-verify-emails | /src/Auth/VerifyEmails/VerifyEmailBroker.php | UTF-8 | 4,470 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace LaravelVerifyEmails\Auth\VerifyEmails;
use Closure;
use Illuminate\Contracts\Mail\Mailer as MailerContract;
use LaravelVerifyEmails\Contracts\Auth\VerifyEmailBroker as VerifyEmailBrokerContract;
use LaravelVerifyEmails\Contracts\Auth\CanVerifyEmail as CanVerifyEmailContract;
class VerifyEmailBroker i... | true |
9a95259cb8c2cea17471edfc40d0aa5ddf242bed | PHP | rj2017/site-dev3tech-2v | /envio_mailing.php | UTF-8 | 915 | 2.75 | 3 | [] | no_license | <?php
$to = "contato@dev3tech.com.br";
$subject = "Mailing site Dev3Tech";
// Passando os dados obtidos pelo formulario para as variaveis abaixo
$emailremetente = trim($_POST['email']);
/* Montando a mensagem a ser enviada no corpo do e-mail. */
$mensagemHTML = '<strong>Formulario de Envio dos Dados</strong>
... | true |
c5518bf9c827d2791bc180741ec92ada8d4d8c5d | PHP | MarrentaxD/Site-Campeonato- | /SiteCamp/app/Controller/TesteController.php | UTF-8 | 3,377 | 2.515625 | 3 | [] | no_license | <?php
namespace Project\Controller;
use Project\Db\QueryBuilder;
class TesteController
{
public function imprimir()
{
$dado = $_POST['dado'];
$resultado = $dado % 2 == 0 ? 'Par' : 'Impar';
require './app/views/imprime.php';
}
public function salvar()
{
... | true |
aa4c98d2c9eccb808aa343fe6e0c45bc19406a02 | PHP | gullAtAngela/taxonomy | /createdb.php | UTF-8 | 2,750 | 2.71875 | 3 | [] | no_license | <?php
//Parameter for DB
$host = 'localhost';
$username = 'int_eco';
$password = 'RZ+n<lMflK4q';
$db = 'int_eco';
$table = 'taxonomy';
$connect = mysqli_connect($host,$username,$password, $db) or die ("Verbindung mit MySQL ist fehlgeschlagen: " . mysqli_error());
// $sel_db = mysqli_select_db($db) or die ("Datenbank ... | true |
ec834e6d07298aae664a0ffdf1ac67b0cb4b3c0a | PHP | nirix/phails | /Phails/Arr.php | UTF-8 | 4,251 | 3.359375 | 3 | [] | no_license | <?php
/**
* Phails
* Copyright (c) 2013, J. Polgar
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, th... | true |
21697246b61b277f7a1d0d5daf59de6ca34710cf | PHP | bappi2097/coronabdAPI | /app/Http/Controllers/DBInputController.php | UTF-8 | 15,308 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Exception;
use App\BanglaWorld;
use App\EnglishWorld;
use App\BanglaCountry;
use GuzzleHttp\Client;
use App\EnglishCountry;
use App\BanglaBangladesh;
use App\BanglaDistrict;
use App\EnglishBangladesh;
use App\EnglishDistrict;
use Illuminate\Http\Request;
use KubAT\PhpSimple\H... | true |
a8ef4bf13fe18c0b619ebf99a50c924b94e3a158 | PHP | DavidFeller/appserver | /tests/AppserverIo/Appserver/Core/Mock/MockThread.php | UTF-8 | 2,231 | 2.671875 | 3 | [] | no_license | <?php
/**
* AppserverIo\Appserver\Core\Mock\MockThread
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
*
* PHP version 5
*
* @author Tim Wagner <tw@appserv... | true |
d71855b677fcdf43bed5606f386d4caad5da955f | PHP | ph8d/php_pool | /day06/ex00/Color.class.php | UTF-8 | 1,784 | 3.703125 | 4 | [] | no_license | <?php
class Color {
public static $verbose = FALSE;
public $red = 0;
public $green = 0;
public $blue = 0;
function __construct(array $color)
{
if (isset($color["rgb"]))
{
$this->red = (int)(($color["rgb"] >> 16) & 0xFF);
$this->green = (int)(($color["rg... | true |
a0f08a6f2631fa5e3600c67db3ebcfee1ec30c54 | PHP | PALASSY/MyBookingSymfony | /src/Service/Pagination.php | UTF-8 | 3,556 | 2.984375 | 3 | [] | no_license | <?php
namespace App\Service;
use Doctrine\Persistence\ObjectManager;
use Symfony\Component\HttpFoundation\RequestStack;
use Twig\Environment;
class Pagination
{
//Il faut : Entity/Limit/Page actuelle initiale/ Manager
private $entityClass;
private $limit = 10;
private $currentPage = 1;
private $manager;
... | true |
3eb357d547cadf4a99ce4dd56f8746d0fd878fb8 | PHP | holyhope/lti-wims | /classes/Requests/ToolProxyRegistrationRequest.php | UTF-8 | 4,675 | 2.5625 | 3 | [] | no_license | <?php
namespace LTI\Requests;
use LTI\Registration;
use LTI\ToolConsumerProfile;
use LTI\DatabaseSession;
class ToolProxyRegistrationRequest extends PostRequest {
const page = 'register';
const message_type = 'ToolProxyRegistrationRequest';
const content_type = 'application/vnd.ims.lti.v2.toolproxy+json... | true |
dc942fe5c996a659416cbe03775fd2ae138268af | PHP | moogkwon/CoolFriend_Backend | /application/models/CallModel.php | UTF-8 | 3,126 | 2.65625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Description of CallModel
*
* @author leo
*/
class CallModel extends CI_Model {
public $tblName = "tb_call_history";
public $searchItems = array(
"caller.firstName AS callerName",
"caller.phoneNumber AS callerPhone",
"callee.firstName AS calleeName",
... | true |
b81009ebb261a7bc323b7d30a651758a0f46af92 | PHP | jaabee/DesignPattern | /Structural/FlyWeight/TeaMaker.php | UTF-8 | 520 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: 小粽子
* Date: 2018/12/17
* Time: 17:16
*/
namespace DesignPattern\Structural\FlyWeight;
class TeaMaker
{
protected $availableTea = [];
public function make($preference)
{
if (empty($this->availableTea[$preference])){
// 缓存
$this->... | true |
b2f32ef5cc40942d03b11705368fad48e4318cfc | PHP | Downz/www | /html/timemybeerstuf/Beer/DB.php | UTF-8 | 2,377 | 2.859375 | 3 | [] | no_license | <?php
$tableResult = $SQLquery->getTable();
$tableToIDs = $SQLquery->getTable();
if (isset($_POST["updateItem"])) {
//TODO: Insert Alert here!!!!
$SQLquery->updateItem($_POST["id"], $_POST["amount"]);
header("Refresh:0");
}
if (isset($_POST['SetNameOnItem'])) {
$SQLquery->setNameOnID($_POST["SetNameI... | true |
8125066db3e7bc000ab8ef077506de6bd1d2769c | PHP | TBK/myMyPlex | /myMyPlex.inc | UTF-8 | 6,179 | 3 | 3 | [] | no_license | <?php
# Test params
$_SERVER['PHP_AUTH_USER'] = 'profplump';
#=========================================
# Parameters/Globals
#=========================================
$USER_DB = 'sqlite:/var/state/myMyPlex/db.sqlite';
$DBH = NULL;
# Prevent PHP from whining - the actual timezone you set is irrelevent
date_default_t... | true |
6622626d7f88ca435d2269a1f36e88df893c057c | PHP | moritzjacobs/cindy | /plugins/embed/content.php | UTF-8 | 1,181 | 3.03125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
EmbedHelper::parseParams($_GET);
class EmbedHelper {
static function parseParams($params) {
$params = array();
foreach ($_GET as $key=>$param) {
$params[urldecode($key)] = urldecode($param);
}
$type = "none";
$id = "";
foreach($params as $k=>$v) {
if (strpos($k, "youtu") !== false && $... | true |
4d6ec769849861b8da38c9bd44248c3d79d278af | PHP | fluix/fconfig | /src/Fluix/Config/Reader/JsonReader.php | UTF-8 | 585 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Fluix\Config\Reader;
use Fluix\Config\Exception\Exception;
use Fluix\Config\File;
use Fluix\Config\Reader;
final class JsonReader implements Reader
{
public function read(File $source): array
{
try {
return \json_decode($source->read(), true, 51... | true |
0a875d44812b526c30106e5d8d7ed924d8723048 | PHP | afdafd/swoft-grpc-server | /src/Request.php | UTF-8 | 4,087 | 2.6875 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Hzwz\Grpc\Server;
use ReflectionException;
use Swoft\Bean\Annotation\Mapping\Bean;
use Swoft\Bean\BeanFactory;
use Swoft\Bean\Concern\PrototypeTrait;
use Hzwz\Grpc\Server\Contract\RequestInterface;
use Hzwz\Grpc\Server\Exception\GrpcServerException;
use function microtime;
use... | true |
73cba79f8f7aa1955377398be5ed5e60965d8a70 | PHP | blendsdk/mailserver | /install.php | UTF-8 | 9,819 | 2.53125 | 3 | [
"MIT"
] | permissive | #!/usr/bin/env php
<?php
class MailServerInstaller {
/**
* The version number
* @var string
*/
protected $VERSION = "0.9";
protected $MAIL_USER = "mail";
protected $MAIL_USER_GROUP = "";
protected $MAIL_USER_UID = 5000;
protected $MAIL_USER_PASSWORD = "";
protected $SERVER_F... | true |
0ed069c24d739a9d2cb7f829f2e3dc773174d4c0 | PHP | aurimielisss/phpAssignement | /controllers/CategoryController.php | UTF-8 | 3,551 | 2.765625 | 3 | [] | no_license | <?php
class CategoryController {
private $slimApp;
private $model;
private $requestBody;
public function __construct($model, $action = null, $slimApp, $parameters=null){
$this->model = $model;
$this->slimApp = $slimApp;
$this->requestBody = json_decode($this->slimApp->reques... | true |
d2f4a27cbec8a91f54b91c17c364d50cde21eff8 | PHP | arielcr/mvc-framework | /lib/helper/Date.php | UTF-8 | 1,293 | 3.421875 | 3 | [] | no_license | <?php
class Date {
private static $instance = NULL;
private static $dias = array("Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado", "Domingo");
private static $meses = array("Enero", "Febrero", "Marzo", "Abril", "Mayo", "Junio", "Julio", "Agosto", "Setiembre", "Octubre", "Noviembre", "Diciembr... | true |
75180043b17f41ecae5190ba0bf2c2673d19b4a0 | PHP | RGPhD/e15 | /bookmark/app/Http/Controllers/PracticeController.php | UTF-8 | 8,243 | 2.96875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Book;
use Str;
class PracticeController extends Controller
{
/**
* Demonstrates deleting data
*/
public function practice22()
{
$books = Book::all();
echo $books;
}
public function practice21()
{ ... | true |
e8bf836ef303deb21955bc44b4598c4063dbe3c6 | PHP | pauly4it/LaraSqrrl | /app/Http/Controllers/Controller.php | UTF-8 | 1,420 | 2.53125 | 3 | [] | no_license | <?php namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
abstract class Controller extends BaseController
{
use Authoriz... | true |
ae50daa78ffb6cff6412345a683c1cc0da935e03 | PHP | mosengine/mosengine | /sys/old/kernel/Common/File/File.php | UTF-8 | 774 | 2.921875 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of File
*
* @author Nelsson302
*/
namespace kernel\Common;
Class File
{
static public function read(... | true |
660d899cc311304d1e5f6f4a88f14a6c8008c11c | PHP | naveensky/avanti-results | /trunk/app/libraries/Constants.php | UTF-8 | 1,069 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by JetBrains PhpStorm.
* User: keshav
* Date: 16/9/13
* Time: 1:18 PM
* To change this template use File | Settings | File Templates.
*/
class Constants
{
const REGISTRATION_CODE_DELHI = 1;
const REGISTRATION_CODE_MUMBAI = 2;
const REGISTRATION_CODE_KANPUR = 3;
const PAGING_CO... | true |
0a450f779f213bfabad9985a539f005602d0061a | PHP | AdamMiltonBarker/hias-core | /src/var/www/html/API/Android/Zone/NLU/Classes/Auth.php | UTF-8 | 6,579 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
abstract class Auth
{
protected $invalidMethod = False;
protected $endpoint,
$verb,
$method,
$args,
$indentifier,
$apikey,
$application=[];
private $debug = False;
function __construct()
{
header("Access-Control-Allow-Orgin: *");
header("Access-Control-Allow-Methods: *");
... | true |
f978c422b366d3a4b61d0d39a6ffa4bdd8cecebb | PHP | Job-jr/SQL_assambly | /get_DB.php | UTF-8 | 10,501 | 2.515625 | 3 | [] | no_license | <?php
session_start();
$conn = new mysqli('localhost','root','','sql_assembly');
/* -------------------------------- Closebtn -------------------------------- */
if (isset($_GET['close-btn'])){
header("location:javascript://history.go(-1)");
exit;
}
/* -------------------------------- Addmodel ------------... | true |
6eefb33f05cb5768e39180a18f6fa9685cac9c3d | PHP | mogic-le/geonames | /src/Seeders/DatabaseSeeder.php | UTF-8 | 1,317 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php namespace Arberd\Geonames\Seeders;
use Arberd\Geonames\DatabaseRepository;
use Arberd\Geonames\Importer;
use Arberd\Geonames\JsonRepository;
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder {
/**
* The importer instance.
*
* @var \Arberd\Geonames\Importer
*/
protected $importer;
... | true |
969ac580b1ee430f49f42576574df00ddefb9fa1 | PHP | GvGMediaSolutions/se-rebirth | /classes/register.php | UTF-8 | 1,009 | 2.875 | 3 | [] | no_license | <?php
include_once 'server.class.php';
$msg = (isset($_GET['msg'])) ? $_GET['msg'] : "";
$out = "";
if(isset($_POST['submit'])){
if((isset($_POST['name']) && isset($_POST['pass']) && isset($_POST['pass2']))){
$login_name = $_POST['name'];
$password = $_POST['pass'];
$password2 ... | true |
210dba190c55c51024d1db7eb6cb4bf751223b2b | PHP | TheSoloGod/hom-nay-an-gi | /connectDB/connectDB.php | UTF-8 | 439 | 2.640625 | 3 | [] | no_license | <?php
define('DB_HOST', 'localhost');
define('DB_USER', "root");
define('DB_PASS', "Chicho@g4ug4u");
define('DB_NAME', 'eat');
$conn = null;
try {
$conn = new PDO("mysql:host=" . DB_HOST . ";dbname=" . DB_NAME, DB_USER, DB_PASS, array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"));
$conn->setAttribute(PDO... | true |
2090c3eabd1faa83a533a4eb8fc078a65436a56a | PHP | CleanFeather/paubo | /database/migrations/2020_12_22_095217_create_hobby_signs_table.php | UTF-8 | 1,013 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateHobbySignsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('hobby_signs'... | true |
a0805ee5b7ffd3a9d534096d771d8ff25a30bb56 | PHP | picasso250/status | /model.php | UTF-8 | 720 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
use lib\Model;
class site extends Model {
static function ensure_url($site_url, $add_time) {
$row = self::sqlBuilder()->where(["site_url=$site_url"])->getOne();
if ($row) {
return $row['id'];
}
return self::add(compact('site_url', 'add_time'));
}
}
class status_log extends Model {
st... | true |
4826c0da3a5d846778d979e95c232c5e0d8eac3e | PHP | Kainanpr/Curso_WEB_UDEMY_PHP7 | /Curso WEB UDEMY PHP7/POO/Namespace_(IMPORTANTE)/config.php | UTF-8 | 315 | 2.765625 | 3 | [] | no_license | <?php
//Função para carregar as classes
spl_autoload_register(function($nameClasse) {
var_dump($nameClasse);
$dirClass = "Class";
$fileName = $dirClass . DIRECTORY_SEPARATOR . "$nameClasse.php";
//Verificar se o arquivo existe
if(file_exists($fileName) === true) {
require_once($fileName);
}
});
?> | true |
cc3bdd363a07153632a2d495d199c951adbf0f02 | PHP | aemaething/ISP | /08_Elementare-Klassen/8.1_DateTime/modify.php | UTF-8 | 875 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
$dt = new DateTime("now");
echo "Referenz-Zeit: ", $dt->format("d.m.Y H:i:s"), "\n";
// Referenz-Zeit: 11.01.2017 16:57:01
// Verwendung eines absoluten Wertes
$dt = new DateTime("now");
$dt->modify("2012-10-10");
echo "2012-10-10 => ", $dt->format("d.m.Y H:i:s"), "\n";
// 2012-10-10 => 10.10.2012 16:57:01
//... | true |
949122f9014905fbfb006a44c5e07c0de23d50c1 | PHP | OFFLINE-GmbH/oc-mall-plugin | /formwidgets/Price.php | UTF-8 | 3,413 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php namespace OFFLINE\Mall\FormWidgets;
use Backend\Classes\FormWidgetBase;
use October\Rain\Exception\ValidationException;
use OFFLINE\Mall\Models\Currency;
/**
* Copied from RainLab.Translate's MLText
*/
class Price extends FormWidgetBase
{
protected $defaultCurrency;
protected $defaultAlias = 'price';... | true |
5da1197ffc309a9b06d46a159d82314f78e09805 | PHP | Cucusenok/turbo | /app/AutoMark.php | UTF-8 | 1,764 | 2.546875 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Log;
class AutoMark extends Model
{
protected static $tableName = 'automarks';
public static function findByType($type){
$automarks_response = DB::table(self::$tableName)
... | true |
f0a0fc7e36106400058d2e799611860533f6e68d | PHP | kapetan91/oopPHPexcercises | /grupa4/6.php | UTF-8 | 355 | 3.578125 | 4 | [] | no_license | <!-- Napisati funkciju koja iz zadatog niza uzima prva tri elementa, i pretvara ih u string, kod kojeg svaka rec zapocinje velikim slovom. -->
<?php
function firstThreeElements($arr)
{
$firstThree = array_slice($arr , 0, 3);
return ucwords(implode(' ', $firstThree));
}
$arr = ['prva', 'tri', 'clana', 'niza'];... | true |
1afe359098cce506019255d9525c18610d3a0caf | PHP | probna/social_calendar | /src/Resources/StupidCommandBus.php | UTF-8 | 536 | 2.734375 | 3 | [] | no_license | <?php
namespace Resources;
use Resources\Command\ChangePassword;
use Resources\Command\RegisterUser;
use Resources\Handler\ChangePasswordHandler;
use Resources\Handler\UserRegistrationHandler;
class StupidCommandBus
{
public function doWork($command)
{
if ($command instanceof RegisterUser) {
... | true |
14d4071d4982afdab6e9b503cf581ac0256402c5 | PHP | ESSch/Geocode | /api/lib.php | UTF-8 | 632 | 2.515625 | 3 | [] | no_license | <?php
// @example post("/app3/log/3", []);
function post(string $url, array $data) {
$es_host = explode("=",trim(shell_exec("env | grep ES_HOST=")))[1];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $es_host . $url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
cu... | true |
3ff4a2308de36ce298dab3551af47517f153e62b | PHP | beeblebrox3/eloquent-enhancements | /src/helpers.php | UTF-8 | 796 | 3.09375 | 3 | [] | no_license | <?php
namespace Sigep\EloquentEnhancements;
/**
* This function checks if the array is associative or not
* Note: the function only looks if all keys are numerical. We have better ways to check, but they can be trouble if
* the array has missing keys
* @param array $array
* @return bool
*/
function isAssoc(arra... | true |
d59908f787f70f86c763e56cbec22b0793b409c0 | PHP | jetigue/stotan | /app/Http/Livewire/Training/RunTypes/SteadyRunForm.php | UTF-8 | 1,501 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Livewire\Training\RunTypes;
use App\Models\Training\RunTypes\Steady;
use Livewire\Component;
class SteadyRunForm extends Component
{
public $steady = null;
public $name;
public $description;
protected $listeners = [
'cancelCreate' => 'resetForm',
'submitCreat... | true |
1ec4d8e68da8864d951bc7f6cfc2ba41c9731c9d | PHP | tungtrana3/WebServer | /database/seeds/ThemGoiCreditSeeder.php | UTF-8 | 1,108 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Illuminate\Support\Str;
class ThemGoiCreditSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$credit = [];
$credit = [
'ten_goi' => 'goi10',
... | true |
1049aa901f75a048305f720562605a76d86f9126 | PHP | Akky85/GamerWebshop | /fetch.php | UTF-8 | 2,241 | 2.53125 | 3 | [] | no_license | <?php require "connection.php"; ?>
<div class='container'>
<div class="row justify-content-center">
<?php
$con = mysqli_connect(host,user,pwd,dbname);
mysqli_query($con, "SET NAMES utf8");
$search = mysqli_real_escape_string($con, $_POST["search"]);
$sql = "SELECT * FROM termek... | true |
370ef1c02346bfeeb626db3d1bb6e66c00b76ba5 | PHP | gabrysiakagnieszka/Famil.io | /module/Famillio/src/Famillio/Model/Person/PersonInterface.php | UTF-8 | 1,207 | 2.71875 | 3 | [] | no_license | <?php
/**
* Date: 11/06/15
* Time: 13:44
*
*/
namespace Famillio\Model\Person;
use AGmakonts\DddBricks\Entity\EntityInterface;
use Famillio\Model\Person\Collection\FactDataAccessInterface;
use Famillio\Model\Person\ValueObject\Picture;
/**
* Interface PersonInterface
*
* Entities that are realizations of... | true |
1a79a295e3b9c07451e5b2519499e7f2826589d4 | PHP | yihaocompany/shenxianshop | /app/common/models/PromGoods.php | UTF-8 | 7,645 | 2.734375 | 3 | [] | no_license | <?php
namespace Shenxianshop\Models;
class PromGoods extends \Phalcon\Mvc\Model
{
/**
*
* @var integer
* @Primary
* @Identity
* @Column(column="id", type="integer", length=20, nullable=false)
*/
protected $id;
/**
*
* @var string
* @Column(column="name", type... | true |
ce783a74b6e1cad3991d50454e20d4ffe83d01e8 | PHP | ianvandermerwe/twothreebird-assessment | /question_4/index.php | UTF-8 | 1,320 | 3.453125 | 3 | [] | no_license | <?php
/**
* We consider an email address in the form user@domain.extension to be valid if its domain and extension are twothreebird.com and the value of user satisfies the following constraints:
* - It starts with between 1 and 6 lowercase English letters denoted by the character class [a-z].
* - The lowercase lette... | true |
4433eff01c1b0af83a543d306139545b7582f2cd | PHP | gowebdev/php-api | /src/GoWeb/Api/Model/Media/ChannelPrograms/Program.php | UTF-8 | 919 | 2.671875 | 3 | [] | no_license | <?php
namespace GoWeb\Api\Model\Media\ChannelPrograms;
class Program extends \Sokil\Rest\Transport\Structure
{
public function getName()
{
return $this->get('name');
}
public function getStartTime($format = null)
{
return $format ? date($format, $this->get('from')) : (int) $t... | true |
3823b122791e8f6775dfeac2c29e2311881676c0 | PHP | sounboul/sim-promotion-2021 | /src/Form/Widget/BackgroundColorSelectType.php | UTF-8 | 2,584 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Form\Widget;
use App\Entity\Core\Website;
use App\Repository\Core\WebsiteRepository;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Sym... | true |
d41707cc718112382e2fa68b8f0eab7457b88cd1 | PHP | nematulloh/farmpay | /common/models/Pharmacist.php | UTF-8 | 2,007 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "pharmacist".
*
* @property int $id
* @property string $firm_name
* @property string $lat
* @property string $long
* @property string $fio
* @property string $passport_seria
* @property string $gender
* @property string $phone
... | true |
aeeb5a8050e18c9fca1233c4e075db247defe3e6 | PHP | jeancharlesgraillot/eval-to-do-list | /taskAddCheck.php | UTF-8 | 768 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
$index = ($_GET['index']);
$name = htmlspecialchars($_POST['name']);
$deadline = htmlspecialchars($_POST['deadline']);
require('db_access.php');
if (isset($name) AND !empty($name) AND isset($index) AND !empty($index) AND isset($deadline) AND !empty($deadline)) {
// Insertion of project informations in datab... | true |
82393ef9117b4b34074833d3be76e800afff311d | PHP | rodrigomassiolo/parkinsoft | /app/Medicamento.php | UTF-8 | 1,568 | 2.609375 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
* @property integer $id
* @property string $nombre
* @property int $numero
* @property string $fechaConHora
* @property boolean $booleano
* @property string $fecha
* @property string $Letra
* @property int $commentId
* @property string $create... | true |
8576aa06e7f7218e8df02c54f6eb777e93fa18da | PHP | yurisi0212/R6StatsAPI-PHP | /R6StatsAPI.php | UTF-8 | 10,832 | 2.6875 | 3 | [] | no_license | <?php
/**
* R6StatsAPI
* @author yurisi
* @link https://homepage.yurisi.space/
*/
class R6StatsAPI {
const APIKEY="";//R6StatsAPIKey here
const SEASON="shadow_legacy";
const LOCATION="apac";//ncsa(US),emea(Europe),apac(ASIA)
const INFO=["generic","seasonal","operators","weapon-categories","we... | true |
190086de60a75fe79a62fc5c81c7af2bcf812da8 | PHP | dicrtarasov/yii2-esputnik | /src/entity/Channel.php | UTF-8 | 1,896 | 2.734375 | 3 | [] | no_license | <?php
/*
* @copyright 2019-2021 Dicr http://dicr.org
* @author Igor A Tarasov <develop@dicr.org>
* @license BSD-3-Clause
* @version 21.05.21 00:57:47
*/
declare(strict_types = 1);
namespace dicr\esputnik\entity;
use dicr\esputnik\Entity;
use dicr\json\EntityValidator;
/**
* Канал контакта.
*
* @link https://... | true |
8bad4d9eb99967ad9e7dba02e920ea03adafa997 | PHP | cdmzero/gestion_tienda | /vistas/update.php | UTF-8 | 13,996 | 2.515625 | 3 | [] | no_license | <?php
require_once $_SERVER['DOCUMENT_ROOT'] . "/gestion_tienda/dirs.php";
require_once CONTROLLER_PATH . "ControladorArticulo.php";
require_once CONTROLLER_PATH . "ControladorImagen.php";
require_once UTILITY_PATH . "funciones.php";
error_reporting(E_ALL & ~(E_STRICT|E_NOTICE));
session_start();
if (!isset($_... | true |
f8767e4f58c28f1dc46c43026e693aab0db2c2c0 | PHP | ChrisGadek1/book_shop | /src/Controller/AddCommentController.php | UTF-8 | 1,347 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\Books;
use App\Entity\Opinions;
use App\Entity\Users;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class AddCommentController extends AbstractController{... | true |
395bb60bb50c1401224126a0ece5017f3b4fae59 | PHP | SickRomeo/Edapem | /mvc/models/crud.php | UTF-8 | 1,024 | 2.6875 | 3 | [] | no_license | <?php
/**
*
*/
class crud extends baseModel
{
function __construct()
{
parrent::__construct();
}
public function create( $table, $data )
{
}
public function read( $table, $fields = '*', $filter = array() )
{
$connect = $this->connectHana();
$fields = empty($fields) ? '*' ? $fields;
$query ... | true |
38c79910e7edd12dc5c54a9d77289d0261adbeff | PHP | ualisonaguiar/telefonia-rest | /src/module/Telefonia/Service/JWTManager.php | UTF-8 | 779 | 2.65625 | 3 | [] | no_license | <?php
namespace Telefonia\Service;
use Firebase\JWT\JWT;
class JWTManager
{
protected $secret = 'usuario-pin';
public function gerarToken($arrData)
{
$arrDataToken = [
'iat' => time(),
'exp' => (round(microtime(true) * 1000)) + (1000 * 60 * $arrData[0]['timeout']),
... | true |
15b8f174f3b0c233dc52808a245b0b61205542e2 | PHP | rafael-assisz/Projeto-PET-SAFE | /arquivos/TS#3 Back-end e Infra/Sprint#3/cadastrodoacoes.php | UTF-8 | 1,551 | 2.890625 | 3 | [] | no_license | <?php
ini_set('display_errors', 'on');
?>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<title>ANIMAIS DOADOS</title>
<link rel="stylesheet" type="text/css" href="teste.css">
</head>
<body>
<h1>Cadastrar animal para doação</h1>
<?php
if ($_POST['ok'] != "CONFIRMAR") {
... | true |
05706a8a6f378559c4e9bc00b2b53dc14117a60a | PHP | LukeVerlaan/Shop-Ease | /actions/profiel_action.php | UTF-8 | 2,762 | 2.796875 | 3 | [] | no_license | <?php
session_start();
require '../includes/dbconnection.php';
require "../class/user.php";
$valid = true;
$pass_valid = false;
if(isset($_POST["person"])) {
echo "person";
$id = $_POST["id"];
$firstname = $_POST["firstname"];
$insertion = $_POST["insertion"];
$lastname = $_POST["lastname"];
$email = $_POST["em... | true |
38134c2ad23cd882a53bbae79d209fbd31a1b373 | PHP | projetNFA021/CorrigeAtelierNFA012du05052018 | /identifiant.php | UTF-8 | 600 | 3.0625 | 3 | [] | no_license | <?php
// Démarrer la session
session_start();
// Si l'utilisateur est connecté
if(isset($_SESSION["login"])){
// Afficher son login stocké dans la session
echo "Votre login est : ". $_SESSION["login"] ."<br><br>";
// Affcicher son password stocké dans la session
echo "Votre mot de passe est : ". $_SESSION["mdp"]." <b... | true |
2629a0a462075e352261f7a674c5d52c31472607 | PHP | vlad-git-hello/Bulletin-board | /app/Http/Controllers/Auth/VerificationController.php | UTF-8 | 1,781 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Http\Requests\Auth\ResendRequest;
use App\Services\Auth\VerificationService\VerificationService;
use Illuminate\Http\RedirectResponse;
/**
* Class VerificationController
* @package App\Http\Controllers... | true |
c86ca43682177f966e91a97b0e133befae11db7f | PHP | lukasboc/parazei | /vendor/lesstif/php-jira-rest-client/src/Sprint/SprintSearchResult.php | UTF-8 | 1,842 | 2.9375 | 3 | [
"MIT",
"BSD-3-Clause",
"Unlicense",
"Apache-2.0",
"OSL-3.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: keanor
* Date: 29.07.15
* Time: 13:12.
*/
namespace JiraRestApi\Sprint;
/**
* Sprint search result.
*/
class SprintSearchResult
{
/**
* @var string
*/
public $expand;
/**
* @var int
*/
public $startAt;
/**
* @var int
*... | true |
137114d11b6417b8537e2cc7eabc7dd90a0497b1 | PHP | RomIII/dk-sov.loc1 | /class/Feed.php | UTF-8 | 6,125 | 2.578125 | 3 | [] | no_license | <?php
class Feed
{
public $moduleName = 'feed';
public $content;
public function show()
{
return $this->content;
}
public function mainList()
{
$db = DB::instance();
$pagination = new Pagination(DB_PREFIX . '_' . $this->moduleName, 3, array('moduleName' => $this->m... | true |
71a6af456b6d8c16fd292dfffecb0b22fd4cdc06 | PHP | le-anh/diemrenluyen | /app/Http/Requests/SinhVienRequest.php | UTF-8 | 2,037 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class SinhVienRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get t... | true |
89edd4e0dc5e9c721c0e431e083aa7393c8f29c5 | PHP | nte-unifr/antiquitas | /src/NTE/AntiquitasBundle/Resources/public/activites/new_pl/lib/classes/class.activite.php | UTF-8 | 1,138 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
class activite extends dbobject {
public $tablename= 'activites';
public $objectname = 'activite';
public $dbvariables=array('name_fr','name_de','category');
public $sections = array();
public $outils = array();
function ondelete(){
// when deleting this activity, delete all sections it contains
for... | true |
bcdc7abe6aa0898528e61ad244cc760ec7b4d11a | PHP | melkarmo/CentraleGarage | /router/routerVoiture.php | UTF-8 | 1,665 | 2.515625 | 3 | [] | no_license | <?php
// Routeur spécifique à la page de gestion de l'entité Voiture
if (isset($_GET['action'])) {
if ($_GET['action'] == 'listVoitures') {
listVoitures();
}
elseif ($_GET['action'] == 'createVoitureForm') {
createVoitureForm();
}
elseif ($_GET['action'] == 'createVoiture') {
if (!empty($_POST['immatricula... | true |
5b63085a2587fc4f6cd966f22faadc43ac7bf535 | PHP | Kamurai/WebRepository | /htdocs/Division3/Section1/Custom.php | UTF-8 | 16,902 | 2.515625 | 3 | [] | no_license | <?php
function getTitle($vPage){
$vResult = "";
$vDefault = "";
$vDefault = $vDefault."Antarrea";
$vResult = $vResult."<title>";
if($vPage==0){
$vResult = $vResult.$vDefault;
}else if($vPage==1){
$vResult = $vResult."Revolutions: Invading Nations";
}else if($vP... | true |
f0a6c902cf3159d981054735e97abf4ffbcba620 | PHP | EmilJPedersen/ProjectOffers | /app/Project/Address/Address.php | UTF-8 | 530 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Project\Address;
use Illuminate\Database\Eloquent\Model;
class Address extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'address';
protected $primaryKey = 'address_id';
/**
* Indicates if the model should ... | true |
b759da8c91c6d81b8e8b886ecefd5d1a3a5990ad | PHP | deegitalbe/trustup-pro-admin-common | /src/Models/Query/AccountChargebeeQuery.php | UTF-8 | 2,570 | 2.703125 | 3 | [] | no_license | <?php
namespace Deegitalbe\TrustupProAdminCommon\Models\Query;
use Deegitalbe\TrustupProAdminCommon\Facades\Package;
use Henrotaym\LaravelModelQueries\Queries\Abstracts\AbstractQuery;
use Deegitalbe\TrustupProAdminCommon\Contracts\Models\Query\AccountChargebeeQueryContract;
/**
* Query used to retrieve account charg... | true |
bb6fa7be1b4a362381b68bc1fb65bbfc5d8f642e | PHP | RustamSafin/symf_project | /src/AppBundle/Service/PostService.php | UTF-8 | 593 | 2.625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace AppBundle\Service;
use AppBundle\Repository\PostRepository;
class PostService
{
const LIMIT_POSTS = 2;
private $postRepository;
function __construct(PostRepository $postRepository) {
$this->postRepository=$postRepository;
}
public function getAllPosts($page = 0) {
... | true |
dcf77f7f4a2825806adaf3ebb6e79edcd27a4c18 | PHP | j0k3r/graby | /src/GrabyConfig.php | UTF-8 | 4,689 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Graby;
use Symfony\Component\OptionsResolver\Options;
use Symfony\Component\OptionsResolver\OptionsResolver;
/**
* Configuration for Graby as a Value Object.
*/
class GrabyConfig
{
private bool $debug;
private string $log_level;
private bool $rewrite_relative_u... | true |
f81f19a1ca8159f10f22629bea32b9ea7c0192ad | PHP | rawscripter/resetfoods | /app/Http/Controllers/ProductsController.php | UTF-8 | 5,209 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Product;
use App\Models\Category;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class ProductsController extends Controller {
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index() {
... | true |
10c280ac3156c2061189c46e95aebdea1997ace7 | PHP | PhilippWitzmann/Cache | /src/Cache.php | UTF-8 | 1,303 | 3.28125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace PhilippWitzmann\Cache;
/**
* All Cache Implementation need to implement this. It controls the basic functionalities
* every Cache needs to have.
*
* @author Philipp Witzmann <philipp@philippwitzmann.de>
*/
interface Cache
{
/**
* Persists an entry into the cache... | true |
08538a662587ed04d90dce6c005d2036d0a78004 | PHP | irabkina/PAC | /database/testPlotWithUpdate.php | UTF-8 | 2,349 | 3.234375 | 3 | [] | no_license | <?php
# Example of Streaming Plots with PHPlot
# This simply plots sin(x) and cos(x), updating at the rate given below.
# Replace the function next_row() to plot something else.
# This must run using a web server, not CLI.
require_once 'phplot/phplot.php';
# Configuration:
# This is the fixed number of points along t... | true |
b03b39786fcf1480aa752e5c3bf364b67439427c | PHP | YedeApp/yedeapp-web | /app/Models/Topic.php | UTF-8 | 964 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
class Topic extends Model
{
protected $fillable = [
'title', 'content', 'user_id', 'chapter_id', 'course_id', 'comment_count', 'view_count', 'is_free', 'slug', 'description', 'sorting', 'active'
];
public function course()
{
return $this->belongsTo(Course::... | true |
91fb6e936b40b9e434d56c7437fd4ff2cd68aaf4 | PHP | pozys/PHP2 | /controllers/UserController.php | UTF-8 | 1,241 | 2.65625 | 3 | [] | no_license | <?php
namespace App\controllers;
use App\main\App;
use App\repositories\UserRepository;
class UserController extends Controller
{
public function __construct($renderer, $request, App $app)
{
parent::__construct($renderer, $request, $app);
$this->repository = new UserRepository($request);
... | true |
0d7259eec07cb78af8c1384446e0c7628d259ff2 | PHP | fierce/fierce | /classes/Tag/TagFieldNode.php | UTF-8 | 1,856 | 2.515625 | 3 | [
"Unlicense"
] | permissive | <?php
/**
*
* Fierce Web Framework
* https://github.com/abhibeckert/Fierce
*
* This is free and unencumbered software released into the public domain.
* For more information, please refer to http://unlicense.org
*
*/
namespace Fierce\Tag;
class TagFieldNode extends FieldNode
{
public static $tagName = 't... | true |
e3b7b173120caf26425793f79a91f39b2623cbb9 | PHP | mcleanka/excel_pharmacy | /customers-add.php | UTF-8 | 4,431 | 2.53125 | 3 | [] | no_license | <?php
require_once 'init.php';
$current_shop = get_shop_name().' Shop';
$current_page = "customers.php";
require_once 'Includes/templates/header.php';
if (isset($_POST['submit'])) {
$errors = "";
if($errors==""){
$fname = $_POST['fname'];
$sname = $_POST['sname'];
$phone = $_POST['phone'];
... | true |
e4a5e28146b4e7bc99b12b7fd649a21cd01fee36 | PHP | platbox/sdk-php | /src/Services/Payment/PlatboxData.php | UTF-8 | 1,993 | 2.828125 | 3 | [] | no_license | <?php
namespace Platbox\Services\Payment;
use Platbox\Services\Config\PlatboxConfig;
/**
* Class PlatboxData
*
* @package Platbox\Services\Payment
*/
class PlatboxData
{
/**
* @var string
*/
private $paymentHost;
/**
* @var string
*/
private $hashAlgo;
/**
* @var bo... | true |
651733903f8924df73b020e4f76b30b0120f79b5 | PHP | pontuyo/takutomo-mixi-appli | /takutomo/apps/frontend/modules/get_event_detail/actions/actions.class.php | UTF-8 | 2,798 | 2.53125 | 3 | [] | no_license | <?php
ini_set('include_path', '../../lib/PEAR' . PATH_SEPARATOR . ini_get('include_path'));
require_once 'XML/Unserializer.php';
/**
* get_event_detail actions.
*
* @package takutomo
* @subpackage get_event_detail
* @author Your name here
* @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44... | true |
1aad928e4338084105083aafc208eed42b79d548 | PHP | 2tankov2/php-exercises | /without.php | UTF-8 | 1,194 | 3.390625 | 3 | [] | no_license | <?php
/**
* Реализуйте функцию without, которая работает по такому же принципу, что и функция из теории, кроме одного
* аспекта. Эта функция должна принимать любое число аргументов, где первый аргумент массив, а все остальные
* - значения, которые нужно исключить из переданного массива. Сделайте решение функциональн... | true |
ee14cfbf4f22e68169613440d080d6243a566029 | PHP | mohammed-naji/fwd8-backend | /lec11/index.php | UTF-8 | 966 | 3.203125 | 3 | [] | no_license | <?php
// Connection
$conn = mysqli_connect('localhost', 'root', '', 'fwd8');
// if($conn) {
// echo 'Success';
// }
// CRUD Application
// C => Create => Insert
// INSERT INTO table_name () VALUES ()
// $ahmed = "INSERT INTO posts (title, content, image) VALUES ('Post Title', 'Post Content', 'post.jpg')";
// if... | true |
52cc2ba85d3d1cc2f8415a308c45dca25242c78a | PHP | digitalkaoz/yuml-php | /src/YumlPhp/Command/ClassesCommand.php | UTF-8 | 1,610 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace YumlPhp\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use YumlPhp\Builder\BuilderInterface;
/**
* this command generates a class diagram.
*
* @author Robert Schönthal <seroscho@googlemail.com>
*/
class ClassesCommand extends BaseComm... | true |
c38eaebdc5243d8ac8b335608a7c3809e7f2bcee | PHP | aphrx/storyproject | /articleLike.php | UTF-8 | 3,345 | 2.640625 | 3 | [] | no_license | <?php
$article=$_GET['story'];
include_once("header.php");
include_once("db.php");
$sql = "SELECT * FROM stories WHERE id='$article' LIMIT 1";
$query = mysqli_query($db, $sql);
$row = mysqli_fetch_array($query);
$story2 = $row['story'];
$title = $row['title'];
$user2 = $row['author'];
$li... | true |
3c2b1fd95c7ed35836a2009fe0ce7dbd8202a388 | PHP | kestas144/php_oop | /index.php | UTF-8 | 684 | 2.59375 | 3 | [] | no_license | <?php
use Src\Apartment;
use Src\BookingManager;
use Src\Guest;
use Src\Reservation;
use Src\SingleRoom;
require __DIR__ . '/vendor/autoload.php';
$apartment = new Apartment(20,450);
$single = new SingleRoom(1408,99);
$guest = new Guest('Vardenis', 'Pavardenis');
$startDate = new \DateTime('2019-04-20');
$endDate = ... | true |
fb68084e755cab25f7a1a878bfc422fd2b575f09 | PHP | JimmyHortlund/oophp-v5 | /view/dice/play_dice.php | UTF-8 | 720 | 2.984375 | 3 | [] | no_license | <?php
"use strict";
namespace Jiho\Dice;
$gameHandler = new GameHandler();
$saveButton = $gameHandler->saveButton();
?>
<h2>" <?= $playerTurn ?> "</h2>
<h3>Player One Score: | <?= $playerOneTotalSum ?> | -- VS -- Computer Score: | <?= $playerTwoTotalSum ?> | </h3>
<p>The rolls are: <?= $output ?></p>
<p>Sum: <?= $cu... | true |
22298acb3b2e8b42e9a321365fa228069210c7cf | PHP | testoodoo1/Oodoosupport | /app/models/Stattus.php | UTF-8 | 613 | 2.53125 | 3 | [] | no_license | <?php
class Stattus extends Eloquent {
protected $table ='status';
public function status(){
return $this->belongsTo('Masterdata', 'status_id');
}
public function assgined_to(){
return Employee::where('employee_identity',$this->updated_by)->first();
}
public function updateParent($object_id){
if ($t... | true |
413ba2cb7ecde406c3735c2bf79f45882bc9b441 | PHP | Narimane-hache/cookbook-php-blog | /config/setting.php | UTF-8 | 4,909 | 2.8125 | 3 | [] | no_license | <?php
$connect = new mysqli('localhost','root','','cookbook') or die (mysqli_error($connect));
$titre="";
$descr="";
$categorie="";
$temp="";
$image="";
$niveau="";
$parts="";
$ingredients="";
$preparation="";
$note="";
$tag="";
$date="";
$id=0;
$update = false;
$users = $connect -> query("SELECT * FROM users ;... | true |
3cfaa9795337c12f04d2c9a01e719b55d0043cee | PHP | woshijunfa/idea | /app/Models/User.php | UTF-8 | 2,351 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Auth\Passwords\CanResetPassword;
use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract;
use Illuminate\Contracts\Auth\CanResetPassword as CanResetPasswordContract;
use Illuminate\... | true |
1d70dac5a97e9c8d2086d05ec1a6f7577a7d02f9 | PHP | totatoto/INFO2_S3_Projet-Sadou | /site/Exemples/fctAux.inc.php | UTF-8 | 1,246 | 2.59375 | 3 | [] | no_license | <?php
function enTete($title="Titre",$css=NULL)
{
echo "<!DOCTYPE html>\n";
echo "<html>\n";
echo "\t<head>\n";
echo "\t\t<title>$title</title>\n";
echo "\t\t<meta charset=\"UTF-8\"/>\n";
if (!empty($css))
echo "\t\t".'<link rel="stylesheet" media="all" type="text/css" href="$css" />';
echo "\t</head... | true |
0dafc2ef35de7bea3b21491f72a35cc78919b9a0 | PHP | adhamu/image-filter | /GDFilters.class.php | UTF-8 | 1,675 | 3.046875 | 3 | [] | no_license | <?php
Class GDFilters {
public $img;
private $img_path;
private $type;
private $extension;
public function __construct($img_path, $type) {
$this->img_path = $img_path;
$this->type = $type;
$tmpEx = strtolower($img_path);
$tmpEx = explode(".", $tmpEx);
$tmpEx = end($tmpEx);
$this->exten... | true |
62e01c42f570100dd2e6d9eda08a059924b5fa6f | PHP | hkq325800/personalPro | /public/php/captcha.class.php | UTF-8 | 1,317 | 2.921875 | 3 | [] | no_license | <?php
session_start();
//产生验证码图片
$image = imageCreateTrueColor(100,30);//创建100*30像素的图片
$bgColor = imagecolorallocate($image,250,250,250); //获取浅灰色的像素值
imagefill($image,0,0,$bgColor);
//绘制验证码
$captchaContent = "";
for($i = 0; $i < 4 ; $i++)
{
$data = "abcdefghijkmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ23456789";
... | true |
32a86464ee0e0a21e18738f0985948d66100fea6 | PHP | TerrePorter/StringBladeCompiler | /tests/View/Blade/BladeIfStatementsTest.php | UTF-8 | 863 | 2.875 | 3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | <?php
namespace Wpb\String_Blade_Compiler\Tests\Blade;
class BladeIfStatementsTest extends AbstractBladeTestCase
{
public function testIfStatementsAreCompiled()
{
$string = '@if (name(foo(bar)))
breeze
@endif';
$expected = '<?php if(name(foo(bar))): ?>
breeze
<?php endif; ?>';
$this->a... | true |