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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
27a68f2e272f35cf93e419350b096f34bc54d9bd | PHP | gdm-1718-annadela/RisicovolSpelen | /web/app/plugins/font-awesome/includes/class-fontawesome-rest-response.php | UTF-8 | 902 | 2.65625 | 3 | [
"GPL-2.0-or-later",
"MIT"
] | permissive | <?php
/**
* Custom handling for FontAwesome REST responses.
*/
namespace FortAwesome;
use \WP_REST_Response;
/**
* Handles FontAwesome-specific enhancements to a REST response.
*/
class FontAwesome_REST_Response extends WP_REST_Response {
/**
* This header will be present on any response that is an instance
... | true |
1f07e7e6635d8cc3bd27d8136e65e0f5e473fe15 | PHP | dnj/autounattend | /src/Setup/DiskConfiguration/Disk/CreatePartition.php | UTF-8 | 1,078 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace dnj\Autounattend\Setup\DiskConfiguration\Disk;
use dnj\Autounattend\Attributes\Attribute;
use dnj\Autounattend\Attributes\Wrapper;
use dnj\Autounattend\ExportTrait;
/**
* @see https://docs.microsoft.com/en-us/windows-hardware/customize/desktop/unattend/microsoft-windows-setup-diskconfiguration-disk-... | true |
35a084ebd606e55e0ef5b6778ad3088a7d83ab35 | PHP | cskopelitis/glafka | /index.php | UTF-8 | 564 | 2.75 | 3 | [] | no_license | <?php
include 'src/HtmlPage.php';
require_once 'model/Course.php';
require_once 'model/Subject.php';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Cp1252">
<title>Insert title here</title>
</head>
<body>
<?php
$page=new HtmlPa... | true |
8d1ffe3c503788cd5ac3d284a1dba8ad294e1df4 | PHP | JamesyfNascimento/DeltaInova | /application/controllers/AlunoController.php | UTF-8 | 2,246 | 2.53125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
require APPPATH . 'libraries/REST_Controller.php';
require APPPATH . 'libraries/Format.php';
class AlunoController extends REST_Controller {
public function __construct(){
header('Access-Control-Allow-Origin: *');
header('Access-C... | true |
78826f3b98d36d15e056eed2a4be0508af829d76 | PHP | proyectosby/mcee | /models/MaterialesEducativos.php | UTF-8 | 1,344 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "materiales_educativos".
*
* @property string $id
* @property int $tipo
* @property int $autor
* @property int $nivel
* @property string $estado
* @property string $otro_cual
* @property string $nombre_apellidos
* @property string... | true |
cbabe2ce658e4a9b648b441e444a714fc9ceec64 | PHP | ldaniil/weather | /core/Application.php | UTF-8 | 420 | 2.96875 | 3 | [] | no_license | <?php
namespace Core;
use Core\Source\WeatherSource;
use Core\Storage\Weather\StorageInterface;
/**
* Class Application
* @package Core
*/
class Application
{
/**
* @param WeatherSource $source
* @param StorageInterface $storage
*/
public function run(WeatherSource $source, StorageInterface... | true |
518d7eba10e8341a9ed42521bd656dac63c65aa2 | PHP | DreddyI/BotClass | /src/Logger.php | UTF-8 | 688 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: systemfailure
* Date: 11.04.17
* Time: 17:24
*/
namespace BotClass;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\FirePHPHandler;
class BotLogger
{
public $logger = null;
public function __construct($logger = null)
{
$thi... | true |
92d9ee60d97643caa890eafff98ea12497b879ba | PHP | stymiee/php-simple-encryption | /tests/unit/traits/GenerateIvTest.php | UTF-8 | 824 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace traits;
use Encryption\Cipher\AES\Aes256cbc;
use Encryption\Traits\GenerateIv;
use PHPUnit\Framework\TestCase;
use ReflectionClass;
class GenerateIvTest extends TestCase
{
public function testGenerateInsecureIv(): void
{
$mockTrait = $this->getMockForTrait(GenerateIv::class);
... | true |
f3e5f4134b297715e3fc12567aa1e81a563dfe34 | PHP | marcelhollerbach/laedit | /site/config/screen_config.php | UTF-8 | 733 | 3.078125 | 3 | [] | no_license | <?php
class Maschine extends StateMaschine
{
private $oldstate = 0;
private $states = array("login", "edit", "commit", "end");
public function __construct(){
$this->oldstate = 0;
}
public function setBand($arr)
{
$val = intval($arr[0]);
$this->oldstate = $val;
}
public func... | true |
a7d842776f9d6363e0f3bd7996354e69fb5d449a | PHP | mzulkifel/SolutionInnNew | /app/Http/Controllers/Controller.php | UTF-8 | 1,366 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
class Controller extends BaseController
{
use AuthorizesReques... | true |
c8375040a52b48b5189fc8fb4de0021f136492a0 | PHP | junioryauricasa/proycontrol-memos | /functions/registrar-memos.php | UTF-8 | 977 | 2.546875 | 3 | [] | no_license | <?php
$codigouser = $_POST['nvchcodigomemo'];
$nombre = $_POST['intnamepersonal'];
$fecha = $_POST['dtmemo'];
$oficina = $_POST['intidoficina'];
if($codigo==null || $nombre==null || $fecha==null || $oficina){
header('location: ../memos.php');
}
include ('../db/conextion.php'); //incluytendo cadena de conec... | true |
5ef7fec520e1fbdf78ffe51553d19708fa5ecc62 | PHP | amirulnu66/police | /app/Http/Controllers/admin/FeesController.php | UTF-8 | 3,310 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\FeesModel;
use Session;
use Validator;
class FeesController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
public function create(){
r... | true |
62cf0fc0ba46473a396efc54b936aa2582ec242b | PHP | alwex/botaniks | /application/forms/NodeEdit.php | UTF-8 | 1,711 | 2.578125 | 3 | [] | no_license | <?php
class Application_Form_NodeEdit extends Zend_Form
{
public $category_id;
public $node_id;
public function Application_Form_NodeEdit ($categoryId=null, $nodeId=null)
{
$this->node_id = $nodeId;
$this->category_id = $categoryId;
parent::__construct();
}
... | true |
3cb4896674e3225d62cf0fab932a9bed2f34becc | PHP | QueenWang/algoCodePhp | /practice_2022dec/4_number/leet0001_number_twosum_easy.php | UTF-8 | 2,039 | 3.890625 | 4 | [] | no_license | <?php
// command line php xx.php
$arr = [2,7,11,15];
echo "\n input array: ".implode(',',$arr)."\n";
$target = 9;
echo "\n == two sum algo == \n";
$solution = new Solution();
$result1 = $solution->twoSum($arr, $target); //use pointer, which will change the origional array
echo "two sum result:".implode(',',$result1... | true |
32057f9304ad1187724d1db27f4d19e0a6b5e423 | PHP | darkain/altaform-core | /modules/audit.php | UTF-8 | 2,195 | 3.15625 | 3 | [
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace af;
////////////////////////////////////////////////////////////////////////////////
// TO USE THIS CLASS, CALL
//
// afAudit::something($type, $id, $old [optional], $new [optional])
//
// METHOD NAME something CAN BE ANYTHING, AND IS USED TO LOG THE TYPE OF ACTION
// THAT IS TAKING PLACE. FOR INST... | true |
a2b2c78ed1ef8659cc283e6c571c5db40d994cfb | PHP | yangruofeng/wechat | /microbank/class/passbook/trading/headquarter.to.partner.trading.class.php | UTF-8 | 1,588 | 3.0625 | 3 | [] | no_license | <?php
class headquarterToPartnerTradingClass extends tradingClass {
private $partner_account_id;
private $amount;
private $currency;
public function __construct($partnerAccountId, $amount, $currency,$remark=null,$handler_name="")
{
parent::__construct();
$this->partner_account_id ... | true |
15d3bd9942c4cd8327556d2cbcffc25bb3521656 | PHP | ysnkreatinc/endpoints | /packages/kreatinc/l2l-bot/src/Controllers/FacebookController.php | UTF-8 | 7,653 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Kreatinc\Bot\Controllers;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Illuminate\Support\Facades\Validator;
use Kreatinc\Bot\Models\Page;
use Kreatinc\Bot\Services\FacebookService;
class FacebookController extends Controller
{
public function __construct(FacebookService $s... | true |
3e5e83835389f62a058073715e16ef62d45ca0ab | PHP | itk-dev/serviceplatformen | /lib/Oio/Ebxml/CountryIdentificationCodeType.php | UTF-8 | 1,364 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace Oio\Ebxml;
/**
* Class representing CountryIdentificationCodeType
*
* The country code based on the 4 diffent schemes.
* Landeidentifikations kode baseret på de 4 forskellige formater.
* XSD Type: CountryIdentificationCodeType
*/
class CountryIdentificationCodeType
{
/**
* @var string $... | true |
99676e725548c349cbd90edc2853af7b65f6a34c | PHP | maennchen/ZipStream-PHP | /test/TimeTest.php | UTF-8 | 888 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace ZipStream\Test;
use DateTimeImmutable;
use PHPUnit\Framework\TestCase;
use ZipStream\Exception\DosTimeOverflowException;
use ZipStream\Time;
class TimeTest extends TestCase
{
public function testNormalDateToDosTime(): void
{
$this->assertSame(
Tim... | true |
72bcf420318f406e7bbd0098723dc71e85c4ac0b | PHP | firomero/graphity-php | /src/main/php/Graphity/Rdf/Literal.php | UTF-8 | 4,225 | 3 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Copyright 2011 Graphity Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable la... | true |
2da5c3ba47489ee5bcfd36210acacd4e24b4c09d | PHP | worldia/textmaster-api | /lib/Textmaster/Model/AbstractObjectInterface.php | UTF-8 | 587 | 2.546875 | 3 | [] | no_license | <?php
/*
* This file is part of the Textmaster Api v1 client package.
*
* (c) Christian Daguerre <christian@daguer.re>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Textmaster\Model;
interface AbstractObjectInterface
{
/**
... | true |
e34b67538214cfdb0bcd3c218ad49847dda41891 | PHP | fede-andri/TpFinal | /controller/LoginController.php | UTF-8 | 3,118 | 2.515625 | 3 | [] | no_license | <?php
class LoginController{
private $renderer;
private $model;
public function __construct($model,$renderer){
$this->renderer = $renderer;
$this->model = $model;
}
public function index(){
session_start();
if(isset... | true |
3cda26a2c3451b92bda99ad2da03ce50b1a44127 | PHP | giesenmartin/giesenwebentwicklung | /Classes/DataProcessing/FlexFormProcessor.php | UTF-8 | 3,828 | 2.703125 | 3 | [] | no_license | <?php
/*
* This file is part of the package bk2k/bootstrap-package.
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
*/
namespace Giesen\Giesenwebentwicklung\DataProcessing;
use Giesen\Giesenwebentwicklung\Utility\ArrayUtility;
use TY... | true |
59cba385b1b842f35dbe9d525f7caf535745c5fb | PHP | sakurayun/DiceRobot | /src/Data/Report/Event/GroupNameChangeEvent.php | UTF-8 | 806 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace DiceRobot\Data\Report\Event;
use DiceRobot\Data\Report\Contact\{Group, Operator};
use DiceRobot\Data\Report\Event;
/**
* Class GroupNameChangeEvent
*
* DTO. Event of that the group's name has changed.
*
* @package DiceRobot\Data\Report\Event
*
* @link https://github.c... | true |
1a2d333a0432f4fc10ebcfd4cac8c155ac8d65d8 | PHP | Tahir-298/Register | /register.php | UTF-8 | 1,939 | 2.9375 | 3 | [] | no_license | <?php
session_start();
//connect to database
$db = mysqli_connect("localhost", "root", "", "authentication");
if (isset($_POST['register_btn'])) {
session_start();
$username = mysql_real_escape_string($_POST['username']);
$email = mysql_real_escape_string($_POST['email']);
$password = mysql_r... | true |
98b6a21471624f4a084d2b31d5416323d31aaa1a | PHP | kinnngg-lenz/csacerc | /app/Note.php | UTF-8 | 1,641 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Note extends Model
{
protected $fillable = [
'name', 'department_id', 'college_id', 'owner', 'user_id', 'slug', 'url', 'semester',
];
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public functio... | true |
42b993a0f31259793e6076d7bf4e12be58ea0ebd | PHP | LautaroFullone/MoviePass | /TPFinal/Models/Functions.php | UTF-8 | 2,027 | 3.25 | 3 | [] | no_license | <?php
namespace Models;
class Functions{
private $id;
private $idRoom;
private $idMovie;
private $occupiedSeats;
private $date;
private $hour;
public function __construct($idRoom="", $idMovie="", $occupiedSeats="", $date="",$hour="")
{
$this->idRoom=$idRoom;
$this->i... | true |
b9ec9abf8f9b1db0697c624382227885d8400f67 | PHP | rlee1957/familyexplorer | /maintenance/add_campaign_reference.php | UTF-8 | 1,332 | 2.546875 | 3 | [] | no_license | <?php
include("../_common/includes/show_errors.php");
include("includes/sql_functions.php");
$field = "";
$value = "";
include("includes/data/get_campaign_info.php");
$campaigns = $results["recordset"];
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" type="text/css" hre... | true |
ab50797da8141046d3bebd2785271178fc0f909f | PHP | ksecurity45/OSWE | /AWAE-PREP-master/Edabit/php/eighteen.php | UTF-8 | 138 | 2.984375 | 3 | [] | no_license | <?php
function noOdds($arr)
{
$na = array();
forEach($arr as $i)
if ($i % 2 == 0)
array_push($na, $i);
return $na;
}
?>
| true |
7706c953f683a128f3fe794cad1a120a26190417 | PHP | arjunnaik/WTA-Lab-Programs | /Lab06/program06.php | UTF-8 | 282 | 2.921875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
</head>
<body>
<h1>
<?php
$file='count.txt';
$count=strval(file_get_contents($file));
file_put_contents($file,(int)$count+1);
echo("you are visitor number:".$count);
?>
</h1>
</body>
</html>
| true |
115c2a6af830374020dd49f511cee909ab0f2bb6 | PHP | dicamo1031/ximedic | /app/controllers/DonanteController.php | UTF-8 | 3,482 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
class DonanteController extends BaseController {
public function getIndex(){
$pagi = 'Donantes';
if (Session::has('usuario')) {
$donante = Donante::paginate(5);
return View::make('Donante.index',
["donantes"=> $donante,
'pag'=>$pagi,
... | true |
4e5f79e477c7537d67d10f2741055096268e01d3 | PHP | hackmbh/CuidarBrincando | /application/models/professor_model.php | UTF-8 | 4,201 | 2.8125 | 3 | [] | no_license | <?php
class Professor_Model extends CI_Model
{
/**
* Cadastra os dados do professor
*
* @param array $info
* @return int inserted id
* @throws RuntimeException
*/
public function save(array $info)
{
$sql = '
INSERT INTO
professor (
... | true |
c191bb725847e94c6d01f3c4ca68ceba3733fd76 | PHP | tabbabi/init-cms-bundle | /Command/InstallCommand.php | UTF-8 | 3,432 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Networking package.
*
* (c) net working AG <info@networking.ch>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Networking\InitCmsBundle\Command;
use Symfony\Component\Console\Comman... | true |
1aa36b4d25af4f3e343c9e5f4b5c403f0915ea61 | PHP | namnv609/php-onesignal-sdk | /src/Utils/Validation.php | UTF-8 | 2,821 | 2.828125 | 3 | [] | no_license | <?php
namespace NNV\OneSignal\Utils;
use Symfony\Component\OptionsResolver\OptionsResolver;
/**
* Validation OneSignal API body parameters
*/
class Validation
{
/**
* OptionsResolver instance
*
* @var Symfony\Component\OptionsResolver\OptionsResolver
*/
private $optionsResolver;
/*... | true |
8adb603aa572aae8f75f39b18ea0521b9aad01c1 | PHP | m8e/silverstripe-docstation | /src/MarkdownDocumentInterface.php | UTF-8 | 352 | 2.75 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace SilverStripe\Docstation;
/**
* Defines an object that contains markdown document properties
* @package SilverStripe\Docstation
*/
interface MarkdownDocumentInterface
{
/**
* @return string
*/
public function getHTML(): string;
/**
* @return array
*/
public func... | true |
9c0d2020d9d38242bcc194f33d2d89ef505c34e0 | PHP | savasdersimcelik/shortcoder | /tests/ShortcoderTest.php | UTF-8 | 5,730 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Seiler\Shortcoder;
class ShortcoderTest extends \PHPUnit_Framework_TestCase
{
/**
* @param $propertyName
* @param $instance
* @return mixed
*/
private function get($propertyName, $instance)
{
$className = get_class($instance);
$reflector = new \Reflecti... | true |
49961600da824afc414a7241ff716bddf3a80de1 | PHP | 462008783/shop1108 | /backend/models/Category.php | UTF-8 | 1,801 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\models;
use backend\components\MenuQuery;
use creocoder\nestedsets\NestedSetsBehavior;
use Yii;
/**
* This is the model class for table "category".
*
* @property int $id
* @property string $name 名称
* @property string $intro 简介
* @property int $depth 深度
* @property string $pid 父级
* @pr... | true |
44068cc6f17cf48e9fb88a48a2176d9f3fe71953 | PHP | mathildeoldorf/ahousetocallhome | /login.php | UTF-8 | 4,466 | 2.515625 | 3 | [] | no_license | <?php session_start();
// if(form submitted) { handle data and redirect+exit if successful } show form; if it has been submitted populate it with the submitted values
if ($_SESSION) {
header('Location: profile.php');
exit;
}
// REQUIRE THE API AGENT ACTIVATE PROFILE TO RUN ON THE PAGE
if (isset($_GET['action']... | true |
363ff6af022120bf0721bbd807e80e452473d593 | PHP | kharysharpe/php-daemon | /src/Lifo/Daemon/Event/SignalEvent.php | UTF-8 | 550 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace Lifo\Daemon\Event;
use Lifo\Daemon\Daemon;
/**
* Event object for signal handling.
*/
class SignalEvent extends DaemonEvent
{
/**
* The signal number
*
* @var integer
*/
private $signal;
public function __construct(Daemon $daemon, $pid)
{
parent::__cons... | true |
28dae0a890902086a7351a6b3cc6360bdf73abad | PHP | arafatrahman/ting-tong | /php/login.php | UTF-8 | 1,379 | 2.578125 | 3 | [] | no_license | <?php
session_start();
include_once "config.php";
$post = filter_input_array(INPUT_POST, FILTER_SANITIZE_STRING);
$email = escape_string($post['email']);
$password = escape_string($post['password']);
if (!empty($email) && !empty($password)) {
$sql = "SELECT * FROM users WHERE email = '{$email}'";
$res =... | true |
bdea8066c4191f9e60a596e643fe7d80a9780c45 | PHP | maiskovich/Login-System | /util/DataCheck.php | UTF-8 | 834 | 2.78125 | 3 | [] | no_license | <?
require_once ('controllers/error.php');
class DataCheck extends Model
{
public function __construct(){
parent::__construct();
}
/**
* Method for checking if a value exist in db
* @param string $table
* @param string $field
* @param string $data
* @param string $errorfield
*/
p... | true |
950a0c8b862cf4ac11f346635bb9609da7e925c0 | PHP | frozzare/wp-xu | /src/foundation/class-jsonable.php | UTF-8 | 684 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
namespace Xu\Foundation;
abstract class Jsonable {
/**
* Convert the object into something JSON serializable.
*
* @return array
*/
public function json_serialize() {
$items = $this->to_array();
foreach ( $items as $key => $value ) {
if ( $value instanceof Jsonable ) {
$items[$key] = $valu... | true |
a0ce9d07caef789578968512fe2f2b2b710a1d19 | PHP | vokie123456/daikuan-3 | /public/version_info.php | UTF-8 | 1,164 | 2.6875 | 3 | [] | no_license | <?php
function curl_request($url, $data = null) {
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
if(!empty($data)) {
curl_setopt($curl, CURLOPT_POST, 1);
curl_seto... | true |
b7b8550a0c756d41be7e98feedff3a6da865704f | PHP | eng-samy/vacation-calculator | /src/Entity/Employee.php | UTF-8 | 2,717 | 3.328125 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace Vacation\Entity;
use DateTime;
/**
* Employee
*
* @package Vacation\Entity
* @author Mohamed Sheir <mohamed.sheir2014@gmail.com>
* @copyright Mohamed Sheir
*/
class Employee
{
/**
* Employee Name
*
* @var string $name
*/
protected $name;
... | true |
1e6f9a779946d2a2fca4970676bbcfd4c029a34c | PHP | alienlebarge/lab | /php/ex8/login.php | UTF-8 | 1,253 | 3.078125 | 3 | [] | no_license | <?php
// démarrage de la session
session_start();
require ('function.inc.php');
checkUser();
// gestion du formulaire
// check si le formulaire a été soumis
if ((isset($_POST['submitted'])) && ($_POST['submitted']==1)) {
$_SESSION['username'] = $_POST['username'];
$_SESSION['password'] = $_POST['password']... | true |
386acc700162ba3d79c7b80abe3e22bc3d34e51b | PHP | pixel-studio-games/cta | /models/kill_stat.php | UTF-8 | 6,552 | 2.5625 | 3 | [] | no_license | <?php
class KillStat extends AppModel {
var $name = 'KillStat';
function updateAllStats(){
$User = Classregistry::init('User');
$fields = "User.id, User.ruler";
$users = $User->find('all', array('fields' => $fields, 'recursive' => -1));
foreach($users as $user):
$this->updateKillStats($user);
... | true |
e534aa979707dfb198b150a5ae2c2d5631131f23 | PHP | ouyangbuchifan/PHP | /oy/18z/demo3.php | UTF-8 | 712 | 2.59375 | 3 | [] | no_license | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>mysql_query()函数执行sql语句</title>
</head>
<body>
<?php
$link=mysqli_connect('localhost','root','123456') or die('error').mysql_error();
$db_selected=mysqli_select_db($link,'db_study');
// insert
$result=mysql_query('insert i... | true |
9f57ffd232374bca4abdbee3e600708a725eb141 | PHP | daedalus1215/cleanphp | /module/Application/src/Application/Controller/InvoicesController.php | UTF-8 | 728 | 2.609375 | 3 | [] | no_license | <?php
namespace Application\Controller;
use CleanPhp\Invoicer\Domain\Repository\InvoiceRepositoryInterface;
/**
* Description of InvoicesController
*
* @author theAdmin
*/
class InvoicesController extends \Zend\Mvc\Controller\AbstractActionController
{
/**
*
* @var InvoiceRepositoryInterface
... | true |
802051c25acba085dad254b6453839637e326b70 | PHP | astronom/merrymall | /plugins/sfDoctrineGuardPlugin/modules/sfGuardRegister/actions/actions.class.php | UTF-8 | 7,185 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the symfony package.
* (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
*
* @package symfony
* @subpackage plugin
* @a... | true |
d963500e7c8f8d055da13a75b44a70485156ab6e | PHP | delsalfannia/PemroWebSafe4Women | /app/models/join_customer.php | UTF-8 | 918 | 2.71875 | 3 | [] | no_license | <?php
class join_customer{
private $table = 'join_customer';
private $db;
public function __construct()
{
$this->db = new Database;
}
public function tambahDataCustomer($data)
{
$query = "INSERT INTO join_customer VALUES ('', :nama, :umur, :alamat, :instansi , :email, :file_ssig, :file_sspos... | true |
10065d0c1b6d71594e0a0fab02dc0c2728ed4d56 | PHP | ansuangry/xcode-project-deploy | /xcodebuildprovisioning/reinit.php | UTF-8 | 736 | 2.703125 | 3 | [] | no_license | <?php
###########################################################
# Reinit
###########################################################
require_once SCRIPT_DIR_PATH . '/S3.php';
log_message("\033[32mRemoving all files in the S3 bucket...\033[37m");
$s3 = new S3(S3_ACCESS_KEY, S3_SECRET_KEY);
$contents = $s3->getBu... | true |
1428ead8a6aaed66bf9e08c3a50319f6fc061c37 | PHP | dominikmank/gearman | /tests/unit/JobCollectionTest.php | UTF-8 | 2,518 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace tests\dmank\gearman;
use dmank\gearman\JobCollection;
use dmank\gearman\JobHandlerInterface;
class JobCollectionTest extends \PHPUnit_Framework_TestCase
{
public function testAddSingeJob()
{
$jobCollection = new JobCollection();
$jobHandlerMock = $this->getMockBuilder(JobHandle... | true |
161e50e04b486925d3ffa083ec71b95ddb47492d | PHP | Hasib3030/DB-works-and-validation | /DB works and validation/reg.php | UTF-8 | 1,334 | 2.828125 | 3 | [] | no_license | <?php
require_once('functions.php');
if(isset($_POST['reg']))
{
$name = $_POST['empname'];
$contact = $_POST['empcontact'];
$username = $_POST['empUsername'];
$password = $_POST['emppass'];
$reg = register($name,$contact,$username,$password);
... | true |
1aac9d3ce4864dbadeab66ff098ed3a868d377c2 | PHP | Room-11/DOMUtils | /src/LibXMLFatalErrorException.php | UTF-8 | 409 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Room11\DOMUtils;
class LibXMLFatalErrorException extends \Exception
{
private $libXMLError;
public function __construct(\LibXMLError $libXMLError)
{
parent::__construct(trim($libXMLError->message), $libXMLError->code);
$this->libXMLError = $libXMLError;
}
public ... | true |
0651754f841c9f3dd74d0a7c030221a8cb9475a0 | PHP | farmercode/symfony_admin | /src/AppBundle/Entity/User.php | UTF-8 | 6,430 | 2.65625 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Config\Definition\Exception\Exception;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* Class User
* @package AppBundle\Entity
* @ORM\Entity(repositoryClass="AppBundle\Entity\UserRepository")
* @ORM\Table(name="... | true |
bff3b6b686fad8632556a23863e51e61941213b2 | PHP | zaknesler/ticketbeast | /app/Http/Controllers/Auth/LoginController.php | UTF-8 | 1,196 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Auth;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
class LoginController extends Controller
{
/**
* Display the login form.
*
* @return \Illuminate\Http\Response
*/
public function showLoginForm... | true |
fd02596f2c79651648c09841e207b76820d76ddc | PHP | tomphp/php-transform | /tests/Exception/MethodNotImplementedExceptionTest.php | UTF-8 | 968 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace tests\TomPHP\Transform\Exception;
use LogicException;
use PHPUnit_Framework_TestCase;
use TomPHP\Transform\Exception\Exception;
use TomPHP\Transform\Exception\MethodNotImplementedException;
final class MethodNotImplementedExceptionTest extends PHPUnit_Framework_TestCase
{
/** @test */
public ... | true |
9651f4f63e641ecbb692ce229d78874f931852c2 | PHP | ajpadilla/products_catalog | /app/Http/Requests/UpdateCategoryRequest.php | UTF-8 | 1,872 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Category;
use App\Repositories\CategoryRepository;
use Illuminate\Contracts\Validation\Validator;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Http\Exceptions\HttpResponseException;
class UpdateCategoryRequest extends FormRequest
{
/** @var Category $cate... | true |
5efe697dd31998804a4301534482fa67ddc54160 | PHP | Azhuro/PageBundle | /Templating/Helper/PageHelper.php | UTF-8 | 1,613 | 2.640625 | 3 | [] | no_license | <?php
/**
* (c) Johnny Cottereau <johnny.cottereau@gmail.com>
*/
namespace Azhuro\Bundle\PageBundle\Templating\Helper;
use Azhuro\Bundle\PageBundle\Model\Interfaces\PageInterface;
use Sonata\BlockBundle\Templating\Helper\BlockHelper;
class PageHelper
{
/**
* @var BlockHelper
*/
protected $blockHe... | true |
7d82b40114a3721cc05d361118127019bc3fb9f2 | PHP | d03n3rfr1tz3/PocketMine.JSONAPI | /src/JSONAPI/api/PlayerHandler.php | UTF-8 | 7,586 | 2.859375 | 3 | [] | no_license | <?php
namespace JSONAPI\api;
use JSONAPI\api\IHandler;
class PlayerHandler implements IHandler
{
private $plugin;
private $methods;
function __construct($plugin)
{
$this->plugin = $plugin;
$this->methods = array(
'players.name' => 'getPlayerByName',
'players.online' => 'getOnlinePlayers',
'players.o... | true |
41e07adee6d5455506e96cb1814efcdca0d288ba | PHP | illuminate3/cms-1 | /src/Devise/Pages/Interpreter/ViewOpener.php | UTF-8 | 2,641 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php namespace Devise\Pages\Interpreter;
/**
* Class ViewOpener opens a view for an include statement in this format:
*
* "@include('some.path.here", ...)
*
* We will use Laravel's view path finder in order to transform the 'some.path.here' into a real
* file that we can open and inspect the html and thus fet... | true |
22f476ce477f7c78855f17a03936df2098f65eba | PHP | Xovesh/Pokedex-Webpage | /src/phpscripts/users/register.php | UTF-8 | 3,106 | 2.796875 | 3 | [] | no_license | <?php
include '../other/DbConfig.php';
function generateRandom($length) {
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ+-';
$charactersLength = strlen($characters);
$randomString = '';
for ($i = 0; $i < $length; $i++) {
$randomString .= $characters[rand(0, $charac... | true |
ebae544d7ba1239d24e61e449f95e7b23e58e434 | PHP | talis/temujin | /scripts/temujin.php | UTF-8 | 2,441 | 2.78125 | 3 | [] | no_license | #!/usr/bin/php
<?php
require_once '../src/Manager.class.php';
function usage($argv)
{
echo "Usage: php {$argv[0]} -h <workerhome> -a (start|stop|status) -w <worker name> -v <version> -n <number of workers> -s <optional list of gearman servers>\n";
echo "e.g:\n";
echo " php {$argv[0]} -a status \n";
... | true |
09510765c352fb39f2cdb6ddebd5bba62cf1d85f | PHP | aftaa/creative | /app/repository/PersonRepository.php | UTF-8 | 3,851 | 2.9375 | 3 | [] | no_license | <?php
namespace app\repository;
use app\entity\Person;
use app\entity\Phone;
use app\service\Db;
use DateTime;
use Exception;
use PDO;
/**
* Class PersonRepository
* @package app\repository
*/
class PersonRepository
{
private Db $db;
private object $app;
/**
* PersonRepository constructor.
... | true |
fce47c4bacd89f7661054b0c61f8e35d184ecb97 | PHP | laraplus/form | /src/DataStores/LaravelDataStore.php | UTF-8 | 1,537 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php namespace Laraplus\Form\DataStores;
use Illuminate\Http\Request;
use Illuminate\Support\MessageBag;
use Laraplus\Form\Contracts\DataStore;
class LaravelDataStore implements DataStore
{
use RetrievesModelValues;
/**
* @var Request
*/
private $request;
/**
* @param Request $reques... | true |
f84a61a6d8b37d0e85e2c6ccd751a474e61bb189 | PHP | akiyatkin/catalog | /Mark.php | UTF-8 | 6,812 | 2.609375 | 3 | [] | no_license | <?php
namespace itlife\catalog;
/**
* Класс обеспечивает негарантированное хранение параметров в экстрокороткой строке из ~2 символов
* Это работает за счёт сохранения объекта данных в 2х символах, со временем данные этих ~2х символов буду заменены, но нам важно только короткая память
* возможность обменяться ссылк... | true |
90dff2c37dd7ed7cfbb1c058d539d4e2871db5d5 | PHP | IsraelSantizo98/carSalesIntecap | /uploadNewCar.php | UTF-8 | 2,041 | 2.578125 | 3 | [] | no_license | <?php
include 'php/conection.php';
$marca = $_POST['marca'];
$linea = $_POST['linea'];
$tipo = $_POST['tipo'];
$transmicion = $_POST['transmicion'];
$modelo = $_POST['modelo'];
$km = $_POST['km'];
$traccion = $_POST['traccion'];
$combustible = $_POST['combustible'];
$color = $_POST['color'];
$precio = $_POST['precio']... | true |
4923dac474e6f6b366353762c1e144044822badc | PHP | iceman5508/IEngine-Web | /IEngine2/classes/iFiles.php | UTF-8 | 16,738 | 3.375 | 3 | [] | no_license | <?php
class iFiles {
private $filename, $exists, $lines = 0, $size = 0, $wordCount = 0;
private $error = array ("101" => "iFiles ERROR 101: No such file exists!",
"102" => "iFiles ERROR 102: File could not be created!",
"103" => "iFiles ERROR 103: File could not be opened!",
"104" => "iFiles ERROR 104:... | true |
e925ae9fd236fafbf70b51d11b91da6dd9383cf1 | PHP | VATUSA/api | /app/Classes/VATUSAMoodle.php | UTF-8 | 19,937 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Interact with Moodle
* @author Blake Nahin <b.nahin@vatusa.net>
*/
namespace App\Classes;
use App\User;
use Exception;
use Illuminate\Support\Facades\DB;
use MoodleRest;
use ReflectionClass;
class VATUSAMoodle extends MoodleRest
{
/** @var int[] Role Mappings */
protected $roleIds = [
... | true |
fe4cdd4fb7f2c0b95b4f7647cd17bb8f37a11f19 | PHP | jaygriggs/TimeSaver | /TimeSaver/reports/byEmployee.php | UTF-8 | 37,217 | 2.640625 | 3 | [] | no_license | <?php
// $Id: byEmployee.php,v 1.9 Exp $
/**
* @file
* byEmployee report generation file.
*
* The byEmployee report uses the PHPExcel libraries to generate an excel5 or 2007 report.
*/
$_glob_fit_height = 3;
$_glob_fit_width = 1;
$ts=new Timesaver();
if ($whichManager>0) {
$csv=$ts->get_csv_list_of... | true |
f759e7e36be12609dcd14ed23e6e07f3832ec2c6 | PHP | KonstantinKirchev/PHP | /6. Arrays-Strings-Objects/PHP-Arrays-Strings-Objects-Homework/Problem2.Result.php | UTF-8 | 445 | 3.25 | 3 | [] | no_license | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Coloring Texts</title>
</head>
<body>
<?php
if (isset($_POST['submit'])) {
$text = str_split($_POST['text']);
foreach ($text as $char) {
if (ord($char)%2==0) {
echo '<span style="color: red;">'.$char.'</span>'.' ';... | true |
cad871798de5ff6b663ca3dad8ab38b05a33b8d1 | PHP | zhangtaihao/anu_style_proxy | /src/ANU/Bundle/StyleProxyBundle/Proxy/BackendDelegate.php | UTF-8 | 1,798 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace ANU\Bundle\StyleProxyBundle\Proxy;
use Guzzle\Http\Client;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Guzzle\Http\Message\Response as GuzzleResponse;
/**
* Delegate server handler for a backend server base URL.
*/
abstract class BackendDelegate
... | true |
f90602f867893079c0deae10bbc728a2baebe35c | PHP | codememory1/attributes | /Targets/MethodTarget.php | UTF-8 | 1,795 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Codememory\Components\Attributes\Targets;
use JetBrains\PhpStorm\Pure;
use ReflectionAttribute;
use ReflectionMethod;
/**
* Class MethodTarget
*
* @package Codememory\Components\Attributes\Targets
*
* @author Codememory
*/
final class MethodTarget extends AbstractTargetForComponents
{
/**... | true |
636167854653ef717b9f1abadfb00dbe4ce2bc68 | PHP | thefriendlybeasts/r2 | /r2/hooks.r2.php | UTF-8 | 2,508 | 3.171875 | 3 | [] | no_license | <?php
class Hooks_r2 extends Hooks
{
/**
* Call any Statamic API method.
* @author Curtis Blackwell
* @return mixed Whatever the API method returns, baby.
*/
public function r2__statamic_api_call()
{
// Figure out which class and method to use.
// Default to POST, fall b... | true |
9278f8c939be5c9848fea8c55c95ca22fc82180d | PHP | chch88/PintoHH | /page/membre/forget.php | UTF-8 | 2,564 | 2.6875 | 3 | [] | no_license | <?php
//require "C:\wamp64\www\PintoHH\page\header.php";
require "../header.php";
$comfirmation = "";
if (!empty($_POST) AND !empty($_POST['email'])) {
//require_once 'C:\wamp64\www\PintoHH\config.php';
require'../../config.php';
$requete = $bdd->prepare('SELECT * FROM utilisateurs WHERE email = ? AND rei... | true |
9122ad11a6eb1be480eac22a396cf3775fceea60 | PHP | ArcanSecurity/skeerel-php | /Skeerel/Util/Random.php | UTF-8 | 823 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by Florian Pradines
*/
namespace Skeerel\Util;
use Skeerel\Exception\IllegalArgumentException;
class Random {
/**
* @param int $length
* @return string
* @throws IllegalArgumentException
*/
public static function token($length = 40){
if(!is_int($length) || ... | true |
7f42f90c6b9d2475af22ec7bb78fde7c4ceeb3a5 | PHP | aaksu87/ni-api | /app/src/Service/ProductService.php | UTF-8 | 602 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Repository\ProductRepository;
class ProductService
{
public function __construct(
private ProductRepository $productRepository //TODO send repositoryInterfaces instead of repositories directly
)
{
}
/**
* @return array
*/
public functio... | true |
0855f4feaa8800cc4f589cbc518448a95becb808 | PHP | squidss/uvanoa | /webmain/model/flow/eatingModel.php | UTF-8 | 14,769 | 2.59375 | 3 | [] | no_license | <?php
/**
* 2018年3月25日17:09:29
* squid 新增一个模型类用于测试操作菜单的
* @author Administrator
*
*/
class flow_eatingClassModel extends flowModel
{
/**
* 模型里面$this->id是指本模型的主键,打开已有记录便会有该id,如果新建为0
*/
protected function flowoptmenu($ors, $crs){
$num = $ors['num'];
$odata = m('eating')->getone('`id` = ' .... | true |
586ee31474b0a39b2c9e7e7d331557e27058be07 | PHP | gregornovak/traffic-info | /index.php | UTF-8 | 1,323 | 2.78125 | 3 | [] | no_license | <?php
class Traffic {
public $location = '';
public function getConditions() {
if(isset($_POST)) {
// Get cURL resource
$this->location = $_POST['location'];
$curl = curl_init();
// Set some options - we are passing in a useragent too here
... | true |
8e4a37cab501df6141e6a651e5e8ee8fc6d2f0b5 | PHP | sourav-netwin/tbd | /TBD Demo/application/models/admin/usermodel.php | UTF-8 | 14,917 | 2.609375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/*
* Author: Name:PHN
* Purpose: Model for controlling database interactions regarding the content.
* Date:26-08-2015
* Dependency: None
*/
class Usermodel extends CI_Model {
/*
* Purpose: Constructor.
* Date: 26-08-2015
* Input Parameter: None
* Output Parameter: None
*/
... | true |
b4550dfd9b2c11d60186a9fa14eef119852b503e | PHP | tarq-aziz/webprograming | /insert.php | UTF-8 | 1,138 | 2.59375 | 3 | [] | no_license | <?php
//session_start();
require "connection.php";
$data = $_POST;
if (isset($_POST['regi'])) {
$name = $_POST['name'];
$email = $_POST['email'];
$pass = $_POST['password'];
$cpass = ($_POST['cpassword']);
if ($pass < 3 && $cpass < 3) {
print "password shoud be more tha... | true |
6d17991b8e40219fecdbfcafc0899f8e073e85ad | PHP | liweioop1/catchadmin-laravel | /src/Support/Form/Element/Components/Group.php | UTF-8 | 2,148 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
// +----------------------------------------------------------------------
// | CatchAdmin [Just Like ~ ]
// +----------------------------------------------------------------------
// | Copyright (c) 2017~2021 https://catchadmin.com All rights reserved.
// +--------------------------------------------------------... | true |
15f8c1ba87011d83745c12a52cf40f1c86419aa9 | PHP | nowakjestem/Crafton | /app/Console/Commands/GithubListCommand.php | UTF-8 | 4,015 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\Services\GithubService;
use Illuminate\Console\Command;
use Illuminate\Support\Arr;
class GithubListCommand extends Command
{
const PREVIOUS_PAGE_OPTION = 9;
const NEXT_PAGE_OPTION = 0;
/**
* The name and signature of the console command.
*
* ... | true |
4105daf687b78551d6b30c1e709410ae7b7772ba | PHP | tiepnguyen/questwork-logger | /src/Questwork/Interfaces/Logger.php | UTF-8 | 131 | 2.953125 | 3 | [] | no_license | <?php
namespace Questwork\Interfaces;
interface Logger
{
public function write($message);
public function onWrite($callback);
} | true |
791035333d803d5696741070f738e40ce385f321 | PHP | openyapp/openy | /openyapi/vendor/psyao/mailtester/src/Codeception/Module/MailTester.php | UTF-8 | 4,111 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Codeception\Module;
use Codeception\Module;
use Codeception\Module\MailTester\MailTestable;
use Codeception\Module\MailTester\MailTesterFactory;
use Codeception\Module\MailTester\MailTesterMessage;
class MailTester extends Module implements MailTestable
{
/**
* @var MailTestable
*/
... | true |
7806890624a92a96e4f680abdaed724d062628cb | PHP | ThomasBollmeier/webappfound | /src/routing/RoutesParser.php | UTF-8 | 2,232 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
Copyright 2017 Thomas Bollmeier <entwickler@tbollmeier.de>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required... | true |
4f64dcaec5e940ff987ef8b44ab149b3f3b79db2 | PHP | AJarombek/saints-xctf | /api/rest_request.php | UTF-8 | 990 | 3.328125 | 3 | [] | no_license | <?php
// Author: Andrew Jarombek
// Date: 10/12/2016 - 12/24/2016
// Class for storing information about the REST request made
// Version 0.4 (BETA) - 12/24/2016
class RestRequest
{
private $data;
private $request_method;
private $request;
public function __construct() {
$this... | true |
cc8b303f6e5752c2ec43bc5037678a88c3713fed | PHP | lukavavetic/digital-city-api | /src/Applications/Http/Factories/Organisation/OrganisationCreateRequestMapperFactory.php | UTF-8 | 788 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace src\Applications\Http\Factories\Organisation;
use Ramsey\Uuid\Uuid;
use src\Business\Mappers\Organisation\Request\OrganisationCreateRequestMapper;
class OrganisationCreateRequestMapperFactory
{
public static function make(array $data) : OrganisationCreateRequestMapper
{
$identifier = ... | true |
4d0e7b6e3554152ce6d1713fcc250f3a5aff56ed | PHP | jrjakiro/hikit | /feed.php | UTF-8 | 474 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
//
$x = 2 + 3;
echo "<h2>Salut !<h2>";
echo $x;
$ch = curl_init("https://inreach.garmin.com/Feed/Share/ThierryBernier?d1=2017-07-14T00:00Z");
$fp = fopen("tracks/feed.kml", "w");
curl_setopt($ch, CURLOPT_FILE, $fp);
echo 'curl_file : ' . curl_error($ch);
curl_setopt($ch, CURLOPT_HEADER, 0);
echo 'curl_head :... | true |
ed94dab8c91f42fa940bc40905da73c1719e4457 | PHP | forkcms/forkcms | /src/Backend/Core/Engine/NavigationCache.php | UTF-8 | 3,485 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Backend\Core\Engine;
use Psr\Cache\CacheItemPoolInterface;
use SpoonDatabase;
final class NavigationCache
{
const CACHE_KEY = 'backend_navigation';
/**
* @var SpoonDatabase
*/
protected $database;
/**
* @var CacheItemPoolInterface
*/
protected $cache;
pu... | true |
9f49a7e67ab965dcdf3ad788793c874f04364850 | PHP | Guilherme-4ugusto/Nacional-Taxi | /email.php | UTF-8 | 1,139 | 2.625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Teste Man</title>
<script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
</head>
<body>
<?php
if (isset($_POST['email']) && !empty($... | true |
7f932625900f1e97f776ab20221cdb669070f8f4 | PHP | GimmyHchs/IRSphp | /show.php | UTF-8 | 1,237 | 2.71875 | 3 | [] | no_license | <?php
// 資料庫相關資料
$database_link = "staff";
$username_link = "staff";
$password_link = "0935820227";
// 建立資料庫連線
$link = mysql_pconnect("localhost", $username_link, $password_link) or trigger_error(mysql_error(),E_USER_ERROR);
mysql_query("SET NAMES utf8",$link);
mysql_query("SET CHARACTER_SET_CLIENT=utf8",$link);
mysql_... | true |
0d6013a5db05fccdc9058911e2412047103c995f | PHP | Makiavelo/flex | /src/Traits/Versionable.php | UTF-8 | 2,176 | 2.765625 | 3 | [] | no_license | <?php
namespace Makiavelo\Flex\Traits;
use Makiavelo\Flex\Flex;
/**
* Trait to add record versions
*/
trait Versionable
{
public $version;
/**
* Initialize the versions relationship
*
* @param array $params
*
* @return void
*/
public function _translatableInit($params =... | true |
1ab479eb7681f55e67780fc54520f98775c2a775 | PHP | MartinSarrailhe/Proyecto-DigitalHouse | /Proyecto/clases/usuario.php | UTF-8 | 1,418 | 3.375 | 3 | [] | no_license | <?php
/**
*
*/
// include "dbjson.php"; Está incluido en init.php junto con la instancia.
class Usuario
{ //Atributos
private $id;
private $nombre;
private $Apellido;
private $username;
private $Email;
private $Contraseña;
//Constructor
function __construct(Array $array)
{
// 2 Origenes: 1ra e... | true |
863bf06c2cd1a9329eee396cb48857a10bf12d01 | PHP | josigam15/PhpToolbox | /PhpClass4/hint.php | UTF-8 | 251 | 3.46875 | 3 | [] | no_license | <?php
$a = array(1,2,3,4);
try
{
// Assume array is array of int.
function displayArray(Array $a)
{
$sum = array_sum($a);
return $sum;
}
echo displayArray(4);
//echo displayArray($a);
}
catch (Exception $e)
{
echo $e->getLine();
} | true |
357c1dc39cf05892fdfb41c298fc802fffdbe107 | PHP | nguyenquangkhai/Social_xPert | /application/models/Post.php | UTF-8 | 4,547 | 2.96875 | 3 | [] | no_license | <?php
class Application_Model_Post {
protected $_postId;
protected $_message = null;
protected $_highlight = 0;
protected $_pinToTop = 0;
protected $_isTagged = 0;
protected $_tag = null;
protected $_milestoneId = null;
protected $_eventId = null;
protected $_imageId = null;
pr... | true |
0cfd7c6a1db5ac46ef011e6228e639bce81374a1 | PHP | jakelemar98/baseballAdmin | /app/Http/Controllers/Admin/PracticeController.php | UTF-8 | 3,508 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\practices;
use App\practiceEvents;
class PracticeController extends Controller
{
public function addPractice(Request $request){
$name = $request->name;
... | true |
42a4d20169cf46b65ca48bc00f11462cbc08a58a | PHP | blargoner/ipv4util | /ipv4util.php | UTF-8 | 1,747 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
/**
* IPv4 utility class.
*
* @package ipv4util
* @author John Peloquin
* @copyright Copyright (c) 2013 John Peloquin. All rights reserved.
*/
/**
* IPv4 utility class.
*
* @package ipv4util
*/
class IPv4Util {
const IP_REGEX = '/^(?:\d{1,3}\.){3}\d{1,3}$/';
const CIDR_REGEX = '/^((?:\d{1,3}\.)... | true |
2decaecd0c303130fc8b24c37188c51704be652d | PHP | unyx/nyx | /src/auth/id/protocols/oauth1/middlewares/Authorization.php | UTF-8 | 12,309 | 2.75 | 3 | [
"MIT"
] | permissive | <?php namespace nyx\auth\id\protocols\oauth1\middlewares;
// External dependencies
use Psr\Http\Message\RequestInterface as Request;
use nyx\utils;
// Internal dependencies
use nyx\auth\id\protocols\oauth1;
use nyx\auth;
/**
* OAuth 1.0a Request Authorization Middleware
*
* Adds OAuth 1.0a protocol specific param... | true |
415a86441294e2c266a6503d585b25a9d9ebc471 | PHP | digdan/hobgoblin | /lib/session.php | UTF-8 | 940 | 2.671875 | 3 | [] | no_license | <?php
/**
* Session Object
*
* Session singleton object
*
*/
class Session {
static $vars;
static $user;
static function logout() {
unset($_SESSION["user"]);
session_destroy();
session_start();
}
static function mustAuth() {
if ( ! self::user()) {
HG::force(401,'Authentication Required');
... | true |