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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
cd16fe53e20960449d02f973b4202e64133cdcce | PHP | Guardian820/OpenUpload | /core/helpers/assetHelper.php | UTF-8 | 598 | 2.53125 | 3 | [] | no_license | <?php
class assetHelper
{
protected $config;
public function __construct() {
$this->config=&Core::$config;
}
public function img($src, $title='')
{
return '<img src="'.$this->config['base_url'].'public/images/'.$src.'" title="'.$title.'" />';
}
public function js($src)
{... | true |
fbe30b2f9445c01196504c29017b24de36ba0a98 | PHP | mlreichardt/WebLibrary | /email.cls.php | UTF-8 | 1,200 | 2.890625 | 3 | [] | no_license | <?php
// VERSION: 1 (21/01/2012)
if(!defined("EMAIL_LAYER"))
{
define("EMAIL_LAYER","email");
class email {
var $from;
var $to;
var $sub;
var $msg;
var $frm;
var $html;
function email($x = "html") {
$this->frm = $x;
}
function subject($x) {
$this->sub = $x;
}
function message($x) {
... | true |
80e9d53f6367206d6451f8897e6b3e2b907dea1e | PHP | Marasca/aion-api | /Domain/Usuario/UsuarioController.php | UTF-8 | 1,764 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Domain\Usuario;
use Domain\Usuario\Requests\LoginRequest;
use Domain\Usuario\Requests\StoreRequest;
use Domain\Usuario\Requests\UpdateRequest;
use Domain\Usuario\UsuarioRepository as Repository;
use Domain\Base\Controllers\AbstractController;
use Domain\Base\Controllers\Traits\DeletesTrait;
use Domain... | true |
1450cae7e8b6addd4d99b56bdc7a588847c83791 | PHP | eusonlito/Laravel-Domain-Scaffolding | /app/Services/Image/Manager/Trim.php | UTF-8 | 415 | 2.578125 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace App\Services\Image\Manager;
class Trim extends ManagerAbstract
{
/**
* @param int $percent
*
* @return self
*/
public function handle(int $percent): self
{
$this->image->trimImage(($percent / 100) * $this->image->getQuantumRange()['quant... | true |
d8f9f4160a3619b365d703c43d8f7b31e5cbd4d8 | PHP | BlockHorizons/BlockGenerator | /src/BlockHorizons/BlockGenerator/biomes/impl/mushroom/MushroomIslandBiome.php | UTF-8 | 703 | 2.6875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace BlockHorizons\BlockGenerator\biomes\impl\mushroom;
use BlockHorizons\BlockGenerator\biomes\type\GrassyBiome;
use pocketmine\block\Block;
use pocketmine\block\VanillaBlocks;
class MushroomIslandBiome extends GrassyBiome
{
public function __construct()
{
parent::__construc... | true |
49896ff7094269a150ac0ea8a7f5add1866255e7 | PHP | Ultime62/Site-Web | /article.php | UTF-8 | 6,107 | 2.875 | 3 | [] | no_license | <?php
session_start();
require_once 'settings/bdd.inc.php';
require_once 'settings/init.inc.php';
require_once('libs/Smarty.class.php');
require_once 'settings/connexion.inc.php';
//condition qui empeche l'acces a la page si la personne n'est pas connecter
if ($acces == false) {
header("Location: index.php?refus... | true |
b3a741c087d87a7ab3ced32128f1d00a2ab571ef | PHP | moashraf/highTouch | /app/Repositories/settingsARRepository.php | UTF-8 | 654 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Models\settingsAR;
use InfyOm\Generator\Common\BaseRepository;
/**
* Class settingsARRepository
* @package App\Repositories
* @version April 12, 2018, 7:46 am UTC
*
* @method settingsAR findWithoutFail($id, $columns = ['*'])
* @method settingsAR find($id, $columns = ['... | true |
65fb06e77ba10df889bbfe6add2635ae1a2269f7 | PHP | ymcatwincities/digital_signage | /modules/openy_digital_signage_screen/src/Entity/OpenYScreenInterface.php | UTF-8 | 1,323 | 2.640625 | 3 | [] | no_license | <?php
namespace Drupal\openy_digital_signage_screen\Entity;
use Drupal\Core\Entity\ContentEntityInterface;
/**
* Provides an interface for defining OpenY Digital Signage Screen entities.
*
* @ingroup openy_digital_signage
*/
interface OpenYScreenInterface extends ContentEntityInterface {
/**
* Gets the Ope... | true |
d143a2d0b29ad0885e5b544b3735a1decb50f750 | PHP | ZhouLiHai/PHPLearning | /php_unit_02/Tests/2_13Test.php | UTF-8 | 394 | 2.671875 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
class StackTest2_13 extends TestCase
{
public function testFailed()
{
$writer = new FileWriter();
$this->assertFalse(@$writer->write('no/such/file', 'some stuff'), false);
}
}
class FileWriter
{
private $file;
public function write($file, $co... | true |
5c2fdc0d0bac5e8c70c1072f854580b5c8d8a9db | PHP | boomcms/boom-core | /src/BoomCMS/Listeners/SetPageInternalName.php | UTF-8 | 741 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace BoomCMS\Listeners;
use BoomCMS\Database\Models\Page;
use BoomCMS\Foundation\Events\PageEvent;
use BoomCMS\Support\Facades\Page as PageFacade;
use BoomCMS\Support\Str;
class SetPageInternalName extends CreatePagePrimaryURL
{
public function handle(PageEvent $event)
{
$page = $event->ge... | true |
1b9ec086784e1cab091c60b1ef51740464b1f231 | PHP | ImSnake/ideas4travel | /Models/program/PrTourType.php | UTF-8 | 1,036 | 2.828125 | 3 | [] | no_license | <?php
namespace app\Models\program;
use app\base\Model;
class PrTourType extends Model
{
public $program_id;
public $type_tour_id;
// Массив полей таблицы.
protected $arrColumnsInTable = [
'program_id',
'type_tour_id',
];
// Название первичного ключа.
protected $primaryK... | true |
cd4b82ddac96c09c3d66ca4a04dac1df577d7dd0 | PHP | leifos-gmbh/ADN | /Services/ADN/ED/classes/class.adnExaminationQuestionGUI.php | UTF-8 | 9,557 | 2.546875 | 3 | [] | no_license | <?php
/* Copyright (c) 2010 Leifos, GPL, see docs/LICENSE */
/**
* ADN examination question GUI class
*
* This is just used as a base class and not called directly
*
* @author Alex Killing <killing@leifos.de>
* @version $Id: class.adnExaminationQuestionGUI.php 28345 2011-04-04 09:53:10Z jluetzen $
*
* @ingroup... | true |
bfb240bcc3d682051a1e3497f21a2be3bbcff1bd | PHP | nikolasnf/Back-End-Test-May | /modules/controllers/Index.php | UTF-8 | 405 | 2.59375 | 3 | [] | no_license | <?php
use HojePromete\Controller;
class Index extends Controller
{
private $_profile;
private $_view;
function __construct()
{
session_start();
if(!isset($_SESSION["login"])){
header("location:/login/");
}
$this->_profile = new ProfileDb();
}
public function indexAction($args)
{
$this->_view = new... | true |
ea2a7072993604c48ad9fb934e7267167125cb35 | PHP | ShaoZeMing/laravel-saas-system | /app/Services/Account/WorkerAccountService.php | UTF-8 | 7,921 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* WorkerAccountService.php
*
* @author gengzhiguo@xiongmaojinfu.com
* $Id: WorkerAccountService.php 2017-06-21 下午2:35 $
*/
namespace App\Services\Account;
use App\Entities\Worker;
use App\Entities\WorkerBill;
use App\Repositories\WorkerAccountRepositoryEloquent;
use Illuminate\Database\Eloquent\Model... | true |
5ef2b40350d53efd2cbc67e870986a27a6271422 | PHP | Mathumitha2561/spark_foundation | /customer.php | UTF-8 | 1,736 | 2.59375 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>View Customers</title>
<link rel="stylesheet" href="/styles/style.css">
<style>
body{
margin: 0;
color: #fff;
background-image: url("images/9-92281_technology-wallpaper-technical-background-images-hd.jpg");
background-position: all;
... | true |
bb2fb6143aab3042434f7b9db12c844c5defa2ee | PHP | wouterj/CoreBundle | /PublishWorkflow/PublishWorkflowInterface.php | UTF-8 | 424 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Symfony\Cmf\Bundle\CoreBundle\PublishWorkflow;
/**
* Interface models can implement if they want to support publish workflow checking
*/
interface PublishWorkflowInterface
{
public function getPublishStartDate();
public function setPublishStartDate(\DateTime $publishDate = null);
publi... | true |
e9ba706d13a13f5f21f7e7ae29b6b07db689d1a6 | PHP | jstewmc/rtf | /src/Token/Control/Word.php | UTF-8 | 2,225 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
namespace Jstewmc\Rtf\Token\Control;
/**
* A control word token
*
* A control word is a specially-formatted command used to perform actions in an
* RTF document such as: insert special characters, change destination, and set
* paragraph- or character-formatting.
*
* A control word takes the following for... | true |
b8f16d7a3fb11f96bc89fdcff543b0ec506cf7ca | PHP | ElhamSadeghian/Training-PHP | /phptraining3.php | UTF-8 | 1,886 | 3.578125 | 4 | [] | no_license | <?php
$a_bool = TRUE; //a boolean
$a_str = 'foo'; //a string
$an_int = 12; //an integer
$foo = True;
echo gettype($a_bool);echo "</br>";
echo gettype($a_str);echo "</br>";
if(is_int($an_int)){
echo $an_int += 4;echo "</br>";
}
if(!is_string($a_bool)){
echo "string: $a_bool";echo "</br>";
}
if($foo == 'show_vers... | true |
0d5ec4b8bf55c69c5631579d94bbfca2537cb893 | PHP | np-patel/payment-gateway | /www/payment-response.php | UTF-8 | 1,496 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
// Start the session
session_start();
//get the config file
require '../config.php';
//obtain the result from the address bar
$result = $_GET['result'];
require 'app/PxPay_Curl.inc.php';
//create an instance of the library
$pxpay = new PxPay_Curl('https://sec.paymentexpress.com/pxpay/pxaccess.aspx', $PxPay_U... | true |
1bcac5cd9b79dfbb65a333bd978d5d6d86bdeaad | PHP | lukanetconsult/php-ssh | /src/Ssh/PublicKeyEntry.php | UTF-8 | 1,442 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Ssh;
use function assert;
use function is_array;
use function is_string;
final class PublicKeyEntry
{
/**
* @param string $algoName
* @param string $data
* @param array<string, string> $attributes
*/
public function __construct(
public rea... | true |
a3945a9de33d05e1b97205d4532824d41ad7a279 | PHP | Asal-GHafari/Exercises | /php.php | UTF-8 | 1,200 | 2.625 | 3 | [] | no_license | <?php
// Create connection
$con=mysqli_connect("localhost","root","","product");
// Check connection
if (mysqli_connect_errno($con))
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$names=$_GET["name"];
$selects=$_GET["select"];
$prices=$_GET["price"];
$descs=$_GET["desc"];
if (isset($_GET['subadd'... | true |
8359e7dbb8105b55ff452f77f89ece88b7e8a018 | PHP | lpj145/express-request | /src/FunctionalClosure.php | UTF-8 | 1,011 | 2.96875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace ExpressRequest;
trait FunctionalClosure
{
protected function matchRun(string $key, array $seeds, string $fun, ...$params): void
{
if (array_key_exists($key, $seeds)) {
$this->{$fun}($seeds[$key], ...$params);
}
}
protected function ... | true |
210858ee9dd1d3b661855a64bcd0007293f14cb7 | PHP | Ojsholly/automated_carpooling_system | /app/Console/Commands/ImportCarModels.php | UTF-8 | 839 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
class ImportCarModels extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'import:carmodels';
/**
* The console c... | true |
d4bb8f663990423aed2fe0c69753d89af9a05433 | PHP | alexsynytskiy/vidkruvai | /app/modules/comment/assets/CommentAsset.php | UTF-8 | 2,171 | 2.59375 | 3 | [] | no_license | <?php
namespace app\modules\comment\assets;
use yii\web\View;
/**
* Class CommentAsset
* @package app\modules\comment\assets
*/
class CommentAsset extends \yii\web\AssetBundle
{
/**
* @var string
*/
protected static $_theme = null;
/**
* @var string
*/
protected static $pathToI... | true |
24e7baf34fdfbe389d207364e0a17dfb19373fd2 | PHP | BWBMaxime/Ecommerce | /src/interfaces/CRUDInterface.php | UTF-8 | 245 | 2.59375 | 3 | [] | no_license | <?
namespace Wails\Core;
interface CRUDInterface
{
public function create(array $args) : object;
public function retrieve(int $id) : object;
public function update(int $id) : bool;
public function delete(int $id) : bool;
} | true |
c229392f857e232d334f31244c10dc885c85ba9a | PHP | FredCave/g_g | /includes/concerts.php | UTF-8 | 7,598 | 2.609375 | 3 | [] | no_license | <?php
$upcoming = array();
$upcoming_years = array();
$previous = array();
$previous_years = array();
$args = array(
"post_type" => "concerts",
"posts-per-page" => -1
);
$concerts_query = new WP_Query( $args );
if ( $concerts_query->have_posts() ) :
while ( $concerts_query->have_posts() ) : $... | true |
c339b14ed567e1df4c6d5ea9676e6374a279055c | PHP | LorenaChulde/portal-yavirac | /server/entidades/CRUD/Noticia.php | UTF-8 | 372 | 2.65625 | 3 | [] | no_license | <?php
class Noticia
{
public $id;
public $descripcion;
public $idFoto;
public $idPagina;
public $esPublico;
function __construct($id,$descripcion,$idFoto,$idPagina,$esPublico){
$this->id = $id;
$this->descripcion = $descripcion;
$this->idFoto = $idFoto;
$this->idPagina = $idPa... | true |
20ba0c15faeda56b8d001cdd4e2be7c6a552ef05 | PHP | brooke1220/easy-baidu | /src/Kernel/Http/Request.php | UTF-8 | 1,609 | 2.6875 | 3 | [] | no_license | <?php
namespace EasyBaidu\Kernel\Http;
use Symfony\Component\HttpFoundation\Request as BaseRequest;
use EasyWeChat\Kernel\Exceptions\BadRequestException;
use EasyWeChat\Kernel\Support\Str;
class Request extends BaseRequest
{
public function get($key, $default = null)
{
$result = parent::get($key, $de... | true |
09c5bd1eedd5d6e0c8adcfe3e0dc201b66cc7882 | PHP | mindcrusher/taggerd | /yii2app/models/Files.php | UTF-8 | 3,121 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "photos".
*
* @property integer $id
* @property string $src
*/
class Files extends \yii\db\ActiveRecord
{
public $file;
/**
* @inheritdoc
*/
public static function tableName()
{
return 'files';
}
... | true |
d5f6b31214b3d8594a50b5366cb1880e11dc0317 | PHP | dersonsena/boilerplate | /src/Shared/Domain/ValueObjects/Email.php | UTF-8 | 701 | 3.09375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Shared\Domain\ValueObjects;
use App\Shared\Domain\Exceptions\InvalidDomainParamException;
use App\Shared\Domain\Exceptions\InvalidEmailException;
use App\Shared\Domain\ValueObjectBase;
final class Email extends ValueObjectBase
{
private string $email;
public fun... | true |
de8b4e49c2a3aaa1879d8d10660d3ab9be80e49c | PHP | Swissgroover/Janek-Wordpress-blog-Post | /views/blog/list.php | UTF-8 | 2,397 | 2.84375 | 3 | [] | no_license | <?php
//default && first = 0,5
//second -> 5,5
//third -> 10,5
//forth -> 15,5
// max posts
// pages count = max post / max on page
// current page
/*
*
*
*/
$start = startQuery($currentPage);
if (isset($search) && strlen($search) > 2) {
$posts = Post::all($start, MAX_ON_PAGE, $search);
} else {
$posts ... | true |
aa4563cbdf79bcdf7a7d3344794647499b85bca8 | PHP | livfahim/ppp | /app/index.php | UTF-8 | 7,886 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
// error_reporting(-1);
// ini_set('display_errors', 1);
ini_set('display_errors', 0);
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
$error = $message = '';
include 'helpers.php';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST["receipt_prin... | true |
2625aaf0ef3aaca04b31c3eab903158e9338e3cb | PHP | CoreDaDev/UHCRun | /src/OguzhanUmutlu/UHCRun/events/BorderChangeEvent.php | UTF-8 | 1,203 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace OguzhanUmutlu\UHCRun\events;
use OguzhanUmutlu\UHCRun\arena\Arena;
use OguzhanUmutlu\UHCRun\UHCRun;
use pocketmine\event\Cancellable;
use pocketmine\event\plugin\PluginEvent;
class BorderChangeEvent extends PluginEvent implements Cancellable {
/*** @var Arena */
private $arena;
... | true |
1342dd98a13b2c1fe4912ef067c46707a81da81d | PHP | Sreemathi04/cse258-iiti-group-8 | /centralLib/templater.php | UTF-8 | 2,639 | 2.609375 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION['myusername']) ){
header("location:index.php");
}
date_default_timezone_set('Asia/Calcutta');
$heading = $_POST['heading'];
$time = date('H:i:s d/m/Y');
$timestamp = date('YmdHis'); // Preparing for y2038bug
$content = $_POST['content'];
$author = $_POST['author'];
... | true |
18c1ac9cc80585845620a1681a25e971759bd99b | PHP | kfeniks/massive | /08/index.php | UTF-8 | 257 | 2.875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Alex
* Date: 04.08.2017
* Time: 16:46
*/
//$status = true;
$status = false;
if ($status) {
echo 'On';
} else {
echo 'Off';
}
//result is off
//analog use ternar operator
echo ($status) ? 'On' : 'Off'; | true |
8136ab399d8a1a373179a369e98e7063a4531ad9 | PHP | dlundgren/phrender | /src/Exception/TemplateNotFound.php | UTF-8 | 397 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @file
* Contains Phrender\Exception\TemplateNotFound
*/
namespace Phrender\Exception;
/**
* Exception for when the template cannot be found
*
* @package Phrender\Exception
*/
class TemplateNotFound
extends \Exception
implements \Interop\Output\Exception\TemplateNotFound
{
public function __cons... | true |
7c8f81f71cd367cfac8a41c9bab4a7bdd18ab2d8 | PHP | enl/jevix | /src/Jevix/Configurator.php | UTF-8 | 1,756 | 2.859375 | 3 | [] | no_license | <?php
/**
* This class is a first step of Jevix refactoring.
* It provides better configuration API for Jevix
*
* @author Alex Panshin <deadyaga@gmail.com>
* @package Jevix
*/
namespace Jevix;
class Configurator
{
/** @var \Jevix\Jevix */
private $jevix;
public function __construct(Jevix $jevix = n... | true |
cb3a564ab00a3f8385fd9bd9c7aa22ba350afbc8 | PHP | googleapis/google-cloud-php | /Core/src/Batch/Retry.php | UTF-8 | 2,593 | 2.578125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Copyright 2017 Google Inc. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by... | true |
a7c7a7b2209b7f1e8cf5dbc6e4819e2d1f70c656 | PHP | zhusaidong/AnonymousChat | /src/AnonymousChat.php | UTF-8 | 3,894 | 2.953125 | 3 | [] | no_license | <?php
/**
* AnonymousChat
*
* @author zhusaidong [zhusaidong@gmail.com]
* @version 0.1.0
* @since 2019/07/24
*/
namespace Zhusaidong\AnonymousChat;
use Workerman\Connection\ConnectionInterface;
class AnonymousChat
{
/**
* @var array $clients
*/
private $clients = [];
/**
* @var SensitiveWord $sensi... | true |
f2dce0340fa43f25196bd0a2825e8f17ae80f477 | PHP | Relewise/relewise-sdk-php | /src/Models/ProductCategoryResultDetailsCategoryResultDetails.php | UTF-8 | 6,945 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Relewise\Models;
use DateTime;
abstract class ProductCategoryResultDetailsCategoryResultDetails
{
public string $typeDefinition = "Relewise.Client.DataTypes.CategoryResultDetails`1[[Relewise.Client.DataTypes.ProductCategoryResultDetails, Relewise.Client, Version=1.96.0.0,... | true |
907949db6fa0c8413a888a1991151e56679ba248 | PHP | hsh2001/toss-php-example | /_api/toss.lib.php | UTF-8 | 1,656 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
define('TOSS_SECRET_KEY', 'test_sk_YPBal2vxj81Bl5OBWNe35RQgOAND');
/**
* POST method로 요청을 날림
*
* @param url:string 요청 url
* @param body:string 요청 body
* @param header:array<string> 요청 header
*
* @return string 응답 문자열
*/
function postRequest($url, $body, $header) {
$curlObject = curl_init($url);
cu... | true |
546e551c6f1c4f3cd0675a4abacb36ba76dd8e04 | PHP | gizmore/gwf4 | /inc/util/GWF_FormsSubmit.php | UTF-8 | 407 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
class GWF_FormsSubmit extends GWF_FormsField
{
public function __construct($name, $label, $value)
{
parent::__construct($name, $label, $value);
}
public function renderInput()
{
return sprintf('<button type="submit" name="%s" class="btn btn-primary" value="%s">%s</button>',
$this->getName(), $this-... | true |
7433b656a9c566ab4953dc4d16ac8b3b835f84a7 | PHP | royercross/votaciones | /votar.php | UTF-8 | 226 | 2.53125 | 3 | [] | no_license | <?php
include_once "FIMAZConfig.php";
include_once "Votos.php";
$votos = new Votos();
if(!$votos->checarVoto(1,2)){
$demo = $votos->sumarVoto($id_votante,$id_votante,$sexo);
print_r($demo);
}else{
echo "No votes";
} | true |
da7dc9aa37ff3f6f11bf42c34a7ab1e358bc6af1 | PHP | kaushikkalariya/my | /controller/teacherController.php | UTF-8 | 12,820 | 2.53125 | 3 | [] | no_license | <?php
namespace controller;
use PDO;
class TeacherController
{
public $con;
public function __construct($con) {
$this->con=$con;
}
public function teacherDetails($id)
{
$queryTeacher=
$this->con->
prepare(" select
teacher... | true |
d58017707ceea9507d6226cf53aadb9b51e909f7 | PHP | ivorobioff/single-form | /src/Api/Controllers/FormsController.php | UTF-8 | 857 | 2.796875 | 3 | [] | no_license | <?php
namespace ImmediateSolutions\Api\Controllers;
use ImmediateSolutions\Core\Entities\Form;
use ImmediateSolutions\Core\Objects\Archive;
use ImmediateSolutions\Core\Payloads\FormPayload;
use ImmediateSolutions\Core\Services\FormService;
/**
* @author Igor Vorobiov<igor.vorobioff@gmail.com>
*/
class FormsControlle... | true |
ecdcd47a4e4cb88fac8da99941d53c3f11e79f89 | PHP | KirillAvramov/EnglishProj | /console/migrations/m181107_160228_create_junction_table_for_text_and_sentence_tables.php | UTF-8 | 2,225 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Handles the creation of table `text_has_sentence`.
* Has foreign keys to the tables:
*
* - `text`
* - `sentence`
*/
class m181107_160228_create_junction_table_for_text_and_sentence_tables extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
... | true |
aadcb5bbffe0d9b71761ba6c4176b5705f5a5721 | PHP | thekid/xp-experiments | /arena/aop/util/invoke/aop/JoinPoint.class.php | WINDOWS-1252 | 1,196 | 3.375 | 3 | [] | no_license | <?php
/* This class is part of the XP framework
*
* $Id$
*/
/**
* Describes a joinpoint
*
* @purpose AOP
*/
class JoinPoint extends Object {
public
$instance= NULL,
$method = '',
$args = array();
/**
* Constructor
*
* @param lang.Generic instance
... | true |
035557fdfa097e963ef6570668109d663eea0599 | PHP | lqqllt/xinxintong | /models/app/merchant/product.php | UTF-8 | 4,538 | 2.546875 | 3 | [] | no_license | <?php
namespace app\merchant;
/**
* 商品
*/
class product_model extends \TMS_MODEL {
/**
* @param int $id
*/
public function &byId($id, $options = array()) {
$cascaded = isset($options['cascaded']) ? $options['cascaded'] : 'N';
$fields = isset($options['fields']) ? $options['fields'] : '*';
$catelog = isset... | true |
581d0f4d15b7904dbd35926d77102e07320d030b | PHP | Theol1999/Php-Partie1-Exo2 | /index.php | UTF-8 | 128 | 2.515625 | 3 | [] | no_license | <?php
$lastname = 'Levert';
$firstname = 'theo';
$age = 19;
echo "le visiteur s'appelle $lastname $firstname il a $age ans";
?>
| true |
5a28a649e334f080119bac0168384b877be8d81c | PHP | fuqiaoxin/douyu-danmu | /domain/Message.php | UTF-8 | 2,059 | 3.1875 | 3 | [] | no_license | <?php
/**
* Socket消息类
* @author LincolnZhou<875199116@qq.com> 2016-03-10
*/
class Message
{
/**
* 正文包含五个部分:
* 1. 数据长度,大小为后四部分的字节长度,占4个字节
* 2. 内容和第一部分一样,4字节
* 3. 斗鱼固定的请求码,本地->服务器是 0xb1,0x02,0x00,0x00,服务器->本地是0xb2,0x02,0x00,0x00,4字节消息内容
* 4. 尾部一个空字节 0x00
*/
private $msg_length;
... | true |
335dce01d7e37e28b47c15f6aebd4c4ce5e19a5d | PHP | ITPini/Mini-Dropbox | /auth.php | UTF-8 | 1,449 | 3.015625 | 3 | [] | no_license | <?php
session_start();
// SQL credentials
$SQL_USER = 'root';
$SQL_PASS = '';
$SQL_HOST = 'localhost';
$SQL_NAME = 'users';
// Try connecting to SQL server
$con = mysqli_connect($SQL_HOST, $SQL_USER, $SQL_PASS, $SQL_NAME);
if (mysqli_connect_error()) {
// Stop on fail
exit('Failed to connect to SQL server: ' . mysql... | true |
3eebd0d3c0a39c0f2be842e3e69bfad6b81ea0ee | PHP | xu-li/flow | /src/ProcessRegistry.php | UTF-8 | 1,468 | 3.203125 | 3 | [
"MIT"
] | permissive | <?php
namespace Xu\Flow;
/**
* Process registry class
*/
class ProcessRegistry
{
/**
* @var array
*/
private $processes = [];
/**
* Add a process to this registry
*
* @param \Xu\Flow\ProcessInterface|\Xu\Flow\ProcessInterface[] $process
* @param int $priority
*
*... | true |
f1e3a55e746c17029c6160f61cb10fcd705f78a2 | PHP | MrMace/MediaPlayer | /includes/handlers/ajax/updateEmail.php | UTF-8 | 902 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Matt
* Date: 3/9/2018
* Time: 11:16 AM
*/?>
<?php include("../../config.php"); ?>
<?php
if(!isset($_POST['username'])){
echo "Could Not Set Username";
exit();
}
if(isset($_POST['email']) && $_POST['email'] != ""){
$username = $_POST['username'];
$email =... | true |
32089bec2b4c401793e1089db143136425e1aa97 | PHP | Rati1324/php2021 | /example-app/app/Models/Attendance.php | UTF-8 | 550 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property int $class_id
* @property int $lecturer_id
* @property int $group_id
* @property boolean $day
* @property string $time
* @property int $room_id
*/
class Attendance extends Model
{
/**
* The table ... | true |
8eb8a37ab106edc1bca7578d7941b48292747f4c | PHP | rodrigopssilva/symfonyRestApi | /jobs/src/AppBundle/Builder/Zipcode.php | UTF-8 | 831 | 2.828125 | 3 | [] | no_license | <?php
namespace AppBundle\Builder;
use AppBundle\Entity\EntityInterface;
use AppBundle\Entity\Zipcode as ZipcodeEntity;
/**
* Class Zipcode
*
* @category Builder
* @package AppBundle\Builder
* @author Rodrigo Silva <rodrigo.pssilva@gmail.com>
* @license proprietary https://github.com/
* @link https://... | true |
937eb003af99af5b05eadb0df4609aab7c616189 | PHP | BuildForSDG/Team-057-Back-End | /modules/Vemail.php | UTF-8 | 1,374 | 2.953125 | 3 | [] | no_license | <?php
class Vemail {
public $title;
public $message;
public $sender;
public $recievers;
public function __construct() {
$this->cURL = new CURL();
}
public function send() {
$sender = $this->sender['Email'] . ":" . $this->send... | true |
f07aad836a435391d11eddf79520c937cfcbfe7a | PHP | audriga/openxport-jmap | /src/Jmap/Calendars/JSCalendarDataType.php | UTF-8 | 533 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace OpenXPort\Jmap\Calendar;
class JSCalendarDataType
{
/**
* Used by fromJson() to parse an array of JSON RecurrenceRule objects, as they are stored in a
* recurrenceRule[] array in the JSCalendar format.
*/
protected static function fromJsonArray(array $json)
{
$jsonEn... | true |
15b609313f75bff9cea7e156608db73b3852949b | PHP | CTA-K12/RuleBundle | /Services/DefinitionManagerLoaderFactory.php | UTF-8 | 3,491 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Mesd\RuleBundle\Services;
use Mesd\RuleBundle\Model\Definition\DefinitionManagerDoctrineLoader;
use Mesd\RuleBundle\Model\Definition\DefinitionManagerFileLoader;
use Mesd\RuleBundle\Model\Definition\DefinitionManagerLoaderInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
class ... | true |
9b4738a79692133bf9b898d67d77729fbfd658dd | PHP | zlatkom1991/partizan-news.in.rs | /admin/login.php | UTF-8 | 2,185 | 2.578125 | 3 | [] | no_license | <?php include('includes/init.php');
if($session->isSignedIn()) {
redirect('index.php');
}
if(isset($_POST['submit'])) {
$username = trim($_POST['username']);
$password = trim($_POST['password']);
$user_found = User::verifyUser($username, $password);
if($user_found) {
$session->login($us... | true |
95fe269e188774b7dcdb3905b34bdb59adae8a9a | PHP | KrzysztofRoskowski/NBA_1998 | /index.php | UTF-8 | 666 | 3.015625 | 3 | [] | no_license | <html>
<head>
<title>NBA</title>
</head>
<body>
<h1>NBA</h1>
<br/>
<br/>
<?php
include('PlayerStatistics\ChicagoBulls.php');
include('GameMechanics\OnePlayerMoves\Throws.php');
use PlayerStatistics\ChicagoBulls;
use GameMechanics\OnePlayerMoves\Throws;
$throws = new Throws();
$player1 = ChicagoBulls::MICHAEL_JO... | true |
d0b6660c33108c7b741d89d50195d390db28dca8 | PHP | drmarduk/mvd_legacy | /class/delete.php | UTF-8 | 884 | 2.796875 | 3 | [] | no_license | <?php
class delete {
public function __construct() {
}
/*
* Was muss geloescht werden?
* noten ...
* files ... mit noten_id
* pdfs loeschen
*/
public function delete($id) {
// pdf's loeschen
$stimmenliste = db_function::getStimmen();
foreach ... | true |
895ed84424f09701309a08d0f46973dc13aa0a21 | PHP | Vvn23/lendinvest-test.bundle | /src/Loan.php | UTF-8 | 1,295 | 3.203125 | 3 | [] | no_license | <?php
class Loan
{
public $start_date;
public $end_date;
public $id;
public $tranches=array();
public function __construct($startdate, $enddate)
{
$this->start_date=$startdate;
$this->end_date=$enddate;
$this->id='12345';
}
public function getLoanId()
{
... | true |
9db1b79c38c4000f782e69f2ec8ddb8bc9bc9c83 | PHP | lylf2000/mixphp | /mixphp/mix1/base/Model.php | UTF-8 | 4,565 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Model类
* @author 刘健 <coder.liu@qq.com>
*/
namespace mix\base;
class Model extends Object
{
// 全部属性
public $attributes;
// 错误
public $errors;
// 当前场景
private $_scenario;
// 验证器类路径
private $_validators = [
'integer' => '\mix\validator\IntegerValidator',
... | true |
53677c194433286e8ef62a3464f64421bb1ec19c | PHP | Parul1239/Glitzz-Events-Event-Booking-And-Mangement-Website | /loginpg.php | WINDOWS-1252 | 8,625 | 2.84375 | 3 | [] | no_license | <?php
session_start();
include("db.php");
// initializing variables
$username = "";
$email = "";
$errors = array();
// connect to the database
// REGISTER USER
if (isset($_POST['reg_user'])) {
// receive all input values from the form
$username = mysqli_real_escape_string($con, $_POST['user... | true |
9edf94bf80e5e3e528879cb67643fdab0a34769b | PHP | inuvalogic/akane | /Apps/Core/Router.php | UTF-8 | 1,843 | 2.59375 | 3 | [] | no_license | <?php
namespace Apps\Core;
class Router {
public static $current;
public static function init(){
include __CONFIG_DIR__.'routes.php';
if (isset($routes) && is_array($routes))
{
$uri = str_replace(__SITEPATH__,'',$_SERVER['REQUEST_URI']);
$uri = trim($uri,'... | true |
e09de4bd6535d0e2cef988b803dd0f2f2bfd850b | PHP | CodingWorker/enhancingProgram | /PHP/codes/yuyan_cankao/052.php | UTF-8 | 213 | 2.765625 | 3 | [] | no_license | <?php
class A{
public static function who(){
echo "A\n";
}
}
class B extends A{
public static function who(){
echo "B\n";
}
}
call_user_func(['B','parent::who']); //输出 A
| true |
857484dbe527e5da81fa4435a7a432914b21fd1b | PHP | remergeit/ComplexNumber | /src/ComplexNumber.php | UTF-8 | 8,522 | 3.25 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Remergeit\Math;
/**
* Class for calculating complex numbers
*
* @method ComplexNumber add(ComplexNumber $complexNumber)
* @method ComplexNumber subtract(ComplexNumber $complexNumber)
* @method ComplexNumber multiply(ComplexNumber $complexNumber)
* @method ComplexNumber ... | true |
8417114d0343a7b8c2aef8ec16d9d8779c70e753 | PHP | monicalaud/phpalused | /praks3/ylesanded.php | WINDOWS-1252 | 725 | 3.453125 | 3 | [] | no_license | <?php
//ylessanded.php
//genereerime vanuse vrtuse
$age = rand (0, 120); //vrtused vahemikus 0-120
echo 'oled ' .$age.' aastat vana <br/>';
if ($age >0 and $age <=10) {
echo'oled nooruk<br/>';
}
else if ($age > 18 and $age <= 120){
echo 'oled seenior<br/>';
}
$age = 10;
switch ($age){
case 5;
ec... | true |
d43855357889374caa833b56a68a05752825baba | PHP | yacza/tiendaweb2 | /backend/controladores/ValidaIngreso.php | UTF-8 | 999 | 2.671875 | 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">
<title>Iniciar Sesión</title>
<?php
$server="localhost";
$usr="root";
$pass="";
$db="supercito";
... | true |
4cd3cc3aaaab4f79d4ec1948dace4e12bc560c64 | PHP | dms97/BristolWebProject | /controller/ControllerUser.php | UTF-8 | 11,502 | 2.859375 | 3 | [] | no_license | <?php
require_once File::build_path(array('model', 'ModelUser.php'));
require_once File::build_path(array('lib', 'Security.php'));
class ControllerUser {
protected static $object = 'User';
public static function readAll() {
Model::isConnected();
$objet = ModelUser::getUserByLogin($_SESSION... | true |
eec67dcc0e2702a56819b1edccb0d8a2b950d987 | PHP | pe4444enko/saleBoard | /htdocs/controllers/userController.php | UTF-8 | 2,070 | 2.765625 | 3 | [] | no_license | <?php
require_once("core/baseController.php");
require_once("models/registrateModel.php");
require_once("models/loginModel.php");
class userController extends Controller
{
public function indexAction()
{
$this->renderView("views/home/index.php");
}
public function createAction()
{
... | true |
9a000487d507f92ae7a6d3eab842b3946db11fbe | PHP | MaherSaleem/laravel-counters | /src/Commands/MakeCounter.php | UTF-8 | 1,225 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace Maher\Counters\Commands;
use Illuminate\Console\Command;
use Maher\Counters\Models\Counter;
class MakeCounter extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'make:counter {key} {name} {initial_value=0} {step... | true |
eec9dcd79ee78f7c10a34c7ddce31ad1df982cc1 | PHP | jimdoescode/alert.codemana.com | /server/src/Alerts/Controllers/Login.php | UTF-8 | 2,256 | 2.671875 | 3 | [] | no_license | <?php namespace Alerts\Controllers;
use \Symfony\Component\HttpFoundation;
use \Alerts\Services;
use \Alerts\Repositories\Interfaces;
class Login
{
/**
* @var \OAuth2\ResponseType\AccessToken
*/
private $tokenGenerator;
/**
* @var Interfaces\Users
*/
private $userRepo;
/**
... | true |
0b331c699843d1d17cfa1506daf892a05b4264db | PHP | RusskikhMaksim/compiler | /src/astClasses/AstClass.php | UTF-8 | 432 | 3.53125 | 4 | [] | no_license | <?php
declare(strict_types=1);
class AstClass
{
public object $childNode;
public string $typeOfNode = "";
public int $nestingLevel;
public function __construct($currentNestingLevel) {
$this->nestingLevel = $currentNestingLevel;
$this->typeOfNode = "Abstract Syntax Tree";
}
pub... | true |
8008685595a32f19dd9b684cd7b05f087d317d62 | PHP | bzozoo/UserSystem | /src/Controllers/Score/getScoreByName.php | UTF-8 | 1,282 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace UserSystem\Controllers\Score;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Views\PhpRenderer;
use \UserSystem\Components\Score;
class getScoreByName {
public function get(Request $request, Response $response, $args) {
... | true |
601da364d6620de8206bc9fae768689e03e3f700 | PHP | tientaitu/Aptech-php-16-TranDaiTien | /PHP/2018-10-29/get-users.php | UTF-8 | 800 | 2.921875 | 3 | [] | no_license | <?php
$servername = 'localhost';
$username = 'root';
$password = '';
$dbname = 'aptech_php_16';
$connect = mysqli_connect($servername, $username, $password, $dbname);
if (!$connect) {
die('connect failed' . mysqli_connect_error());
}
$sql = "SELECT id, email, password FROM users";
$result = mysqli_query($connect, ... | true |
9171021193dfb329a6bbbd43aa4447e3e95ad342 | PHP | Trion3000/arrays_loops_tasks | /19.php | UTF-8 | 629 | 3.71875 | 4 | [] | no_license | <b> 19. Составьте массив дней недели. С помощью цикла foreach выведите все дни недели,
а текущий день выведите курсивом. Текущий день должен храниться в переменной $day. </b>
</br> </br> </br>
<?php
$day = 5;
$arr = [ 1 => 'Mon', 2 => 'Tue', 3 => 'Wed', 4 => 'Thu', 5 => 'Fri', 6 => 'Sat', 7 => 'Sun'];
foreach ( $... | true |
ee91e9fec7e067717d9c795923a57eacdf56ccd9 | PHP | Clarkcj12/bitcoin-faucet-rotator | /app/Helpers/Validators/FaucetValidator.php | UTF-8 | 2,295 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php namespace Helpers\Validators;
use App\Faucet;
use Illuminate\Validation\Validator;
/**
* Class FaucetValidator
*
* This class is used to validate faucet
* entries and updates.
*
* @author Rob Attfield <emailme@robertattfield.com> <http://www.robertattfield.com>
* @package Helpers\Validators
*/
class Fau... | true |
091584d60dad31702e9c430f67594e666176ca1a | PHP | raditya743/MagicCratess | /src/Hebbinkpro/MagicCrates/forms/CrateForm.php | UTF-8 | 4,945 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Hebbinkpro\MagicCrates\forms;
use Hebbinkpro\MagicCrates\Main;
use pocketmine\event\Event;
use jojoe77777\FormAPI\ModalForm;
use jojoe77777\FormAPI\CustomForm;
use pocketmine\Player;
class CrateForm
{
private $main;
private $config;
private $crates;
private $types = [];
... | true |
1be246c723880b8b338054e5b9136505bfb26282 | PHP | panwenbin/yii2-blog | /backend/models/Post.php | UTF-8 | 629 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @author Pan Wenbin <panwenbin@gmail.com>
*/
namespace backend\models;
class Post extends \common\models\Post
{
public $makeOldAsArchive;
public function rules()
{
return array_merge(parent::rules(), [
[['makeOldAsArchive'], 'safe'],
]);
}
public functio... | true |
eae82e190875591b8dbcedd31b07d2e7d5e99f7b | PHP | angrybrad/craftnet | /src/controllers/api/v1/DeveloperController.php | UTF-8 | 1,171 | 2.5625 | 3 | [] | no_license | <?php
namespace craftnet\controllers\api\v1;
use craft\elements\User;
use craftnet\controllers\api\BaseApiController;
use yii\web\Response;
/**
* Class DeveloperController
*/
class DeveloperController extends BaseApiController
{
// Public Methods
// =========================================================... | true |
f3ed025394dcf9821a43d431cba3b9654bf437a6 | PHP | DanielMediote/atServicos | /portal/classes/Sessao.class.php | UTF-8 | 703 | 2.84375 | 3 | [] | no_license | <?php
/**
*
*/
final class Sessao{
public static function open(){
session_start();
}
public static function setSessionData($dados){
$_SESSION['status'] = True;
foreach ($dados as $key => $value) {
$_SESSION[$key] = $value;
}
}
public static function unsetSessionDate(){
$_SESSI... | true |
0444210de596c261b0a489b9786a0e9d80d58483 | PHP | ashifulislam/User-Resume | /educationEdit.php | UTF-8 | 4,287 | 2.671875 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION['email'])){
header('location:logInForm.html');
}
?>
<?php
include('include/header.php');
include('include/slideBar.php');
?>
<?php
// including the database connection file
$con=mysqli_connect('localhost','root','');
mysqli_select_db($con,'persona... | true |
937781293310050c48e9d4583badb637adc5d422 | PHP | gdmec07140552/tp5Blog | /application/admin/model/Article.php | UTF-8 | 2,504 | 2.671875 | 3 | [
"Apache-2.0",
"PHP-3.0"
] | permissive | <?php
namespace app\admin\model;
use think\Db;
/**
* 分类管理
*/
class Article extends Base
{
protected $table = 'article';
function __construct()
{
parent::__construct();
$this->table = $this->table;
}
/**
* [getDetail 获取单条文章信息]
* @param [type] $where [查询条件]
* @return [type] [description]
*/
... | true |
41e43a45efe0ac3ed76a3a50c6c3183044b21c8d | PHP | RabiulIslam/UP-CMS | /Production/html/extract_data/includes/conn.php | UTF-8 | 4,033 | 2.6875 | 3 | [] | no_license | <?php
function connect_db(){
static $conn;
if(empty($conn)){
$conn = mysqli_connect("updater.cvbaznhpajws.eu-central-1.rds.amazonaws.com", "up_qatar2018", "up!2018&bymayar?h", "up_qatar");
if(mysqli_connect_errno()){
die("Error connecting MySQL: ".mysqli_conne... | true |
5e94143048b4567945ee669da55a05812b6dfab6 | PHP | dudsz/WebService | /getLists.php | UTF-8 | 982 | 2.515625 | 3 | [] | no_license | <?php
require_once 'wishFunctions.php';
$db = new Testing();
$jResponse = array("success" => 0);
if (isset($_POST['un']) && !empty($_POST['un'])) {
// Set values from post params
$username = $_POST['un'];
// User whose list we are getting
$wLists = $db->getLists($username);
if ($wLists) {
$jResponse["success"]... | true |
52a5666e9dd3ba3f6108d822bb72e551993253fb | PHP | anakin14/HourLogger | /view_hours.php | UTF-8 | 1,830 | 2.859375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Anakin Kinsey
* Date: 2/25/2019
* Time: 6:26 PM
*/
session_start();
if(!isset($_SESSION["id"])){
header("location: home.php");
exit;
}
?>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>View Hours</title>
<link rel="stylesheet" href="style.css"/>... | true |
98f9398cde498442a25b84eb3dbe420555415bd3 | PHP | LeisureLarry/moreglue | /lib/MoreGlue/Framework/MVC/Views/View.php | UTF-8 | 1,161 | 2.671875 | 3 | [] | no_license | <?php
namespace MoreGlue\Framework\MVC\Views;
class View
{
protected $_view = array(0 => null, 1 => null, 2 => null);
public function __construct($matches)
{
$namespacedControllerName = $matches->get('controller');
$bundle = preg_replace('/Bundles(.*)Controllers/', '$1', stri... | true |
07dbb1337dd9563eb45d0814979de40be6f6d1ec | PHP | ken678/yzncms | /vendor/endroid/qr-code/tests/QrCodeTest.php | UTF-8 | 3,621 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | <?php
/*
* (c) Jeroen van den Enden <info@endroid.nl>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Endroid\QrCode\Tests;
use Endroid\QrCode\Factory\QrCodeFactory;
use Endroid\QrCode\QrCode;
use PHPUnit\Framework\TestCase;
class QrC... | true |
b05ee8752121d33e064af2bc2f601ce2b88c4db5 | PHP | viniciusnw/angular-wp-rest | /wp/content/plugins/posts-delta-pack/classes/Taxonomy.php | UTF-8 | 2,885 | 2.578125 | 3 | [] | no_license | <?php
require_once 'Settings.php';
require_once 'Taxonomy_Factory.php';
class Taxonomy {
public $post_types_tax_settings;
public function __construct() { }
/**
*
* Registra o post_type que cadastra taxonomias
*
*/
public function initial_taxonomy() {
$labels = array(
'name' ... | true |
b579c1ae13ea9b086170f3ea4672090acf83d5ab | PHP | Vantuyen3398/HOME-1 | /php/b1.php | UTF-8 | 1,397 | 3.140625 | 3 | [] | no_license | <?php include 'constan.php';?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>B1</title>
<link rel="stylesheet" href="">
</head>
<body>
<?php
$count_b = CountWoker(12);
echo "Bai 1: Tong so cong nhan cua B = ". $count_b .".";
echo "<br>";
e... | true |
533a559f4bd170836a09fc5b0a079641eed30b63 | PHP | Desch/EmuDevstore | /community/wcf/lib/acp/action/PageMenuItemRenameAction.class.php | UTF-8 | 2,062 | 2.578125 | 3 | [] | no_license | <?php
// wcf imports
require_once(WCF_DIR.'lib/action/AbstractAction.class.php');
require_once(WCF_DIR.'lib/data/page/menu/PageMenuItemEditor.class.php');
/**
* Renames a page menu item.
*
* @author Arian Glander
* @copyright 2001-2009 WoltLab GmbH
* @license WoltLab Burning Board License <http://www.wolt... | true |
549d3669adac92401584e646989650190c96135a | PHP | jmoyaitc/itculiacan_93_tic1023 | /TareasDemo/comentartarea.php | UTF-8 | 1,084 | 2.6875 | 3 | [] | no_license | <?php
// Nada de codigo aun. solo el html.
require_once("tareas.repo.php");
$id = $_GET['id'];
$tarea = LeerTarea($id);
// Normalente estos datos puden salir directamente de LeerTarea, pero para simplificar utilizaremos una funcion aparte.
$comentarios = LeerComentarios($id);
?><DOCTYPE html>
<html>
... | true |
224249db6476ae15e0b214ac2304c8969189b759 | PHP | IradukundaYves/expo | /admin/update/update_product.php | UTF-8 | 1,460 | 2.65625 | 3 | [] | no_license | <?php
include("../DataBaseConnection.php");
if (isset($_POST['updateProduct'])) {
//set parameters
$p_name =$_POST['product_name'];
$p_desc = $_POST['product_description'];
$picture = $_FILES['product_image']['name'];
$c_name = $_POST['company_name'];
$p_img = "../../p_img/".basename($_FILES[... | true |
3e64008bd91ea3e288c9712f466b4f0ef909d3d4 | PHP | antodippo/mappics | /tests/Infrastructure/Service/NetteFileFinderTest.php | UTF-8 | 1,600 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Tests\Infrastructure\Service;
use App\Application\Service\FileFinder;
use App\Infrastructure\Service\NetteFileFinder;
use PHPUnit\Framework\TestCase;
class NetteFileFinderTest extends TestCase
{
/** @var FileFinder */
private $fileFinder;
public function setUp(): void
{
$... | true |
eec41177d13262dfb3b6cb7dd750602fa25a138a | PHP | bingo-soft/jabe | /src/Impl/Persistence/Entity/ExecutionObserverInterface.php | UTF-8 | 321 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Jabe\Impl\Persistence\Entity;
interface ExecutionObserverInterface
{
/**
* Callback which is called in the clearExecution method of the ExecutionEntity.
*
* @param execution the execution which is been observed
*/
public function onClear(ExecutionEntity $execution): void;
}... | true |
75239a7de3ce7ce15836608339d1345ec44caefb | PHP | kaktusmov/task_manager | /init_db.php | UTF-8 | 2,511 | 2.859375 | 3 | [] | no_license | <?php
require_once ('db.php');
class init_db extends \app\db
{
public function __construct()
{
$link = mysqli_connect($this->host, $this->user, $this->password);
if ($link == false){
print("Ошибка: Невозможно подключиться к MySQL " . mysqli_connect_error());
}
else ... | true |
576145cb23eeec2628f5b8cdb25783fe920dd9cc | PHP | al-one/hexonet-api | /src/Response.php | UTF-8 | 2,937 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Alone\Hexonet;
use Psr\Http\Message\ResponseInterface;
class Response
{
protected $response;
public function __construct(ResponseInterface $response)
{
$this->response = $response;
}
public function getHash()
{
$res = $this->getIni() ?: [];
return $r... | true |
c906b831aef942dece59763584de7aebc6197bd3 | PHP | HappyDays-jQuery/GoF | /tests/Visitor/VisitorTest.php | UTF-8 | 1,640 | 2.671875 | 3 | [] | no_license | <?php
namespace GoF\Visitor;
use GoF\CommonTestCase;
class VisitorTest extends CommonTestCase
{
protected function setUp()
{
parent::setUp();
}
protected function tearDown()
{
parent::tearDown();
}
public function testVisitor()
{
$rootDir = new Directory("roo... | true |
dee2a5aa3bac39656fc592095222b55c04e8c471 | PHP | vasllly219/Test3 | /delete.php | UTF-8 | 1,512 | 2.65625 | 3 | [] | no_license | <?php
require_once 'function.php';
if (!hasRole('admin')) {
http_response_code(403);
die('Доступ запрещен');
}
$list = getData();
if (count($list) === 0){
echo '<h1>Тесты не найдены</h1>';
die;
}
$errors = [];
$inputData = getInputValuesDel([]);
if(isPOST()) {
$inputData = getInput... | true |