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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
f0bb4dfc4fb10a3b464e59665ff3983a2e9e8f55 | PHP | therceman/copper | /src/Component/DB/DBSeed.php | UTF-8 | 1,269 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace Copper\Component\DB;
use Copper\Entity\AbstractEntity;
abstract class DBSeed
{
/** @var string */
public $modelClassName = '';
/** @var array */
public $seeds = [];
/** @var \Closure|null */
private $onCompleteClosure = null;
abstract function getModelClassName();
... | true |
668bf0a9b0e9ce0571e646d7e3651d54b3a243c1 | PHP | rashenok/joomla-dev | /libraries/restful/code/joomla/cache/object.php | UTF-8 | 2,313 | 2.78125 | 3 | [] | no_license | <?php
/**
* @package Joomla.Platform
* @subpackage Cache
*
* @copyright Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
/**
* Joomla Platform Cacheable Class
*
* @pac... | true |
8d4a49251a4034b7e8da4e24f40a3c2c9926c59b | PHP | ArthurJamelot/ProjetAlu3a | /connecter.php | UTF-8 | 1,970 | 2.625 | 3 | [] | no_license | <?php
include 'connexion.php';
if (isset($_POST['login']) and isset($_POST['mdp']))
{
$login=$_POST['login'];
$mdp=$_POST['mdp'];
$requete = $connexion->query("SELECT * FROM UTILISATEURS WHERE USERNAME='$login' OR EMAIL='$login'");
$requete = $requete->fetch();
$iduser= $requete['ID_USER'];
$veri... | true |
7bd514c26d7dc774e9be53e2f7bf31a66ea5ac66 | PHP | JD2895/Blog | /posts.php | UTF-8 | 808 | 2.578125 | 3 | [] | no_license | <?php
session_start();
include_once 'header.php';
include_once './includes/dbblog.inc.php';
?>
<h1> Blog posts </h1>
<table style="border:2px solid;">
<?php
$sql = "SELECT post_id, uid, title, date_time FROM posts ORDER BY date_time DESC LIMIT 3";
$result = mysqli_query($conn, $sql);
if ($result == 0){
... | true |
63903a9093e1e682f160feb7d9e4ae0eb3f87a6b | PHP | dolfy82/openclassrooms | /b50.php | UTF-8 | 1,317 | 3.203125 | 3 | [] | no_license | <?php
function num_encode($num) {
$list_char_min = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z');
$list_char_maj = array('A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U',... | true |
89d33f81e8ad5ca9d29d8e72150042d392a16ea6 | PHP | itrnka/ha-framework | /src/ha/Access/HTTP/IO/Request/HTTPInputRequest.php | UTF-8 | 2,459 | 2.953125 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types = 1);
namespace ha\Access\HTTP\IO\Request;
use ha\Access\HTTP\Error\HTTP415Error;
use ha\Component\HTTP\URL;
/**
* Interface HTTPInputRequest.
* Represents incoming HTTP request to HTTP server.
*/
interface HTTPInputRequest
{
/**
* HTTPInputRequest constructor.
*/
pu... | true |
d147cd08004c8e0956faea7fa082f2d5aeddf6cf | PHP | pronob980/projectD | /classes/Database.php | UTF-8 | 1,223 | 3.296875 | 3 | [] | no_license | <?php
class Database {
private $hostdb = "localhost";
private $userdb = "root";
private $passdb = "";
private $namedb = "projectdevxpart";
public $pdo;
public function __construct() {
if (!isset($this->pdo)) {
try {
$link = new PDO("mysql:host=" . $this->ho... | true |
2e3f92430dea4cf2a8a07b59bdbc9c59eba18c3d | PHP | EmilJPedersen/ProjectOffers | /packages/laravel-economic/src/Builders/ProductBuilder.php | UTF-8 | 1,302 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace LasseRafn\Economic\Builders;
use LasseRafn\Economic\Models\Product;
class ProductBuilder extends Builder
{
protected $entity = 'products';
protected $model = Product::class;
/**
* @param $unencodedId
*
* @return mixed|Model
*/
public function findWithCustomEncoding( $unencodedId ) {
r... | true |
6462967f1fd27dd01ef778865e2954f4db393adb | PHP | ivanpetric998/project3 | /app/requests/LoginRequest.php | UTF-8 | 383 | 2.5625 | 3 | [] | no_license | <?php
namespace app\requests;
use app\requests\Request;
class LoginRequest extends Request
{
public function __construct($request)
{
parent::__construct($request);
}
public function rules()
{
return [
"username"=>"required|reg:/^[\d\w\_\-\.\@]{6,30}$/|exists:user,use... | true |
ff4d8f92ea371e123ace54c2a18d9f9c00de3f87 | PHP | KMM-AO/project-film-db-blok-6-meko106 | /MVC_oefen/docent(versie3)/app/models/smaak.class.php | ISO-8859-1 | 1,440 | 3.0625 | 3 | [] | no_license | <?php
namespace app\models;
use core\Model;
use core\Database;
use PDO;
class Smaak extends Model {
/** de bijbehorende database-tabel */
const TABLENAME = 'smaken';
public function __construct()
{
/**
* Roep de parent-constructor aan met n optionele parameter:
* primary-k... | true |
6c0569360767fc74193668f29fd2bcf04ffb9c35 | PHP | donataskriauciunas/Palanga | /payAndDrive/src/BuyCarModule/Models/Vendors/VehicleVendor.php | UTF-8 | 2,740 | 2.984375 | 3 | [] | no_license | <?php
namespace payAndDrive\src\BuyCarModule\Models\Vendors;
use payAndDrive\src\BuyCarModule\Events\NewVehicleEvent;
use payAndDrive\src\BuyCarModule\Models\Clients\Client;
use payAndDrive\src\BuyCarModule\Events\EventDispatcher;
use payAndDrive\src\BuyCarModule\Events\SoldCarEvent;
use payAndDrive\src\BuyCarModule\... | true |
a86c626c97aee5181fcd1bb6f159766b371df837 | PHP | d3vm4rc-d07-d3/instar-camera-automate-surveillance | /SetStatusIfHomeOrAway.php | UTF-8 | 1,791 | 2.921875 | 3 | [] | no_license | <?php
//=============================================================================================
// Version 1.0
// Created by: Marcus Opel
// Organization: https://devmarc.de
// requires: PHP 5.4 or higher
//=====================================================... | true |
6c0570bc32bdb6d834784bfcba609bd155949667 | PHP | mamazu/php-ci-server | /src/Services/Git/GitHubWebHookParserInterface.php | UTF-8 | 1,024 | 2.953125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: mamazu
* Date: 11/02/18
* Time: 18:44
*/
namespace App\Services\Git;
use App\Exceptions\InvalidPayloadException;
interface GitHubWebHookParserInterface
{
/**
* Sets the payload for the parser.
* If the payload is invalid it throws an InvalidPayloadExceptio... | true |
ab9c5595dcab4723243f444ae51802c52efa57b9 | PHP | raillie/ethbnb | /ethbnb-master/ethbnb-master/src/ethbnb/API/Users.php | UTF-8 | 537 | 2.65625 | 3 | [] | no_license | <?php
namespace ethbnb\API;
use ethbnb\Request\User\UserRequest;
use ethbnb\Response\User\UserResponse;
class Users extends AbstractAPI
{
const USER_RESPONSE_CLASS = UserResponse::class;
/**
* @param UserRequest $request
* @return UserResponse
*/
public function view(UserRequest $request)... | true |
1c937074e9d7f6b19739ef7682bccae5cc53e4db | PHP | conheocon25/spnvps | /chuagiacquang.com/mvc/domain/Config.php | UTF-8 | 2,046 | 2.8125 | 3 | [] | no_license | <?php
Namespace MVC\Domain;
require_once( "mvc/base/domain/DomainObject.php" );
class Config extends Object{
private $Id;
private $Param;
private $Value;
//-------------------------------------------------------------------------------
//ACCESSING MEMBER PROPERTY
//-----------------------------... | true |
d3377ddb82150ef299acc6b47162032514265b66 | PHP | TsengWen/shingnan-frontend | /web/model/index.lib.php | UTF-8 | 3,012 | 2.71875 | 3 | [] | no_license | <?php
// initialize
require_once HOME_DIR . 'configs/config.php';
/**
* 興南首頁
*/
class Index
{
public $db = null;
public $smarty = null;
public $msg = '';
public $error = '';
public $admin = null;
/**
* Statistic constructor
*/
public function __construct()
... | true |
cf707e4212f043653e104843fddefa05f94cb70a | PHP | jqhph/framework-lxh | /src/kernel/RequestAuth/Counters/Counter.php | UTF-8 | 1,117 | 2.875 | 3 | [] | no_license | <?php
namespace Lxh\RequestAuth\Counters;
use Lxh\Cache\CacheInterface;
use Lxh\RequestAuth\Auth;
class Counter
{
/**
* @var Auth
*/
protected $auth;
/**
* @var CacheInterface
*/
protected $cache;
/**
* 缓存前缀
*
* @var string
*/
protected $prefix = 'cou... | true |
ff68f3fe01e32928e2ed41f4fd3b6e60575b378d | PHP | ameybhavsar24/asn-tracker | /public/login.php | UTF-8 | 5,034 | 2.625 | 3 | [] | no_license | <?php
// Initialize session
session_start();
// Check if user is already logged in, if yes redirect to dashboard
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true) {
header("location: dashboard.php");
exit;
}
require_once("../db.php");
$email = $password = "";
$email_err = $pass... | true |
37d09f531bcaebe1ae915d8ccdfc641502c33f96 | PHP | gnondpom09/tp_poo | /class/request.php | UTF-8 | 918 | 3.140625 | 3 | [] | no_license | <?php
class Request implements InterfaceRequest {
/**
* Get param
*
* @param string $key
* @return string
*/
public function getParam(string $key): string {
if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST[$key])) {
return $_POST[$key];
} elseif (is... | true |
ca8a8d63b2c500fbeb288acc8becb51623ef0834 | PHP | iverasp/ntnu | /tdt4237/src/webapp/controllers/AdminController.php | UTF-8 | 1,337 | 2.671875 | 3 | [] | no_license | <?php
namespace tdt4237\webapp\controllers;
use tdt4237\webapp\Auth;
use tdt4237\webapp\models\User;
class AdminController extends Controller
{
function __construct()
{
parent::__construct();
}
function index()
{
$this->check_auth();
$variables = [
'users' =>... | true |
037b2caa6adc845fec98eab3cd783784dccdc1cd | PHP | shadowsliver/codesource | /controller/Controller.php | UTF-8 | 828 | 2.6875 | 3 | [] | no_license | <?php
include_once './model/db/DBConnection_mysql.php';
include_once './model/Properties.php';
include_once './model/Functions.php';
class Controller
{
private $db;
private $properties;
private $functions;
public function __construct()
{
//$this->db = new DBConnection("root", "root", "voor... | true |
1efc995a67e1a950cca4990933c1c80bf6c8728d | PHP | tonyberrynd/SugarDockerized | /sugar/include/SugarDateTime.php | UTF-8 | 26,732 | 2.984375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Your installation or use of this SugarCRM file is subject to the applicable
* terms available at
* http://support.sugarcrm.com/Resources/Master_Subscription_Agreements/.
* If you do not agree to all of the applicable terms or do not have the
* authority to bind the entity as an authorized representative... | true |
b80a3bab18d2efc24e83c79769a461bd01cd689f | PHP | Taeeun-Kim/World_Data_Website | /php/save.php | UTF-8 | 394 | 2.6875 | 3 | [] | no_license | <?php
include("../php/world_data_parser.php");
$file = "../data/world_data_v1.csv";
$myParser = new WorldDataParser();
$array = $myParser->parseCSV($file);
$value = $myParser->saveXML($array);
$is_file_exist = file_exists('../data/world_data.xml');
if ($is_file_exist) {
echo 'XML Savestatus: erfolgreich (1)'; /... | true |
1bea4350f951a7dee7bcfba7a354ef0b0a2db80e | PHP | gvozdb/CurrencyCalc | /core/components/currencycalc/processors/mgr/item/update.class.php | UTF-8 | 1,772 | 2.515625 | 3 | [] | no_license | <?php
class CurrencyCalcItemUpdateProcessor extends modObjectUpdateProcessor
{
/** @var CurrencyCalcItem $object */
public $object;
/** @var string $objectType */
public $objectType = 'CurrencyCalcItem';
/** @var string $classKey */
public $classKey = 'CurrencyCalcItem';
/** @var array $lan... | true |
ee86ff1462b31a61e7d77ce0cc397fcbabb94b4a | PHP | evas-php/evas-auth | /src/Traits/AuthForeignTrait.php | UTF-8 | 2,183 | 2.65625 | 3 | [
"CC-BY-4.0"
] | permissive | <?php
/**
* Трейт аутентификации через внешний ресурс.
* @package evas-php\evas-auth
* @author Egor Vasyakin <egor@evas-php.com>
*/
namespace Evas\Auth\Traits;
use Evas\Auth\Auth;
use Evas\Auth\Models\AuthGrant;
trait AuthForeignTrait
{
/**
* Получение ссылки для внешней аутентификации.
* @param str... | true |
5d268fafe64c2d086bbfe962e33aed4285d3d3ff | PHP | jongtaikim/kucamp | /module/member/attendance_list.php | UHC | 150,588 | 2.53125 | 3 | [] | no_license | <?php
/***************************************************************
* ϸ: module/member/attendance.php
* ۼ: 2006.11.8
* ۼ:
* : ⼮üũ
******************************************************************/
//php Ȯ
//phpinfo();exit;
//echo "dt_date:$dt_date";
$num_date = "20".date(y)."-".date(m)."-".date(d); //Էµ ¥ ó¥ ... | true |
528c4bb3b1650162b333bb4604688ba12583ddb9 | PHP | muelt/grapeful | /app/User.php | UTF-8 | 1,916 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
p... | true |
22bed37ce6b5a3131ee7c072d9697ea8759d8b15 | PHP | boputu/Prueba2 | /use.php | UTF-8 | 871 | 2.859375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Gimnasio</title>
</head>
<body>
<?php
include "gym.php";
$gestor=new gym();
$gestor->nuevoHombre($_POST["Lhombres"]);
$gestor->nuevoMujer($_POST["Lmujeres"]);
$gestor->nuevoHombre($_POST["Mhombres"]);
$gestor->nuevoMujer($_POST["Mmujeres"])... | true |
a6e545e170f6e4b4b1125e897e73a5bc65fc63f2 | PHP | DanielRomanMartinez/my-neighborhood-community-api | /src/Application/NotificationLog/Delete/DeleteNotificationLogCommand.php | UTF-8 | 554 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Application\NotificationLog\Delete;
final class DeleteNotificationLogCommand
{
private string $id;
private string $elasticSearchIndex;
public function __construct(
string $id,
string $elasticSearchIndex
) {
$this->id = $id;
... | true |
2b23e686c270b15c276bb5fc5f104fdc3f29de67 | PHP | semelyanov86/sf | /app/Domains/Teams/DataTransferObjects/TeamDataCollection.php | UTF-8 | 885 | 2.734375 | 3 | [] | no_license | <?php
namespace Domains\Teams\DataTransferObjects;
use Domains\Teams\Models\Team;
use Illuminate\Support\Collection;
class TeamDataCollection extends \Parents\DataTransferObjects\ObjectDataCollection
{
public function current(): TeamData
{
return parent::current();
}
/**
* @param Tea... | true |
45353d66b88c365dbec375fa8ddb8a0098b757ce | PHP | uml-digitalinitiatives/UofM-Theme_2 | /templates/islandora-basic-collection-grid.tpl.php | UTF-8 | 796 | 2.625 | 3 | [] | no_license | <?php
/**
* @file
* islandora-basic-collection.tpl.php
*
* @TODO: needs documentation about file and variables
*/
?>
<div class="islandora islandora-basic-collection">
<div class="islandora-basic-collection-grid clearfix">
<?php foreach($associated_objects_array as $key => $value): ?>
<dl class="islandor... | true |
7b9ea1c2927d3ac3f5ef8c70d9bc3c11c556eda5 | PHP | nikman09/site | /application/libraries/Layout.php | UTF-8 | 1,696 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Layout {
private $ci;
function __construct() {
$this->ci = & get_instance();;
}
public $header = 'template/header';
//public $menu = 'template/menu';
public $footer = 'template/footer';
public $endhtml = 'template/endhtml';
function render($view,$data = null,$js... | true |
41448e229c83b645ee829ddfa0b7b2a0bbfd8a14 | PHP | MatiasNAmendola/erp-pyme | /application/models/SeriesProductos.php | UTF-8 | 1,126 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
class Model_SeriesProductos extends Zend_Db_Table_Abstract {
protected $_name = 'series_productos';
public function new_serie($id_producto,$numero_serie){
$data = array('id_producto' => $id_producto,'numero_serie' => $numero_serie);
return $this->insert($data);
}
public function findSerie($id_producto,... | true |
39b6f57b87615019043234801f1d8a7a6052e7a0 | PHP | Evil85/tournament-scheduling-project | /EndpointProgram/testphp/index.php | UTF-8 | 1,194 | 2.65625 | 3 | [] | no_license | <?php
$address = "127.0.0.1";
$port = 2345;
// getter testing: leave this here to verify connection is working
$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_connect($socket, $address, $port);
$data = array(
'Command' => 'getTournamentID',
'TournamentName' => 'Clone Wars Racquetbal... | true |
01a2029f1b88c3c3934de411f0e93bd26c7512fc | PHP | colesnic89/realty | /components/Date/DateHelper.php | UTF-8 | 309 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\components\Date;
use Yii;
class DateHelper
{
public static function format($date, $format = null)
{
if (empty($format)) {
$format = Yii::$app->params['defaultDisplayDateTimeFormat'];
}
return date($format, strtotime($date));
}
} | true |
960d728a0f33a8232f9b8d6db6881107186b3e54 | PHP | sheldon/framework-oo-mvc-tutorial | /public/Router.php | UTF-8 | 181 | 2.9375 | 3 | [] | no_license | <?php
class Router{
public $controllers = array("hello", "goodbye");
public function route($url_parts){
if(in_array($url_parts[0], $this->controllers)) return 1;
}
}
?> | true |
5121c69fa2c916508e648bddcf0fabd911cfa55d | PHP | andrey-owdienko/test-news | /models/News.php | UTF-8 | 1,350 | 2.703125 | 3 | [] | no_license | <?php
namespace app\models;
use http\Url;
use PHPHtmlParser\Dom;
use Yii;
use yii\behaviors\TimestampBehavior;
use yii\db\Expression;
/**
* This is the model class for table "news".
*
* @property int $id
* @property string|null $description
* @property string|null $date
*/
class News extends \yii\db\ActiveReco... | true |
ef634946f9c7b7a43b7f3a15c4cb5f84804b4fbf | PHP | thiio-com/exigo-php-sdk | /src/Requests/ExigoRequest.php | UTF-8 | 566 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Thiio\Exigo\Requests;
use JsonSerializable;
class ExigoRequest implements JsonSerializable
{
const API_VERSION = "/3.0";
const DATE_FORMAT = "Y-m-d H:i:s";
public function jsonSerialize(): mixed{
return get_object_vars($this);
}
public function toArray(){... | true |
542ed1da3f4ba720d833bf642852ef7e10d6cfbd | PHP | mersahin/laravel-api-startup | /app/Models/Model.php | UTF-8 | 2,824 | 2.921875 | 3 | [] | no_license | <?php
namespace App\Models;
use Validator;
use App\Services\Filter;
use App\Exceptions\ValidationException;
use Illuminate\Database\Eloquent\Model as BaseModel;
abstract class Model extends BaseModel
{
/**
* The storage format of the model's date columns.
*
* @var string
*/
protected $d... | true |
bcb7f0d9433050a269e66be0abcb514b5546e2be | PHP | matkozikowski/poker-app | /app/tests/Util/Validation/StraightValidationTest.php | UTF-8 | 635 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Tests\Util\Validation;
use App\Validation\StraightValidation;
use PHPUnit\Framework\TestCase;
class StraightValidationTest extends TestCase
{
/**
* @dataProvider getCardsData
*/
public function testCorrectCheckRules($cards, $expected): void
{
$royalFlushValidation = ... | true |
249188b486b51ef1e4ee3b6987861817fc615d6f | PHP | shield-sso/sso | /src/Entity/RefreshToken.php | UTF-8 | 1,657 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace ShieldSSO\Entity;
use DateTimeInterface;
use ShieldSSO\Contract\Entity\AccessTokenInterface;
use ShieldSSO\Contract\Entity\RefreshTokenInterface;
class RefreshToken extends AbstractEntity implements RefreshTokenInterface
{
/** @var string|null */
private $code = nu... | true |
79a1bffd27e792b3b504e2bdd6433e5c0fd83b64 | PHP | AnaMC/DAW | /AplicacionesWebEntornoServidor/Tema 4.1/classes/Manager.php | UTF-8 | 192 | 2.65625 | 3 | [] | no_license | <?php
interface Manager{
function add($objeto);
function edit($objeto);
function get($id);
function getAll();
function remove($id);
} | true |
394e2fe1a58bae0e1ae8af16ce2ca8f10f97a94f | PHP | XavierGaro/MustSee-Web-Service | /serializer/Serializer.php | UTF-8 | 780 | 3.390625 | 3 | [] | no_license | <?php
namespace Serializer;
/**
* Interface Serializer
* Cada una de les classes que implementen aquesta interfície permet seriar les dades que es
* passen per argument en un tipus diferent de format. Les dades poden ser objectes,
* arrays o elements primitius.
*
* En el cas d'objectes obté totes les propietats ... | true |
40b4137a108fe656aeea428b95fa0a7002490a18 | PHP | MaximeCgn/DWWM2020-Maxime | /01 - PHP CLI/03 EXOS ALGO A REFAIRE/6.1.php | UTF-8 | 87 | 2.75 | 3 | [] | no_license | <?php
for ($i=0;$i<7;$i++) {
$tableau[$i]=0;
echo "[".$tableau[$i]."]\t";
}
| true |
94562d65609319521bd34ccb917af51ed5e3c6c4 | PHP | Iago-sc/SistemaAcademico | /SistemaAcademico/curso/alterar.php | UTF-8 | 1,713 | 2.75 | 3 | [] | no_license | <?php
$id = $_POST['id'];
$nome = $_POST['nome'];
$descricao = $_POST['descricao'];
$carga_horaria = $_POST['carga_horaria'];
$anoInicio = $_POST['anoInicio'];
$semestreInicio = $_POST['semestreInicio'];
$anoTermino = $_POST['anoTermino'];
$semestreTermino = $_POST['semestreTermino'];
$turno_id = $_POST['turno_id'];
... | true |
1317eca3c8d3bc1ea491ba6bf69a2bf5f0e5b815 | PHP | BaseAppMongoVue/base-api-mongo | /web/app/Http/Controllers/Api/V1/Admin/Auth/RefreshTokenController.php | UTF-8 | 2,819 | 2.546875 | 3 | [] | no_license | <?php
namespace OdontoInn\Http\Controllers\Api\V1\Admin\Auth;
use Tymon\JWTAuth\Exceptions\TokenInvalidException;
use OdontoInn\Http\Controllers\ApiController;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use Tymon\JWTAuth\Facades\JWTAuth;
use Tymon\JWTAuth\Token;
use Tymon\JWTAuth\Excepti... | true |
d76b980e4784b555490003a5d5eb4108232cc3be | PHP | techdivision/import | /src/Adapter/SerializerTrait.php | UTF-8 | 3,243 | 3 | 3 | [
"MIT"
] | permissive | <?php
/**
* TechDivision\Import\Adapter\SerializerTrait
*
* PHP version 7
*
* @author Tim Wagner <t.wagner@techdivision.com>
* @copyright 2016 TechDivision GmbH <info@techdivision.com>
* @license https://opensource.org/licenses/MIT
* @link https://github.com/techdivision/import
* @link http://w... | true |
8aa38834872b6b8f1795825120e130ccf265b24b | PHP | kimon89/scraper | /tests/ScrapeTest.php | UTF-8 | 973 | 2.78125 | 3 | [] | no_license | <?php
include "Scraper.php";
use Sainsburys\Scraper;
class ScrapeTest extends PHPUnit_Framework_TestCase
{
public $html = '';
public function setUp()
{
$this->html = file_get_contents('tests'.DIRECTORY_SEPARATOR.'test_data.html');
}
public function testgetDom()
{
$dom = Scraper::getDom($this->html);
$t... | true |
334f699dfd1b97cbe9cb615062f494123a35193a | PHP | rolandalla/wordpress-to-instagram | /vendor/mgp25/instagram-php/tests/Realtime/Command/SendHashtagTest.php | UTF-8 | 3,995 | 2.578125 | 3 | [
"Apache-2.0",
"GPL-2.0-or-later"
] | permissive | <?php
namespace InstagramAPI\Tests\Realtime\Command;
use InstagramAPI\Realtime\Command\Direct\SendHashtag;
use PHPUnit\Framework\TestCase;
class SendHashtagTest extends TestCase
{
public function testNonNumericThreadIdShouldThrow()
{
$this->expectException(\InvalidArgumentException::class)... | true |
4dc9b402a6a2fc3a605371d9e705fe920165a0ea | PHP | mrprompt/Cielo | /src/Requisicao/IdentificacaoTransacao.php | UTF-8 | 2,333 | 2.59375 | 3 | [] | no_license | <?php
/**
* Cielo
*
* Cliente para o Web Service da Cielo.
*
* O Web Service permite efetuar vendas com cartões de bandeira
* VISA e Mastercard, tanto no débito quanto em compras a vista ou parceladas.
*
* Licença
* Este código fonte está sob a licença GPL-3.0+
*
* @category Library
* @package MrPrompt... | true |
c8c1472b765fe744449a781faa5cefc242ae1a5e | PHP | magelon/dogbook | /phptest/add_entry.php | UTF-8 | 1,470 | 3.1875 | 3 | [] | no_license |
<?php //add_entry.php
if ($_SERVER['REQUEST_METHOD'] == 'POST'){ //Handle the form.
//Connect and select:
$dbc = mysql_connect('localhost', 'root', '1234');
mysql_select_db('myblog',$dbc);
// Validate the form data:
$problem = FALSE;
if(!empty($_POST['title'])&& !empty($_POST['entry'])){
$t... | true |
74b34c3b7f1d6f60e49629f32436052d2a76696c | PHP | makDocs/PHP | /FTP/m2/String1.php | UTF-8 | 781 | 3.125 | 3 | [] | no_license | <?php
$str1 = "sample text \"ABC\" \\ go \\\\ to next line \nABC \t press Tab key \101 \141 \n";
echo '<pre>';
echo $str1;
echo '</pre>';
$n = 10;
//Heredoc
$str2 = <<<MYSTR
Heredoc
My sample heredoc
we have single qoute '
we have double qoute "
we have one var... | true |
bbfa6eee31c387eadbcd425e540ad9205e4a72d5 | PHP | Swoolefony/swoole-bundle | /src/Server/Status.php | UTF-8 | 927 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Swoolefony\SwooleBundle\Server;
readonly class Status
{
public function __construct(
private int $mainPid,
private int $managerPid,
private int $workerPid,
private ?int $phpPid,
private int $port,
private string $ip,
... | true |
f1928b0b2514016523592f9dac6702a01b149e4f | PHP | terry-i/gs | /07_04_tetsuroimura3/insert.php | UTF-8 | 1,320 | 2.78125 | 3 | [] | no_license | <?php
//1. POSTデータ取得
//$name = filter_input( INPUT_GET, ","name" ); //こういうのもあるよ
//$email = filter_input( INPUT_POST, "email" ); //こういうのもあるよ
$name=$_POST["name"];
$writer=$_POST["writer"];
$first=$_POST["first"];
$recommend=$_POST["recommend"];
$memo=$_POST["memo"];
//2. DB接続します
include("function.php");
$pdo=db_conn();... | true |
da0e6de2a0e201d8b37312362f54af18ebe428fe | PHP | wwcao/group8 | /basic/models/User.php | UTF-8 | 2,873 | 2.9375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "users".
*
* @property integer $id
* @property string $username
* @property string $password
* @property string $auth_key
* @property string $access_token
*/
class User extends \yii\db\ActiveRecord implements \yii\web\IdentityInterf... | true |
f54ec3fb2cda3f036b341797aecf7c19f8758d1d | PHP | dineshbh/portfolio-cms | /apps/portfolio-cms/app/database/migrations/2015_01_05_131226_create_gallery_table.php | UTF-8 | 1,039 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateGalleryTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('gallery', function(Blueprint $table) {
$table->increments('... | true |
728474cdc4f6038ad172cf0eed7753bee800be6a | PHP | moretgn/listhub | /core/modules/blog/model/PriorityData.php | UTF-8 | 2,656 | 2.921875 | 3 | [] | no_license | <?php
class PriorityData {
public static $tablename = "priority";
public function createForm(){
$form = new lbForm();
$form->addField("name",array('type' => new lbInputText(array("label"=>"Nombre")),"validate"=>new lbValidator(array())));
$form->addField("color",array('type' => new lbInputText(array("la... | true |
dda8363a19cfc3681a20ba53a76c1d946bcf1417 | PHP | pawel-slowik/districts | /tests/Editor/UI/Factory/UpdateDistrictCommandFactoryTest.php | UTF-8 | 3,840 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Districts\Test\Editor\UI\Factory;
use Districts\Editor\Application\Command\UpdateDistrictCommand;
use Districts\Editor\Application\Exception\ValidationException;
use Districts\Editor\UI\Factory\UpdateDistrictCommandFactory;
use PHPUnit\Framework\MockObject\MockObject;
use PHP... | true |
a1a5dab6ca379698f576f89c07f046008ce669cd | PHP | allmeida/pessoas-api | /app/Http/Controllers/API/PessoaController.php | UTF-8 | 2,688 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\API;
use App\API\Apierror;
use App\Pessoa;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class PessoaController extends Controller
{
private $pessoa;
public function __construct(Pessoa $pessoa)
{
$this->pessoa = $pessoa;
}
public ... | true |
b39729d8cd67319dcb594e63e6a03dd4b54901d1 | PHP | samadguliev/bx-data | /src/Element/DbElement.php | UTF-8 | 3,830 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Akop\Element;
/**
* Класс для работы с данными из таблиц
* Необходимо наследовать класс с указанием:
* @var $tableName Имя таблицы
* @var $connectionName Имя соединения
* @var $scriptsAfterConnect Скрипты выполняемве после коннекта
* @author Андрей Копылов aakopylov@mail.r... | true |
8e2d86c1919d851054fc5f1ffea65d3f40580d31 | PHP | trygvevalbo/PRG1100eksamenscase2019 | /sokidatabase.php | UTF-8 | 4,813 | 3.125 | 3 | [] | no_license | <!-- sokidata.php -->
<?php
include "start.php";
?>
<h3>Søk</h3>
<form method="post" action="" id="sokeSkjema" name="sokeSkjema">
<p>Skriv inn søket ditt under:</p><input type="text" id="sokestreng" name="sokestreng" required /> <br/>
<input type="submit" value="Søk" id="sokeKnapp" name="sokeKnapp" />
... | true |
94aa590cd002d66a10e15bd779d9db1a188b9ba7 | PHP | RCaracuel/pruebaLaravel | /app/Http/Controllers/formularioContacto.php | UTF-8 | 545 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
//use Illuminate\Http\Request;
class formularioContacto extends Controller
{
//Usando la clase Illuminate
// public function store(Request $request){
//Sin usar la clase
public function store(){
// return $request;
//Para acceder ... | true |
02c0739e4e2eeb8bd6a930aa7ae75288b9bd8eaa | PHP | noahsnjx/app_gestion_projet | /src/Data/TypeTache.php | UTF-8 | 1,422 | 3.171875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace data;
/**
* Class Type_tache
*/
class TypeTache implements IReadableEntity
{
/**
* @var int identification du type de tache
*/
private int $idTypeTache;
/**
* @var string libellé du type de tache
*/
private string $libTypeTache;
/**
... | true |
a10e994d353b7b3292b0ede1a52a8fc436d9c3ef | PHP | tehwave/laravel-achievements | /tests/TestAchievement.php | UTF-8 | 514 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace tehwave\Achievements\Tests;
use tehwave\Achievements\Achievement;
class TestAchievement extends Achievement
{
/**
* The name of this achievement.
*
* @var string
*/
public $name = 'Test Achievement';
/**
* The description of this achievement.
*
* @var s... | true |
66b3c5c8b12b8246454c9475c8e4ceddd8d6f2cb | PHP | atomx/atomx-api-php | /Atomx/Resources/Advertiser.php | UTF-8 | 1,123 | 2.703125 | 3 | [] | no_license | <?php namespace Atomx\Resources;
use Atomx\AtomxClient;
use Atomx\Resources\Traits\NameTrait;
use Atomx\Resources\Traits\StateTrait;
use InvalidArgumentException;
class Advertiser extends AtomxClient {
use NameTrait, StateTrait;
protected $endpoint = 'advertiser';
public function setName($name)
{
... | true |
dac3b500ed725866c67f8ea1abfab0dac17ae549 | PHP | comelyio/vivid-shell | /src/ASCII/Banners.php | UTF-8 | 955 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of Comely Vivid Shell package.
* https://github.com/comelyio/vivid-shell
*
* Copyright (c) 2018 Furqan A. Siddiqui <hello@furqansiddiqui.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code or visit follow... | true |
808f3e5e864c2cf204b2e639fa65c6081fdf7d5d | PHP | agolden/november_project_api | /hidden/helper_classes/NP_Service.php | UTF-8 | 5,075 | 2.875 | 3 | [] | no_license | <?php
require_once('NP_DatabaseConnection.php');
abstract class NP_Service
{
protected $DBH;
protected $uniqueErrorMessage;
protected $invalidReferenceMessage;
function __construct($dbh) {
$this->DBH = $dbh;
}
function authorizeSelect($input, $authenticated_user) { throw new UnauthorizedUserExcept... | true |
997d6c86152953f3800889f89fb9335aac5b94ef | PHP | stojankukrika/A2ZCMS | /app/database/migrations/2013_10_17_135949_create_gallery_table.php | UTF-8 | 829 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateGalleryTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up() {
Schema::create('gallerys', function(Blueprint $table) {
$table -> increments('id') -> unsigned... | true |
e14e7b70362fd239a8c50b789e707adb81c38d28 | PHP | xjlelf/php_test | /lib/Config.php | UTF-8 | 620 | 2.9375 | 3 | [] | no_license | <?php
namespace Lib;
class Config {
private static $config_namespace = NULL;
public static function load($name) {
if (is_null(self::$config_namespace)) {
throw new \Exception("Config namespace is not set yet.");
}
static $configs;
if (!isset($configs[$name])) {... | true |
9b7f2999cefe418350c2350c07006f7dc015aaf9 | PHP | wangze0218/wuhan | /app/Http/Middleware/SystemMiddleware.php | UTF-8 | 821 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: wangze
* Date: 2017/8/30
* Time: 16:05
*/
namespace App\Http\Middleware;
use Closure;
use App\System\ResponseException;
class SystemMiddleware
{
public function handle($request, Closure $next)
{
try{
$res = $next($request);
}catch (R... | true |
27cc9eb51c33b6dfffbee0a5708eea874bd05a44 | PHP | amirzac/design_patterns | /src/Fundamental/EventChannel/Interfaces/EventChannelInterface.php | UTF-8 | 287 | 2.734375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace app\Fundamental\EventChannel\Interfaces;
interface EventChannelInterface
{
public function publish(string $topic, string $data): void;
public function subscribe(PublisherInterface $publisher, SubscriberInterface $subscriber): void;
} | true |
0c3839cfed4ced5bfba6dbd1f25224a426d057fb | PHP | bitbang/http | /src/Http/Clients/AbstractClient.php | UTF-8 | 2,628 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Bitbang\Http\Clients;
use Bitbang\Http;
/**
* Ancestor for HTTP clients. Cares about redirecting and debug events.
*
* @author Miloslav Hůla (https://github.com/milo)
*/
abstract class AbstractClient implements Http\IClient
{
use Http\Strict;
/** @var int[]|NULL follow Location header on th... | true |
8b72685b2571e38fc12612e372305d33c3a22d04 | PHP | G3rson98/OdontoBot | /core/app/model/Agenda.php | UTF-8 | 2,328 | 2.640625 | 3 | [] | no_license | <?php
class Agenda{
public $id_agenda;
public $id_odontologo;
public static function mostrarFichasDia($id_odontologo){
date_default_timezone_set('America/La_Paz');
$fecha = getdate();
$fechaco = $fecha["year"] . "-" . $fecha["mon"] . "-" . $fecha["mday"];
$sql="select * from ficha,agenda where ficha.id_a... | true |
b0c970b934359942074985493a341c0b6c07ad89 | PHP | silverstripe/silverstripe-framework | /src/Forms/FileUploadReceiver.php | UTF-8 | 14,388 | 2.625 | 3 | [
"CC-BY-3.0",
"BSD-3-Clause"
] | permissive | <?php
namespace SilverStripe\Forms;
use Exception;
use InvalidArgumentException;
use SilverStripe\Assets\File;
use SilverStripe\Assets\Storage\AssetContainer;
use SilverStripe\Core\Injector\Injector;
use SilverStripe\ORM\ArrayList;
use SilverStripe\ORM\DataObject;
use SilverStripe\ORM\DataObjectInterface;
use SilverS... | true |
9b8287d6a752fd8e869e650200faa8dc05637275 | PHP | tmccarthy67/Blackjack | /index.php | UTF-8 | 4,335 | 2.75 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Blackjack</title>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script src="blackjack.js"></script>
<link rel="stylesheet" href="styles.css">
</head>
<bo... | true |
7426268812783deda11971dbff01feae7a8e7e47 | PHP | Jlloretquero/Boletin3 | /ejer20.php | UTF-8 | 140 | 3.03125 | 3 | [] | no_license | <?php
$asterisco="*";
for($num1=1;$num1<=6;$num1++){
for ($contador=1;$contador<=$num1;$contador++){
echo $asterisco;
}
echo "<br>";
} | true |
763f19bdbb1bb70216772c5c9a718e9d59873991 | PHP | linxwFF/curl | /www.kjksxt.com/function.class.php | UTF-8 | 7,180 | 2.734375 | 3 | [] | no_license | <?php
//采集方法
//get方法采集
function get_Curl($url) {
//初始化
$curl = curl_init();
// 设置你需要抓取的URL
curl_setopt($curl,CURLOPT_URL,$url);
// 设置header
curl_setopt($curl,CURLOPT_HEADER,0);
// 设置cURL 参数,要求结果保存到字符串中还是输出到屏幕上。
curl_setopt($curl,CURLOPT_RETURNTRANSFER,1);
//超时设置
curl_setopt($curl, CURLOPT_TIMEOUT,0); ... | true |
a7473593f669ee2655f53348e5f0e41f5da3ee8a | PHP | FER25-Code/Transport_Server | /src/Entity/Event.php | UTF-8 | 2,111 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\JoinColumn;
use Doctrine\ORM\Mapping\ManyToOne;
/**
* @ORM\Entity(repositoryClass="App\Repository\EventRepository")
*/
class Event
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
... | true |
47ff109d29a08f60a3d1c652169579316ec0d96e | PHP | mkherlakian/bernard | /tests/Driver/Pheanstalk/DriverTest.php | UTF-8 | 3,596 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Bernard\Tests\Driver\Pheanstalk;
use Bernard\Driver\Pheanstalk\Driver;
use Pheanstalk\Job;
use Pheanstalk\Pheanstalk;
class DriverTest extends \PHPUnit\Framework\TestCase
{
/** @var \PHPUnit_Framework_MockObject_MockObject */
private $pheanstalk;
/** @var Driver */
private $driver;
... | true |
c0d5d19ded57874ae94f481b577dadb912fcc19b | PHP | kevinknelson/xing-repository | /src/Xing/System/Serialization/JsonSerializer.php | UTF-8 | 1,380 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package Xing\System
* @copyright 2013 Kevin K. Nelson (xingcreative.com)
* Licensed under the MIT license
*/
namespace Xing\System\Serialization {
use Xing\System\Collections\Xinq;
class JsonSerializer {
public static function encode( $data ) {
if( version_compare(phpversion(),'5... | true |
8479e187ace5152ebdc129d2717ca95e5243bdad | PHP | flsouto/httextar | /FlSouto/HtTextar.php | UTF-8 | 876 | 2.953125 | 3 | [] | no_license | <?php
namespace FlSouto;
class HtTextar extends HtTextin{
function __construct($name){
parent::__construct($name);
$this->cols(40);
$this->rows(4);
}
function size($colsxrows){
$arr = explode('x',"$colsxrows");
if(ctype_digit($arr[0])){
$this->cols($arr[0]);
}
if(isset($arr[1]) && ctype_digit($a... | true |
323c4f5f834473443d96ee964f446df679ee1734 | PHP | rafalsalawa/RafAlbums | /album_info.php | UTF-8 | 1,401 | 2.90625 | 3 | [] | no_license | <?php
//include 'database.php';
//$album_id = 1;
//AlbumInfo($album_id);
function AlbumInfo($conn, $album_id) {
$albumCount = 0;
$albumSize = 0;
$sqlinfo = "SELECT * FROM `photos` WHERE `album_id`=$album_id";
$result = $conn->query($sqlinfo);
if ($result->num_rows > 0) {
while($row = $result->f... | true |
90bfd1c9cad5f3bca1e57750e0686f92cf7a2e61 | PHP | paulprincewill/ecommerce | /apps/backend/products/main.php | UTF-8 | 1,017 | 2.53125 | 3 | [] | no_license | <?php
require "../../../initialize.php";
require BACKEND_LIB."db.php";
if (isset($_POST['search'])) {
$search = $_POST['search'];
$category = $_POST['category'];
$type = $_POST['type'];
$sql = "SELECT * FROM products WHERE title LIKE '%$search%' AND category LIKE '%$category%' AND type LIKE '%$type%' ... | true |
3c0e318209b9ecce9e90a24502453f416ffeb132 | PHP | olli-gold/tubfind | /sys/authn/SIPAuthentication.php | UTF-8 | 6,129 | 2.65625 | 3 | [] | no_license | <?php
/**
* SIP2 authentication module.
*
* PHP version 5
*
* Copyright (C) Villanova University 2010.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* This program is... | true |
84d54b03009c976e4e65844f8cb2647981eb850b | PHP | ExeQue/remix | /tests/Unit/Serialize/JsonSerializerTest.php | UTF-8 | 1,995 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Tests\Unit\Serialize;
use ExeQue\Remix\Serialize\JsonSerializer;
it('decode method returns decoded value', function () {
$serializer = JsonSerializer::make();
expect($serializer->decode('"foo"'))->toBe('foo');
});
it('encode method returns encoded value', function ... | true |
a8a5d50ab8d589ae6c8a619714df96a1c36b4c09 | PHP | OnlyRichard20/Proyecto-DAW | /php/class.usuarios.php | UTF-8 | 872 | 2.796875 | 3 | [] | no_license | <?php
class usuario extends DataBoundObject {
protected $id;
protected $email;
protected $nombre;
protected $apellido;
protected $contra;
protected $direccion;
protected $telefono;
protected $tipo;
protected function DefineTableName()... | true |
3b942b9c0a34cf624e015e00236225d47d40a312 | PHP | omkarkhare/PHP-Application | /index.php | UTF-8 | 2,004 | 2.625 | 3 | [] | no_license | <?php
//Start session
session_start();
//Unset the variables stored in session
unset($_SESSION['ID']);
unset($_SESSION['USER_FIRST_NAME']);
unset($_SESSION['USER_LAST_NAME']);
$_SESSION['start'] = 0;
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta name="viewport" content="width=device... | true |
db529a3240880fe78a136c3fe313ab6be7db9a12 | PHP | MMatola/mpesa-wordpress | /mpesa.php | UTF-8 | 8,855 | 2.703125 | 3 | [] | no_license | <?php
/*
* Plugin Name: WooCommerce Mpesa Mz Payment Gateway
* Plugin URI: http://www.xindiri.com/woocommerce/mpesa-mz-wp-gateway-plugin.html
* Description: Take mobile payment on your store.
* Author: Xindiri
* Author URI: http://www.xindiri.com
* Version: 1.0.0
*
*
* /*
* This action hook registers our PHP... | true |
90b76a446e353269a86caa4acf02aed776315419 | PHP | RomanovSci/playbook-backend | /app/Services/Booking/BookingTimingService.php | UTF-8 | 1,307 | 2.546875 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace App\Services\Booking;
use App\Exceptions\Internal\IncorrectDateRange;
use App\Models\Booking;
use App\Repositories\BookingRepository;
use App\Services\ExecResult;
use Carbon\Carbon;
/**
* Class BookingTimingService
* @package App\Services\Booking
*/
class BookingTimingSe... | true |
714a9b151e7648f264cfc0668d5ba615a36e504b | PHP | ShinigamiDay/ESGIBlog | /src/ESGI/BlogBundle/Controller/ArticleController.php | UTF-8 | 9,323 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace ESGI\BlogBundle\Controller;
use ESGI\BlogBundle\Entity\SuggestArticle;
use ESGI\BlogBundle\Form\SuggestArticleType;
use ESGI\BlogBundle\Entity\Article;
use ESGI\BlogBundle\Form\ArticleType;
use Symfony\Component\HttpFoundation\Request;
use FOS\RestBundle\Controller\FOSRestController;
class ArticleCon... | true |
9a6c13a995f04e4e6604741d81bcdceca7868027 | PHP | Lemaitrehan/its | /application/admin/validate/Navs.php | UTF-8 | 398 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace application\admin\validate;
use think\Validate;
/**
* 导航验证器
*/
class Navs extends Validate{
protected $rule = [
['navTitle|max:30', 'require', '请输入导航名称|导航名称不能超过10个字符'],
['navUrl','require', '请输入导航链接'],
];
protected $scene = [
'add'=>['navTitle','navUrl'],
'edit'=>['navTitle','na... | true |
dbb3cd30311cfa485183fd5d96c85e767c733d37 | PHP | mr-robot35/Employee-Shift-Management-System | /export_total_employee.php | UTF-8 | 4,135 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
require('include/connection.php');
$output = "";
//initializing count variables
$night_count_f = 0;
$day_count_f = 0;
$morning_count_f=0;
if(isset($_POST['export_e'])){
$date1_e=$_POST['date1_e'];
$date2_e=$_POST['date2_e'];
//checking for a valid date range
$query = "SELE... | true |
bfbc7c9cef2617caa6f4152181b17e22d584634f | PHP | cadoyi/yashop | /modules/catalog/models/ProductGallery.php | UTF-8 | 1,378 | 2.703125 | 3 | [] | no_license | <?php
namespace catalog\models;
use Yii;
use cando\db\ActiveRecord;
/**
* 产品画册
*
* @author zhangyang <zhangyangcado@qq.com>
*/
class ProductGallery extends ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return '{{%product_gallery}}';
}
/**
... | true |
d708e5f0169dd0c2da0e4661f9a5aa187e11e8f0 | PHP | robtuley/knotwerk | /forms/Test/Form/XhtmlTextElement.php | UTF-8 | 4,795 | 2.515625 | 3 | [] | no_license | <?php
/**
* Unit test cases for T_Form_Xhtml class.
*
* @package formTests
* @author Rob Tuley
* @version SVN: $Id$
* @license http://knotwerk.com/licence MIT
*/
/**
* T_Form_Xhtml unit tests for the T_Form_Text element.
*
* @package formTests
*/
class T_Test_Form_XhtmlTextElement extends T_Unit_Case
{
... | true |
a8003600d8ee387b57750cecc830eba0d99a42e2 | PHP | tovinping/PHP | /demo05/index.php | UTF-8 | 4,889 | 3.046875 | 3 | [] | no_license | <?php
header("content-Type:text/html;charset=utf-8");
echo "<h3>PHP正则表达式</h3>";
echo "<p>1.^和$:前者匹配开头,后者匹配结尾!</p>";
echo "<p>2.\b和\B:前者在一个单词中匹配,后者是不在一个完整单词中匹配</p>";
echo "<p>3.[]:出现在方括号里的字符都匹配成功(匹配单个字符)</p>";
echo "<p>4.|:或字符,T|t表示T或t,(与[]相比,|能匹配任意长度字符)<p>";
echo "<p>5.-:连字符,例如[a-zA-Z]:匹配任意大小写字母</p>";
echo "<p>... | true |
750f0a717b2d02018c6508d30408dcd377a37e51 | PHP | Ghoolian/MuzieksiteV2 | /src/Security/Voter/UserVoter.php | UTF-8 | 3,124 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Voter;
use App\Entity\Authentication\User;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
us... | true |
a8b6b2149fee4e569fafd5703a3210c177230830 | PHP | fishling/empManager | /timeProcess.php | UTF-8 | 436 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: fish
* Date: 2015/12/22
* Time: 11:12
*/
//设置时区
date_default_timezone_set('prc');
function getLastVisitTime(){
if(!empty($_COOKIE['lastVisit'])){
echo '<br/>上次登录时间为 '.$_COOKIE['lastVisit'];
}else{
echo '<br/>第一次登录';
... | true |
c0de6e989c39d2ad930b9f98dd8808da38452a61 | PHP | iammordaty/assistant-web | /src/Assistant/Module/Collection/Extension/Reader/MetadataParser/MetadataField/Artist.php | UTF-8 | 1,315 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace Assistant\Module\Collection\Extension\Reader\MetadataParser\MetadataField;
final class Artist implements MetadataFieldInterface
{
/** Lista wyjątków, które nie są rozdzielane */
private array $exceptions;
public function __construct(private array $parameters)
{
$this->exceptio... | true |
40812a85cd4c3c3ac6a7066f347a6fa45f4bb232 | PHP | mohamedjs/multi-vue | /app/Http/Requests/Api/BrandRequest.php | UTF-8 | 1,287 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Requests\Api;
use Illuminate\Foundation\Http\FormRequest;
use Validator;
use App\Brand;
class BrandRequest extends FormRequest
{
/**
* Determine if the brand is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true... | true |
5d57707566a191cd8c1c3f7e0a29e46fae53d17d | PHP | gerardnt/WebServices-CSE451 | /cse451-gerardnt-web-master/exam/info.php | UTF-8 | 682 | 2.984375 | 3 | [] | no_license | <?php
/*
Nicholas Gerard
Exam 01 question php db
*/
$mysqli = mysqli_connect("ceclnx01.csi.miamioh.edu","exam","password","exam");
if (mysqli_connect_errno($mysqli)) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
die;
}
/*
* this function will return an array of keys from the table
* */
f... | true |