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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
56fac87072f179dea74ec5f1f398db506a60c877 | PHP | LEmanRUS17/Triangle-website-on-Yii2 | /modules/user/forms/frontend/PasswordResetForm.php | UTF-8 | 2,795 | 2.84375 | 3 | [] | no_license | <?php
namespace app\modules\user\forms\frontend;
use yii\base\InvalidArgumentException;
use app\modules\user\Module;
use yii\base\Model;
use app\modules\user\models\User;
/**
* Форма сброса пароля
*/
class PasswordResetForm extends Model
{
public $password; // Пароль
/**
* @var \common\models\User
... | true |
07ad52997847b148d2acc992735e4fddc112f567 | PHP | Vaked/Training-materials | /Presentations/PHP 7.1 to 7.2 new features and changes/Argument_type_declarations.php | UTF-8 | 361 | 3.78125 | 4 | [] | no_license | <?php
class MyClass {
public $var = '';
}
class FirstChild extends MyClass {
public $var = 'My name is Jim';
}
class SecondChild extends MyClass {
public $var = 'My name is John';
}
$firstchild = new FirstChild;
$secondchild = new SecondChild;
function test(object $arg) {
return $arg->var;
}
echo test($firstch... | true |
64709d0b2b0eb9be7efb2221bdaf8adc85f535f5 | PHP | nickmyself/CourseProject | /Part3/MovieWeb/movie1.php | UTF-8 | 6,166 | 2.65625 | 3 | [] | no_license | <?php
$movieID = $_GET["movieid"];
require_once 'login_jz337.php';
function getgenrearray($mid)
{
$query = "Select GenreName from ShowMovieGenre WHERE MovieId = $mid";
//echo'<table cellspacing="0">';
// echo'<tr><th>Movie Name</th><th>ReleaseDate</th><th>Language</th><th>Rating</th></tr>';
$resu... | true |
560039328739d15d4742716df404f2be5130adf3 | PHP | Filipinoy7/3wa | /dev/Restaurant/application/models/UserModel.class.php | UTF-8 | 2,932 | 2.921875 | 3 | [] | no_license | <?php
class UserModel{
public function addUser($post){
$hash = $this -> hashPassword($post['password']);
$data = new Database();
$data -> executeSql('INSERT INTO User(FirstName,LastName,Email,Password,BirthDate,CreationTimestamp,Address,City,ZipCode,Phone)
VALUES... | true |
5a163669af36b69c3db3e3191984b70dad90ba0b | PHP | masJIan/isdk | /src/Http/CClient.php | UTF-8 | 2,079 | 3.03125 | 3 | [] | no_license | <?php
namespace mkharla\isdk\Http;
/**
* Class CClient
* @package mkharla\isdk\Http
*/
class CClient implements IClient
{
/**
* GET method request handler
*
* @param string $url
* @param array $query
* @return array
*/
public function getMethod(string $url, array $query): arr... | true |
a8969f343f5f00a7aa0d85f59c92b49cf427f863 | PHP | feat7/api-server | /src/Route.php | UTF-8 | 1,972 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Feat7\ApiServer;
/**
* Routes
*/
class Route
{
/**
* @var $routes
* @type array
*/
public static $routes;
public static function getFinalRoute()
{
$route = self::$routes[self::getRequestMethod()][self::getUri()];
if(is_callable($route)) {
return $route(); //Closure
} else if(is_arra... | true |
6261a39b01275f4f1b57bcebb2a91a6721e00e5c | PHP | SACTTOKEN/SACT | /app/service/applets.php | UTF-8 | 1,278 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by yaaaaa__god
* User: GOD
* Date: 2018-12-27 11:44:36
* Desc: 微信小程序
*/
namespace app\service;
class applets{
public $appID = '';
public $appsecret = '';
public function __construct(){
$this->appID = c('applets_appid');
$this->appsecret = c('applets_appsec');
... | true |
5e6050a0159a7c1c54528318014f95626f861b29 | PHP | lucascourot/PHPKataTrainReservation | /tests/Domain/CoachTest.php | UTF-8 | 2,680 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace TrainReservationTest\Domain;
use PHPUnit\Framework\TestCase;
use TrainReservation\Domain\AvailableSeat;
use TrainReservation\Domain\BookingReference;
use TrainReservation\Domain\Coach;
use TrainReservation\Domain\ReservedSeat;
class CoachTest extends TestCase
{
public function testShouldNotExceed... | true |
9cf30853928d4f34d082651cefe45cbd88d55007 | PHP | withoutthea/Feather | /Feather/Components/Collections/IObjectCollection.php | UTF-8 | 312 | 2.578125 | 3 | [] | no_license | <?php
namespace Feather\Components\Collections
{
interface IObjectCollection extends \Feather\Components\Collections\IGenericObjectCollection
{
public function find(\Feather\Components\Collections\CollectionQuery $search);
public function first();
public function last();
}
} | true |
2864c88955705125e5afa16c32c94adbceb683b6 | PHP | RaafiFathulIchsani/P7_PW_173040152 | /latihan7c/php/tambah.php | UTF-8 | 2,060 | 2.609375 | 3 | [] | no_license |
<?php
session_start();
if (!isset($_SESSION['username'])) {
header("Location : login.php");
exit;
}
require'functions.php';
if(isset($_POST['tambah'])){
if (tambah($_POST) > 0) {
echo "<script>
alert('data berhasil ditambah');
document.location.href ='admin.php';
</script>";
}else{
echo"<script>
ale... | true |
92b1955c4f33b30ced595f2a8d9642cd02498b63 | PHP | springtimesoft/springtimesoft_raygun | /app/code/community/Springtimesoft/Raygun/Helper/Data.php | UTF-8 | 5,333 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
class Springtimesoft_Raygun_Helper_Data extends Mage_Core_Helper_Abstract
{
const CONFIG_API_KEY = 'springtimesoft_raygun/springtimesoft_raygun_group/springtimesoft_raygun_api_key';
const CONFIG_ASYNC = 'springtimesoft_raygun/springtimesoft_raygun_advanced_group/springtimesoft_raygun_async';
const CON... | true |
52f484482f26959374713d124616576133c1cbe9 | PHP | trk-life/trk-life | /tests/phpunit/TestUtilsTrait.php | UTF-8 | 2,657 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace TrkLife;
use Slim\Http\Environment;
use Slim\Http\Request;
use Slim\Http\Response;
use TrkLife\Entity\Token;
use TrkLife\Entity\User;
/**
* Class TestUtilsTrait
*
* Contains utilities for phpunit test cases
*
* @package TrkLife
* @author George Webb <george@webb.uno>
*/
trait TestUtilsTrait
{
... | true |
b3806bb19e9e85d477802b2b9995c2ff76c424b0 | PHP | chirag-prajapati-2705/esatus | /model/User.php | UTF-8 | 642 | 2.515625 | 3 | [] | no_license | <?php
class User extends Model {
public $rules = array(
'pseudo' => array(
'rule' => 'notEmpty',
'message' => 'Veuillez préciser votre pseudo.'
),
'phone' => array(
'rule' => 'notEmpty',
'message'... | true |
c13e9dff8ef6a5936780d2dc5b210f2c93edbebe | PHP | osbendc/administracion | /db/database.php | UTF-8 | 2,029 | 2.84375 | 3 | [] | no_license | <?php
class database {
private $server;
private $user;
private $pass;
private $table;
private $pdo;
public function __construct() {
$this->server = 'localhost';
$this->user = 'root';
$this->pass = '';
$this->table = 'administacion';
}
public f... | true |
1d640350371008f13bf0fe659e376693969f1c76 | PHP | eusonlito/invoice-api | /app/Services/Request/Auth.php | UTF-8 | 699 | 2.703125 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace App\Services\Request;
use Illuminate\Http\JsonResponse;
use App\Domains\User\Store;
class Auth
{
/**
* @param \Illuminate\Http\JsonResponse $response
* @param mixed $data
*
* @return \Illuminate\Http\JsonResponse
*/
public static function addT... | true |
15ff591ac2c63fd53d81ff4c88c381e17b77f6de | PHP | arvatis/payolution-php-api | /src/Request/Transaction/Payment.php | UTF-8 | 1,559 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace ArvPayolutionApi\Request\Transaction;
use ArvPayolutionApi\Request\RequestTypes;
use ArvPayolutionApi\Request\Transaction\Payment\Presentation;
/**
* Class Payment
*/
class Payment
{
const REST_API_OPERATION_TYPE = 'CALCULATION';
const REST_API_PAYMENT_TYPE = 'INSTALLMENT';
/**
* @... | true |
bdb10e57cd7a16d59a3cf5e71df870e720a626f5 | PHP | Juscostajr/sample-project | /app/src/Domain/Shipping/Pricelist.php | UTF-8 | 2,757 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Domain\Shipping;
use Doctrine\ORM\Mapping as ORM;
use JsonSerializable;
/**
* @ORM\Entity
* @ORM\Table(name="pricelist")
*/
class Pricelist implements JsonSerializable
{
/**
* @var integer
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
* @ORM\Column(type="integer")
... | true |
dba82e2fa75686421fe085d06e1ba585f438a1b1 | PHP | MaXiaofei2014/laravel-response-hjson | /src/HjsonResponse.php | UTF-8 | 2,143 | 2.921875 | 3 | [] | no_license | <?php
namespace HjsonResponse;
use InvalidArgumentException;
use Exception;
class HjsonResponse
{
protected $http_code = 200;
protected $error_code = 0;
protected $data;
public function __toString()
{
$this->toResponse($this->data, $this->getHttpCode());
}
/**
* http 标准.
... | true |
91976f9d069d03de8d435a952c0f750ccbf0a6fe | PHP | nleal/gestioncurricular | /protected/controllers/DepartamentoController.php | UTF-8 | 11,032 | 2.59375 | 3 | [] | no_license | <?php
Yii::import('application.vendor.mpdf.*');
require_once('mpdf.php');
class DepartamentoController extends Controller
{
/**
* @var string the default layout for the views. Defaults to '//layouts/column2', meaning
* using two-column layout. See 'protected/views/layouts/column2.php'.
*/
public $layout='//... | true |
3e5d2e4fa65503004626bcf752c6b777d4bd997e | PHP | lanfix/parser | /Parser.php | UTF-8 | 1,276 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
namespace lanfix\parser;
use lanfix\parser\src\Document;
use lanfix\parser\src\Element;
use Exception;
/**
* @property Document $document
*/
class Parser
{
/**
* @var Element[] корневой <html> элемент
*/
private $document;
/**
* @param string $from Url сайта который парсить
... | true |
0bd293ea037b78b52ae150f04077b89524a932e6 | PHP | Gaurav3099/Student-Database-Management-System | /update.php | UTF-8 | 1,272 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
$servername='localhost';
$username='root';
$password='';
$dbname='gauravtest';
$conn= mysqli_connect($servername,$username,$password,$dbname);
if ($conn->connect_error) {
//echo "Connection Failed" or die (mysqli_error($conn));
die("Connection failed: " . $conn->connect_error);
}
else{
echo "Co... | true |
c62aa2cc1f1b59827d7b4fe51a2560d28120f40f | PHP | ajaykiet2/htdocs | /application/models/Company.php | UTF-8 | 3,790 | 2.515625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Company extends CI_Model {
var $table = 'company';
var $column_order = array(null,'companyID', 'name','contactName','contactMobile','contactEmail');
var $column_search = array('name','contactName','contactMobile','contactEmail'... | true |
a27c8bdbcb1f9f73dc2963a27162a44159955e8d | PHP | jonathandey/job-plugin | /models/Vacancy.php | UTF-8 | 13,003 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php namespace JetMinds\Job\Models;
use Db;
use Url;
use App;
use Str;
use Html;
use Lang;
use Model;
use Markdown;
use BackendAuth;
use ValidationException;
use Carbon\Carbon;
use Cms\Classes\Page as CmsPage;
use Cms\Classes\Theme;
/**
* Vacancy Model
*/
class Vacancy extends Model
{
use \October\Rain\Database... | true |
bd981937a4922406a4b6863474b5bf0307425d1b | PHP | MarceauKa/mamarflix | /src/Utils/CsvWriter.php | UTF-8 | 1,774 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Utils;
class CsvWriter
{
protected string $filename;
protected string $quotes;
protected string $separator;
protected string $newline;
protected array $lines = [];
public function __construct(
string $filename,
string $quotes = '"',
string $separato... | true |
64e3cd2ea1d5c3825a2328806735d8482907d3ce | PHP | LanhKhoc/mini-forum | /services/home_service.php | UTF-8 | 3,133 | 2.625 | 3 | [] | no_license | <?php
class home_service {
public function getCategoriesData() {
$topicModel = new category_model();
$fields = '
c.id as id_category, c.name as category_name, c.description as category_description,
tp.id as id_topic, tp.name as topic_name, tp.description as topic_description,
th1.id as id_t... | true |
32acee6f04d79ec3c3a19eede2d29d39fdbc71a3 | PHP | stephens2424/php | /testdata/fuzzdir/corpus/ext_mysqli_tests_mysqli_savepoint.php | UTF-8 | 1,911 | 2.828125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
require_once("connect.inc");
/* {{{ proto bool mysqli_savepoint(object link, string name) */
$tmp = NULL;
$link = NULL;
if (!is_null($tmp = @mysqli_savepoint()))
printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
if (!is_null($tmp = @mysqli_savepoint($link)))
printf("[002] Expecti... | true |
b5f88b077b517d45430de9bcfb65801261cdac3f | PHP | abreham-gebremedin/kebetachin | /app/Models/OtherSkill.php | UTF-8 | 702 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class OtherSkill
*
* @property int $id
* @property int $job_id
* @property int $skill_id
*
* @property Job $job
* @property Skill $skill
*
* @package App\Models
*/
class OtherSkill extends Mod... | true |
99eb6302c64feb8be6314c1ead87eed307a947b5 | PHP | chrisemerson/adventOfCode | /2015-PHP-TDD/run/day11 | UTF-8 | 418 | 2.953125 | 3 | [] | no_license | #!/usr/bin/env php
<?php
use AdventOfCode\Day11\PasswordFinder;
require_once __DIR__ . "/../vendor/autoload.php";
$input = trim(file_get_contents(__DIR__ . "/../res/Day11/input"));
$passwordFinder = new PasswordFinder();
$nextPassword = $passwordFinder->getNextPassword($input);
echo "New Password: " . $nextPasswor... | true |
b39a3409c8fb5c9dd5d186d3c9cf12dc2de63af3 | PHP | amad9720/openproject | /src/Sup/TestBundle/HealthCheck/SupHealthCheck.php | UTF-8 | 652 | 2.578125 | 3 | [] | no_license | <?php
namespace Sup\TestBundle\HealthCheck;
class SupHealthCheck
{
public function isHealthy($result, $health)
{
$orangeNum = $result->getOrange();
$orangeWeight = $health->getOrangeFruit()->getWeight();
$tomateNum = $result->getTomate();
$tomateWeight = $health->getTomateFru... | true |
a3c37e24e06aceddaabd751524e4372aa396099d | PHP | brightnucleus/injector | /src/Injection.php | UTF-8 | 1,094 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
/**
* Bright Nucleus Injector Component.
*
* @package BrightNucleus\Injector
* @author Alain Schlesser <alain.schlesser@gmail.com>
* @license MIT
* @link http://www.brightnucleus.com/
* @copyright 2016 Alain Schlesser, Bright Nucleus
*/
namespace BrightNucleus\Injec... | true |
9add9c86d03b6d7b8bbc20b146f630ad85342995 | PHP | Ikamee/Le-PHP | /Video.php | UTF-8 | 626 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Dylan
* Date: 13/12/2018
* Time: 14:32
*/
class Video extends Document
{
private $type;
public function __construct($nom, $auteur, $type)
{
parent::__construct($nom, $auteur);
$this->type = $type;
$this->estEmpruntble = true;
}
... | true |
33d38fdc2e824c4308125aa5b1eb9e992fa17d42 | PHP | msoler18/webold | /models/user.php | UTF-8 | 1,178 | 2.8125 | 3 | [] | no_license | <?php
Class UserModel extends Db {
protected static $table_name = 'usuario';
public static function authenticate_user($username="", $password="")
{ // Método que valida el username y la clave de un usuario
// Traer el objeto $db_obj al método
/*echo "<script language = JavaScript> alert (' 1 ... | true |
a327cb6da47cfb8a7e3c3afe4616f3175585b9d7 | PHP | miksir/php_proxy_example | /ConnectionsCollection.php | UTF-8 | 1,747 | 2.90625 | 3 | [] | no_license | <?php
namespace MiksIr\proxy;
/**
* Class ConnectionsCollection
* @package MiksIr\proxy
* Набор соединений, с которыми работаем
*/
class ConnectionsCollection {
const SELECT_TIMEOUT = 0;
protected $sockets = [];
/** @var Connection[] */
protected $connections = [];
public function add(Conne... | true |
cd0696b61c54ef62273699dc58136cbc4d97ab24 | PHP | EliasRLima/eloise | /sistema/classes/CrudEstagio.php | UTF-8 | 7,592 | 3.203125 | 3 | [] | no_license | <?php
/* CrudEstagio.php
* Extensao de Manipuladora.php
*
* Desenvolvedor:
*
* Instituto Federal do Maranhao
* Definicoes primitivas de SQL para Create(Insert), Read (Select), Update e Delete
*/
include("Manipuladora.php");
//Crud generico
//Cada tabela podera estender Create(Insert), Read (Se... | true |
bd9bccfb953a08ba2b68a7c3e12eb0ed8200e98d | PHP | pacoruina/lobby-wars | /src/Infrastructure/CliCommand/StrategyTrialCommand.php | UTF-8 | 2,298 | 2.671875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace LobbyWars\Infrastructure\CliCommand;
use LobbyWars\Application\GetMinimumRoleToWinTheTrialQuery;
use LobbyWars\Application\GetMinimumRoleToWinTheTrialQueryHandler;
use LobbyWars\Domain;
use LobbyWars\Infrastructure\Provider\DependenciesProvider;
use Symfony\Component\Console\I... | true |
e86e2cb2e14c8d3e0cc704c90c5478e22017a94c | PHP | tks007-github/db-academy | /new_development/coach/c_phisical_test/c_phisical_test_delete_check.php | UTF-8 | 1,976 | 2.859375 | 3 | [
"MIT"
] | permissive | <!--
c_phisical_test_delete.phpからの入力情報をチェックし、遷移先を決定する。
問題なし→c_phisical_test_delete_done.phpへリダイレクト
問題あり→エラーメッセージを出力し、戻るボタンでc_phisical_test_content.phpへ遷移
-->
<?php
session_start();
session_regenerate_id(true);
// c_phisical_test_content.phpからの情報をSESSIONで受け取る
$date = $_SESSION['date'];
$belong_code = $_S... | true |
5a23fe2ebb4a7de0a6e7c4fb8451923f8c971a4a | PHP | ayeletCr/project0 | /application/models/schedule.php | UTF-8 | 275 | 2.828125 | 3 | [] | no_license | <?php
class Schedule extends CI_Model {
public function get_schedules($course) {
$this->db->select('day, begin_time, end_time');
$this->db->from('schedule');
$this->db->where('cat_num', $course);
return $this->db->get()->result();
}
}
| true |
6295caedd599d53c3d5da8c3d42c73d75caf160d | PHP | gabrieletudes/larablog | /app/Http/Controllers/RegistrationController.php | UTF-8 | 771 | 2.546875 | 3 | [] | no_license | <?php
namespace Blog\Http\Controllers;
use Blog\Http\Requests\StoreBlogRegistration;
use Blog\User;
use Illuminate\Http\Request;
class RegistrationController extends Controller
{
public function register(){
return view('forms.create-registration');
}
public function store(Request $request){
... | true |
b2b0a24519d6f487a7b010d47243710142aec737 | PHP | LOTiger/attendance | /app/Presenters/UsersPresenter.php | UTF-8 | 2,819 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: lotiger
* Date: 17-12-13
* Time: 下午3:37
*/
namespace App\Presenters;
use App\User;
use Bican\Roles\Models\Role;
use Illuminate\Support\Facades\Auth;
class UsersPresenter extends Presenter
{
public function getAllUsers()
{
$data = '';
foreach (Aut... | true |
e9f2144de2813f79b844344afa7ef215abbe699c | PHP | midnightmonster/recess | /recess/recess/apps/tools/views/layouts/navigation.part.php | UTF-8 | 744 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/*== Part Inputs ==*/
// selected: The name of the selected navigation item
assert(is_string($selected));
/*=================*/
function printNavItem($action, $display, $selectedUrl) {
if($selectedUrl == $display) $liClass = ' class="highlight"';
else $liClass = '';
echo '<li' . $liClass . '>' . Html::anchor(... | true |
0c6d4c358caf53b00e72483938fe4d33bede6c51 | PHP | AhamedBilal/POS-Layerd- | /api/service/CustomerService.php | UTF-8 | 1,926 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by IntelliJ IDEA.
* User: Bilal
* Date: 7/10/2019
* Time: 9:49 AM
*/
?>
<?php
require_once __DIR__.'/../dto/Customer.php';
require_once __DIR__.'/../bo/impl/CustomerBOImpl.php';
$operation = $_POST['type'];
$customerBO = new CustomerBOImpl();
switch ($operation){
... | true |
8a03b2bdb9db473714013f31117f7734b40ad4b6 | PHP | icthusboy7/smart-crm | /src/Entity/Views/Event.php | UTF-8 | 3,235 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Entity\Views;
use DateTimeInterface;
use JsonSerializable;
use App\Entity\Status;
use App\Entity\User;
use Doctrine\ORM\Mapping as ORM;
/**
* Offers a view of visits as calendar events.
*
* @ORM\Entity(
* readOnly=true,
* repositoryClass="App\Repository\EventRepository"
... | true |
e073c444e1cbe29043f2771bc2e80ef2601fda44 | PHP | jayshields/jquery-php-ajax-pagination-example | /public/index.php | UTF-8 | 1,727 | 2.984375 | 3 | [] | no_license | <?php
require_once __DIR__.'/../vendor/autoload.php';
$app = new \Silex\Application();
//Initialise the database connection
$app['db'] = function () {
$host = 'localhost';
$db_name = 'example';
$user = 'root';
$pass = '';
return new \PDO(
"mysql:host={$host};dbname={$db_name}",
$... | true |
7efaed8fa2265b1f254c1da029e47d1177352dc2 | PHP | scodx/IISRequestAuth | /IISRequestAuth.php | UTF-8 | 1,631 | 3.078125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: scodx
* Date: 28/08/14
* Time: 09:05
*/
namespace IISRequestAuth;
class IISRequestAuth {
private $user;
private $password;
function __construct($user, $password)
{
$this->setUser($user);
$this->setPassword($password);
}
publi... | true |
1337b73620b12920fe78ad57c1d6f9759a2070da | PHP | cssolutions/sandbox | /php/callback_example.php | UTF-8 | 269 | 2.734375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: csaba
* Date: 2017.07.18.
* Time: 12:23
*/
$callback = function($param) {
echo is_string($param) ? 'Helló ' . $param : 'faszom';
};
function call($callback, $name) {
$callback($name);
}
call($callback, 'Csaba'); | true |
4bb93ff55259cdeacbdbbff3e3227d6c1eb912d7 | PHP | jaywizzy/kaedco | /database/migrations/2016_10_16_132834_create_substations_table.php | UTF-8 | 904 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSubstationsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('substations... | true |
bb66c73cb23d6a3812a8a8ca7b6dbc5ab7683dfc | PHP | angelxmoreno/copyleaks | /src/Request/RequestBase.php | UTF-8 | 2,896 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Axm\CopyLeaks\Request;
use Axm\CopyLeaks\Exceptions\CopyLeaksApiException;
use Axm\CopyLeaks\Exceptions\UnexpectedResponseException;
use Axm\CopyLeaks\Response\Response;
/**
* Class RequestBase
* @package Axm\CopyLeaks\Request
*/
abstract class RequestBase implements RequestInterface
{
/**
... | true |
f715bc73a80f06d90c095ce4ea5f850a5a0a4d04 | PHP | iamgerwin/storetracker | /vendor/behat/mink/src/Behat/Mink/Element/Element.php | UTF-8 | 2,511 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace Behat\Mink\Element;
use Behat\Mink\Session;
/*
* This file is part of the Behat\Mink.
* (c) Konstantin Kudryashov <ever.zet@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
/**
* Base element.
*
* @a... | true |
19de5895415dadee0b13e91fd54798841ae358f6 | PHP | molkaaffes/gestionStock_Php | /models/remise.class.php | UTF-8 | 1,169 | 2.671875 | 3 | [] | no_license | <?php
class Remise
{
private $id_remise;
private $taux_remise;
public function __construct($id_remise,$taux_remise)
{
$this->id_remise=$id_remise;
$this->taux_remise=$taux_remise;
}
public function add($cnx)
{
$cnx -> exec("insert into remise (taux_remise) values('".$this->taux_remise.... | true |
3894b660104f53b33f3d8610cb23b7cbb007c944 | PHP | gevorgmargaryan/sample | /src/SimpleMath/PointCollectionInterface.php | UTF-8 | 421 | 3.328125 | 3 | [] | no_license | <?php
namespace SimpleMath;
interface PointCollectionInterface
{
/**
* Calculates average point.
*
* @return PointInterface
*/
public function getAverage(): PointInterface;
/**
* Finds the furthest point from the given point.
*
* @param PointInterface $point
* @ret... | true |
33b738848355309a19c2c21fdcd761a1774dfc72 | PHP | CuongMark/raffle_fifty | /app/code/Angel/Fifty/Model/WinningNumber.php | UTF-8 | 2,420 | 2.546875 | 3 | [] | no_license | <?php
namespace Angel\Fifty\Model;
use Angel\Fifty\Api\Data\WinningNumberInterface;
class WinningNumber extends \Magento\Framework\Model\AbstractModel implements WinningNumberInterface
{
protected $_eventPrefix = 'angel_fifty_winning_number';
/**
* @return void
*/
protected function _constru... | true |
ebf23e2270fd900c9848dc9c15b9b80678b5fa7e | PHP | ntd1712/messenger | /src/LaravelEventDispatcherAdapter.php | UTF-8 | 1,702 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Chaos\Support\Messenger;
use Illuminate\Contracts\Events\Dispatcher;
/**
* Class LaravelEventDispatcherAdapter.
*
* <code>
* $dispatcher = new LaravelEventDispatcherAdapter(app('events'));
* $container['dispatcher'] = $dispatcher;
* </code>
*
* @author t(-.-t) <ntd1712@mail.com>
*/
class Lar... | true |
2bd0348874245eee99ddf1ee426218c8fdfff2b1 | PHP | MJBrennan/Twilio-Test | /Twilio.php | UTF-8 | 616 | 2.78125 | 3 | [] | no_license | <?php
require __DIR__ . '/twilio-php-master/Twilio/autoload.php';
use Twilio\Rest\Client;
class Twilio{
public $imput;
public $output;
public $sid = 'YOUR_ID';
public $token = 'YOUR_TOKEN';
public function __construct(){
$property = $this->smsSend();
print $property;
}
public function smsSen... | true |
8315f7c912181789be2a4355efd23b9304f25e43 | PHP | like218726/thinkphp5tool | /application/common.php | UTF-8 | 7,659 | 3.015625 | 3 | [
"Apache-2.0"
] | permissive | <?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +-------------------------------------------------... | true |
4697feef8a644e6b7c5a553967157fe2ffd1954d | PHP | Horakle/PPE4 | /ppe4 php/type_interet.php | UTF-8 | 518 | 2.921875 | 3 | [] | no_license | <?php
public class type_interet {
private int id_type_int;
private String lib_type_int;
//Getter & Setter ID
public int getId_type_int() {
return id_type_int;
}
public void setId_type_int(int id_type_int) {
this.id_type_int = id_type_int;
}
//Getter & Setter Libell�
public String getLib_type_int() {
... | true |
70b42a32e0497a10e8f0da48c6a5081bc83702cb | PHP | oprincipe/pmanager | /app/UserRelations.php | UTF-8 | 1,151 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: oprincipe
* Date: 25/03/18
* Time: 10:09
*/
namespace App;
use Illuminate\Support\Facades\Auth;
trait UserRelations
{
/**
* A project belongs to:
* - user (many)
*/
public function user()
{
return $this->belongsTo('App\User');
}
... | true |
f0e3248d858dab9d01253f8558222fa6a1bae0a3 | PHP | Joby22/hua | /code/api/zhuce.php | UTF-8 | 748 | 2.78125 | 3 | [] | no_license | <?php
// 获取用户名和密码
$user=$_GET['username'];
$pass=$_GET['password'];
// 数据库连接
$con=mysqli_connect('localhost','root','123456','test');
// 整体用双引号,表名和字段用反引号,变量和字符用单引号
$sql="SELECT*FROM `user` WHERE `username`='$user'";
$res=mysqli_query($con,$sql);
// 判断
if(!$res){
die('数据库连接错误'.mysqli_error($con));
}
$row=mysqli... | true |
3717ba34930dbc64560508b99f901fade6d4c088 | PHP | libredesarrollo/codeigniter3-master | /application/views/sitemap.php | UTF-8 | 986 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
header("Content-Type: application/xml; charset=utf-8");
echo '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL;
echo '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitem... | true |
ff0e85ab132d2c98937e5333e73957bc1066e7cf | PHP | deljdlx/Senseio | /vendor/Senseio/class/Crawler.php | UTF-8 | 4,079 | 2.65625 | 3 | [] | no_license | <?php
namespace Senseio;
use SenseioApplication\Application;
/**
* Class Crawler
* @property MongoStorage $storage
* @package Senseio
*/
class Crawler
{
protected $configuration;
protected $startURL;
protected $startPage;
protected $storage;
protected $logger;
protected $crawledPages=array();
... | true |
9f917a556c1a2110f5e2a9ba40ebb2c5eb1d2a44 | PHP | bradyo/sageweb | /library/Sageweb/Cms/Abstract/Post.php | UTF-8 | 6,813 | 2.625 | 3 | [] | no_license | <?php
/**
* Doctrine ORM Base class for a post.
*
* @property integer $id
* @property integer $entityId
* @property integer $authorId
* @property string $status
* @property array $votes
* @property array $views
* @property array $categories
* @property array $tags
* @property datetime $createdAt
* @proper... | true |
db22850855e0175cbe305c7b4fc02818d47d07e7 | PHP | kartikabhidesai/watershop | /app/include/paging.php | UTF-8 | 4,343 | 3.0625 | 3 | [] | no_license | <?php
/************************************************
* ======================================== *
* Perfect MySQL Paging *
* ======================================== *
* Script Name: class.paging.php *
* Developed By: Khurram Adeeb Noorani *
* Email: khurramnoorani@gmail.com *
* My CV: http://www.visual... | true |
1c8b1f91b8d18e31701d00d9194fbb5d4517620b | PHP | lee696/mingph | /Application/Home/Controller/ApiController.class.php | UTF-8 | 6,250 | 2.515625 | 3 | [] | no_license | <?php
namespace Home\Controller;
use Think\Controller;
/**
* api代理
* 由于第三方接口端跨域配置问题,通过第三方模拟访问实现代理功能
* 要求实现功能:
* * 能够代理各种请求模式
* * 协调cookie
* * 客户端IP告知
* 暂时只弄个简单代理
*/
class ApiController extends Controller {
private $method;
private $url;
private $cookie;
private $clientIp;
... | true |
725fb2f864da4e655e63363eb845b88033b85233 | PHP | Chmieloo/PHPadventOfCode2016 | /Puzzles/Day04/PuzzlePartOne.php | UTF-8 | 2,477 | 3.578125 | 4 | [] | no_license | <?php
namespace Puzzles\Day04;
use Puzzles\Abstraction\Puzzle;
/**
* Puzzle day 4
* Class PuzzlePartOne
* Advent Of Code 2016
*/
class PuzzlePartOne extends Puzzle
{
private $sum;
public function __construct()
{
$this->initialize();
$this->loadInput();
$this->processInput();
... | true |
d3612e2e2f8f68bda536179f8e256b697d3df8d7 | PHP | Zerquix18/TwitAudio | /models/Audios.php | UTF-8 | 27,707 | 2.6875 | 3 | [] | no_license | <?php
/**
* Audio Model
* Manages all the audios/replies data
*
* @author Zerquix18 <zerquix18@outlook.com>
*
**/
namespace models;
use \application\interfaces\ModelInterface;
use \application\Twitter;
use \application\HTTP;
use \models\Users;
use PDO;
use Abraham\TwitterOAuth\TwitterOAuth;
class Audios implements Mo... | true |
318dc340364011d4b62bce304b0b5c73d3db6968 | PHP | A973C/cacher-php | /src/Cacher.php | UTF-8 | 3,366 | 3.53125 | 4 | [
"MIT"
] | permissive | <?php
/**
* Cacher
* A simple, general-purpose, file-based cache provider
* @author biohzrdmx <github.com/biohzrdmx>
* @version 2.0
* @license MIT
*/
namespace Cacher;
class Cacher {
/**
* Cache directory
* @var string
*/
protected $cache_dir;
/**
* Cache time
* @var integer
... | true |
e4f419560f25c2c047def40c04ba7e18be43d570 | PHP | IGS-PROMO-2020/best-E-learning | /register.php | UTF-8 | 2,343 | 2.75 | 3 | [
"CC-BY-3.0",
"CC-BY-4.0"
] | permissive | <?php
require('dbconnect.php');
if (isset($_REQUEST['submit'])){
// récupérer le nom d'utilisateur et supprimer les antislashes ajoutés par le formulaire
$nom = stripslashes($_REQUEST['nom']);
$nom= mysqli_real_escape_string($conn, $nom);
$prenom = stripslashes($_REQUEST['prenom']);
$prenom= mysqli_r... | true |
465a83245ca2de28c95b94201c2263b383f12f16 | PHP | polro/orientation_lycee | /php/gestion_prof.php | UTF-8 | 17,393 | 2.640625 | 3 | [] | no_license | <?php
// Démarrage de la session
session_start();
//fonction pour réécrire correctement les champs de saisi.
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
//On affiche tous les comptes
if ($_SESSION['acces'] == '1'){
include 'menu... | true |
3f1a0d859a72bec5eca52dedfd554fdfc5d9704e | PHP | loganetherton/samples | /valuepad-backend/app/Core/Log/Extras/StateExtra.php | UTF-8 | 458 | 2.90625 | 3 | [] | no_license | <?php
namespace ValuePad\Core\Log\Extras;
use ValuePad\Core\Location\Entities\State;
class StateExtra extends Extra
{
/**
* @param string $code
* @param string $name
*/
public function __construct($code, $name)
{
$this[Extra::CODE] = $code;
$this[Extra::NAME] = $name;
}
/**
* @param State $state
*... | true |
bdca0197211e4f2c9653a6811291d619cf0f6fef | PHP | vrungel76/services | /services/exchanger/providers/crypto/CoinMarketCap/CoinMarketCapClient.php | UTF-8 | 4,430 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: agavrilenko
* Date: 16.04.19
* Time: 14:53
*/
namespace app\services\exchanger\providers\crypto\CoinMarketCap;
use app\services\exchanger\providers\ClientException;
use app\services\exchanger\providers\crypto\CryptoNormalize;
use app\services\exchanger\providers\Exchanger... | true |
627ab048e2eec308562e3edb1e4d2cf1ad32c1e7 | PHP | rsanchez/craft-cli | /src/Command/RunTasksCommand.php | UTF-8 | 4,356 | 2.59375 | 3 | [] | no_license | <?php
namespace CraftCli\Command;
use Symfony\Component\Console\Helper\ProgressBar;
use Symfony\Component\Console\Input\InputOption;
use Craft\TaskModel;
use Craft\TaskStatus;
use Craft\TaskRecord;
use Exception;
class RunTasksCommand extends Command
{
/**
* {@inheritdoc}
*/
protected $name = 'run:... | true |
f1da1364ea18b6ac35a3ba1ad06576a41b5e4c2b | PHP | garming/php-cache | /src/Lib/Memcache.php | UTF-8 | 3,036 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: garming
* Date: 8/5/15
* Time: 16:52
*/
namespace PhpCacheX\Cache\Lib;
use PhpCacheX\Cache\CacheInterface;
class Memcache implements CacheInterface
{
private static $__instance;
protected $_connection;
private static $__flag = TRUE;
private $prefix = 'Ph... | true |
8f3f4eb5477f5c5ceba2f3789e9c35db307585f1 | PHP | Researcher86/blog | /src/Domain/Model/Post/AddedCommentEvent.php | UTF-8 | 772 | 2.859375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Blog\Domain\Model\Post;
use Blog\Domain\DomainEvent;
use DateTimeImmutable;
final class AddedCommentEvent implements DomainEvent
{
/**
* @var CommentId
*/
private $commentId;
/**
* @var DateTimeImmutable
*/
private $date;
/**
* A... | true |
f463967cbe82b6004b3f79ba27b22346948e47b3 | PHP | scottlt/Project_cs4433 | /recipe_search.php | UTF-8 | 1,835 | 2.625 | 3 | [] | no_license | <?php
require_once('lib/01_definitions.php');
require_once('lib/02_recipes.php');
session_start();
display_html_header(__FILE__);
display_topnav(__FILE__);
display_page_messages(__FILE__);
if (isset($_SESSION['current_user_id'])) {
$user_name = $_SESSION['current_user_name'];
... | true |
5320d32786fa79bb491e7ef89d2d1c3f412e0f98 | PHP | kumamidori/Sample.ExpressionLanguage | /src/Service/ChargeCalculator.php | UTF-8 | 1,379 | 3.046875 | 3 | [] | no_license | <?php
namespace Sample\ExpressionLanguage\Service;
use Symfony\Component\ExpressionLanguage\Expression;
/**
* 料金計算クラス
*
* @package Sample\ExpressionLanguage\Service
*/
class ChargeCalculator
{
private $config;
private $rateService;
private static $ratePerUnit;
/**
* @param array $config 料金設定... | true |
f82295cfe7fb088f8a218c0bfd482ad07138c304 | PHP | antonygilon/ceg.net | /ceg_forum/signupcheck.php | UTF-8 | 1,474 | 2.53125 | 3 | [] | no_license | <html>
<head>
<?php
include 'connect.php';
$username=$_POST['username'];
$email=$_POST['emailid'];
$usernamequery="SELECT * FROM user_details WHERE user_name=$username ";
$emailquery="SELECT * FROM user_details WHERE user_email=$email ";
if(mysql_query($usernamequery))
{
... | true |
bb624202e53b6d12606285bac710d8bbd40cf3cf | PHP | makinacorpus/apubsub | /src/Notification/NotificationService.php | UTF-8 | 13,740 | 2.765625 | 3 | [] | no_license | <?php
namespace MakinaCorpus\APubSub\Notification;
use MakinaCorpus\APubSub\BackendInterface;
use MakinaCorpus\APubSub\Backend\DefaultMessage;
use MakinaCorpus\APubSub\CursorInterface;
use MakinaCorpus\APubSub\Error\ChannelDoesNotExistException;
use MakinaCorpus\APubSub\Field;
use MakinaCorpus\APubSub\MessageInstance... | true |
3f328e8c70680d3f0d7024ddb46451ba3d16fa9c | PHP | lasekmiroslaw/simple-rest | /src/Api/FormProcesor.php | UTF-8 | 1,652 | 2.75 | 3 | [] | no_license | <?php
namespace App\Api;
use Symfony\Component\Form\FormInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\JsonResponse;
use App\Api\ApiProblem;
class FormProcesor
{
public function processForm(FormInterface $form, Request $request)
{
$data = json_decode($re... | true |
f39cacf920e20c1651b2d1c5314b57f657018d20 | PHP | smaloron/php-mvc | /src/models/DAO/DAO.php | UTF-8 | 970 | 3.21875 | 3 | [] | no_license | <?php
namespace Models\DAO;
use Framework\WebApplication;
use Models;
abstract class DAO
{
/**
* @var PDO
*/
protected $_db;
public function __construct() {
$this->_db = WebApplication::getApplication()->getConfig()['dataBase'];
}
... | true |
0c2c2d02be0286a2945d09d47c259aaa6cd56aeb | PHP | carlead/mailchimp | /Mailchimp/Methods/MCHelper.php | UTF-8 | 1,393 | 2.8125 | 3 | [] | no_license | <?php
namespace Carlead\MailchimpBundle\Mailchimp\Methods;
use Carlead\MailchimpBundle\Mailchimp\RestClient,
Carlead\MailchimpBundle\Mailchimp\MailchimpAPIException;
class MCHelper extends RestClient
{
/**
* Ping the MailChimp API
*
* @return string
* @throws MailchimpAPIException
*... | true |
bc5b60e7a6ddda4ad6135f7ea91a57bc70a0a3cb | PHP | cptladouille/videatube | /model/purchaseClass.php | UTF-8 | 1,875 | 3.265625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: chloethonin
* Date: 18/12/2018
* Time: 15:33
*/
class purchaseClass
{
var $id;
var $date_purchase;
var $id_video;
var $id_user;
/**
* purchaseClass constructor.
* @param $id
* @param $date_purchase
* @param $id_video
* @param ... | true |
53275ecb4a66e29084a530bfdbe6a2bdb8a8605b | PHP | RegioneER/sirer | /html/html/xCDMProtocolloLib/Archiflow/soapClient/Card/Type/RetrieveCardsFromSearchModel.php | UTF-8 | 3,672 | 2.703125 | 3 | [] | no_license | <?php
namespace ArchiflowWSCard\Type;
use Phpro\SoapClient\Type\RequestInterface;
class RetrieveCardsFromSearchModel implements RequestInterface
{
/**
* @var string
*/
private $sessionId = null;
/**
* @var \ArchiflowWSCard\Type\ModelTypeFilter
*/
private $modelT... | true |
c6b4d439bdffa007d935bda3a004989b54515703 | PHP | ellipsephp/router-adapter | /src/RouterRequestHandler.php | UTF-8 | 1,518 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Ellipse\Router;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Server\RequestHandlerInterface;
class RouterRequestHandler implements RequestHandlerInterface
{
/**
* The input name of the value overriding the request ... | true |
e3f68db21684e85c395afa204e220a32c83a8524 | PHP | o3co/query.extension.cql | /Visitor/ExpressionVisitor.php | UTF-8 | 6,786 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace O3Co\Query\Extension\CQL\Visitor;
use O3Co\Query\Extension\Http\Visitor\ExpressionVisitor as BaseVisitor;
use O3Co\Query\Extension\CQL\Literals;
use O3Co\Query\Query\Expr;
/**
* ExpressionVisitor
* CQL ExpressionVisitor is to generate Http based CQL native query from SimpleExpression.
* @uses B... | true |
fc159380de866258f653776805e12bc6ad45653f | PHP | lesstif/php-jira-rest-client | /src/Issue/IssueService.php | UTF-8 | 35,990 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace JiraRestApi\Issue;
use ArrayObject;
use JiraRestApi\JiraException;
use JiraRestApi\Project\ProjectService;
class IssueService extends \JiraRestApi\JiraClient
{
private $uri = '/issue';
/**
* @param object $json
*
* @throws \JsonMapper_Exception
*
* @return Issue
... | true |
5411917dab616a136e490c076dfc621586d8364e | PHP | VadimPolh/emc_main | /app/Models/Objects.php | UTF-8 | 1,263 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Cviebrock\EloquentSluggable\SluggableInterface;
use Cviebrock\EloquentSluggable\SluggableTrait;
class Objects extends Model implements SluggableInterface{
/**
* The database table used by the model.
*
* @var string
*/
... | true |
5ae8e00004b8ed6688c548af033efc227f903d36 | PHP | ztbcms/ztbcms-Chart | /Service/FilterY.class.php | UTF-8 | 15,988 | 2.6875 | 3 | [] | no_license | <?php
namespace Chart\Service;
use Think\Exception;
class FilterY {
/**
* 原字段输出
*
* @param $tableName
* @param $time_field
* @param $time_section
* @param $x
* @param $x_type
* @param $x_time
* @param $y
* @param $y_type
* @param $filter
* @param $orde... | true |
ff353074da1fd3b88c4868dba025458eb1a6a077 | PHP | chonea/register.summitkids.ca | /pfbc_login_example.php | UTF-8 | 812 | 2.78125 | 3 | [] | no_license | <!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Login Form Example</title>
</head>
<body>
<?php
session_start();
use PFBC\Form;
use PFBC\Element;
include("libraries/PFBC/Form.php");
$form = new Form("login");
$form->addElement(new Element\HTML('<legend>Login</legend>'));
$form->addElement(new Element... | true |
9f5421876bb133d2039b686ee8906fef37eaf045 | PHP | eramirezr112/pima | /app/test.php | UTF-8 | 482 | 2.9375 | 3 | [] | no_license | <?php
$json = file_get_contents('file.json');
$data = json_decode($json, TRUE);
echo "<pre>";
print_r($data['API']['key']);
echo "</pre>";
/*
$jsonIterator = new RecursiveIteratorIterator(
new RecursiveArrayIterator(json_decode($json, TRUE)),
RecursiveIteratorIterator::SELF_FIRST);
print_r($jsonIterator);
... | true |
0008d523e1d9e9e40a7ebe966f8aad5aff79983f | PHP | YaFou/FakeMe | /src/Provider/GenericProvider.php | UTF-8 | 1,167 | 3.046875 | 3 | [] | no_license | <?php
namespace YaFou\FakeMe\Provider;
class GenericProvider implements ProviderInterface
{
public function getNames(): array
{
return [
'boolean',
'digit',
'integer',
'float',
'randomElement'
];
}
public function boolean(): ... | true |
4187503d45a2e251c6daeafc0b533be084aacfcd | PHP | nanoghelfi2/brothers-birras | /private/ventas/productoManejo.php | UTF-8 | 4,457 | 2.640625 | 3 | [] | no_license | <?php
require '../cuenta/compruebaVentas.php';
require '../clases/Chango.php';
require '../clases/ProductosCh.php';
$objChango= new Chango();
$objProductosCh= new ProductosCh();
$objWonderlist= new Wonderlist();
//Por post, siempre tiene que llegar un id del chango para obtener diferentes datos, como puede... | true |
a7a36ca0d019203bbd6f95be0726c5a8fc4d8fb5 | PHP | sahanh/resto | /src/Resto/Parser/Response/DefaultParser.php | UTF-8 | 6,368 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Resto\Parser\Response;
use Resto\Common\Helpers as H;
use Exception;
use Resto\Exception\ParserException;
use Resto\Exception\ResponseErrorException;
use Resto\Common\Request;
use Guzzle\Http\Message\Response;
class DefaultParser implements ParserInterface
{
/**
* The Guzzle response object
* @va... | true |
c00ffff608748e301420b4ff6666ed0487849032 | PHP | CLERC-Thomas/Neptune | /php/admin_reservations/fonction_reservation.php | UTF-8 | 618 | 2.59375 | 3 | [] | no_license | <?php
function visualisation_admin(PDO $BDD){
$requete = $BDD->prepare ("SELECT chambre_id , reservation , paye , client_id , depart, arrive , token,facture FROM planning
ORDER BY chambre_id ASC");
$requete->execute();
$resultat = $requete->fetchAll();
return $resultat;
}
function getDa... | true |
1a24ce13b67b9aedae7a4dd8241a960661c1d775 | PHP | nttr-t-suga/studyphp | /openssl/key_csr.php | UTF-8 | 755 | 2.78125 | 3 | [] | no_license | <?php
$fp = fopen('list.txt', 'r');
$str = '';
$option = array(
0 => '/C=',
1 => '/ST=',
2 => '/L=',
3 => '/O=',
4 => '/OU=',
);
$getoption = array();
for ($i = 0; $i < 5; $i++) {
$getoption[$i] = fgets($fp);
$getoption[$i] = rtrim($getoption[$i], "\n");
$str = $str . $option[$i] . $... | true |
fe3aef772cdfbcc27be0b3c9f359ba9fda399058 | PHP | keerthanasadam/Web-Shop | /payment.php | UTF-8 | 3,040 | 2.65625 | 3 | [] | no_license | <?php
if(isset($_SESSION['email'])){
session_start();
?>
<div>
<?php
include("functions/function.php");
include("admin_content/connect.php");
$total = 0;
global $conn;
$ip = getIp();
$sel_price = "select * from cart where ipaddr='$ip'";
$run_price = mysqli_query($conn, $sel_price);... | true |
b4b8870b6f6469c9b42818ecf692df3942d68aa6 | PHP | Ray67/SchoolNet | /RayTools/Entity/Fields.php | UTF-8 | 6,828 | 3.125 | 3 | [] | no_license | <?php
namespace RayTools\Entity;
use RayTools\Item\Item;
use RayTools\Entity\Clause;
use RayTools\Entity\Join;
abstract class Fields
{
protected
$fld_PrimaryKey,
$joins,
$clauses,
$aliases, /* Table d'indexation par alias */
$orders;
public
$col... | true |
4c88f3a9ad9cac192170b571a9eda6306589f457 | PHP | arillo/silverstripe-cms-actions | /src/CmsInlineFormAction.php | UTF-8 | 3,027 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace LeKoala\CmsActions;
use SilverStripe\Admin\ModelAdmin;
use SilverStripe\Forms\LiteralField;
use LeKoala\CmsActions\DefaultLink;
/**
* A simple button that links to a given action or url
*
* This is meant to be used inside getCMSFields or getCMSUtils
*
* Action must be implemented on the controll... | true |
24283f946f7d9aae7f77aa5a15594434c2e728fe | PHP | adved85/infocheck | /database/migrations/2019_04_18_084637_create_posts_table.php | UTF-8 | 1,195 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePostsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('posts', function ... | true |
64b15c182dfc101938943fce4464fe97e5be306a | PHP | jurniores/aulasPhp | /32-DAO/config.php | UTF-8 | 613 | 2.75 | 3 | [] | no_license | <?php
$db_name = 'test';
$db_host = 'localhost';
$db_user = 'root';
$db_pass = '';
// função nativa do PHP para conectar ao banco de dados é o PDO
$pdo = new PDO("mysql:dbname=$db_name;hots=$db_host",$db_user, $db_pass);
// inserindo uma querydentro do banco
//$sql = $pdo->query('SELECT * FROM usuarios'... | true |
4cf7a44a329c85bbaacb07ca2b38b435d396815c | PHP | albrecht-stephanie/PDO-Partie1 | /ex4/index.php | UTF-8 | 1,255 | 2.59375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="fr" dir="ltr">
<head>
<meta charset="utf-8">
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<title>Exercice 4</title>
</h... | true |
c518ad21afa6a2b5efce28af18f3b16e242f85b7 | PHP | Hoangbach-97/PHP_MVC_BASIC_SCAFFOLD | /mvc/core/App.php | UTF-8 | 2,250 | 3.03125 | 3 | [] | no_license | <?php
// echo $_GET['url'];
class App{
// http://localhost/MVC_PHP/Home/Products/smartphone/1
// /Gán giá trị mặc định: phòng trường hợp user ngáo
protected $controller="Home";
protected $action="Products";
protected $params=[];
function __construct(){
$response = $this->UrlProces... | true |