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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e6083545e9f69379faafd0ce1cc9504fefa40f63 | PHP | mikkoka/Tsoha-Bootstrap | /app/controllers/supervisorcontroller.php | UTF-8 | 3,390 | 2.640625 | 3 | [] | no_license | <?php
class SupervisorController extends BaseController {
private static $rules = array(
"required" => array(
array("enimi"),
array("snimi"),
array("sposti"),
array("salasana"),
array("rtunnus")),
"lengthBetween" => array(
... | true |
18cbf36d37290380becbab6a9a424e546465f8c4 | PHP | alfonsocv12/loginMainPageNoFramework | /views/error.php | UTF-8 | 293 | 2.515625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<?php
$code = $_REQUEST['code'];
$message = $_REQUEST['message'];
echo "<h1>Error $code</h1>";
echo "<p> $message </p>";
?>
</body>
</html>
| true |
6f8bc138f302f9869d291f65c5503273b7338d65 | PHP | StephanKrauss/PhpPattern | /Src/Behavioral/Iterator/TimeIterator.php | UTF-8 | 560 | 3.265625 | 3 | [] | no_license | <?php
namespace App\Behavioral\Iterator;
class TimeIterator implements \IteratorAggregate
{
public function __construct(int $time)
{
$this->weekAgo = $time - 604800;
$this->yesterday = $time - 86400;
$this->now = $time;
$this->tomorrow = $time + 86400;
$this->... | true |
e75e867bede1ada3d699735e48627d3db3f6e462 | PHP | lipengok/www | /admin/php/model/StudentSchoolModel.php | UTF-8 | 4,593 | 2.8125 | 3 | [] | no_license | <?php
namespace Admin\Php\Model;
use Admin\Php\Model\Dbutils;
include 'Dbutils.php';//没使用框架的时候就得使用原始的办法引入外界的php,而不是名字空间。
class StudentSchoolModel{
private $connection;
private $student;
public function __construct()
{
$this->student=new Dbutils();
$this->connection=$this->student->getCo... | true |
e21b3340b9a28333ce257802313bb492869b5b51 | PHP | Kirashia/ExperienceSamplingAdmin | /Admin/Notification/checkUsers.php | UTF-8 | 2,160 | 2.765625 | 3 | [] | no_license | <?php
//Load the Notification calss from 'notification.php'
include('notification.php');
$notification = new Notification;
$users = getUsersToSend($notification);
var_dump($users);
$tokens = getUserTokens($users);
var_dump($tokens);
$notification->sendNotification($notification->getAllTokens(false), "Answer some questi... | true |
e1635baa40fbe8bba434ce37a9c4078c2f5dc6da | PHP | hanakin/Kudos | /application/libraries/article.php | UTF-8 | 877 | 2.890625 | 3 | [
"MIT",
"LicenseRef-scancode-dco-1.1"
] | permissive | <?php
class Article {
protected static function path($path = '')
{
if ( ! is_file($path))
{
return null;
}
return pathinfo($path);
}
public static function date($path = '')
{
if ( ! $parts = static::path($path))
{
return null;
}
return strtotime(substr($parts['filename'], 0, 8));
}
publi... | true |
f9d8c09b2d822de2a75e1e31be009b65ed79e119 | PHP | momennezhad/Web-Projects | /watermark/watermark.php | UTF-8 | 1,948 | 3.09375 | 3 | [] | no_license | <?php
function watermark_image($originalimage)
{
global $image_path;
list($owidth,$oheight) = getimagesize($originalimage); // GET HEIGHT AND WIDTH OF ORIGINAL IMAGE
$width = $owidth; $height = $oheight;
$image_path = “watermark.png”; // THIS IS THE IMAGE YOU WANT TO WATERMARK ON YOUR IMAGE , height : 25px and wi... | true |
812e50893fcab6c229d7edacc374cad2c84588d2 | PHP | JohnFajardo/pc-wp-polls | /index.php | UTF-8 | 3,274 | 2.71875 | 3 | [] | no_license | <?php
/*
Plugin name: PartnerComm Wordpress poll plugin
Plugin URI: https://johnfajardo.dev
Description: A simple plugin to add API endpoints for polls, developed for PartnerComm.
Author: John Fajardo
Author URI: https://johnfajardo.dev
Version: 1.0
*/
function plugin_install () {
global $wpdb;
$charset_collat... | true |
d835669451b0b3ea8874b3a73abd39f1c54e213a | PHP | coder20b/formation | /exos/php04/exo05.php | UTF-8 | 910 | 3.421875 | 3 | [] | no_license | <?php
/*
## EXO5
CREER UN FICHIER PAR EXERCICE
exo05.php
CREER UNE FONCTION QUI TROUVE LA PLUS PETITE VALEUR DANS UN TABLEAU DE NOMBRES
EN PARAMETRE, ON FOURNIRA UN TABLEAU DE NOMBRES
$tabNombre
ET ON TESTERA AVEC
$tabNombre = [ 12, 3, 45, 1, 100, 35 ];
// RESULTAT A... | true |
fe582e5f1d6dffc8c3db93ba665620692219eb86 | PHP | rbblair/MathPlatformer | /src/public/server.php | UTF-8 | 3,605 | 3.203125 | 3 | [] | no_license | <?php
session_start();
// initializing variables
$username = "";
$errors = array();
// connect to the database
//Our MySQL user account.
define('MYSQL_USER', 'maks');
//Our MySQL password.
define('MYSQL_PASSWORD', 'maks');
//The server that MySQL is located on.
define('MYSQL_HOST', 'localhost');
... | true |
92ee01903101578face9b96a1d0cbbf06c6da0f7 | PHP | ajbm6/mvc5 | /src/Route/Filter.php | UTF-8 | 244 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
*
*/
namespace Mvc5\Route;
use Mvc5\Arg;
class Filter
{
/**
* @param Route $route
*/
public function __invoke(Route $route)
{
$route[Arg::PATH] = urldecode($route->path()) ?: Arg::SEPARATOR;
}
}
| true |
45fea311a857567d0f9665d1bf992966847080e6 | PHP | arnaudjuracek/lopendoc | /WP/templates/content-modules/meta.php | UTF-8 | 3,349 | 2.578125 | 3 | [] | no_license |
<?php
$auteurs = get_the_author();
if( !empty($auteurs) ) {
$htmlTags = '<div class="auteurs auteurs-list">';
$htmlTags .= '<div class="legende">';
$htmlTags .= __('Author: ', 'opendoc');
$htmlTags .= '</div>';
$htmlTags .= '<div class="contenu">';
// foreach( $auteurs as $auteur) {
$authorName = $au... | true |
ee41246b3fefabe00b627a1de6ea2be3a934bb83 | PHP | koriym/app-state-diagram | /src/LabelName.php | UTF-8 | 507 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Koriym\AppStateDiagram;
use function sprintf;
/** @psalm-immutable */
final class LabelName implements LabelNameInterface
{
public function getNodeLabel(SemanticDescriptor $descriptor): string
{
return $descriptor->id;
}
public function getLinkLabel(... | true |
e7cd3d6f082c2856fd9b48eb17500f6b5a7a717e | PHP | beamreaching1/F19-Team12-Wagner-Roswurm-Patel-Withycombe | /Unused/display_user.php | UTF-8 | 865 | 3.015625 | 3 | [] | no_license | <?php
//Pseudocode for database connection
$host = "172.31.64.59";
$dbuser = "team12";
$dbpass = "hG827vnymmBh5CVkTSZ3";
$dbname = "team12";
//Establish SQL connection
$connection = new mysqli ($host, $dbuser, $dbpass, $dbname);
$sql = "SELECT * FROM Driver";
$result = mysqli_query($connection, $sql);
$temp = $row... | true |
fca12e0f22318a1780e2d5752508bb5fc30b9559 | PHP | Dart-Alex/sekhmet | /app/Policies/ChanUserPolicy.php | UTF-8 | 1,150 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Policies;
use App\User;
use App\ChanUser;
use Illuminate\Auth\Access\HandlesAuthorization;
use App\Chan;
class ChanUserPolicy
{
use HandlesAuthorization;
/**
* Determine whether the user can create chan users.
*
* @param \App\User $user
* @return mixed
*/
... | true |
b8257701a3d13a963626adb2b3cd3676125ee48e | PHP | AbdulazizAladwi/ria | /app/Models/Requirement.php | UTF-8 | 1,206 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Str;
class Requirement extends Model
{
use SoftDeletes;
protected $table = 'requirements';
public $timestamps = true;
protected $fillable = array('type', 'deadlin... | true |
9226f4f918b7078c1142eb8c01cf681587323142 | PHP | zouyan198429/sxaca.org.cn | /admin/app/Business/DB/QualityControl/CourseClassDBBusiness.php | UTF-8 | 15,016 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
// 培训班管理
namespace App\Business\DB\QualityControl;
use App\Services\DB\CommonDB;
use App\Services\Tool;
/**
*
*/
class CourseClassDBBusiness extends BasePublicDBBusiness
{
public static $model_name = 'QualityControl\CourseClass';
public static $table_name = 'course_class';// 表名称
public static $rec... | true |
4c9b7ff06f0ebf09e5c2f9384e894fd0ae0b251b | PHP | antonirez/prueba_farm | /src/Service/NotificationService.php | UTF-8 | 534 | 2.953125 | 3 | [] | no_license | <?php
/**
* Envía una notificación por email a un usuario
*/
namespace App\Service;
use App\Entity\User;
use App\Provider\MailerProviderInterface;
class NotificationService
{
private $mailerProvider;
public function __construct(MailerProviderInterface $mailerProvider)
{
$this->mailerProvider ... | true |
aff62469a0e5294f12fa07486cfcb5bca0249973 | PHP | YaangVu/Laravel-Base | /src/Generator/GeneratorHelper.php | UTF-8 | 2,816 | 2.5625 | 3 | [] | no_license | <?php
namespace YaangVu\LaravelBase\Generator;
use Illuminate\Support\Arr;
use Illuminate\Support\Str;
use JetBrains\PhpStorm\ArrayShape;
trait GeneratorHelper
{
#[ArrayShape(['first' => "mixed", 'last' => "mixed", 'hasSub' => "bool", 'subLevel' => "int"])]
public array $arrName = [];
public string $roo... | true |
9e7012b5f0b123288f395b93d3bea7bb54a58606 | PHP | sengokyu/php-enum | /Tests/PHPEnumTests.php | UTF-8 | 4,345 | 3.125 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace Sengokyu\Lang;
use PHPUnit\Framework\TestCase;
class Day extends PHPEnum
{
protected static function initialize()
{
self::register('SUNDAY');
self::register('MONDAY');
self::register('TUESDAY');
self::register('WEDNESDAY');
self::register('THURSDAY');
... | true |
2b2954fcb8d9f9112a34de79fdc64958a41dd58f | PHP | FaisalNabil/AgriERP | /data/fertilizer_data_access.php | UTF-8 | 1,231 | 2.578125 | 3 | [] | no_license | <?php require_once(APP_ROOT."/lib/data_access_helper.php") ?>
<?php
function addFertilizerToDb($fertilizer){
$query = "INSERT INTO Fertilizer(Name, PricePerUnit) VALUES('$fertilizer[Name]', $fertilizer[PricePerUnit])";
return executeNonQuery($query);
}
function editFertilizerToDb($fertilizer){
$query = "UPD... | true |
99babae7ae304781c5a057c6739183139ee26a78 | PHP | wilsonge/framework-api | /src/Service/DatabaseProvider.php | UTF-8 | 1,497 | 2.546875 | 3 | [] | no_license | <?php
/**
* @copyright Copyright (C) 2016 George Wilson. All rights reserved.
* @license GNU General Public License version 3 or later; see LICENSE.txt
*/
namespace Wilsonge\Api\Service;
use Joomla\Database\DatabaseFactory;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Registry\Re... | true |
387b0143a20851132fda330dd7fd07e9d6ddb009 | PHP | Vincenzo-Wang/YiitoBlogLog | /models/Blog.php | UTF-8 | 1,091 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "{{%admin_log}}".
*
* @property string $log_id
* @property integer $admin_id
* @property string $log_info
* @property string $log_ip
* @property string $log_url
* @property integer $log_time
*/
class Blog extends \yii\db\ActiveReco... | true |
49a325e3e263216859cc569efba7b79d8b993b73 | PHP | cha63506/Upload-181 | /class/fileManager.class.php | UTF-8 | 1,061 | 2.984375 | 3 | [] | no_license | <?php
class FileManager {
private $table;
private $upload_dir = UPLOAD_FOLDER;
private $db;
/**
* @param string $table
*/
function __construct( $table = "files" ) {
$this->table = $table;
$this->db = connect_to_mysql();
}
/**
* @param $filename
* @param $tmp_name
* @return bool
*/
function sa... | true |
d917b4f2d0b9254c0d0064319ee774087da7bcf4 | PHP | IgorTananakin/PHP_task | /2/pages/functions.php | UTF-8 | 1,158 | 2.953125 | 3 | [] | no_license | <?php
$users = 'pages/users.txt';
function register($name, $pass, $email) {
$name = trim(htmlspecialchars($name));
$pass = trim(htmlspecialchars($pass));
$email = trim(htmlspecialchars($email));
if($name == '' || $pass == '' || $email == '') {
echo "<h3 style='color:red;'>Заполнены не все поля... | true |
9f5c9d7931ba1b3de81b304e5dc6818bc59f1a8f | PHP | tugmaks/Morphos | /tests/russian_plularize_basic.phpt | UTF-8 | 523 | 2.65625 | 3 | [] | no_license | --TEST--
test for russian pluralization.
--FILE--
<?php
require dirname(__FILE__).'/../vendor/autoload.php';
$plu = new morphos\RussianPlurality();
for ($i = 1; $i <= 25; $i++)
echo $plu->pluralize('дом', $i)."\n";
?>
--EXPECT--
дом
дома
дома
дома
домов
домов
домов
домов
домов
домов
домов
домов
д... | true |
41c54fafb9830b8a329d20101bd5d86a3cf2a9e5 | PHP | raalveco/aspos | /app/models/cuenta.php | ISO-8859-1 | 2,088 | 2.546875 | 3 | [] | no_license | <?php
class Cuenta extends ActiveRecord{
public static function registrar($rfc, $nombre, $paquete){
if(Cuenta::existe("rfc = '".$rfc."'")){
return false;
}
$cuenta = new Cuenta();
$cuenta -> activo = "SI";
if(Session::get("administrador_id")){
$cuenta -> usuario_creacio... | true |
a70a254dce46bf63ad2bb825f17918a3c188764c | PHP | bloc-notes/php | /laboratoire03/index-laboratoire02.php | UTF-8 | 3,530 | 3.78125 | 4 | [] | no_license | <?php
require_once "librairie-date-doyon.php";
require_once "librairie-generale-doyon.php";
$strDate = date("d-m-Y");
echo "Nous sommes le $strDate.<br /><br />";
/* 1er technique : Récupération du jour, mois et année à partir de la fonction date(). */
$strJour = date("d");var_dump($s... | true |
13b9c48dae6fac33d65475e1d9bc8b4ea3a42c14 | PHP | edwiljonas/menu | /classes/core/display.class.php | UTF-8 | 1,226 | 2.609375 | 3 | [] | no_license | <?php
#PLUGIN DISPLAY MANAGEMENT
class hmenu_display{
#CLASS VARS
private $plugin_dir;
#CONSTRUCT
public function __construct($plugin_dir){
//define plugin directory path
$this->plugin_dir = $plugin_dir;
}
#GET DIRECTORY
public function get_directory(){
return $this->plugin_dir;
}
... | true |
f794604b6cb8454ea43387b7dc335df447c40692 | PHP | kapitoshka1/19.11.2018 | /index.php | UTF-8 | 338 | 3.375 | 3 | [] | no_license | <?php
$arr = array(41,22,46,7,0,-2,-3,41,0,-17,-1);
$max = $arr[0];
for($t=0;$t<=;$t++){
if($max<$arr[$t]){
$max = $arr[$t];
};
};
echo "max" .$max;
?>
<?php
echo "<br/>";
$arr = array(41,22,46,7,0,-2,-3,41,0,-17,-1);
for($i = 0, $sum = 0; $i <10; $i++)
if($arr[$i] > 0)
$sum += $arr[$i];... | true |
d1957041996096dc8eebd555a661cdde92b49ad4 | PHP | SterlingAr/kampai | /app/Http/Services/Auth/impl/JWTAuthService.php | UTF-8 | 4,768 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: rincewind
* Date: 1/27/18
* Time: 10:02 PM
*/
namespace App\Http\Services\Auth;
use App\Http\Services\Osm\OsmServiceInterface;
use App\Http\Services\User\UserServiceInterface;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Foundation\Validation\Val... | true |
fe6027001986494d245fa0dd76f499faa28ff6b2 | PHP | HackingPolitics/hp-backend | /src/Security/Voter/AccessBlockedVoter.php | UTF-8 | 1,859 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Security\Voter;
use App\Security\AccessBlockService;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
use Symfony\Component\Security\Core\Security;
class AccessBlockedVoter extends Vot... | true |
f72e0337fdc3e5bc50c1fe5bc64ff8dee8943c12 | PHP | deprecated-packages/rector-ci | /src/Github/GithubRepositoryGetter.php | UTF-8 | 1,205 | 2.75 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Rector\RectorCI\Github;
use Doctrine\ORM\EntityManagerInterface;
use Rector\RectorCI\Entity\GithubRepository;
use Rector\RectorCI\Github\Exceptions\GithubRepositoryNotFoundException;
use Rector\RectorCI\Github\Query\GetGithubRepositoryQuery;
final class GithubRepositoryGetter... | true |
6c4a8964f049c4fb6df4a09c8cad86efc3ee0d20 | PHP | aminspicse/myspeec | /application/models/users/Login.php | UTF-8 | 635 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
class Login extends CI_Model
{
function check_data($username, $password)
{
$this->db->select('*');
$this->db->from('users');
$this->db->where('username',$username);
$this->db->where('password',$password);
if($query... | true |
05de77159cd25b478f5fa72c0140e7a467104b78 | PHP | wfyson/Disaggregator2 | /extensions/writers/wordWriter.class.php | UTF-8 | 2,567 | 2.96875 | 3 | [] | no_license | <?php
class WordWriter
{
public static function write(DisaggregatorPerson $person, Document $document, $redactions)
{
$root = $_SERVER['DOCUMENT_ROOT'];
$documentDir = "sites/Disaggregator2/data/documents/";
$ext = Document::getExtension(basename($document->... | true |
e270a4e5142b63dfce2a3f8cd5c46c608d2de5de | PHP | Mecyu/swoole-pool | /src/Pool.php | UTF-8 | 1,226 | 2.875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: myron
* Date: 2019/7/29
* Time: 下午5:39
*/
namespace Mecyu\SwoolePool;
class Pool
{
protected $binds;
protected $instances;
/**
* Pay constructor.
*/
public function __construct()
{
$this->serviceRegister();
}
/**
* bind... | true |
f8c6c04bb38023dc7211284d24b4c31f154e59ec | PHP | adrianyz/Zhao_Yizhao_3014_CMS | /detail.php | UTF-8 | 3,799 | 2.796875 | 3 | [] | no_license | <?php
require_once('admin/phpscripts/config.php');
if(isset($_GET['id'])) {
//get the movie
$tbl = "tbl_movies";
$col = "movie_id";
$id = $_GET['id'];
$getMovie = getSingle($tbl, $col, $id);
if(isset($_POST['submit'])){
$name = $_POST['name'];
$rating = $_POST['rating']... | true |
667afa75bfc524743b1d44e6f80503405b9cf4f5 | PHP | buzz1274/weighttracker | /api/controllers/weightController.php | UTF-8 | 7,900 | 2.625 | 3 | [] | no_license | <?php
class weightController extends controller {
public function __construct($app) {
parent::__construct($app);
$this->weight = new weightModel();
$this->user = new userModel();
}
//end __construct
/**
* gets all weights for the curr... | true |
585bc27999d625c20990499775d877adbe638dbc | PHP | hanley261/AccountingPHP | /src/login.php | UTF-8 | 5,275 | 3.078125 | 3 | [] | no_license | <?php
// Include config file
$config['db'] = array(
'host' =>'localhost',
'username' =>'rmorga51',
'password' =>'',
'dbname' =>'accounting'
);
//change dbname back to 'accounting' before committing
$db = new PDO('mysql:host=' . $config['db']['host'] . ';dbname=' . $config['db']['dbname'], $config['db']['user... | true |
a5001465c2850f053648af52de6f7417b8d5f2c2 | PHP | xandros15/anime-charades | /src/AnimeCharades.php | UTF-8 | 3,423 | 3.3125 | 3 | [] | no_license | <?php
namespace App;
class AnimeCharades implements \JsonSerializable, \Countable
{
/** @var CharadeItem[] */
private $done = [];
/** @var CharadeItem[] */
private $list;
/** @var string */
private $name;
/** @var array */
private $players;
/** @var bool */
private $started;... | true |
b76ccd6b9b604e0c8854ed8a0514eb5486c65aee | PHP | khushboo30796/language-transltr | /language-transltr-mycode/webpages/insert4.php | UTF-8 | 5,512 | 2.546875 | 3 | [] | no_license | <?php
require_once('dataObject.php');
error_reporting(error_reporting()&~E_NOTICE);
?>
<p align="right"><a href="loginhome1.php">Home</a></p>
<center>
<h2>Indian Institute of Technology,Indore</h2>
<h3>Research Paper Portal</h3>
<h3>Add new publication/patent</h3>
<body style="background-image :url(iitilogo-2.png);
... | true |
01614d6c102465d0f1a63adb390ac1b4cf0ee83e | PHP | sjksathishkumar/travel | /protected/components/UserIdentity.php | UTF-8 | 4,722 | 2.84375 | 3 | [] | no_license | <?php
/**
* UserIdentity represents the data needed to identity a user.
* It contains the authentication method that checks if the provided
* data can identity the user.
*/
class UserIdentity extends CUserIdentity
{
public $userType;
private $_id;
/**
* Authenticates a user.
* The example implementation ma... | true |
7e86067eb247c6690d82d4fdb79e878caf4fbe70 | PHP | shearusherly/Shooping-Cart | /header.php | UTF-8 | 1,294 | 2.59375 | 3 | [] | no_license | <?php
session_start();
//if the session id for the user exists use the same ID
if(isset($_SESSION['SESS_CHANGEID']) == TRUE){
session_unset();
session_regenerate_id();
}
require("connection.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<head... | true |
37ff28a4c56fee3d8665fc9c5e70db8f829ca0d8 | PHP | ggunlugu/ornekler | /frameworks/lithium/0.9.9/libraries/lithium/test/templates/console/coverage.txt.php | UTF-8 | 398 | 2.53125 | 3 | [
"MIT"
] | permissive | {:heading2}Code Coverage{:end}
<?php
foreach ($data as $class => $coverage) {
echo ($coverage['percentage'] >= 85 ? "{:success}" : "{:error}");
echo "{$class}{:end}: ";
echo count($coverage['covered']) . " of " . count($coverage['executable']);
echo " lines covered (";
echo ($coverage['percentage'] >= 85 ? "... | true |
5462735fce2e7a6ce5c70a0b46a78806de4f5364 | PHP | kemalbehram/planoo.ai | /src/PromotionBundle/Checker/PromotionEligibiltyChecker.php | UTF-8 | 1,705 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: manuel
* Date: 17/11/16
* Time: 16:00
*/
namespace PromotionBundle\Checker;
class PromotionEligibiltyChecker
{
protected $datesEligibilityChecker;
protected $usageLimitEligibilityChecker;
protected $couponsEligibilityChecker;
protected $rulesEligib... | true |
2e79ea05047fd24f313b9378a35535efc7e30c18 | PHP | ravibeta/PHPSamples | /samplecurl.php | UTF-8 | 1,513 | 2.53125 | 3 | [] | no_license | <?php
function cURLcheckBasicFunctions()
{
if( !function_exists("curl_init") &&
!function_exists("curl_setopt") &&
!function_exists("curl_exec") &&
!function_exists("curl_close") ) return false;
else return true;
}
// declare
if( !cURLcheckBasicFunctions() ) print_r('UNAVAILABLE: cURL Bas... | true |
c613d31813acf8a7a9b959f5b099fa0c4640daa3 | PHP | Zieheavy/proftaak2 | /partials/navigation.php | UTF-8 | 3,187 | 2.515625 | 3 | [] | no_license | <?php
include 'include/get/getPermissions.php';
$currentPage = explode("/",$_SERVER['PHP_SELF'])[2];
$active = -1;
$admin = -1;
$verified = $_SESSION["verified"];
$anyEditRights = false;
$createDocument = false;
//checks if you have permisons to verify a user or if you have permission to create a new college
if($_SES... | true |
91dee2b389b22d8c3a9a3c636f8ed2c8563b900e | PHP | SKSteeve/Courses | /02.TechFunfamentals-php/02.ExercisesTech/08.Arrays-Exercises-php/07.MaxSequenceOfEqualElements.php | UTF-8 | 528 | 3.34375 | 3 | [] | no_license | <?php
$arr = array_map('intval',explode(' ' , readline()));
$count = count($arr);
$bestScore = 0;
$bestElement = '';
for($i = 0; $i < $count; $i++)
{
$repeats = 1;
for($j = $i + 1; $j < $count; $j++)
{
if($arr[$i] === $arr[$j])
{
$repeats++;
}
else
{
... | true |
7a62e1af5f2c393e25eec295920523d7ef688d75 | PHP | SpencerNussbaum/game-on | /types/tasks/task_shortcode.php | UTF-8 | 96,324 | 2.578125 | 3 | [] | no_license | <?php
session_start();
/*
This is the file that displays content in a post/page with a task.
This file interprets and executes the shortcode in a post's body.
*/
// Task Shortcode
function go_task_shortcode($atts, $content = null) {
extract(shortcode_atts(array(
'id' => '', // ID defined in Shortcode
'cats' =>... | true |
043607e40f813439a7bfc7220e5096193f7d2611 | PHP | whatcq/tools | /tasks/bots/0005-mode-shenglv.php | UTF-8 | 353 | 2.765625 | 3 | [] | no_license | <?php
if (empty($_SESSION['mode']) || $_SESSION['mode'] !== '声律启蒙') {
return;
}
$botName = '声律启蒙';
$d = file(__DIR__ . '/声律启蒙.txt');
while (1) {
$i = mt_rand(26, 799);
if (strlen($d[$i]) < 20) continue;
if ($sentence = trim($d[$i])) return $sentence;
if ($sentence = trim($d[$i - 6])) return $sen... | true |
f8f964ce9a35679fda8b53a57c83c14d08bfa9d4 | PHP | brunomarchioro/ldap-wordpress-plugin | /ifc-auth.php | UTF-8 | 5,262 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Plugin Name: IFC LDAP Auth
* Plugin URI: araquari.ifc.edu.br
* Description: Autenticação de usuários através do LDAP.
* Version: 0.0.1
* Author: IFC Araquari
* Author URI: araquari.ifc.edu.br
* License: MIT
*/
add_filter('authenticate', 'ldapAuthPlugin', 10, 3);
// Comment this line if you wish to... | true |
72c32199fa40b045d57340f29460c00c4c3982b6 | PHP | afleming1992/thirdyeargroup | /model/RealStaff.class.php | UTF-8 | 1,508 | 3.421875 | 3 | [] | no_license | <?php
/**
* This object represents staff for staff management.
*
*/
class RealStaff
{
/**
* username, use to login
* @var String
*/
private $username;
/**
* Name
* @var String
*/
private $name;
/**
* Email
* @var String
*/
private $email;
/**
* Use to know if the staff guy is a mana... | true |
ff3440c22effe4e5fe7d83d3671e1f44cedfba44 | PHP | greboid/stock | /src/Stock.php | UTF-8 | 27,489 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace greboid\stock;
use \Exception;
use \greboid\stock\Database;
use \PDO;
class Stock {
private $database;
public function __construct(Database $database = null) {
if ($database == null) {
$this->database = new... | true |
65db83827f5dd5c68a8f66d3ad28f0bb4d5fc9b3 | PHP | ipaulygon/rapid | /database/seeds/ProductVarianceSeeder.php | UTF-8 | 1,632 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class ProductVarianceSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$product_variance = array (
array(
'pvProductId' => 'PROD0001',
'pvVarianceId' => 'VAR000... | true |
5ce02fb31753d5a968b415a75cfbc546933cbbc7 | PHP | jy404/GoWithEvening | /mine_tasks.php | UTF-8 | 3,531 | 2.5625 | 3 | [] | no_license | <?php
require "public_module.php";
$start = seize("start"); // 开始的列表位置
$kind = seize("kind"); // 团的种类
$username = seize0("username");
$password = seize0("password");
// 检查用户
$username = urldecode($username);
$password = urldecode($password);
$sql = "SELECT * FROM users WHERE username = '$username' and pass... | true |
2ea3a69ac557a51fd8113c660fcf695d692f9540 | PHP | WernerLuiz92-Studies/E-Commerce_BookStore__PHP7.1 | /www/src/Controller/Course/Persist.php | UTF-8 | 1,871 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Werner\BookStore\Controller\Course;
use Doctrine\ORM\EntityManagerInterface;
use Nyholm\Psr7\Response;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Werner\BookStore\Helper\FlashMessageTrait;
use Werner\BookStore\M... | true |
16b7e6c9722ded2c116efabd28660bded85cf7c6 | PHP | Ooypunk/elastic-crawler | /CrawlBase.php | UTF-8 | 555 | 2.578125 | 3 | [] | no_license | <?php
namespace ElasticCrawler;
use Elasticsearch\ClientBuilder;
/**
* Base class, for crawler classes that have anything to do with the database
*
* @author Ooypunk
*/
class CrawlBase {
protected $client;
public function getClient() {
if ($this->client === null) {
// @todo Move to some configuration fi... | true |
dca7e7a108b3d05a6c84b30194fa6d2999d2c08e | PHP | softdevelop/todo-list---laravel-angular | /app/Http/Controllers/CreatePostController.php | UTF-8 | 862 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\ToDoListModel;
use App\Http\Requests;
use Illuminate\Http\Request;
class CreatePostController extends Controller
{
public function create(Request $request)
{
$this->validate($request, [
'name' => 'required',
]);
$post = new ToDoListModel;
$post->name = $... | true |
c6f7d8a23edd03b920e908cb4041547bf7bf7bab | PHP | Ziggeo/phprecious | /database/mongo/ResilientMongoIterator.php | UTF-8 | 4,980 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
Class ResilientMongoIterator implements Iterator {
private $collection;
private $query;
private $originalSkip;
private $originalLimit;
private $originalSort;
private $originalHint;
private $elementsObtained;
private $iterator;
private $first;
function __construct($colle... | true |
21295958b0bb194998a55dffe939178b0f9c18d6 | PHP | Good725/ideabubble-lamp | /plugins/timeoff/src/StaffService.php | UTF-8 | 1,210 | 2.8125 | 3 | [] | no_license | <?php
namespace Ideabubble\Timeoff;
use Ideabubble\Timeoff\Dto\StaffSearchDto;
use Ideabubble\Timeoff\Entity\Staff;
class StaffService
{
/**
* @var StaffRepository
*/
private $staffRepository;
public function __construct(StaffRepository $staffRepository)
{
$this->staffRe... | true |
0143b9c84f27b85b7bdd59ba42eac2265121cf98 | PHP | alvinlal/php-tutorials | /variables.php | UTF-8 | 416 | 3.265625 | 3 | [] | no_license | <?php
define('MESSAGE2', 'world');
$message1 = "hello";
$name = "alvin";
$age = 19;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<h1><?php echo $message1, MESSAGE2... | true |
a1dbf24abc0d279a150bb1b3b263f20885d644de | PHP | anupamkanyal/wimb | /whereismybus/mobile/login.php | UTF-8 | 6,826 | 2.546875 | 3 | [] | no_license | <?php
session_start();
if(($_SESSION['username'])=="admin") {
echo '<table width="100%" border="1px" align="center" style="text-align:center;font-weight:bold;">
<tr>
<td><a href="?action=addbus">Add Bus</a></td>
<td><a href="?action=shwbus">Show Buses</a></td>
<td><a href="?a... | true |
4f1dd0342af8662df4df0440d64c337626b4e5f5 | PHP | gruzik-igor/DashboardInstances | /src/AppBundle/Command/ReportsChartsCommand.php | UTF-8 | 4,312 | 2.75 | 3 | [] | no_license | <?php
namespace AppBundle\Command;
use Cronfig\Sysinfo\AbstractOs;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputInterface;
class ReportsChartsCommand extends ContainerAwareCommand
{
protected fun... | true |
f1e26911fe670ae1539ad07309506829055907e5 | PHP | Cupmouse/PHPNekonium | /util/transactions.php | UTF-8 | 3,880 | 3.3125 | 3 | [] | no_license | <?php
namespace kabayaki\PHPNekonium;
include_once __DIR__.'\NekoniumType.php';
/**
* transactions object holds list of {@link transaction} or {@link data} of hash of transaction.
* That means if {@link isHashOnly()} returns true, {@link get()} returns an array of data objects,
* and the otherwise an array of tra... | true |
cdc398b8a4b0c4216ae45fda0c2a1666314c8779 | PHP | DMeloni/up | /index.php | UTF-8 | 10,133 | 2.8125 | 3 | [] | no_license | <?php
/**
* Up : upload your file, and share it
* author : dmeloni
* source : drag and drop script (lehollandaisvolant)
*/
/**
* Verify if filename is correct
* @param string $titreDocument
* @return boolean
*/
function isValidName($titreDocument){
if(!(strlen($titreDocument) >= 3 && strlen($titreDocument) ... | true |
5cdd49414cf18d5c3a23b1e12cf32b7ddfdf5218 | PHP | cmcintosh/commerce_gifts | /src/Event/GiftAttributeValueEvent.php | UTF-8 | 995 | 2.65625 | 3 | [] | no_license | <?php
namespace Drupal\commerce_gift\Event;
use Drupal\commerce_gift\Entity\GiftAttributeValueInterface;
use Symfony\Component\EventDispatcher\Event;
/**
* Defines the gift attribute value event.
*
* @see \Drupal\commerce_gift\Event\GiftEvents
*/
class GiftAttributeValueEvent extends Event {
/**
* The gift... | true |
1dbc577668be0ac12bac608c88140be89060d614 | PHP | gracianani/ReliMerge | /app/Entities/Station.php | UTF-8 | 6,337 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entities;
use Illuminate\Database\Eloquent\Model;
use DB;
use Carbon\Carbon;
class Station extends Model
{
protected $table = 'display.stations';
protected $primaryKey = 'ItemID';
private $hourly_function_name = 'display.stationrecents_hourly';
private $columns = [];
prote... | true |
4faeb2a9bbc9d5b44b913b0c4368c1b7bbd2158d | PHP | akmcomau/openmvc-exchange-rates | /classes/models/ExchangeRate.php | UTF-8 | 2,630 | 2.515625 | 3 | [] | no_license | <?php
namespace modules\exchange_rates\classes\models;
use core\classes\exceptions\RedirectException;
use core\classes\Hook;
use core\classes\Model;
use core\classes\Module;
use core\classes\Authentication;
use core\classes\models\Customer;
use core\classes\models\Administrator;
class ExchangeRate extends Model {
p... | true |
3f4ea0f94ae4c2e381210e00a8ca9e14d8b899d5 | PHP | WebStra/millica | /app/Repositories/BasketRepository.php | UTF-8 | 3,926 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Basket;
use Auth;
/**
* Class BasketRepository
* @package App\Repositories
*/
class BasketRepository extends Repository
{
/**
* @return Basket
*/
public function getModel()
{
return new Basket();
}
/**
* @return mixed
*/
... | true |
6e308465608064f94fc433d1749cdbbfa44ca4a6 | PHP | DASetya/kenalan-yuk | /app/Http/Middleware/Authenticate.php | UTF-8 | 1,095 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
// use Illuminate\Auth\Middleware\Authenticate as Middleware;
use Illuminate\Http\Request;
use Closure;
use Illuminate\Support\Facades\Auth;
class Authenticate
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Cl... | true |
887d8424a967c917704f099347d783bf7f0bd665 | PHP | kaffeesiader/progwebinfosys | /wiki/controllers/generateController.php | UTF-8 | 1,339 | 3.1875 | 3 | [] | no_license | <?php
class generateController extends Controller {
private $db;
public function __construct() {
$this->db = db::getInstance();
}
function __destruct() {
}
// function generates n Words randomly and returns them as string
public function generateRandomContent($nWords) {
$text = str_shuffle(str_repeat(st... | true |
99682ec04295b4da535035d6e6dca5afe050e8b1 | PHP | timhayes1123/servicerequests | /admin/includes/propertypage.php | UTF-8 | 26,018 | 3.1875 | 3 | [] | no_license | <?php
/**
* Class to handle all aspects of the property UI.
*
**/
class propertypage {
private $login = true;
private $propertyId = 0;
private $customerId = 0;
private $firstName = "";
private $lastName = "";
private $employeeId;
private $address = "";
private $city = "";
private ... | true |
1a3b1249c8ddaf2d8e5352cb77f7a16a59ad97be | PHP | nachmanrosen/homework | /hw_58/hw58.php | UTF-8 | 573 | 2.96875 | 3 | [] | no_license | <?php
$name=$_POST['name'];
$age=$_POST['age'];
$email=$_POST['e-mail'];
$rate=$_POST['rate'];
if(empty($name)) {
echo "no name ";
}
else{
echo "name is:". $name ;
}
echo "<br/>";
if(empty($age)) {
echo "no age ";
}
elseif($age<0||$age>120){
echo "age is not valid. age must be between 1 and 120";
}
els... | true |
e8e3b477c91587fc4d0d88d68ac0cb7c66d1dee8 | PHP | TonyBogdanov/data-expectation | /src/Exceptions/AbstractException.php | UTF-8 | 1,033 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright (c) Tony Bogdanov <tonybogdanov@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace DataExpectation\Exceptions;
use Symfony\Component\VarDumper\Cloner\VarCloner;
use Symfony\Component\VarDump... | true |
346d7cb824eed594d1a416446099922cc193fdca | PHP | rkgladson/PHPixme | /phpunit.php | UTF-8 | 2,945 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: rgladson
* Date: 4/8/2016
* Time: 11:18 AM
*/
// All errors on
namespace {
error_reporting(E_ALL);
}
// Load the autoload file.
namespace {
$autoloader = __DIR__ . '/vendor/autoload.php';
if (!file_exists($autoloader)) {
echo "Composer autoloader not found: $autol... | true |
495a38266be413f9288b9c47cf505c7af6c54440 | PHP | brnovk/university-study-master | /6th course/php - mysql (basics)/remaking tasks for another variant (v3 - salaries for departments)/php-scripts/lab11/chairs-handler.php | UTF-8 | 1,420 | 2.75 | 3 | [] | no_license | <?php
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
$requestType = '';
if (filter_input_array(INPUT_POST)) {
$requestType = INPUT_POST;
} else if (filter_input_array(INPUT_GET)) {
$requestType = INPUT_GET;
}
$rawChairsName =
filter_input($requestType, 'chairsName', FILTER_SANITIZE_SPEC... | true |
6104d534da4ba3d98888b2534fe6a0f6ce9a51f1 | PHP | abdxax/SAU | /admin/register.php | UTF-8 | 1,544 | 2.609375 | 3 | [] | no_license | <?php
$connect= mysqli_connect('localhost','root','','traditionhere');
if (isset($_POST['sub'])) {
$name=$_POST['name'];
$email=$_POST['email'];
$pass=$_POST['pass'];
$pass1=$_POST['pass1'];
$phone=$_POST['phone'];
$opi=$_POST['opi'];
$adds=$_POST['address'];
if ($pass==$pass1) {
$sql="INSERT INTO user(em... | true |
c7637fb349ee4b49fa67237c3682b9ba9977a6ac | PHP | lotharthesavior/wt-spa-theme | /WTGear/templates/writer/writer.php | UTF-8 | 1,814 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Template for Words Tree - Writer
*
* @author Savio Resende <savio@savioresende.com.br>
*/
$this->returnTemplate('breadcrumb_template');
$this_chapter_url = home_url(add_query_arg([
'action' => 'persist-chapter'
],$wp->request));
// --
$post_id = "";
$post_title = "";
$post_content = "";
$b... | true |
9386bfff2b4af24421f082576bd757b5c5a9d30c | PHP | LoBrs/calendly-sdk-php | /src/Models/Organization.php | UTF-8 | 1,462 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace LoBrs\Calendly\Models;
use LoBrs\Calendly\Calendly;
use LoBrs\Calendly\Exceptions\ApiErrorException;
use LoBrs\Calendly\Exceptions\InvalidArgumentException;
use LoBrs\Calendly\Traits\Timeable;
/**
* @property $uri
* @property $plan Active subscription plan or trial plan
* @property $stage Current ... | true |
609169a5e18fd2131a76552dc14d370310774d0c | PHP | lunanan/abs4sos | /databaseValidation/pub/model/Activite.php | UTF-8 | 1,592 | 3.6875 | 4 | [] | no_license | <?php
/**
* Cette classe représente une activité qu'un utilisateur pratique.
* @author Nicolas BLANCHARD & Alan GASSINE
*/
class Activite{
private $idAct;
private $laDate;
private $description;
private $unUtilisateur;
/**
* Constructeur de Utilisateur
*/
public function __construct(){}
/**
* Initialis... | true |
5cee4fb37b11842ff324c0836ef72128f1ab2660 | PHP | andri000me/quizkuy | /backend/api-quiz-kuy/application/helpers/app_helper.php | UTF-8 | 1,493 | 3.046875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
function search_array($array, $key, $value)
{
$results = array();
if (is_array($array)) {
if (isset($array[$key]) && $array[$key] == $value) {
$results[] = $array;
}
foreach ($array as $subarray) {
$results = array_merge($results, search_array($subarray, ... | true |
8901b7846c5005be0130f5f9ee59ad75f05d6005 | PHP | asanoturna/Finance-1 | /trunk/setting - Copy.php | UTF-8 | 2,148 | 2.609375 | 3 | [] | no_license | <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Finance - Setting</title>
</head>
<body>
<p><a href="detail.php">Detail</a> | <a href="category.php">Manage Category</a></p>
<h3>Setting</h3>
<?php
date_default_timezone_set("Asia/Saigon");
require("config.php");
require("ut... | true |
4a7885f8b258a67e00a20ee1bed9a3e16ba14aa1 | PHP | gabrielivan/ProgramacionIII | /Clase-05/clases/inscripcion.php | UTF-8 | 514 | 2.9375 | 3 | [] | no_license | <?php
class Inscripcion
{
public $nombreAlumno;
public $apellidoAlumno;
public $emailAlumno;
public $nombreMateria;
public $codigoMateria;
public function __construct($nombreAlumno, $apellidoAlumno, $emailAlumno, $nombreMateria, $codigoMateria)
{
$this->nombreAlumno = $nombreAlumno;... | true |
17827f68eb8ca039d7ebb37837f4d290a73bd038 | PHP | VictorEspiritu/microservices-persistence | /src/EventSourcing/Domain/Model/Meetup/ScheduledDate.php | UTF-8 | 330 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace EventSourcing\Domain\Model\Meetup;
final class ScheduledDate
{
private $date;
private function __construct(string $date)
{
$this->date = $date;
}
public static function fromString(string $date): ScheduledDate
{
return new self($date)... | true |
22f0ac48038e9d4b2a8811f5011c99a2674fb5ec | PHP | DamianKrzeminski/Gallery | /admin/includes/user.php | UTF-8 | 3,050 | 2.703125 | 3 | [] | no_license | <?php
class User extends Db_obejct{
protected static $db_table = "users";
protected static $db_table_fields = array('username', 'password', 'email', 'first_name', 'last_name', 'user_image', 'role');
public $id;
public $username;
public $password;
public $email;
public $first_name;
p... | true |
4c36240b50e2902474c280dcda5b65973a654c9b | PHP | keyanmca/yoga | /application/models/FitnessPromotionCodes.php | UTF-8 | 1,525 | 2.5625 | 3 | [] | no_license | <?php
/* Created by : Lekha
* on : 19th April 2012
* Class that interacts with the table fitness_promotion_codes
*/
class FitnessPromotionCodes extends Zend_Db_Table
{
protected $_name = 'fitness_promotion_codes';
public function addData($data)
{
global $db;
$data = a... | true |
8e95959e814675d347288cf56acba24d3b4bd482 | PHP | jadilson12/studied | /php/intevaloHoras/index.php | UTF-8 | 227 | 3.078125 | 3 | [] | no_license | <?php
$date = new DateTime( '2011-10-11 16:08:06' ); // data e hora
$interval = $date->diff( new DateTime( ) ); // data e hora atual
echo $interval->format( '%Y Anos, %m Meses, %d Dias, %H Horas, %i Minutos e %s Segundos' );
| true |
ba1fae82e8f2421185564a3378e7806256744f6f | PHP | KouyeHugues/api_rest | /src/librairy/section/Update.php | UTF-8 | 1,853 | 2.84375 | 3 | [] | no_license | <?php
//Headers required
//Access of data from any engine (*)
header("Access-Control-Allow-Origin:*");
//Format of data that will be sent
header("Content-Type: Application/json; charset=UTF-8");
//Authorized method
header("Access-Control-Allow-Methods: PUT");
//duration of the request
header("Access-Control-Allow-... | true |
72b31f33a9eff0bc8a768d8919d2b0d7f11ca9fc | PHP | GamakCZ/LinkSlots | /LinkSlots/src/linkslots/LinkSlots.php | UTF-8 | 1,841 | 2.71875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace LinkSlots;
use linkslotsapi\API;
use pocketmine\event\Listener;
use pocketmine\plugin\PluginBase;
use pocketmine\scheduler\Task;
use pocketmine\Server;
/**
* Class LinkSlots
* @package LinkSlots
*/
class LinkSlots extends PluginBase implements Listener {
/** @var string[] $servers */
pub... | true |
9212d38aa752ae2aea9fd16e6f8f0d797222803e | PHP | linjuchen/dingtalk-robot | /src/Robot.php | UTF-8 | 2,662 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Zing\DingtalkRobot;
use GuzzleHttp\Client;
use Zing\DingtalkRobot\Exceptions\CannotSendException;
use Zing\DingtalkRobot\Exceptions\InvalidArgumentException;
use Zing\DingtalkRobot\Messages\Message;
use Zing\DingtalkRobot\Messages\TextMessage;
class Robot
{
public const BASE_URI = 'https://oapi.d... | true |
e616a2b4224cffdf5cdbccfe246903e1e46e01a5 | PHP | tharindu97/SchoolResultSystem | /view/viewStudent/marks.php | UTF-8 | 1,889 | 2.578125 | 3 | [] | no_license | <?php
include '../../model/db_school_con.php';
$connection = setConnection();
session_start();
if(isset($_SESSION['id'])){
$stuId = $_SESSION['id'];
$query = "SELECT * FROM `marks` WHERE `student_id` = '$stuId'";
$result = mysqli_query($connection, $query);
... | true |
4ed9ae70afb70e2c0b6de232f55e66d34acdd5b6 | PHP | AnthonyVu/mathgame | /authenticate.php | UTF-8 | 288 | 2.578125 | 3 | [] | no_license | <?php
session_start();
extract($_POST);
if (($_POST['email'] === "a@a.a") && ($_POST['password'] === "aaa")) {
$_SESSION["authenticated"] = true;
header("Location: index.php");
} else {
$error = "Uh oh! Something's wrong.";
header("Location: login.php?error=$error");
}
?> | true |
f1226aaa83dd074414f9374e850b00c91747780a | PHP | joshgaber/NovaUnit | /src/Lenses/MockLensQuery.php | UTF-8 | 2,513 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace JoshGaber\NovaUnit\Lenses;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use JoshGaber\NovaUnit\Constraints\EloquentCollectionContains;
use PHPUnit\Framework\Assert as PHPUnit;
class MockLensQuery
{
private $query;
private $results;
private $request;
... | true |
759e9b42daede6e0922cd1e517e2a7241bb9d0bb | PHP | shamnad-sherief/tencent-marketing-api-php-sdk | /src/Parameters/Filter.php | UTF-8 | 3,318 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: lizhicheng
* Date: 2019/8/13
* Time: 19:39
*/
namespace MrSuperLi\Tencent\Ads\Parameters;
// 当 operator 为 EQUALS、CONTAINS、LESS_EQUALS、LESS、GREATER_EQUALS、GREATER 时,values数组长度为1;
// 当 operator 为 IN 时,values数组长度为100;
// filtering=[{"field":"system_status", "operator": "EQU... | true |
afdf712ad20baf7bd4df4473749941b0eb438792 | PHP | felipe-jm/cineweb | /application/views/_components/unidadesSelect.php | UTF-8 | 798 | 2.671875 | 3 | [] | no_license | <?php if (!$this) {
exit(header('HTTP/1.0 403 Forbidden'));
}
require_once APP . 'models/unidade.php';
$unidades = Unidade::all();
?>
<label for="unidade_id">
Unidade
<select id="unidade_id" name="unidade_id" class="input" required>
<?php foreach ($unidades as $unidade) { ?>
<?php if (isset($unidade_... | true |
e867a487148d64f9cb438ed0cf63c1e7df6aef87 | PHP | marcelobveras/APSOO | /Hotel/Connection/TesteConexao.php | UTF-8 | 256 | 2.875 | 3 | [] | no_license | <?php
require("PDOConnectionFactory.class.php");
try {
$pdo = new PDOConnectionFactory();
$pdo->getConnection();
// estou conectado
echo "Sucesso";
$pdo = null;
}catch (PDOException $ex){
echo $ex->getMessage();
}
echo "<br>teste 123"; | true |
f66ccf21b2d953fab29bddd4584573464be05032 | PHP | mrjgreen/authentic | /src/Phroute/Authentic/NamedPersistenceInterface.php | UTF-8 | 343 | 2.53125 | 3 | [] | no_license | <?php namespace Phroute\Authentic;
/**
* Interface NamedPersistenceInterface
* @package Phroute\Authentic
*/
interface NamedPersistenceInterface {
/**
*
*/
public function forget();
/**
* @return mixed
*/
public function get();
/**
* @param $value
*/
public f... | true |
b61f52846b0e94729d079e8de83bd53c25412ef3 | PHP | jianfyun/api-easy-demo | /src/App/Controllers/DemoController.php | UTF-8 | 1,343 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Controllers;
use ApiEasy\Controller\ControllerInterface;
use ApiEasy\Http\Message\Request;
use ApiEasy\Http\Message\Response;
class DemoController implements ControllerInterface
{
public function preDispatch(Request $request, Response $response)
{
//Do some common work before the p... | true |
5f3d85ab8dfd37e796419369fe5a342e117289c8 | PHP | adachigit/BlueFrog-Cocos2dx | /bin_luajit/lib/compile_scripts.php | UTF-8 | 3,887 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
require_once(__DIR__ . '/quick/ScriptsCompiler.php');
$options = array(
array('h', 'help', 0, false, 'show help'),
array('i', 'src', 1, null, 'source files directory'),
array('o', 'output', 1, null, 'output filename | output directory'),
... | true |
4fa3a3d730be00ffa1c431a2f4148976cb311585 | PHP | mike-bright/laravel-twitter-clone | /app/models/User.php | UTF-8 | 2,115 | 2.6875 | 3 | [] | no_license | <?php
// TO DO: look into these:
use Illuminate\Auth\UserTrait;
use Illuminate\Auth\UserInterface;
class User extends Eloquent implements UserInterface {
use UserTrait;
protected $table = 'user';
protected $hidden = array('password');
protected $guarded = array('id');
public function setPassword($passwor... | true |