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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e93843028f73e2ee7687f427591b933096c67ea4 | PHP | mengtry-coder/2bc_bms | /backend/models/ProjectTimesheetTag.php | UTF-8 | 836 | 2.5625 | 3 | [] | permissive | <?php
namespace backend\models;
use Yii;
/**
* This is the model class for table "project_timesheet_tag".
*
* @property int $id
* @property int $id_project_timesheet
* @property string $id_tag
*/
class ProjectTimesheetTag extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static fun... | true |
4a143b28cf43d58e765a9c47f0e344ae7443718e | PHP | FilipenkoDanil/shop | /app/Services/CurrencyRates.php | UTF-8 | 933 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use GuzzleHttp\Client;
class CurrencyRates
{
public static function getRates()
{
$url = 'https://api.privatbank.ua/p24api/pubinfo?json&exchange&coursid=5';
$client = new Client();
$response = $client->request('GET', $url);
if ($response->getS... | true |
2c82beca7415bafb54c38b9032f2be5368a1042d | PHP | suinua/game_chef | /src/game_chef/pmmp/form/team_game_map_forms/TeamGameMapListForm.php | UTF-8 | 1,162 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace game_chef\pmmp\form\team_game_map_forms;
use form_builder\models\simple_form_elements\SimpleFormButton;
use form_builder\models\SimpleForm;
use game_chef\repository\TeamGameMapDataRepository;
use pocketmine\Player;
class TeamGameMapListForm extends SimpleForm
{
public function __construct() {
... | true |
edceb241cee451ae505aa70c149880e6d530873d | PHP | JesusDPH20/ss-UNAM-CERT | /ss-unam-cert-noticert/descargaNoticias.php | UTF-8 | 490 | 2.5625 | 3 | [] | no_license | <?php
session_start();
$noticias = $_POST['dom'];
//die();
//CREACIÓN DEL ARCHIVO HTML - FUNCIONA
$myfile = fopen("news_".date('Y_m_d-h_i_s_a').".html", "w+");
$html = "<h1>Estas son las noticias</h1><br>";
fwrite($myfile, $html);
fclose($myfile);
file_put_contents('news_'.date('Y_m_d-h_i_s_a').'.... | true |
5d6060e1d0e9f5d0c8c019e636bd2953e7162e8f | PHP | SuRaMoN/e-to-e | /src/EToE/Exception/ErrorException.php | UTF-8 | 297 | 2.6875 | 3 | [] | no_license | <?php
namespace EToE\Exception;
use EToE\Error;
class ErrorException extends \ErrorException
{
public function __construct(Error $error)
{
parent::__construct($error->getErrorMessage(), 0, $error->getErrorNumber(),
$error->getOriginatingFile(), $error->getOriginatingFileLine());
}
}
| true |
538e05fb5051ba777171825aef8fe0f4a8e3fdef | PHP | koandamb01/eopProject | /mentors.php | UTF-8 | 5,447 | 2.6875 | 3 | [] | no_license | <?php
session_start();
// Check if user is logged in using the session variable
if ( $_SESSION['logged_in'] != 1 ) {
$_SESSION['message'] = "You must log in before viewing registration page!";
header("location: error.php");
}
$active = $_SESSION['active'];
$firstname = $_SESSION['firstname'];
if(!... | true |
129519da2ad42eef4ae80ad8d6c7eb9acfff9b27 | PHP | escalantejulian18/PHPMySQL | /Práctico 6/tp6/admin/borrar.php | ISO-8859-1 | 1,957 | 2.671875 | 3 | [] | no_license | <?php
// Incluimos la clase de singleton
require_once $_SERVER['DOCUMENT_ROOT'] . '/tp6/includes/php/Singleton/Sesion.php';
//generamos el id de session
if (!isset($_SESSION['initiated'])){
session_regenerate_id();
$_SESSION['initiated'] = true;
}
// Incluimos la clase de singleton
require_once $_SE... | true |
50c06214d28f266c7e581bbf222f1ad6aa3ce281 | PHP | iNtergrated/l5-fixtures | /src/Mayconbordin/L5Fixtures/Loaders/CsvLoader.php | UTF-8 | 637 | 2.75 | 3 | [] | no_license | <?php namespace Mayconbordin\L5Fixtures\Loaders;
use League\Csv\Reader;
class CsvLoader extends AbstractLoader
{
public function load($path)
{
$data = $this->metadata->getFilesystem()->read($path);
return $this->getReader($data)->fetchAssoc();
}
/**
* @param string $data
* @... | true |
240d29cf039e4a7a08d0a390e23a2fa89653262a | PHP | piyushchauhan2011/pux-routing-example | /index.php | UTF-8 | 4,817 | 2.90625 | 3 | [] | no_license | <?php
require 'vendor/autoload.php'; // use PCRE patterns you need Pux\PatternCompiler class.
use Pux\Executor;
// Get the database connection and return the reference for use
function getConnection() {
$dbhost = "localhost";
$dbuser = "root";
$dbpass = "diehard4";
$dbname = "pux_test";
$dbh = new PDO("mysq... | true |
c5f5db4c574ccfa246bf876a9d1fbf2d93ef4970 | PHP | Alex223/Estadistica-Finanza | /Finanza/Controlador/Coberturas/ValidaRegistros.php | UTF-8 | 1,075 | 2.671875 | 3 | [] | no_license | <?php
include_once '../../Modelo/Conexion.php';
$conexión = new Conexion();
$conexión->conectar();
if (!$conexión) {
echo "No pudo conectarse a la BD: " . mysql_error();
exit;
}
if (!mysql_select_db($conexión->base())) {
echo "No ha sido posible seleccionar la BD: " . mysql_error();
exit;
}
$c... | true |
b83c08e33aec0450e0a93032b7a90ae257a4c7d6 | PHP | jiacheng-0/IS113-Dump | /is113/LT2-2019-Prep/IS113_TrialLT1_SetA_2018 James/q3flip.php | UTF-8 | 3,070 | 3.125 | 3 | [] | no_license | <?php
// this will autoload the class that we need in our code
spl_autoload_register(function ($class) {
// we are assuming that it is in the same directory as common.php
// otherwise we have to do
// $path = 'path/to/' . $class . ".php"
$path = $class . ".php";
require $path;
});
?>
<html>
<... | true |
5f69e64ea14075605eb8256b60affe742cd17854 | PHP | zeineb2000/projetweb | /modifierregistree.php | UTF-8 | 1,681 | 2.515625 | 3 | [
"MIT",
"CC-BY-3.0",
"CC-BY-4.0"
] | permissive | <HTML>
<head>
</head>
<body>
<?PHP
include "../entities/registre.php";
include "../core/registreC.php";
if (isset($_GET['cin'])){
$registreC=new registreC();
$result=$registreC->recupererregistre($_GET['cin']);
foreach($result as $row){
$cin=$row['cin'];
$nom=$row['nom'];
$prenom=$row['prenom']... | true |
1deb681aee2585b9cc3ba38239afc67f3dd76fc8 | PHP | lekster/md_new | /new/libraries/common/Aop/Go/Aop/Pointcut/TrueMethodPointcut.php | UTF-8 | 914 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Go! OOP&AOP PHP framework
*
* @copyright Copyright 2012, Lissachenko Alexander <lisachenko.it@gmail.com>
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
namespace Go\Aop\Pointcut;
use ReflectionMethod;
use TokenReflection\ReflectionMethod as Par... | true |
a34d3ed06681f79c09826dd377bb0024c055d78f | PHP | yla06/php_framework | /Core/View/Storage.php | UTF-8 | 1,055 | 2.984375 | 3 | [] | no_license | <?php
namespace View;
class Storage
{
private static $_data = [];
public static function setData( $name, $value, $secure = true )
{
self::$_data[$name] = ( $secure ) ? self::xss( $value ) : $value;
}
public static function getData($name)
{
return ( isset ( self::$_da... | true |
e99ddc9f0ee1190f40d4b20a211ae13a989d6ce9 | PHP | chienle29/anime2 | /app/Model/Media/MediaFile.php | UTF-8 | 16,263 | 2.8125 | 3 | [] | no_license | <?php
namespace CTMovie\Model\Media;
use Illuminate\Filesystem\Filesystem;
/**
* Class MediaFile
* @package CTMovie\Model\Media
*/
class MediaFile
{
/** @var string Raw source URL after "find-replace in image URLs" options applied to it. */
private $sourceUrl;
/** @var string Raw source URL retrieved... | true |
54a3ed328822b298f6eefcfe1db7978f3037b93c | PHP | ercancavusoglu/zagoo | /src/backend/app/Repositories/Eloquent/WalletRepository.php | UTF-8 | 1,168 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Eloquent;
use App\Constant\WalletDefinitions;
use App\Contract\Repository\WalletRepositoryInterface;
use App\Models\Wallet;
use App\Service\Modules\Register\Parameters\WalletParameters;
class WalletRepository extends BaseRepository implements WalletRepositoryInterface
{
/**
... | true |
8a688f53579b39db1d997cc70b4c03d74e9c3cd1 | PHP | DeBoerTool/validator | /src/Abstracts/Multi.php | UTF-8 | 325 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Dbt\Validator\Abstracts;
abstract class Multi
{
/** @var array */
protected $validators = [];
protected function setValidators (array $validators): void
{
foreach ($validators as $validator) {
$this->validators[] = $validator;
}
... | true |
ac6c067839a4887b4f4ec0a232a826dad8e1a7ba | PHP | rjw57/findsorguk | /app/modules/analytics/controllers/ContentController.php | UTF-8 | 5,640 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/** Query the Google analytics api by content
*
* @author Daniel Pett <dpett@britishmuseum.org>
* @copyright (c) 2014 Daniel Pett
* @category Pas
* @package Controller_Action
* @subpackage Admin
* @license
* @version 1
*/
class Analytics_ContentController extends Pas_Controller_Action_Admin {
/... | true |
1319883996673f89cb43345b5d001e004782fa64 | PHP | buidaoanhvan/php_module | /includes/database.php | UTF-8 | 2,026 | 2.671875 | 3 | [] | no_license | <?php
if (!defined('_BLOCK_DEFAULT')) header("Location: ./?module=errors&action=404");
function query($sql, $data = [], $status = 0)
{
global $conn;
$query = false;
$statement = null;
try {
$statement = $conn->prepare($sql);
if (!empty($data)) {
$query = $statement->execute(... | true |
7c1857ac96f3550e6d4d58e9a71871fd53ca78ab | PHP | Infernosquad/stackoverflow-driven | /src/ContentBundle/EntityListener/PostListener.php | UTF-8 | 552 | 2.625 | 3 | [] | no_license | <?php
namespace ContentBundle\EntityListener;
use ContentBundle\Entity\Post;
use Doctrine\ORM\Event\LifecycleEventArgs;
use Psr\Log\LoggerInterface;
class PostListener
{
/**
* @var LoggerInterface
*/
private $logger;
public function __construct(LoggerInterface $logger)
{
$this->log... | true |
7271af6e0ef0fb3b46fa2f2dffe558284e8984c1 | PHP | ThomasA92/PHP | /03 _POST/exercice.php | UTF-8 | 721 | 2.5625 | 3 | [] | no_license | <?php
// Exercice :
// - Créer un formulaire avec les champs ville, code postal et un textarea adresse.
// - Afficher les valeurs saisies par l'internaute dans la page exercice_traitement quand le formulaire a été envoyé.
print_r($_POST);
?>
<h1>Formulaire exercice</h1>
<form action="exercice_traitement.php" metho... | true |
7f42cbd4f4915a926dd6e464087e481fa58a211e | PHP | rupeshmohanty/Book-My-Room | /admin/dashboard/scripts/deleteBooking.php | UTF-8 | 758 | 2.59375 | 3 | [] | no_license | <?php
// include db connection!
include('../../../scripts/db.php');
// session start!
session_start();
// get id of the booking!
$bookingId = $_GET['id'];
if($bookingId != 0) {
// delete booking!
$deleteBooking = "DELETE FROM `bookings` WHERE `id` = '$bookingId'";
... | true |
c787d7ca1973e6c27e9f7b2460f6ed817afe3395 | PHP | lat1992/EasyAPI-Framework | /lib/Db/DbMysql.php | UTF-8 | 772 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
class Db {
private $sql;
function __construct($host, $username, $password, $database, $charset) {
$this->sql = new mysqli($host, $username, $password, $database);
$this->sql->set_charset($charset);
//$this->sql->begin_transaction(MYSQLI_TRANS_START_READ_WRITE);
$this->sql->autocommit(FALSE)... | true |
c46067d3c7d4d33c866b92a6bf7d50d246949a50 | PHP | JeongJunPark/MyGitHub | /procject_celib/model/TradeModel.php | UTF-8 | 10,780 | 2.515625 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class TradeModel extends CI_Model {
public $tablename="trades";
public $pk_fieldname="id";
public function __construct()
{
parent::__construct();
// Your own constructor code
$this->db2 = $this->... | true |
786cd9f0c7c141d5cd50c4343d2966ccac0b82f6 | PHP | expouic/sapphire | /forms/GridField.php | UTF-8 | 3,755 | 3 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Displays a {@link SS_List} in a grid format.
*
* GridFIeld is a field that takes an SS_List and displays it in an table with rows
* and columns. It reminds of the old TableFields but works with SS_List types
* and only loads the necessary rows from the list.
*
* The minimum configuration is to pa... | true |
fb69492331ef8bcf3896f8b108d4e7e814522158 | PHP | nanbando/core | /src/Core/Server/Command/Ssh/SshGetCommand.php | UTF-8 | 2,859 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Nanbando\Core\Server\Command\Ssh;
use Nanbando\Core\Server\Command\CommandInterface;
use Nanbando\Core\Storage\StorageInterface;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Co... | true |
31e102973ed9bc96710e2cea84362850a9c1716e | PHP | kdambekalns/ApiGen | /src/Generator/NamespaceGenerator.php | UTF-8 | 2,761 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace ApiGen\Generator;
use ApiGen\Configuration\Configuration;
use ApiGen\Contract\Generator\GeneratorInterface;
use ApiGen\Element\ReflectionCollector\NamespaceReflectionCollector;
use ApiGen\Templating\TemplateRenderer;
final class NamespaceGenerator implements GeneratorInterfac... | true |
f4fa8c3f2219ba324abf8407e679e27579a58252 | PHP | jaCUBE/roomba-test | /app/models/Roomba.class.php | UTF-8 | 1,357 | 3.09375 | 3 | [] | no_license | <?php
/**
* Glorious Roomba.
* @class Roomba
* @author Jakub Rychecký <jakub@rychecky.cz>
*/
class Roomba
{
/**
* @var Navigator $navigator Roomba's sense in the room
*/
public $navigator;
/**
* @var Battery $battery Roomba battery
*/
public $battery;
/**
* @var Com... | true |
9858219c17fc6a4e2de6fafa4f8f536ff1175e89 | PHP | reyhannaufal/Cariin | /app/Http/Controllers/ThreadController.php | UTF-8 | 3,071 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Thread;
class ThreadController extends Controller
{
public function index()
{
$threads = Thread::all();
return response()->json([
'success' => true,
'threads' => $threads
]);
}
... | true |
b045904c61392711a007caccc66b8f3b0e356faa | PHP | khandu-shivam/crud | /taskview.php | UTF-8 | 1,163 | 2.640625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css">
</head>
<body>
<?php
include 'dbcon.php';
$id=$_GET['id'];
$data="select * from task where id=$id";
$result=mysqli_query($con,$data);
$entry=mysqli_fet... | true |
b337a8abb3e86e6b1d09b3e427d60d4889eb2a93 | PHP | michalSolarz/symfony-shop | /src/AppBundle/Model/BackendProductSearch/StringCondition.php | UTF-8 | 835 | 2.84375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: michal
* Date: 07.07.16
* Time: 07:11
*/
namespace AppBundle\Model\BackendProductSearch;
/**
* Class StringCondition
* @package AppBundle\Model
*/
class StringCondition implements SearchConditionInterface
{
/**
* @var string
*/
private $value;
/... | true |
d7e2fb9ff98c264f796f73fd44be95cd47b62ac1 | PHP | pablojc12/Dog | /assets/server/uploadImagen.php | UTF-8 | 2,970 | 2.609375 | 3 | [] | no_license | <?php
require_once 'conection.php';
// Tiempo de espera del script
// Este lo usamos para emular mas o menos el comportamiento en un servidor web no local
// Ya que muchas veces al ejecutarlo de fomra local no se aprecia bien el funcionamiento.
//sleep(3);
// ini_set("display_errors", 1);
// Definimos va... | true |
f8f362dc723abbc7a9becaba3aa80bb4efdc8af0 | PHP | netninja-scott/team-a | /src/TeamA/API/PlaxitudeBot.php | UTF-8 | 3,912 | 3.078125 | 3 | [] | no_license | <?php
namespace Netninja\TeamA\API;
use Netninja\TeamA\CommonAPI;
/**
* Class PlaxitudeBot
* @package Netninja\TeamA\API
*/
class PlaxitudeBot extends CommonAPI
{
/**
* @route /
*/
public function index()
{
$this->jsonResponse([
[
'method' =>
... | true |
001d7b43c3d909fb5f3a0058f29b37fc0cac9178 | PHP | INET2005ITC2015/inet2005-fh | /inet2005Lab4 /rectangle.php | UTF-8 | 203 | 2.8125 | 3 | [] | no_license | <?php
abstract class rectangle extends shapes
{
var $width;
var $length;
var $name = 'rectangle';
function calculateSize()
{
$area = ($this->width * $this->length);
return $area;
}
} | true |
9ebc8ff65160537ccd2f1970fb4f5540212b1d1c | PHP | grateja/els-csi-offline_sync-v6 | /yii-ELS/framework/cli/views/webapp/protected/models/AccountTypes.php | UTF-8 | 7,822 | 2.65625 | 3 | [] | no_license | <?php
/**
* This is the model class for table "account_types".
*
* The followings are the available columns in table 'account_types':
* @property integer $id
* @property string $created_at
* @property string $updated_at
* @property string $name
* @property string $landing_module
* @property string $landing_co... | true |
7f5de00883a787016b41298b542cce4b97aae7cf | PHP | ptawkin/php_base | /hw3/task6.php | UTF-8 | 1,572 | 3.28125 | 3 | [] | no_license | <?php
/*В имеющемся шаблоне сайта заменить статичное меню (ul – li) на генерируемое через PHP.
Необходимо представить пункты меню как элементы массива и вывести их циклом.
Подумать, как можно реализовать меню с вложенными подменю?
Попробовать его реализовать..*/
?>
<?php
$title = "php";
$header = 'php';
$paragraph ... | true |
efcc78a65e9e9f011f2086fd6545d99a93f41050 | PHP | KnightAR/phpgs | /src/Options/CompatibilityLevel.php | UTF-8 | 666 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Webit\PHPgs\Options;
final class CompatibilityLevel
{
/** @var string */
private $level;
/**
* CompatibilityLevel constructor.
* @param string $level
*/
private function __construct($level)
{
$this->level = (string)$level;
}
/**
* @return Compa... | true |
2ac08f1ecfe6c41b8dc5c34f9bff2e2b53d176d5 | PHP | newtut/Server | /sqlconnect/register.php | UTF-8 | 5,755 | 2.625 | 3 | [] | no_license | <?php
// Import PHPMailer classes into the global namespace
// These must be at the top of your script, not inside a function
use PHPMailer\PHPMailer\PHPMailer;
//use PHPMailer\PHPMailer\SMTP;
//use PHPMailer\PHPMailer\Exception;
// Load Composer's autoloader
//require 'vendor/autoload.php... | true |
74627409b0916c547be8127ec09d0d36b6a1b8c5 | PHP | idanisgallimore/php_food_store- | /addcust.php | UTF-8 | 3,253 | 2.765625 | 3 | [] | no_license | <?php
session_start();
// Login to the db via the login() function
include_once("/mylibrary/login.php");
login();
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$zip = $_... | true |
b6a0fdd9b5f4f384a53d41262051b0424b7162cf | PHP | stuffaboutpete/PHPLibrary | /Helper/Cookie.php | UTF-8 | 434 | 2.875 | 3 | [] | no_license | <?php
namespace PO\Helper;
/**
* Exists for testing purposes - cookies
* cannot be set during a PHPUnit test
*/
class Cookie
{
public function set(
$name,
$value = null,
$expire = 0,
$path = null,
$domain = null,
$secure = false,
$httponly = false
)
{
setcookie($name, $value, $expire, $path, $... | true |
d1470e438caaa449b81656dd66f095c0d0d1ab04 | PHP | MichelleMcginty/CD-Catelogue | /EnterNewAlbum.php | UTF-8 | 3,305 | 2.953125 | 3 | [] | no_license | <!DOCTYPE html>
<head>
<!-- My CSS link -->
<link href="style.css" rel="stylesheet">
<title>Add a new Album</title>
<meta charset="utf-8" />
</head>
<body>
<?php
//Michelle McGinty R00122053
//////////path to link
include 'dbconnection.php';
/////////link parameters
$con = mysqli_connect($host, $db_u... | true |
eeec1eea8265b7a975401adef504bd0fd16469b1 | PHP | Alpharoy/test-api | /app/Models/Permission/Role.php | UTF-8 | 1,012 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Models\Permission;
use App\Models\Model;
class Role extends Model
{
protected $table = 'roles';
/**
* model名称
*
* @var string
*/
const MODEL_NAME = '角色';
/**
* 真删除
*
* @var bool
*/
protected $forceDeleting = true;
/**
* 可以被批量... | true |
d2099e8a3c93afce73d3ceeedfae6a068253aabd | PHP | junfeng0202/ant-doctor | /app/Repository/CollegeRepository.php | UTF-8 | 3,152 | 2.625 | 3 | [] | no_license | <?php
namespace App\Repository;
use App\Models\College;
use App\Models\CollegeSection;
use App\Models\CollegeSectionContent;
class CollegeRepository
{
public function backList($limit, $sort = [])
{
$college = College::query();
if (count($sort)) {
$college->orderBy(...$sort);
}
return $college->latest('... | true |
8a84c30757c8b1a646b5139bb91ddc1ade3e96d1 | PHP | cosnics/cosnics | /src/Chamilo/Core/Repository/ContentObject/LearningPath/Display/Component/BaseReportingComponent.php | UTF-8 | 4,533 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Chamilo\Core\Repository\ContentObject\LearningPath\Display\Component;
use Chamilo\Core\User\Storage\DataClass\User;
use Chamilo\Libraries\Format\Structure\ActionBar\Button;
use Chamilo\Libraries\Format\Structure\ActionBar\ButtonToolBar;
use Chamilo\Libraries\Format\Structure\ActionBar\Renderer\ButtonT... | true |
3e50b642867b5d5b5250922cf23910a0ab81e3e1 | PHP | ovivic/food-booking-app | /userPageClient.php | UTF-8 | 13,828 | 2.59375 | 3 | [] | no_license | <?php
require 'config/main.php';
session_start();
if (!isset($_SESSION["loggedin"]) && !$_SESSION["loggedin"]) {
header("Location: login.php?showNotLoggedInMessage=1");
}
// API call to load the address for the user
$clientAddress = APIUtil::getApiRequest(AddressController::API_READ_ONE . "?entityId=" . SiteUt... | true |
864a05449e3fbe5e0afed7ae197a5790abb8a242 | PHP | 0x9d8e/test01 | /Services/Kinopoisk.php | UTF-8 | 1,793 | 2.5625 | 3 | [] | no_license | <?php
namespace Services;
use Models\Film as Film;
use DiDom\Document;
use Models\FilmMapper;
use Models\FilmRating;
use Models\FilmRatingMapper;
class Kinopoisk
{
const source = 'http://www.kinopoisk.ru/top/';
public function update()
{
$this->fetch($this->load(), function (Film $film) {
... | true |
1df483a11f0b85554f59fcd054edad662ba0c356 | PHP | yassinehamouten/php-flasher | /src/Cli/Prime/System/OS.php | UTF-8 | 1,316 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Flasher\Cli\Prime\System;
class OS
{
public static function getName()
{
return php_uname('s');
}
public static function getRelease()
{
return php_uname('r');
}
public static function isUnix()
{
return in_array(self::getName(), array(
... | true |
eae15e76b131c4f4da4fae2aed43f80023f811f5 | PHP | jbud/Portal1.0 | /cmsdata/class.cmssettings.php | UTF-8 | 4,292 | 2.734375 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
class cmsSettings {
function getSettings()
{
$cmsDatabase = new cmsDatabase;
$query = "SELECT * FROM settingsb WHERE id='1'";
$return = $cmsDatabase->db($query, true);
$query = "SELECT * FROM links ORDER BY id ASC";
$linkz = $cmsDatabase->db($query, true, true);
$query = "SELECT COUNT(*) FROM links... | true |
88384030ab0e4dcdfe2d34a0665b503991a035ad | PHP | kranack/frmwrk | /app/framework/modules/Form/class/Form.php | UTF-8 | 1,392 | 2.765625 | 3 | [] | no_license | <?php
namespace Modules\Form;
/* TODO: FOR LIE A L'ID PUTAIN DE MERDE T'ES CON OU QUOI?!!! */
class Form {
private $_objs = array();
private $__template_path;
public function __construct ($type, $action) {
$this->_type = $type;
$this->_action = $action;
$this->__module_path = dirname(__DIR__);
... | true |
64387308393323401b1952ce37962c10283173c6 | PHP | vinhnguyen13/krp | /source/apps/backend/protected/modules/news/controllers/ArticleController.php | UTF-8 | 15,093 | 2.703125 | 3 | [] | no_license | <?php
class ArticleController extends Controller
{
/**
* @var string the default layout for the views. Defaults to '//layouts/column2', meaning
* using two-column layout. See 'protected/views/layouts/column2.php'.
*/
public $layout='//layouts/column2';
/**
* Displays a particular model.
* @param integer... | true |
57dfb6410ac9ce974158e55b9a8e441849b968ea | PHP | caominhquan/learning | /laravel/app/Http/Controllers/NotesAPIController.php | UTF-8 | 796 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Note;
use Illuminate\Http\Request;
class NotesAPIController extends Controller
{
public function index()
{
return Note::get();
}
public function store(Request $request) {
$post = new Note();
$post->title = $request->title;
... | true |
39bc8db3061b812558cc38611a355aa86acc9556 | PHP | gunelism/task | /q01.php | UTF-8 | 507 | 3.359375 | 3 | [] | no_license | <?php
// Neticesi aşağıdakılar olan funksiya yazın
/*
ekranaYaz(); -->Boş
ekranaYaz('salam'); -->arg1: salam
ekranaYaz('salam', 'heci', 'necesen'); -->arg1: salam,arg2: heci,arg3: necesen
*/
function fun($yaz=null, $h=null, $c=null){
if ($yaz==null) {
echo "bos";
}... | true |
9cb9348976534bc6bac0e346f59f6580db9308cb | PHP | julienBreem/mvc-fromScratch | /index.php | UTF-8 | 850 | 2.5625 | 3 | [] | no_license | <?php
require __DIR__ . '/vendor/autoload.php';
include('config.php');
//Initializes the request abstraction
//$request = new base\core\request();
$request = new base\core\http\Request();
//getting the view class from the request
$viewFactory = new base\view\ViewFactory();
$view = $viewFactory->getView($request);
$vi... | true |
a489d1c0cada7ac19da94a39982c47d18332883b | PHP | 1PilotApp/oc-client-plugin | /classes/ComposerUpdateManager.php | UTF-8 | 3,670 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace OnePilot\Client\Classes;
use ApplicationException;
use Artisan;
use Exception;
use Illuminate\Support\Arr;
class ComposerUpdateManager
{
/** @var ComposerProcess */
private $process;
public function __construct()
{
$this->process = new ComposerProcess;
}
/**
* @... | true |
e1910017e4e3b7342c0ea0f71ed3a83ef5659fd2 | PHP | LiXiaoYaoGG/Ephp | /Core/Core.php | UTF-8 | 2,247 | 2.90625 | 3 | [] | no_license | <?php
namespace Core;
use Core\Core;
use Components\Console\Console;
class Core{
private static $instance;
private $pool = [];
public function __construct(){
self::$instance = &$this;
}
/**
* 获取单例
* @return ControllerFactory
*/
public static function getInstance(){
... | true |
ba74792a0ef7c10d381854c7294f34bbe649aee8 | PHP | mrloc2015/ITV | /order.php | UTF-8 | 1,510 | 3.5625 | 4 | [] | no_license | <?php
$order = new Order();
$order->setPrice(4000);
var_dump($order);
echo $order->getTotalHtml();
class Order
{
const MINIMUM_PRICE_FREE_SHIPPING = 5000;
const TAX_VALUE = 0.05;
protected $tax = 0 ;
protected $shipping = 0;
protected $price = 0;
public function setPrice($price)
{
$this->price = $p... | true |
ac406eaba8b512adea46f029f7418bbf3b127aa5 | PHP | leomazzolin/mysocialarea | /application/objects/Object.php | UTF-8 | 8,143 | 2.640625 | 3 | [] | no_license | <?php
abstract class Object_Object
{
/**
* PRIVATE DATA
*/
private $_TblName = NULL;
private $_errors = array();
private $_DataTblName = '_data';
private $_db = NULL;
private $_CategoryValues = array( 'id', 'tbl', 'ref_id', 'category', 'description', 'value', 'created', 'modified' );
/*
* P... | true |
abaec93b962e6aaad637b4a45b906755a63b7af3 | PHP | slince/composer-registry-manager | /src/Command/ResetCommand.php | UTF-8 | 1,119 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* This file is part of the slince/composer-registry-manager package.
*
* (c) Slince <taosikai@yeah.net>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Slince\Crm\Command;
use Symfony... | true |
114a62afdfb0b51c20028b35a23ff204ed8d5f58 | PHP | dougblackjr/ee-json-ld | /addon/json_ld/vendor/spatie/schema-org/src/Menu.php | UTF-8 | 1,454 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Spatie\SchemaOrg;
/**
* A structured representation of food or drink items available from a
* FoodEstablishment.
*
* @see http://schema.org/Menu
*/
class Menu extends CreativeWork
{
/**
* A food or drink item contained in a menu or menu section.
*
* @param \Spatie\SchemaOrg\Men... | true |
736b26a35306d8c4bdb39ddba401095c1841de64 | PHP | snamper/pms | /src/Validation/Validator/transactionValidator.php | UTF-8 | 1,059 | 2.53125 | 3 | [] | no_license | <?php
namespace pms\Validation\Validator;
/**
* 事务验证
* Class transactionValidator
* @package pms\Validation\Validator
*/
class transactionValidator extends \pms\Validation\Validator
{
/**
* 进行验证
* @param \Phalcon\Validation $validation
* @param type $attribute
* @return boolean
*/
... | true |
a6684e7bae97ebe73033e34b9f533fad16243179 | PHP | jordanrynard/Code-Examples | /PHP Application - Autodownloader/classes/ImdbList.class.php | UTF-8 | 1,738 | 2.859375 | 3 | [] | no_license | <?
namespace MediaCenter;
require_once('./libraries/simple_html_dom.php'); // http://simplehtmldom.sourceforge.net/manual.htm
class ImdbList {
function __construct(){
}
static function get_results($url){
// User Agent seems to be required by The Pirate Bay
ini_set('user_agent', 'Mozilla/5.0 (Windows; U; Wi... | true |
0f3e2207f227ec45af0a98bc5fb68d17cfb699d1 | PHP | ProgressoRU/plasticode | /src/Models/Traits/CachedDescription.php | UTF-8 | 1,959 | 2.671875 | 3 | [] | no_license | <?php
namespace Plasticode\Models\Traits;
use Plasticode\Util\Date;
trait CachedDescription
{
protected static function getDescriptionField()
{
return 'description';
}
protected static function getDescriptionCacheField()
{
return 'cache';
}
protected static funct... | true |
4eff62972df6809ca7c19dfbda65a6c08edea62c | PHP | anggadarkprince/angga-ari.com | /app/Taxonomy.php | UTF-8 | 1,788 | 2.546875 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
class Taxonomy extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'term', 'slug', 'type', 'category', 'description'
];
... | true |
64ff7b6be896f82beaf0a484377860967e15546a | PHP | chaplean/coding-standard | /phpcs/ChapleanStandard/Sniffs/File/DisallowDoubleEmptyLineSniff.php | UTF-8 | 2,019 | 3.046875 | 3 | [] | no_license | <?php
/**
* Disallow double consecutive empty lines in file.
*
* @author Tom - Chaplean <tom@chaplean.coop>
* @copyright 2014 - 2017 Chaplean (http://www.chaplean.coop)
* @since 1.1.0
*/
class ChapleanStandard_Sniffs_File_DisallowDoubleEmptyLineSniff implements PHP_CodeSniffer_Sniff
{
protected $conse... | true |
8ae742c03d34c96f9aa06bd073be7ba8fe86a3f6 | PHP | handylim/SlidingPuzzle | /login.php | UTF-8 | 2,252 | 2.59375 | 3 | [] | no_license | <?php
session_start();
function testInput($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
$response['connected'] = null;
$response['error'] = null;
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$userEmail = testInput($_POST["email"]);
$userPa... | true |
d691b0cf8a8dff6f99ba6a6dabb8f12e019d564d | PHP | codertiu/city-edu | /console/migrations/m180511_154840_create_member_salary_table.php | UTF-8 | 886 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Handles the creation of table `member_salary`.
*/
class m180511_154840_create_member_salary_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('member_salary', [
'id' => $this->primaryKey(),
... | true |
d60471b59ab47cd933f7cda3b90953411546c5ec | PHP | Rahim12345/barcode | /seller/rightBorder.php | UTF-8 | 1,740 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php ?>
<table class="table table-dark" style="width: 100%;font-size: 10px;">
<thead style="background-color: #1c4b79;">
<tr>
<th scope="col">№</th>
<th scope="col">İstehsalçı</th>
<th scope="col">Ünvan</th>
<th scope="col">Model</th>
<th scope="col">Kateqoriya</th>
... | true |
99f8575047927c59918ffe16219f7404bd2a56aa | PHP | octfx/WebProgrammierungShop | /app/SparkPlug/Config.php | UTF-8 | 1,143 | 2.828125 | 3 | [] | no_license | <?php declare(strict_types = 1);
/**
* User: Hannes
* Date: 20.11.2017
* Time: 18:37
*/
namespace App\SparkPlug;
/**
* Class Config
* Lädt PHP Dateien aus config Ordner
*/
class Config
{
private $configFolder;
private $config = [];
/**
* Config constructor.
*/
public function __const... | true |
60b0a727c306414b4c95caae6fba899dc6db7885 | PHP | rpistoresi/ilr | /rand.php | UTF-8 | 665 | 3.015625 | 3 | [] | no_license | <?php
// seed with microseconds
function make_seed()
{
list($usec, $sec) = explode(' ', microtime());
return $sec + $usec * 1000000;
}
srand(make_seed());
$randval = rand();
//echo $randval;
echo '<br>';
// $fileTempName = "raytest.jpg";
// $fileName = substr($fileName, 0, strpos($fileName, "test"));
// $ext2... | true |
80500de22a629beea619a73665299fa8269597e4 | PHP | JanekRoos/gs1-barcode-parser | /src/Parser/ParserConfig.php | UTF-8 | 1,754 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Lamoda\GS1Parser\Parser;
use Lamoda\GS1Parser\Barcode;
use Lamoda\GS1Parser\Constants;
final class ParserConfig
{
/**
* @var bool
*/
private $fnc1SequenceRequired = true;
/**
* @var array
*/
private $fnc1PrefixMap = [
Constants::FN... | true |
1398bcfa83232313f19067b1014b06b9cb96270e | PHP | RegioneER/sirer | /html/html/xCDMProtocolloLib_PROD/Archiflow/soapClient/Card/Type/KeyVersion.php | UTF-8 | 6,321 | 2.796875 | 3 | [] | no_license | <?php
namespace ArchiflowWSCard\Type;
use Phpro\SoapClient\Type\RequestInterface;
class KeyVersion implements RequestInterface
{
/**
* @var string
*/
private $Digest = null;
/**
* @var \ArchiflowWSCard\Type\ArrayOfField
*/
private $Indexes = null;
/**
... | true |
ff65c41b35393438811f65c7340fb72b250387aa | PHP | saadadel/simple-todo | /app/Http/Requests/TasksStoreRequest.php | UTF-8 | 797 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use App\Task;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Auth;
class TasksStoreRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
... | true |
d00c14c1109161a0838dffec6d6290a9f3c3da05 | PHP | chhetry-abhishek/abhishek_component2 | /abhishek-component2/app/Http/Controllers/ProductController.php | UTF-8 | 4,095 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class ProductController extends Controller
{
public function index(){
$data = file_get_contents('products.json');
$productdata = json_decode($data, true);
return view('welcome',[
'productdata' =>$productdata
... | true |
6a8a8f31c0c600007e46335b6e6d4a9c480a30c7 | PHP | netzmensch/hurricane | /sys/classes/parsers/image.php | UTF-8 | 394 | 2.65625 | 3 | [] | no_license | <?php
namespace redcross\hurricane\classes\parsers;
use redcross\hurricane\classes\abstractParser;
/**
* Class image
* @package redcross\hurricane\classes\parsers
*/
class image extends abstractParser
{
/**
* @return void
*/
public function parseContent()
{
$this->replaceContentElemen... | true |
9c6324484bf6c6bf74d090107ae6f041fe0c0204 | PHP | signifly/travy-schema | /tests/Unit/SchemaTest.php | UTF-8 | 2,096 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Signifly\Travy\Schema\Tests\Unit;
use PHPUnit\Framework\TestCase;
use Signifly\Travy\Schema\Fields\Text;
use Signifly\Travy\Schema\Schema;
class SchemaTest extends TestCase
{
/** @test */
public function it_serializes_attributes_to_json()
{
$schema = new Schema([
'name... | true |
5c7172d7edb8afbd4f6474d502a3861312b81a7a | PHP | jgleiser/simple-php-smarty-blog | /create_new_blog.php | UTF-8 | 811 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
session_start();
require_once "includes/functions.php";
// check if user is logged
if(!isset($_SESSION['uid'])){
header("Location: index.php");
exit;
}
// Check if it was called from the form
if(!isset($_POST['create'])){
header("Location: index.php");
exit;
}
// blogid stores the id of the new blog or an ... | true |
5e075978cd2bfd741e9336ff1c13f90881603fff | PHP | wangti1/priceFindsystem | /index.php | UTF-8 | 3,875 | 2.625 | 3 | [] | no_license | <?php require_once('Connections/pricefind.php'); ?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_rsdbprice = 3;
$pageNum_rsdbprice = 0;
if (isset($_GET['pageNum_rsdbprice'])) {
$pageNum_rsdbprice = $_GET['pageNum_rsdbprice'];
}
$startRow_rsdbprice = $pageNum_rsdbprice * $maxRows_rsdbprice;
mysql_select_db($d... | true |
254fdf3e874d536fbb36d7a3728f260edf6437c9 | PHP | winky007/SwooleCustomerService | /class/Utils.php | UTF-8 | 523 | 2.765625 | 3 | [] | no_license | <?PHP
class Utils
{
public static function debug($input, $tag = '')
{
if ($tag) echo "{$tag} start\n";
echo json_encode($input, JSON_UNESCAPED_UNICODE) . "\n";
if ($tag) echo "{$tag} end\n";
}
public static function h($text)
{
return htmlentities($text,... | true |
f77ea0129c6b4ba917b0b004d508c64bb6f277bf | PHP | zitivapo/php-druid-query | /src/DruidFamiliar/Interval.php | UTF-8 | 3,906 | 3.359375 | 3 | [
"MIT"
] | permissive | <?php
namespace DruidFamiliar;
use DateTime;
use DruidFamiliar\Exception\MissingParametersException;
use DruidFamiliar\Exception\UnexpectedTypeException;
use RuntimeException;
/**
* Class Interval represents Web ISO style date ranges for use in Druid queries.
*
* @package DruidFamiliar
*/
class Interval
{
... | true |
d0305977a2031abb7f1de60cea92ae298365635c | PHP | GlZM0/phpBubbleSort | /WriteArrays.php | UTF-8 | 338 | 3.1875 | 3 | [] | no_license | <?php
include_once ("BubbleSort.php");
class WriteArrays
{
function writer($tablicaL) {
$bubbleSort = new BubbleSort();
echo "Liczby przed sortowaniem :\n";
print_r($tablicaL);
echo "<br>";
echo "\nLiczby po sortowaniu\n:";
print_r($bubbleSort->sortowanieBabelkowe($ta... | true |
dbf00f702e82809f3e9ef24ce126ef29335f65b0 | PHP | tan-yuki/agora-recording-sample-php-server | /src/AgoraServer/Domain/Agora/Entity/RestfulAPI/AuthCredentialKeyFactory.php | UTF-8 | 629 | 2.65625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace AgoraServer\Domain\Agora\Entity\RestfulAPI;
class AuthCredentialKeyFactory
{
private CustomerId $customerId;
private CustomerSecret $customerSecret;
public function __construct(CustomerIdFactory $customerIdFactory,
CustomerSecretFa... | true |
73dff8c1219da5c5e2e28ff322d35ec4fb04dc4e | PHP | map2u/cobas_react | /react/Model/ReportInterface.php | UTF-8 | 4,186 | 2.5625 | 3 | [] | no_license | <?php
namespace Map2u\CoreBundle\Model;
/**
* ReportInterface
*/
interface ReportInterface {
/**
* Get id
*
* @return guid
*/
public function getId();
/**
* Set id
*
* @param guid $id
* @return Report
*/
public function setId($id);
/**
* Set ... | true |
79e56c4b5e9f1e0754905a277c7cdf8801af8c40 | PHP | danalextronic/gocare | /app/Http/Controllers/API/ApiController.php | UTF-8 | 2,078 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\API;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Apikey;
use Crypt;
use Auth;
use App\User;
class ApiController extends Controller
{
private $_key;
public $user;
/**
* ApiController constructor. Grabs the ... | true |
45e5d43efa778b52ebba30a75bf1add3541c63e3 | PHP | CampanL/mof-maf | /controllers/Controllers.php | UTF-8 | 3,372 | 2.78125 | 3 | [] | no_license | <?php
namespace Controllers;
use Symfony\Component\HttpFoundation\Request;
use Silex\Application as App;
use Models;
use Symfony\Component\Validator\Constraints as Assert;
use Utils\Utils as Utils;
class Controllers{
protected $table;
protected $model;
protected $app;
protected $utils;
protected $constraint... | true |
f1932083fe42486cd7b5e7452250c3a8d4878391 | PHP | wilcarllopez/PHPexercises | /solution41.php | UTF-8 | 375 | 3.46875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Solution #41</title>
</head>
<body>
<div class="container">
<?php
for ($i = 1; $i < 7; $i++) {
for ($j = 1; $j < 7; $j++) {
if ($j == 1) {
echo str_pad($i*$j, 2, " ", STR_PAD_LEFT);
} else {
echo str_pad($i*$j, 4, " ", STR_PAD_LEFT);
... | true |
0ad7f74fb97ae5be9ce1d6b60d12ee3735b600a1 | PHP | meza/P-PEX | /tests/Http/HttpParamsTest.php | UTF-8 | 1,659 | 2.5625 | 3 | [] | no_license | <?php
/**
* HttpParamsTest.php
*
* Holds the test cases for the HttpParams class
*
* PHP Version: 5
*
* @category File
* @package Test
*
* @author meza <meza@meza.hu>
* @license GPL3.0
* GNU GENERAL PUBLIC LICENSE
* Version 3, 29 June 2007
*
* Copyright (C) 20... | true |
c82aa7940d9a6198a8caef5b9bf7d1408a135546 | PHP | 1g0rbm/eventhub | /api/src/Auth/Entity/User/Status.php | UTF-8 | 813 | 2.953125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Auth\Entity\User;
use Webmozart\Assert\Assert;
class Status
{
public const WAIT = 'wait';
public const ACTIVE = 'active';
private string $value;
public function __construct(string $value)
{
Assert::oneOf($value, [self::WAIT, self::ACTIVE]);
... | true |
8fde53d7a360d6bed3bfa21d7ea1ffe698c089d1 | PHP | codesk90/backOrder | /database/api.php | UTF-8 | 2,025 | 2.921875 | 3 | [] | no_license | <?php
//Connection
include("../dbconnect.php");
if (isset($_POST['done'])) {
//Assign variables
$styleNumber = $_POST['style_number'];
$customerName = $_POST['customer_name'];
$phoneNumber = $_POST['phone_number'];
$email = $_POST['email'];
$date = date("Y-m-d");
//Insert into database
$sql = "IN... | true |
1a4e5e8a9552608ac690534ed47e1e26a1c8c965 | PHP | wikimedia/oauth2-server | /src/Entities/ClaimEntityInterface.php | UTF-8 | 478 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @author Sebastian Kroczek <me@xbug.de>
* @copyright Copyright (c) Alex Bilbie
* @license http://mit-license.org/
*
* @link https://github.com/thephpleague/oauth2-server
*/
namespace League\OAuth2\Server\Entities;
interface ClaimEntityInterface
{
/**
* Get the claim's name.... | true |
016b5ffcd328739c798bb6edcd6732913d0d4841 | PHP | alesancor1/IISSI-AutoescuelaTrafico | /app/models/AnunciosModel.php | UTF-8 | 1,083 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
class AnunciosModel extends BaseModel{
private $table;
public function __construct($adapter){
$this-> table = "Anuncios";
parent::__construct($this -> table, $adapter);
}
public function getAll($first = 0, $last = -1){
$query="SELECT * FROM Anuncios ORDER BY Fecha DESC";
$res = $this-... | true |
966e97fe8faa1e8b365f95a9fe0478aa3f7d6ee9 | PHP | Engrev/P5_vergne_thomas | /core/Route.php | UTF-8 | 3,050 | 3.453125 | 3 | [] | no_license | <?php
namespace Blog\Core;
/**
* Class Route
* @package Blog\Core
*
* Represents a route.
*/
class Route
{
/**
* @var string The path.
*/
private $path;
/**
* @var mixed The closure.
*/
private $callable;
/**
* @var array URL matches.
*/
private $matches = [];... | true |
df901d19eed7a021bb81900e2687b6e895403603 | PHP | Rolice/Laravel-LangSync | /src/services/LabelsCollection.php | UTF-8 | 543 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php namespace Rolice\LangSync;
/**
* Class LabelsCollection
* @package Rolice\LangSync
*/
class LabelsCollection
{
/**
* @var array
*/
private $collection = [];
/**
* Set collection items
*
* @param $collection
* @return $this
*/
public function set($collection)... | true |
241f6222154b9a55def44d94bf845ae85212ef54 | PHP | PatBradley88/ThoroughbredSmartTrainerHMS | /admin/includes/editFarrier.php | UTF-8 | 3,411 | 2.875 | 3 | [] | no_license | <?php
if(isset($_GET['f_id'])) {
$the_farrier_id = $_GET['f_id'];
}
$query = "SELECT * FROM farrier WHERE farrier_id = {$the_farrier_id}";
$select_farrier_by_id = mysqli_query($con, $query);
while($row = mysqli_fetch_assoc($select_farrier_by_id)) {
$farrier_id = $row['farrier_id'];
$farrier_horse_id = ... | true |
c0f52436ede387930d1712b7235866a8944cd264 | PHP | Mordavius/nw3-dierenambulance | /app/Console/Commands/CrontTest.php | UTF-8 | 1,292 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\User;
use Illuminate\Console\Command;
use App\Ticket;
class CrontTest extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'crontest';
/**
* The console command description.
... | true |
5c9be3ea16dd5f94e13fe5cc3a6553dcf75ee184 | PHP | jacerider/code_challenges | /easy/fibonacci_series/php/fibonacci_series.php | UTF-8 | 1,020 | 4.09375 | 4 | [] | no_license | <?php
/**
* Fibonacci Series Code Challenge
*
* The Fibonacci series is defined as:
*
* F(0) = 0; F(1) = 1; F(n) = F(n-1) + F(n-2) when n > 1;
*
* Given a positive integer 'n', print out the F(n).
*
* -- Example Input:
*
* 5
* 12
*
*
* -- Example Output:
*
* 5
* 144
*
* To access th... | true |
4d99571d8df6eae3c55b5f9383b3ab8837898f25 | PHP | ondraczsk/MCPELANDCore | /src/legionpe/command/team/TeamRankChangeSubcommand.php | UTF-8 | 2,807 | 2.734375 | 3 | [] | no_license | <?php
namespace legionpe\command\team;
use legionpe\command\sublib\SessionSubcommand;
use legionpe\session\Session;
use legionpe\team\Team;
use pocketmine\utils\TextFormat;
class TeamRankChangeSubcommand extends SessionSubcommand{
/** @var bool */
private $promote;
/**
* @param bool $promote
*/
public functi... | true |
25fe8b7e57ec5acc6e778166e2f125a22eae80ae | PHP | Bephometh/TBD-tugas-besar | /TugasBesar 3/UI Baru/Second.php | UTF-8 | 10,553 | 2.53125 | 3 | [] | no_license |
<html>
<?php
include ("../connection.php");
// print_r($conn);
// return;
session_start();
?>
<head>
<title>Diagnosis 2</title>
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css">
<style>
table, th, td {
border: 1px solid black... | true |
61d9215d89c1a842d261cee97eb84cccfcf659b6 | PHP | ozzyrod/cis047 | /assignment12/inc/viewBlog.php | UTF-8 | 1,785 | 3.3125 | 3 | [] | no_license | <?php
$connection = dbConnect();
$sql = "SELECT * FROM `blogging_tool` . `blog`";
$dosql = mysqli_query( $connection, $sql ) or die ( 'Query failed: ' . mysqli_error( $connection ) );
// for each row in the database, grab the episode, title, director, and year
// and create a new form to edit the data. When you clic... | true |
56ba232a220198e14d13ab7be59f762d48b9798f | PHP | codekandis/easypwgen-api | /src/Http/UriBuilders/ApiUriBuilderInterface.php | UTF-8 | 513 | 2.625 | 3 | [] | no_license | <?php declare( strict_types = 1 );
namespace CodeKandis\EasyPwGenApi\Http\UriBuilders;
/**
* Represents the interface of all API URI builders.
* @package codekandis/easypwgen-api
* @author Christian Ramelow <info@codekandis.net>
*/
interface ApiUriBuilderInterface
{
/**
* Builds the URI of the index.
* @retur... | true |
70fef6eac99d1d8d820702829716673942e17ba3 | PHP | Laisbat/scgm | /src/Model/Malote.php | UTF-8 | 4,824 | 2.75 | 3 | [] | no_license | <?php
namespace src\Model;
/**
* Classe de Malote
*
* @author Lais
*/
class Malote extends \src\Model\Db {
private $name = 'malote';
public function get($id)
{
$sql = "SELECT id_malote, dt_envio, valor_recebido, valor_receber, observacao, fk_operadora, status, dt_recebimento FROM {$this->n... | true |