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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
aad767f31555d3ba8254cbd197c6c65ca1468c1d | PHP | sanyaade-multimedia/lmms.io | /lib/GitHubClient.php | UTF-8 | 2,036 | 2.609375 | 3 | [] | no_license | <?php
namespace LMMS;
require_once($_SERVER['DOCUMENT_ROOT'].'/../vendor/autoload.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/feed/json_common.php');
use Cache\Adapter\Apcu\ApcuCachePool;
use Github\HttpClient\HttpClientInterface;
use Github\HttpClient\CachedHttpClient;
// This CachedHttpClient subclass catches ... | true |
bdd6fdf53182fc270113fa0e1c67ce4c35080610 | PHP | KaushikDebdas/Care-Giver-System | /registration.php | UTF-8 | 1,203 | 2.96875 | 3 | [] | no_license | <?php
if(isset($_POST['submit'])){
$servername = "localhost";
$username = "root";
$password = "";
$dbName = "caregiver";
// Create connection
$conn = new mysqli($servername, $username, $password);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
// Create databas... | true |
607b8c2e754c630236ddbe223bdae21ad82b15fa | PHP | promahmoud/hw-hoangweb-plugin | /plugins/hw-helps/includes/main.php | UTF-8 | 12,350 | 2.609375 | 3 | [] | no_license | <?php
/**
* Interface iHW_HELP
*/
interface iHW_HELP {
/**
* @return mixed
*/
public function help_callback();
/**
* @return mixed
*/
public function register_admin_menu();
}
/**
* Class HW_HELP: this class used to be extends
*/
class HW_HELP extends HW_Core im... | true |
4dee0af62128c99f2a4a96b1b06c4f22a6a92711 | PHP | BallisticPain/Aura.Filter | /src/Rule/Sanitize/Trim.php | UTF-8 | 881 | 3.171875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
/**
*
* This file is part of the Aura project for PHP.
*
* @package Aura.Filter
*
* @license http://opensource.org/licenses/bsd-license.php BSD
*
*/
namespace Aura\Filter\Rule\Sanitize;
/**
*
* Sanitizes a value to a string using trim().
*
* @package Aura.Filter
*
* @license http://opensource.org/l... | true |
f97222b85e1e549b390fc5f1ed6f0e28f50bab35 | PHP | themainframe/strategy-pattern-example | /src/StrategyPatternBundle/Strategy/LongStrategy.php | UTF-8 | 280 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace StrategyPatternBundle\Strategy;
class LongStrategy implements StrategyInterface
{
public function canProcess($data)
{
return strlen($data) >= 10;
}
public function process($data)
{
return substr($data, 0, 10) . '...';
}
}
| true |
5f5c704d0ec06cfc2c0456c5ee5080f3d8a2b033 | PHP | shuihun/Group-Co | /src/Service/User/Service/UserService.php | UTF-8 | 245 | 2.578125 | 3 | [] | no_license | <?php
namespace src\Service\User\Service;
interface UserService
{
public function getUser($id);
public function addUser($user);
public function getUserByMobile($mobile);
public function updateUserPassword($userId, $password);
} | true |
45f0668ed8cb3c7b3c77bcf137217f2a8cd8e5d4 | PHP | ITECOMMPAY/qa-wframework | /src/Codeception/Lib/WFramework/Conditions/CountEmpty.php | UTF-8 | 347 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Codeception\Lib\WFramework\Conditions;
class CountEmpty extends AbstractCondition
{
public function getName() : string
{
return "не содержит элементов?";
}
public function acceptWCollection($collection) : bool
{
return $collection->getElementsArray()->isEmpty();
... | true |
09c2b967cafc3b914eac4f4510f238a229e76a98 | PHP | angyK-dev/arba-treso | /operations/encaissement/cotisations/ajax/ajax_save_cotisations.php | UTF-8 | 4,889 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: angem
* Date: 06-Jun-19
* Time: 6:51 PM
*/
if (isset($_POST['data']) && isset($_POST['year'])) {
$data = $_POST['data'];
$n = sizeof($data);
$mbr = array();
$coti = array();
$mois = array();
$mtt = ... | true |
1d5f9f423dfd4844131165502420d332903068f5 | PHP | spindola001/PHP7 | /variaveis/exemplo-02.php | UTF-8 | 581 | 3.625 | 4 | [] | no_license | <?php
/*
$anoNascimento = 1990; //correto
$nomeCompleto = "Carlos"; //correto
*/
$nome1 = "Paulo"; //correto
$sobreNome = "Souza";
$nomeCompleto = $nome1." ".$sobreNome; // concatenação
echo $nomeCompleto;
exit; //o programa para a execução aqui
//$1nome = "Luzia"; //errado
//$nome_func = "Lucas" //unico caracte... | true |
06b1db8c0eb0ed5ff8e91a87a24f6a0bc26cf1e5 | PHP | frstshmn/otis | /office/vendor/api/UserApi.php | UTF-8 | 5,192 | 2.875 | 3 | [] | no_license | <?php
require_once 'Api.php';
require_once 'User.php';
class UserApi extends Api
{
public $apiName = 'users';
/**
* Метод GET
* Вывод списка всех записей
* http://ДОМЕН/user
* @return string
*/
public function indexAction()
{
$users = User::select_all();
if($us... | true |
94edb0e582419215227bcb7aad02a506ebf2a30c | PHP | mmitsui/info-seeking-intentions | /src/collection-tools/fall2015/spring2016intent/core/Snippet.class.php | UTF-8 | 967 | 2.796875 | 3 | [] | no_license | <?php
require_once('Connection.class.php');
require_once('Base.class.php');
class Snippet extends Base {
public function __construct(){
parent::__construct();
}
public static function retrieveFromUser($userID, $projectID=FALSE){
}
public static function retrieveFromProject($projectI... | true |
054b39e61b1b81d751a0b73b416c890bfb9bad66 | PHP | onhout/dojo-php-assignments | /intro1.php | UTF-8 | 266 | 3.65625 | 4 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: pl
* Date: 4/11/15
* Time: 16:47
*/
//Create a program that prints all the odd numbers from 1 to 1000. Use the for loop and don't use any array to do this exercise.
for ($i = 1; $i<1001; $i++){
echo $i . '<br>';
}
| true |
31888aef36ccd3d7e1a3a62ef84e6d962147b222 | PHP | architattrey/takeaway | /application/libraries/AutheticationLib.php | UTF-8 | 7,111 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
require APPPATH . '/libraries/REST_Controller.php';
class AutheticationLib extends REST_Controller {
protected $loginUser;
protected $arabicLang;
/**
* Constructor for the AutheticationLib
*
* @access public
* @para... | true |
f59def6317b89016f4968bad5028f1a539984089 | PHP | 1serioga/geo-location | /src/Services/IpLocationProvider/IpLocationProvider.php | UTF-8 | 679 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Services\IpLocationProvider;
use ipinfo\ipinfo\IPinfo;
class IpLocationProvider {
/**
* @var IPinfo
*/
private $client;
public function __construct(string $infoIpSecret)
{
$this->client = new IPinfo($infoIpSecret);
}
public function provide(string $ipA... | true |
8b801f374e67bdab3cb542aa01cfee92d9a60d4b | PHP | artlantis/sndsgd-util | /tests/TempTest.php | UTF-8 | 1,970 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
use \org\bovigo\vfs\vfsStream;
use \sndsgd\util\File;
use \sndsgd\util\Path;
use \sndsgd\util\Temp;
class TempTest extends PHPUnit_Framework_TestCase
{
/**
* @covers sndsgd\util\Temp::registerPath
*/
public function testRegisterPath()
{
Temp::cleanup();
$path = tempnam(sys_get_tem... | true |
7bc8270116eed4a628457ddcecbbb317a403af35 | PHP | getjams21/qualimeds_esalessys | /app/database/migrations/2014_10_26_092456_create_branches_table.php | UTF-8 | 620 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateBranchesTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('Branches', function(Blueprint $table)
{
$table -> increments('id');
$ta... | true |
7fd636a1abbdc711010e104b167e3a8a44a7602f | PHP | Miheel/Webbutveckling | /lab5_project/database/gameStat.php | UTF-8 | 1,803 | 2.828125 | 3 | [] | no_license | <?php
include_once "../database/DBIO.php";
class Stats{
private $title;
function __construct($title){
$this->title = $title;
}
/**
* Utility function saves game stat
*/
function gameStatUtil(){
$db = new DBIO();
if($_SERVER["REQUEST_METHOD"] == 'POST'){
if(isset($_POST["saveGame"])... | true |
f69e7b34bd3cb3ac35cb682e4d3dd1981af84624 | PHP | PhamHanh96/Hanh_Project_Intern_Codeception | /tests/_support/Page/User/UserLoginPage.php | UTF-8 | 3,316 | 2.859375 | 3 | [] | no_license | <?php
namespace Page\user;
/**
* Class UserLoginPage
* @package Page\user
*/
class UserLoginPage
{
//Page
public static $urlHome = '/';
public static $loginButton = '';
public static $logoutButton = '';
public static $submitLoginButton = '';
public static $username = '';
public static $pa... | true |
60dcdbe447124c3a31c96621bf5d769646f4a5d4 | PHP | alexsantossilva/frontend-php-code-challenge | /wp-content/plugins/teste-rakuten/location.php | UTF-8 | 767 | 2.859375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: alex
* Date: 04/08/18
* Time: 19:37
*/
include_once('services/OpenWeatherMap.php');
include_once('config/Parameters.php');
function getLocation()
{
if (!empty($_POST['lat']) && !empty($_POST['lon'])) {
$latitude = $_POST['lat'];
$longitude = $_POST['lo... | true |
cbaec34f3c9d7dd46697e8b5aa813706162bd743 | PHP | WifinderWEB/iwifinder | /src/Shop/ApiBundle/Entity/Cart.php | UTF-8 | 1,581 | 2.8125 | 3 | [] | no_license | <?php
namespace Shop\ApiBundle\Entity;
class Cart{
protected $goods = array();
public function clear(){
$this->goods = array();
}
public function remove($ids){
$ids = explode(',', $ids);
foreach($ids as $id) {
if ($this->goods[$id])
... | true |
ce9823eff85ff2680623591bb111542e581a5a97 | PHP | sonvq/symfony_starter | /src/AppBundle/Entity/PreventiviAttesa.php~ | UTF-8 | 6,948 | 2.578125 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
/**
* PreventiviAttesa
*/
class PreventiviAttesa
{
/**
* @var integer
*/
private $idViaggio;
/**
* @var integer
*/
private $codpromotore;
/**
* @var integer
*/
private $codpromotorecreazione;
/**
* @var integer
... | true |
1213a9d92cf50a485d24c9cd440fd281dec583b0 | PHP | WillSewell/MySite2013 | /module/Blog/src/Blog/Model/Blog.php | UTF-8 | 560 | 2.890625 | 3 | [] | no_license | <?php
namespace Blog\Model;
class Blog
{
public $id;
public $title;
public $content;
public $created;
public $modified;
public function exchangeArray($data)
{
$this->id = isset($data['id']) ? $data['id'] : null;
$this->title = isset($data['title']) ? $data['title'] : null;... | true |
910ae64f82d7eb22ff36e2342b0bd54fe66ee742 | PHP | yorkbc2/muzschool | /core/modules/ms.connector.php | UTF-8 | 1,063 | 2.8125 | 3 | [] | no_license | <?php
require "ms.template.php";
class MS_Connector extends MS_Template {
private $info = array(
"name" => "muz_database",
"host" => "127.0.0.1",
"user" => "root",
"password" => ""
);
public $connect = "";
public function connect() {
$l = $this->info;
$this->connect = mysqli_connect... | true |
161bbc0e2992d525cecd041cd58070b75beab206 | PHP | tuannvbg/practice | /js/高性能javascript/demo-mxhr/mxhr_test.php | UTF-8 | 3,817 | 2.984375 | 3 | [] | no_license | <?php
/**
* Functions for combining payloads into a single stream that the
* JS will unpack on the client-side, to reduce the number of HTTP requests.
* 这里的payloads可以理解为一个流(stream)中的单元,包含信息和控制符,mxhr_stream函数将每一个
* payload(复数加s)合并成一个“流”,在客户端,Javascript将会解析这些payload,进而减少HTTP请求的数量。
* Takes an array of pay... | true |
c217e88c3d2875ed3e35f1f2da49010fe164ad77 | PHP | matry-ny/contact-mvc | /models/Comment.php | UTF-8 | 736 | 2.71875 | 3 | [] | no_license | <?php
namespace models;
use components\Model;
/**
* Class Comment
* @package models
*
* @property int $id
* @property string $user_name
* @property string $comment
* @property int $author
* @property int $is_moderated
* @property string $created_at
* @property string $updated_at
*/
class Comment extends M... | true |
c2b30d11e95edf5624dd796c5fde5cbd65e3835b | PHP | thenbrent/grunion-ajax | /grunion-ajax.php | UTF-8 | 3,967 | 2.53125 | 3 | [] | no_license | <?php
/*
Plugin Name: Grunion Ajax
Plugin URI: http://wordpress.org/extend/plugins/grunion-ajax/
Description: Using Grunion Contact Form? Make form submission slick with Grunion Ajax.
Author: Brent Shepherd
Version: 1.3
Author URI: http://find.brentshepherd.com
License: GPLv2 or later
*/
Grunion_Ajax::init();
class G... | true |
eb70c45afdc1e6646ab8208e16bb2a93261b5913 | PHP | OpenACalendar/OpenACalendar-StaticWeb-Core | /src/openacalendar/staticweb/repositories/builders/EventRepositoryBuilder.php | UTF-8 | 3,854 | 2.59375 | 3 | [] | no_license | <?php
namespace openacalendar\staticweb\repositories\builders;
use openacalendar\staticweb\models\AreaModel;
use openacalendar\staticweb\models\CountryModel;
use openacalendar\staticweb\models\EventModel;
use openacalendar\staticweb\models\GroupModel;
/**
*
* @package Core
* @link http://ican.openacalendar.org/ O... | true |
e94e5aaf22e5358fc5ae2ce425f8581be4b1bfdb | PHP | mp27/laravel-blog-portfolio | /app/Http/Controllers/PublicPostsController.php | UTF-8 | 807 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Actions\Posts\GetAllPublicPostsAction;
use App\Actions\Posts\GetPublicPostBySlug;
use App\Actions\Posts\GetPublicSimilarPosts;
use Illuminate\Http\Request;
class PublicPostsController extends Controller
{
public function index(GetAllPublicPostsAction $getAllPostsActi... | true |
9a1cd1d2117490253fef094ff63bd713ffaa5195 | PHP | Oscarmal/pae | /tools/encrypt.php | UTF-8 | 1,976 | 2.765625 | 3 | [] | no_license | <?php
parseForm($_GET, $_POST);
function encrypt($input,$opt=false){
global $cfg;
$Key = $cfg[encrypt_key];
if($opt){
$output = base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, md5($Key), $input, MCRYPT_MODE_CBC, md5(md5($Key))));
// $output = urlencode($output);
}else{
// $input = urldecode($input);
$... | true |
00463a922b0bbec10b0b40deb69f3597225efffd | PHP | kongnakornna/backendhmvc | /application/modules/api/controllers/School.php | UTF-8 | 2,710 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
// This can be removed if you use __autoload() in config.php OR use Modular Extensions
/** @noinspection PhpIncludeInspection */
require APPPATH . 'libraries/REST_Controller.php';
/* response list
$this->response($users, REST_Controller::HTTP_OK);... | true |
19286c27c60df9b4e97dac6aefb2742ee45ae22e | PHP | JeralBenites/DemoLaravel-Backend | /app/Http/Controllers/ArtistaController.php | UTF-8 | 2,756 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Artista;
class ArtistaController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}
/**
* Show the form ... | true |
d16257ad765e53dc13881a02581077dd262a7a4e | PHP | The-Flash/mvc-calc | /classes/Calc.php | UTF-8 | 722 | 3.9375 | 4 | [] | no_license | <?php
class Calc {
private $num1;
private $num2;
private $operator;
function __construct($num1, $num2, $operator)
{
$this->num1 = $num1;
$this->num2 = $num2;
$this->operator = $operator;
}
function calculate() {
// does the actual calculation
switch... | true |
bb48fc1a1515eef8b0254c5c37198bcc12672df4 | PHP | Sahoju/Tomb-of-Echoes | /php/db_fns.php | UTF-8 | 5,743 | 3.09375 | 3 | [] | no_license | <?php
class Init {
private $conn;
public function __construct() {
try {
// connecting to database
$this->conn = new
PDO('mysql:host=mysql.labranet.jamk.fi;dbname=L4929_3;charset=utf8', 'L4929', '60FXAM0zUfFdMIlVPy3P4eb7... | true |
bd3d834aadbdc800b36b0c77331b449b88db56ff | PHP | julianmejio/orion-lam | /API/Orion/class.UsuarioFacebook.inc | UTF-8 | 18,041 | 2.875 | 3 | [] | no_license | <?php
/**
*
* Representa un usuario identificado en Facebook.
* @author Julián Mejio
* @version 1.12
*
* @property string $IdFacebook
* @property mixed $DatosFacebook
* @property bool $EsMiembroClubOrion
* @property string $ValidadoPorIdFacebook
* @property bool $EsSuperUsuario
* @property Experiencia $Expe... | true |
82347dbd644e718a321c46aab78c68c2b6fd192b | PHP | ndziePatrickJoel/b2 | /src/AppBundle/Modele/EvolutionHebdoModel.php | UTF-8 | 1,567 | 2.546875 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace AppBundle\Modele;
use AppBundle\Entity\EvolutionHebdo;
/**
* Description of EvolutionHebdoModel
*
* @author BMHB... | true |
e076295c75877e4cae7b76b7deda34ec7f66d793 | PHP | IBMS-Network/IBMS-Network | /classes/clsUsersCompanies.php | UTF-8 | 2,177 | 3.0625 | 3 | [] | no_license | <?php
class clsUsersCompanies {
/**
* Table name
* @var $tableName string
*/
private $__tablename__ = 'userscompanies';
/**
* Inner variable to hold own object of a class
* @var object $instance
*/
static private $instance = NULL;
/**
* variable of DB class , present DB connect
* @var ... | true |
89914f3edfea4fb0289f0a6388c757d692a420fa | PHP | numama/VPS | /session.php | UTF-8 | 371 | 2.53125 | 3 | [] | no_license | <?php
session_start(); //手動でセッション開始
$_SESSION["password"] = $_POST["password"];
?>
<!doctype hteml>
<html>
<body>
<form action="" method="post">
<input type="text" name="password" placeholder="名前">
<input type="submit" value="送信">
</form>
<?php var_dump($_POST); ?>
<h1><?= $_SESSION["password"]; ?>さん!</... | true |
c3629ea49368d11c6b8af7623f7a25eaf60a8bca | PHP | Dirix/revidirix | /lib-comprarPublicacion.php | UTF-8 | 1,843 | 2.765625 | 3 | [] | no_license |
<?php
//Compramos la publicacion
function comprarPublicacion($cliente,$edicion){
include "conexion.php";
$time = time();
$tiempo = date("y-m-d-(H.i.s)", $time);
$sql="INSERT INTO compra (fecha, edicion_id, cliente_id)
VALUES ('$tiempo', $edicion, $cliente)";
$result=mysql_query($sql,... | true |
3ff400c4bd351e47de5cd5ae29282593b865979d | PHP | sprat2/voicely | /voicely/public_html/ha-test/twit-test/get-token.php | UTF-8 | 2,970 | 2.765625 | 3 | [] | no_license | <?php
session_start();
// Configure PHP to throw exceptions for notices and warnings (to more easily debug via ajax)
set_error_handler(function($errno, $errstr, $errfile, $errline) {
throw new RuntimeException($errstr . " on line " . $errline . " in file " . $errfile);
});
// Display errors
error_reporti... | true |
7befbc97caaa24f8a60dc7185862e1bbfba0d812 | PHP | rana046/crdfund | /member-console/audio.php | UTF-8 | 748 | 2.703125 | 3 | [] | no_license | <?
$valid_extensions1 = array('mp3','ogg','Wav','mpeg' ); // valid extensions
$path = 'uploads/'; // upload directory
$img = $_FILES['audio']['name'];
$tmp = $_FILES['audio']['tmp_name'];
// get uploaded file's extension
$ext = strtolower(pathinfo($img, PATHINFO_EXTENSION));
// can upload same image usin... | true |
2d9490d0f815899780338703b474f16b670d764d | PHP | taipv1984-developer/vuagomsu | /protected/persistence/dao/CustomerDao.php | UTF-8 | 39,075 | 2.75 | 3 | [] | no_license | <?php
class CustomerDao extends BaseDao{
private $conn;
public function __construct() {
$this->conn = $GLOBALS['conn'];
}
public function selectAll(){
try {
$sql = "select * from `customer`";
//debug
LogUtil::sql('(selectAll) '. DataBaseHelper::renderQuery($sql));
$stmt = $this->conn->prepare(... | true |
0792744aa1c5fd4cff77a9befee43f55b930be9e | PHP | 2742396435/liyiguo | /rikao5.php | UTF-8 | 189 | 2.765625 | 3 | [] | no_license | <?php
$arr = [1,2,3,4,5,6,7,8,9,10];
$ji = $ou = [];
foreach ($arr as $k => $v) {
if ($v%2==1) {
$ji[] = $v;
}
else{
$ou[] = $v;
}
}
var_dump(array_merge($ji,$ou));
?> | true |
8119d97da4cb6c7cd6a9e5585b1b56c1b1b7ba07 | PHP | pear/Payment_DTA | /tests/DTAZVTest.php | UTF-8 | 50,883 | 2.640625 | 3 | [] | no_license | <?php
require_once dirname(__FILE__) . '/helper.inc';
require_once 'DTAZV.php';
class DTAZVTest extends PHPUnit_Framework_TestCase
{
protected $backupGlobals = FALSE;
protected $fixture;
protected function setUp()
{
// Create the Array fixture.
$this->fixture = new DTAZV();
$D... | true |
305212d55d92dec5c2b87f44184fb4fefc50b23d | PHP | ken0621/pressIQ | /app/Models/Tbl_payroll_paper_sizes.php | UTF-8 | 663 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Tbl_payroll_paper_sizes extends Model
{
protected $table = 'tbl_payroll_paper_sizes';
protected $primaryKey = "ayroll_paper_sizes_id";
public $timestamps = false;
/* COLUMN REFERENCE NAME */
// [INTEGER] payroll_paper_sizes_id
... | true |
37870ac7179ab87bdf8742f6dfa8b0a07872b713 | PHP | otjake/WejapaMeranda | /includes/authprocessor.php | UTF-8 | 12,963 | 2.71875 | 3 | [] | no_license | <?php
require("includes/db.php");
$name =$username = $email =$password= "";
$error=array('nameErr'=>"",'usernameErr'=>"",'emailErr'=>"",'passwordErr'=>"",'main'=>"");
if ($_SERVER['REQUEST_METHOD'] == "POST") {
#### REGISTER start####
if (!empty($_POST['check']) && ($_POST['check'] == "test")) {
if (empt... | true |
d58998021c55399684d258e0fcb8fbb17a749da3 | PHP | cptechinc/stat-dpluso | /site/templates/_dbfunc.php | UTF-8 | 162,335 | 2.703125 | 3 | [] | no_license | <?php
use atk4\dsql\Query;
use atk4\dsql\Expression;
/* =============================================================
LOGIN FUNCTIONS
============================================================ */
/**
* Returns if User is logged in
* @param string $sessionID Session Identifier
* @param bool $debug R... | true |
8099e859cbf414203bd4b9c92ae60bac4b1d0001 | PHP | wslim/wslimphp | /src/Db/Model.php | UTF-8 | 20,749 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Wslim\Db;
use Wslim\Util\StringHelper;
use Wslim\Util\ArrayHelper;
use Wslim\Common\Config;
use Wslim\Common\Configurable;
use Wslim\Ioc;
/**
* ### 示例代码
* 初始化一个model或继承类后,然后可以,调用相关方法query()、链式方法、高级查询方法. <br>
*
* ```
* $model = new Model('products');
*
* $result = $model->select('id, title... | true |
7beb174ce885d9291ba4476924d89956de6d7ce4 | PHP | 18301664232/real-php | /real/protected/models/TypeOrder.php | UTF-8 | 690 | 2.625 | 3 | [] | no_license | <?php
//流量包
class TypeOrder extends CActiveRecord {
public $id; //主键
public $order_no_id;
public $flow_type_id; //
public $name; //
public $count; //
public $addtime;
//Model静态方法为必须有的方法
public static function model($className = __CLASS__) {
return parent::model($className);
... | true |
76861832950f773cc556554f8d9ca54e0455f5bc | PHP | titrxw/w7-rangine | /Src/Core/Process/ProcessAbstract.php | UTF-8 | 768 | 2.75 | 3 | [] | no_license | <?php
/**
* @author donknap
* @date 18-11-22 下午8:27
*/
namespace W7\Core\Process;
/**
* 定义此函数后,将自动添加事件循环,用于接收主进程通过管道传递的数据
* return false 或取消循环
* 也可以在函数中调用 swoole_event_del 自行取消
* 如果在函数内调用 $process->exit() 每次接收完后后,会销毁进程,以待下次重建
* 如果不启用该函数,需要在run函数内,while (1) 来侦听读取数据
* @method boolean read(\Swoole\Process $proc... | true |
77d54e7acef2c2d19c6578d0f5ac77becb4d3370 | PHP | liusiqi43/TournoiJCC | /Modules/Classement/index_show.php | UTF-8 | 2,725 | 2.515625 | 3 | [] | no_license | <?php
$ROOT = '../../';
require_once $ROOT.'global.inc.php';
require_once 'index_show_actions.php';
require_once $ROOT.'header.php';
?>
<!-- // Les css vont dans le assets/css/tournoi.css Et ne modifie jamais bootstrap.css -->
<div style="float:right;">
<table class="table text-right">
<tbody><tr>
<?p... | true |
9e9906ab6e392824da4e5d596bb8c3935684e466 | PHP | ppak10-archives/PHP-Sqlite-D3 | /index.php | UTF-8 | 12,388 | 2.625 | 3 | [] | no_license | <!-- D3 Trades Navigator -->
<!-- Initial PHP scripts -->
<?php
class SQLiteDB extends SQLite3
{
function __construct()
{
$this->open('crypto.db');// open database file
}
}
$db = new SQLiteDB(); // Call database file
if(!$db){ // If no database file exists
echo $db->lastE... | true |
717cd857e998cbfc54c5ecfeaf9e736d0973b588 | PHP | aud1ence/Shape_factory_method | /ShapeFactory.php | UTF-8 | 352 | 3.171875 | 3 | [] | no_license | <?php
//require "Rectangle.php";
class ShapeFactory
{
public function getShape($type)
{
if ($type == 'Rectangle') {
return new Rectangle();
} elseif ($type == 'Circle') {
return new Circle();
} elseif ($type == 'Square') {
return new Square();
... | true |
c299abd4621953f16ccde16e7f9b6d504f876ccd | PHP | Wolf-In-Sneakers/Test | /controllers/TagController.php | UTF-8 | 2,883 | 2.703125 | 3 | [] | no_license | <?php
namespace Shop\controllers;
use Exception;
use Shop\core\Controller;
use Shop\models\Material\Material;
use Shop\models\Tag\Tag;
class TagController extends Controller
{
private Material $material;
private Tag $tag;
public function __construct()
{
parent::__construct();
$thi... | true |
fa44007353c3dff111772fbc87c18a8d02438ec7 | PHP | federave/AplicacionSM | /modelo/diaRepartidor/viejo/estructuraGenerica.php | UTF-8 | 854 | 2.59375 | 3 | [] | no_license | <?php
include_once($_SERVER["DOCUMENT_ROOT"] . '/AplicacionSM/modelo/conector.php');
abstract class EstructuraGenerica extends Conector
{
function __construct()
{
parent::__construct();
}
abstract protected function guardar();
abstract protected function evaluar();
abstract protected fu... | true |
e626ab03c2f1337ecdec96e8603fd3e578eaa726 | PHP | Lowess/NF17 | /classes/Panier.class.php | UTF-8 | 1,087 | 2.921875 | 3 | [] | no_license | <?php
Class Panier {
//Attributs
public $id;
public $datePanier;
public $login;
//Méthodes statiques
public function Creer($login, $datePanier=-1, $id=-1){
$datePanier=date("Y M d H:i:s",time());
$this->id=$id;
$this->datePanier=$datePanier;
$this->login=$login;
}
//Méthodes de classe publiques
publ... | true |
068a0c6f8bc5dee00c7a92b866a705867d3195ea | PHP | lnahuelituom/ituom | /lautaro/BolsaWeb/sesiones/paginaUno.php | UTF-8 | 595 | 2.984375 | 3 | [] | no_license | <?php
/*session_start() --> es la funcion que nos ofrece PHP , para poder iniciar una sesion.
session_destroy(); -- PARA DESTRUIR UNA SESION*/
session_start();
/*$_SESSION['nombre'] --> es un vector en el que indicamos que vamos a iniciar una variable de sesion ,
dentro de los corchetes ,le indicamos el identificador, ... | true |
197c1d69f04256ca9ddf4f2daff8bbf7057424b6 | PHP | rifanid98/arkademy | /1.php | UTF-8 | 1,188 | 2.890625 | 3 | [] | no_license | <?php
function biodata($name,$age){
$address = "Kp. Sinagar RT 03/07, Ds. Cihideung Udik, Kec. Ciampea Kab. Bogor 16620";
$hobbies = ["coding","gaming","learning"];
$is_married = false;
$list_school = [
"elementary_school" => [
"year_in" => "2005",
"year_out" => "2011",
... | true |
9524e7dbcd1710f09f7f749725827e3d87f81304 | PHP | projetos-ncs/curso4linux | /Aula08/Aula8.3/Loja.php | UTF-8 | 840 | 3.5625 | 4 | [] | no_license | <?php
interface FreteInterface
{
public function getValorFrete();
}
Class FreteMotoboy implements FreteInterface
{
protected $valorFrete = 20;
public function getValorFrete()
{
return $this->valorFrete;
}
}
Class FreteSedex implements FreteInterface
{
protected $valorFrete ... | true |
a17385b148f2436e7f6e84921da99ba47b09bc83 | PHP | scsper/sandj | /php/reservation.php | UTF-8 | 503 | 2.625 | 3 | [] | no_license | <?php
include 'connect.php';
$query = "SELECT * FROM user";
$result = mysql_query($query);
if ($result) {
while($row = mysql_fetch_array($result)) {
$first_name = $row["first_name"];
$last_name = $row["last_name"];
$rsvp = $row["rsvp"];
$confirma... | true |
b69db0f7cb71a954dc9e5fe3dd12ca4a340a67d5 | PHP | c9s/PHPTask | /src/PHPTask/Task/CleanTask.php | UTF-8 | 317 | 2.546875 | 3 | [] | no_license | <?php
namespace PHPTask\Task;
class CleanTask extends BaseTask
{
public function run() {
if ($paths = $this->config('paths') ) {
foreach( $paths as $path ){
if ( file_exists($path) ) {
futil_rmtree($path);
}
}
}
}
}
| true |
ca2181ba2e3eed9a9fbbc4471bed01e98acb38c4 | PHP | biswabijaya/google-url | /src/Actions/Shorten.php | UTF-8 | 1,646 | 2.875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* This file is part of the badams\GoogleUrl library
*
* @license http://opensource.org/licenses/MIT
* @link https://github.com/badams/google-url
* @package badams/google-url
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
... | true |
2d6bc4c90a46e894443a60984a4b1341d0b7872d | PHP | azhai/CuteLib | /public/blog.php | UTF-8 | 1,284 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use \Cute\Web\Handler;
class BlogHandler extends Handler
{
use \Cute\Contrib\Handler\DBHandler;
protected $dbkey = 'wordpress';
protected $modns = 'Blog\\Model';
public function get($slug = false)
{
$query = $this->posts->join('*', 'taxonomies.*');
if ($slug === false) {
... | true |
5af9231c9752a9891065a8e15f62849ec74758be | PHP | cube43/ebics-client | /tests/Unit/FDLParamsTest.php | UTF-8 | 1,276 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Cube43\Component\Ebics\Tests\Unit;
use Cube43\Component\Ebics\FDLParams;
use DateTimeImmutable;
use PHPUnit\Framework\TestCase;
use RuntimeException;
/** @coversDefaultClass FDLParams */
class FDLParamsTest extends TestCase
{
public function testFailOnEmptyFileFormat(): ... | true |
dcab0b6fdeb011573ff847b3e6f1b1c523e5aa9f | PHP | holipic-finishing/holipic | /database/seeds/CouponCodeTableSeeder.php | UTF-8 | 918 | 2.578125 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class CouponCodeTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Schema::disableForeignKeyConstraints();
$faker = Faker\Factory::create();
\App\Models\CouponCode::trunc... | true |
c900bdd14c816d5b40d5e964e5f5fcaaebf8f853 | PHP | Juggheadrob2167/Developer_PHP | /Design/Generator/generator.php | UTF-8 | 494 | 3.34375 | 3 | [] | no_license | <?php
ini_set("memory_limit","200M");
//生成器
function makerange($length){
$ret = [];
for($i =1;$i<$length;$i++){
$ret[] = $i;
}
return $ret;
}
function makerange_g($length){
for($i =1;$i<$length;$i++){
yield $i;
}
}
$myfile = fopen("testfile.txt", "w");
//$re = makerange(1000000... | true |
3e5da07a72c86a7a3dc6dba4b6b2434a6da2ad4b | PHP | FacundoWilliams/Sistema-de-Compras | /app/Policies/PermisoPolicy.php | UTF-8 | 1,065 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Policies;
use App\Models\Articulo;
use App\Models\User;
/**
* Una de las maneras de agregar autorización a una acción en Laravel es mediante <strong>Policies</strong>.
* Esta policy será encontrada automáticamente por el framework, dado que implementa la
* naming convention "<nombre_model>Poli... | true |
a40ccf1553b740ba019bd5beb929ecfc8185a3a6 | PHP | duythien/las | /app/common/models/Tariffs.php | UTF-8 | 5,536 | 2.65625 | 3 | [] | no_license | <?php
namespace Las\Models;
use Phalcon\Validation\Validator;
/**
* Tariffs Model
*
* @package las
* @category Model
* @version 1.0
*/
class Tariffs extends \Phalcon\Mvc\Model
{
const UNACTIVE = 0;
const ACTIVE = 1;
private $request;
/**
* Initialize tariff
*
* @pac... | true |
5d9ee29aa1a0866cc191d62dbe419aadda16df2e | PHP | lpx20181019/thinkphp5.1 | /tp5.1/application/index/controller/Demo4.php | UTF-8 | 1,222 | 2.59375 | 3 | [
"PHP-3.0",
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Microsoft
* Date: 2020/1/22
* Time: 15:10
*/
namespace app\index\controller;
use \think\Db;
/*
* 连接数据库的几种方式
* 1.全局配置:config/database.php
* 在config文件夹下新建一个index模块,在模块下可以新建database.php配置单独的数据库
* 2.动态配置:think\db\query.php 方法:connect()
*3.DSN连接:数据库类型://同户名:密码@数据库地址:端口号/数... | true |
27bf339894d3bfdbd9accdba97bd37931966e0d9 | PHP | jocl/AMFBundle | /Zend/Crypt/Rsa/Key.php | UTF-8 | 1,860 | 2.640625 | 3 | [] | no_license | <?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
* @package Z... | true |
3344bff53ebc3f22e145d9a60be9be3113e20230 | PHP | douggonsouza/mvc | /src/view/screens.php | UTF-8 | 9,270 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace douggonsouza\mvc\view;
use douggonsouza\mvc\view\mimes;
use douggonsouza\propertys\propertys;
use douggonsouza\propertys\propertysInterface;
use douggonsouza\mvc\view\screensInterface;
use douggonsouza\mvc\view\attributesInterface;
use douggonsouza\mvc\view\attributes;
use douggonsouza\mvc\view\templa... | true |
742a94ac3acdfe28c35fe3cd7c0dc8ee41b89227 | PHP | csesznegid/PHPWorkshopAPI | /Framework/SuperGlobal/Request.php | UTF-8 | 1,699 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the "PHP Workshop - API" package
*
* @author Denes Csesznegi
* @since 2020.09.03.
*/
namespace Framework\SuperGlobal;
/**
* Class to manage $_REQUEST super global
*
* @package Framework\SuperGlobal
* @abstract
*/
abstract class Request
{
/**
* Get a value by key
... | true |
3a1e6b7e10e528283a813ff27305d2ded5f9e1a6 | PHP | trantu230399/18php04 | /ajax/result.php | UTF-8 | 556 | 2.828125 | 3 | [] | no_license | <?php
// Connect Database
$conn = @mysqli_connect("localhost", "root", "12345678", "test");
$sql = "select * from member";
$result = $conn->query($sql);
?>
<table>
<tr>
<td>Name</td>
<td>Email</td>
</tr>
<?php
if($result->num_rows > 0){
while($row = $result->fetch_assoc()){
... | true |
997bf853b46d0e4c8c20b31b6dbfc9bf718e4f3a | PHP | VSVverkeerskunde/gvq-api | /src/Question/Serializers/QuestionJsonEnricher.php | UTF-8 | 1,000 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | <?php declare(strict_types=1);
namespace VSV\GVQ_API\Question\Serializers;
use Ramsey\Uuid\UuidFactoryInterface;
use VSV\GVQ_API\Common\Serializers\JsonEnricher;
class QuestionJsonEnricher implements JsonEnricher
{
/**
* @var UuidFactoryInterface
*/
private $uuidFactory;
/**
* @param Uuid... | true |
8f30d94aac36a086fd5bffd09f0192ed427dec88 | PHP | montanhes/app-tN48g3Qy | /app/Http/Requests/StoreProductRequest.php | UTF-8 | 1,410 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreProductRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* G... | true |
bdb5a90652eaed5a3f84b00dd657e93dcd70435b | PHP | amorcego/apostas-esportivas | /app/vo/helpers/ArquivoVO.php | UTF-8 | 1,783 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace app\vo\helpers;
use app\core\ValueObject;
use app\helpers\Utils;
class ArquivoVO extends ValueObject
{
private $refTable;
private $ref;
private $refId;
private $source;
/**
* @return null|string
*/
public function getExtension()
{
return Utils::getFileE... | true |
b7fb9c2f701b9750156878111850ebecb1a60219 | PHP | tsudos/PHP | /PHP/impôts.php | UTF-8 | 483 | 3.03125 | 3 | [] | no_license | <?php
$age = $_POST['age'];
$revAnnuel = $_POST['revenue'];
//$_POST car on a utilisé method="post" sino,n $_GET
echo "INFORMATIONS : <br/>";
echo "Votre age : $age<br/>";
echo "Revenue Annuel pris en compte : $revAnnuel<br/>";
if ($age>= 18 && $revAnnuel >=20000) {
echo "vous êtes donc imposable <br/>";
}
els... | true |
64a8611ef774ff64fbc2d3372b135d2fe21777bb | PHP | axomar/ITS | /Engine/Variables.php | UTF-8 | 544 | 2.8125 | 3 | [] | no_license | <?php
$postdata = file_get_contents("php://input");
$request = json_decode($postdata);
$exercise_id = "../" . $_GET['exercise'] . ".xml";
$exercise_num = intval($_GET['num_exe']);
$xml=simplexml_load_file($exercise_id) or die("Error: Cannot create object");
//$count_exercises = $xml->count();
//$exercise = mt_rand(0,... | true |
a0e25dbd91839605be9af2294d12ad6f990399fd | PHP | hugoliveira79/cartrack_test | /Cars/Controller.php | UTF-8 | 1,110 | 3.046875 | 3 | [] | no_license | <?php
require_once('Cars.php');
/**
* Gets all Cars by Id from DB
*
* @return array
*/
function getAllCars(){
$query="select * from cars";
$result = pg_query($query);
$data = [];
while ($record = pg_fetch_assoc($result)) {
$car = new Car($record['id'],$record['model_name'], $record[... | true |
8c946893a2da6b28304ec897e8562aafcf791854 | PHP | malenkiki/math | /tests/Number/Natural.php | UTF-8 | 2,218 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
/*
Copyright (c) 2014 Michel Petit <petit.michel@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify,... | true |
adc9202f6f489b3f5fb222da347de3a509f28ac2 | PHP | samithesorceress/my-website | /api/uploadFile/index.php | UTF-8 | 4,457 | 2.8125 | 3 | [] | no_license | <?php
$root = $_SERVER['DOCUMENT_ROOT'] . "/sami-the-sorceress/api/";
require_once($root . "core/init.php");
require_once($root . "core/defaults.php");
require_once($root . "core/functions.php");
if (empty($_FILES) === false && valExists("file", $_FILES)) {
$sql_params = [];
// File vars
$file = $_FILES... | true |
50940374ba9db579bcec0f361f260d802bf07669 | PHP | ylapp1/GameOfLife | /src/GameOfLife/Rules/BlinkingStainsRule.php | UTF-8 | 488 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @file
* @version 0.1
* @copyright 2018 CN-Consult GmbH
* @author Yannick Lapp <yannick.lapp@cn-consult.eu>
*/
namespace Rule;
/**
* Rules for a world with blinking stains (Rules for 0123/01234).
*/
class BlinkingStainsRule extends BaseRule
{
/**
* Sets the birth/stay alive rules for this r... | true |
0f379499d5f21815ceffdabf7fb670dadc2585ae | PHP | ivanomanca/iSalento | /iSalento/Components/Page/Views/TemplateColors/Snippets/List/cListItem/cListItem.php | UTF-8 | 1,780 | 3.03125 | 3 | [] | no_license | <?php
/** Isp_View_Snippet */
Isp_Loader::loadClass('Isp_View_Snippet');
Isp_Loader::loadVistaObj("Snippets","List","Separator");
Isp_Loader::loadVistaObj("Snippets","Html","Clear");
/**
* Single list item. It is made of a separator snippet
* and provides a box layout for the InBoxItems snippet
* or any other ele... | true |
91b7a1ffa334adccbf9d365644c041568af0da63 | PHP | withnat/atm | /system/Flash.php | UTF-8 | 1,637 | 2.625 | 3 | [] | no_license | <?php
namespace System;
//use System\Session;
final class Flash
{
private function __construct(){}
public static function info($message)
{
Session::set('__vandaFlashInfo[]', $message);
}
public static function success($message)
{
if (Request::isAjax())
{
$html = '<div class="alert a... | true |
bbc3fa14eb9d67f5b144ec3f095d1e32007cd24b | PHP | ifeanyi-ajimah/OOP-in-PHP | /interface/shapes.php | UTF-8 | 2,236 | 3.75 | 4 | [] | no_license | <?php
include "shapeinterface.php";
include "geometryInterface.php";
// class Triangle
class Triangle implements shapeInterface, geoInterface
{
public function getArea(){
echo 'Triangle area';
}
public function getCircumference($length, $breath)
{
echo $length . ' ' . $breath;
... | true |
fd65a5206643e1fb663c30d7c8b12de159c135e9 | PHP | karayabin/universe-snapshot | /universe/Ling/Light_DatabaseFakeDataMaker/Service/LightDatabaseFakeDataMakerService.php | UTF-8 | 9,099 | 2.71875 | 3 | [] | no_license | <?php
namespace Ling\Light_DatabaseFakeDataMaker\Service;
use Ling\Light\ServiceContainer\LightServiceContainerInterface;
use Ling\Light_Database\Service\LightDatabaseService;
use Ling\Light_DatabaseFakeDataMaker\Exception\LightDatabaseFakeDataMakerException;
use Ling\Light_DatabaseFakeDataMaker\Generator\LightData... | true |
593360bfdf51abc6b8949ef438709e80fea8990d | PHP | marywarrington/doctor-office-phpDatabase | /tests/DoctorTest.php | UTF-8 | 5,323 | 2.765625 | 3 | [] | no_license | <?php
/**
* @backupGlobals disabled
* @backupStaticAttributes disabled
*/
require_once "src/Doctor.php";
require_once "src/Patient.php";
require_once "src/Specialty.php";
$server = 'mysql:host=localhost;dbname=doctor_office_test';
$username = 'root';
$password = 'root';
$D... | true |
a4ce1b9a5642e9a7d804f25371a3b90f5708fa00 | PHP | rcrivera/agrimeter | /android/getAllOrganizations.php | UTF-8 | 923 | 2.875 | 3 | [] | no_license | <?php
/*Code that request all Organization available at the database*/
//array for JSON response
$response = array();
//Generating data base connection.
$con = mysqli_connect("localhost","root","agrimeterdb13","agrimeterDB");
if(mysqli_connect_errno()){
$response["success"] = 0; //error trying to conne... | true |
d5c31a53fd6378e4e36606c3db2783daf1569304 | PHP | medharik/it_2 | /php_bd/revision_crud/index.php | UTF-8 | 1,988 | 2.953125 | 3 | [] | no_license | <?php
//connexion bd
$link = new PDO('mysql:host=localhost;dbname=dbrevision', 'root', '');
//preparer sql
$rp = $link->prepare("select * from employee");
//executer sql
$rp->execute();
//extraire (fetch)
$employees = $rp->fetchAll();
// print_r($employees);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset... | true |
07f248c6b9d609988831018a448d2f1446c7bf6b | PHP | castion2293/api-caller | /src/Helpers/CurrencyHelper.php | UTF-8 | 1,110 | 3.203125 | 3 | [] | no_license | <?php
if (!function_exists('currency_multiply_transfer')) {
/**
* "乘" 上幣別對應比例, 若無設定env對應之幣別比例. 預設為台幣 1倍
* 『轉出點數』『取得餘額』『轉換原生注單』時使用
* @param String $station
* @param $number
* @return float|int
*/
function currency_multiply_transfer(String $station, $number)
{
$currency... | true |
3443efc4babd2aba15789e673c54bffe042f8b3e | PHP | deternitydx/coding-exams | /src/web/index.php | UTF-8 | 3,843 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* This file contains the main command logic.
*
* @author Robbie Hott
* @license https://opensource.org/licenses/Apache-2.0 Apache-2.0
* (except str_putcsv as noted below)
*/
include("../../vendor/autoload.php");
/**
ini_set("display_errors", 1);
ini_set("track_errors", 1);
ini_set("html_errors", 1);
e... | true |
5c9cd3e727ab868105c69224d40b1c6a89d9e441 | PHP | TheLordDuck/EP1-TV3 | /Activitat PHP_BASE/exemplesLlibrePHP6/06/Espacio.php | ISO-8859-1 | 992 | 2.890625 | 3 | [] | no_license | <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Espacio en disco</title>
<meta http-equiv="Content-type"
content="text/html;charset=ISO-8859-1" />
<style type="text/css">
* { font-family: monosp... | true |
0337cb0d48849b3ba0ee8a242c00a67e7647180b | PHP | Sandra-Romero/API-RESTful | /app/Models/CustomRules/MyCustomRules.php | UTF-8 | 1,248 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php namespace App\Models\CustomRules;
//Clase ProfesorModel
use App\Models\ProfesorModel;
//Clase GradoModel
use App\Models\GradoModel;
//Clase RolModel
use App\Models\RolModel;
class MyCustomRules
{
//regla para validar profesor_id en la tabla grado
public function is_valid_profesor(int $id): bool
{
... | true |
4324bdd24f294d44cc4e1eae6f7efdc6dd4af84b | PHP | artmarkov/fdoc_school | /classes/forms/control/MultiCheckbox.php | UTF-8 | 4,127 | 2.546875 | 3 | [] | no_license | <?php
namespace main\forms\control;
class MultiCheckbox extends BaseControl
{
protected $array = null;
protected $delimiter = ',';
protected $htmlDelimiter = '';
protected $inline = true;
protected function loadOptions($options)
{
if (isset($options['refbook'])) {
$r = \R... | true |
41ad77570b64906349339f828ed1edb2b4e2e484 | PHP | difi/signature-api-client-php | /src/Digipost/Signature/API/XML/Thirdparty/XAdES/CertificateValuesType.php | UTF-8 | 3,927 | 2.71875 | 3 | [] | no_license | <?php
namespace Digipost\Signature\API\XML\Thirdparty\XAdES;
/**
* Class representing CertificateValuesType
*
*
* XSD Type: CertificateValuesType
*/
class CertificateValuesType
{
/**
* @property string $id
*/
private $id = null;
/**
* @property \Digipost\Signature\API\XML\Thirdparty\... | true |
9c57ece9af9158711c486c0c598d85aa8c2dadb2 | PHP | Skarbo/KrisSkarboApi | /src/exception/parser_exception.php | UTF-8 | 330 | 2.8125 | 3 | [] | no_license | <?php
class ParserException extends AbstractException {
const WEBPAGE_NOT_EXIST_ERROR = 1;
const DOM_ERROR = 2;
const HTML_ERROR = 3;
public function __construct( $message = NULL, $custom_code = 0, Exception $previous = NULL ) {
parent::__construct( $message, $custom_code, $previous );
... | true |
3da21b69044238590c1baf37c2f3c6bc46f1c530 | PHP | solcre-org/solcre-framework | /src/Adapter/PaginatedAdapter.php | UTF-8 | 1,032 | 2.640625 | 3 | [] | no_license | <?php
namespace Solcre\SolcreFramework2\Adapter;
use Laminas\Paginator\Adapter\AdapterInterface;
use Solcre\SolcreFramework2\Entity\PaginatedResult;
class PaginatedAdapter implements AdapterInterface
{
/**
*
* @var PaginatedResult
*/
protected $paginatedResult;
/**
* Additional attr... | true |
191e7a0dad89c43c59b90f66947668b0bc8c62fd | PHP | gazpachu/work | /webs/webmarket/v3/amfphp/services/v3/Hosting.php | UTF-8 | 3,022 | 2.9375 | 3 | [] | no_license | <?php
class Hosting
{
function Hosting()
{
$this->methodTable = array
(
"listar" => array (
"description" => "devuelve el hosting solicitado",
"access" => "remote",
"arguments" => array("id_hosting")
),
"listarTodos" => array (
"description" => "devuelve todos los hos... | true |
665c83614a45e5b94aa81f47fd23e69126ebd74f | PHP | gpviamaquinas/repository | /RepositoryFactory.php | UTF-8 | 480 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace gpviamaquinas\repository;
/**
* Essa classe é o Factory dos repositórios
*/
class RepositoryFactory {
public static function createRepository()
{
$connection = Connection::getInstance();
return new Repository($connection);
}
public function createDa... | true |
357b9985046bbdb65809768f9f7b7760ad804761 | PHP | fernandohs/giftshop | /app/Models/CategoryProduct.php | UTF-8 | 784 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class CategoryProduct extends Model
{
use HasFactory;
protected $table="categories_products";
/**
* The attributes that are mass assignable.
*
* @var array
*/
... | true |
341e34076da4471682df7f715efa3b9ecf2116fb | PHP | boxcore/Note-bak | /php/str/pathinfo.php | UTF-8 | 719 | 2.890625 | 3 | [] | no_license | <?php
// pathinfo 获取链接的后缀名
header("Content-type:text/html; charset=utf8");
$url = "http://www.baiduc.com/dir/index.php?id=123&name=user&pass=12333#testid";
$str = pathinfo($url);
echo '<hr>打印parse_url(http://www.baiduc.com/dir/doc/index.php?id=123&name=user#testid):<br>';
echo "<pre>";
print_r($str);
echo "... | true |