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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
6107373c023155f11c3bf21acc47367864cd33c4 | PHP | alaminjnu/E-HealthCare | /login/login.php | UTF-8 | 13,989 | 2.625 | 3 | [] | no_license | <?php require_once('../Connections/health.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theVal... | true |
82aecd7d2e3cafefdf16e8bdacc44c9d535ebc95 | PHP | Sywooch/other | /taozon.ru [PHP]/otapilib2/types/OtapiDataListOfExternalDeliveryType.php | UTF-8 | 321 | 2.53125 | 3 | [] | no_license | <?php
class OtapiDataListOfExternalDeliveryType extends BaseOtapiType{
/**
* @return OtapiArrayOfExternalDeliveryType
*/
public function GetContent(){
$value = isset($this->xmlData->Content) ? $this->xmlData->Content : false;
return new OtapiArrayOfExternalDeliveryType($value);
}
... | true |
9cc6ff441f657cc5f780f7584e75199d9518ce86 | PHP | civils-council/civilsbudget | /src/AppBundle/Exception/TurboSmsException.php | UTF-8 | 767 | 3.015625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace AppBundle\Exception;
use Throwable;
/**
* Class TurboSmsException.
*/
class TurboSmsException extends \Exception
{
/**
* @var string
*/
private $smsText;
/**
* TurboSmsException constructor.
*
* @param string $message
* @p... | true |
6969da5da3f16e3aba083998248084215f50e487 | PHP | m0o0m/game.fjbdsh.com | /simplewind/Core/Library/Vendor/PHPExcel/PHPExcel/HashTable.php | UTF-8 | 1,945 | 3.03125 | 3 | [
"Apache-2.0"
] | permissive | <?php
class PHPExcel_HashTable
{
public $_items = array();
public $_keyMap = array();
public function __construct($pSource = null)
{
if ($pSource !== NULL) {
$this->addFromSource($pSource);
}
}
public function addFromSource($pSource = null)
{
if ($pSource == null) {
return;
} else if (!is_array(... | true |
7c8c8ebd65b1dacd0d079cf5de2df79e14fd0bae | PHP | Ytsellout/ytsellout | /Admin/delete.php | UTF-8 | 1,779 | 2.53125 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "ytsellout";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
// sql to delete a record
$pro... | true |
04dc61978d4209e4e2d9ac9e3e9a452b5f9ff69e | PHP | aedart/athenaeum | /packages/Validation/src/Rules/DateFormat.php | UTF-8 | 2,856 | 3.359375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Aedart\Validation\Rules;
use Carbon\Exceptions\InvalidFormatException;
use Closure;
use Illuminate\Support\Carbon;
use ValueError;
/**
* Date Format Validation Rule
*
* Ensures given attribute is a date string according to an allowed format.
*
* @author Alin Eugen Deac <aedart@gmail.com>
* @pac... | true |
d69e79cbb7674e9d559ffad47bbe6d9c47bdcba6 | PHP | henarozz/Txwitch7 | /app/txwitch/Controller/AppController.php | UTF-8 | 2,937 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Txwitch
*
* @author Alexander Makhin <henarozz@gmail.com>
*/
namespace Txwitch\Controller;
use Psr\Container\ContainerInterface;
use Slim\Http\Request;
use Slim\Http\Response;
use Txwitch\Component\Security;
/**
* AppController Class
*
* @package Txwitch\Controller
*/
class AppController
{
/**... | true |
9a8e3b10d23282c32421c1e19a84c02f175a8d25 | PHP | Leereal/zimgeneral | /app/Http/Controllers/API/EmployeeController.php | UTF-8 | 3,370 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use App\Http\Resources\EmployeeResource;
use App\Models\Branch;
use App\Models\Employee;
use Illuminate\Http\Request;
class EmployeeController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \I... | true |
be2aaf26ab84f711b9f3f4efdc4ef638a61a9ac1 | PHP | josuecamelo/phpunittests | /tests/Alura/Leilao/Tests/Service/AvaliadorTest.php | UTF-8 | 2,429 | 2.578125 | 3 | [] | no_license | <?php
namespace Alura\Leilao\Tests\Service;
use Alura\Leilao\Model\Lance;
use Alura\Leilao\Model\Leilao;
use Alura\Leilao\Model\Usuario;
use Alura\Leilao\Service\Avaliador;
use PHPUnit\Framework\TestCase;
class AvaliadorTest extends TestCase
{
public function testAvaliadorDeveEncontrarMaiorValorDeLancesEmOrdemC... | true |
8168b86886799be58dcb6f825a67cae7b50b90ca | PHP | claremontdesign/zbase | /src/Ui/Form/Type/Select.php | UTF-8 | 3,007 | 2.859375 | 3 | [] | no_license | <?php
namespace Zbase\Ui\Form\Type;
/**
* Zbase-Form Element-Text
*
* Element-Select
*
* @link http://zbase.dennesabing.com
* @author Dennes B Abing <dennes.b.abing@gmail.com>
* @license proprietary
* @copyright Copyright (c) 2016 ClaremontDesign/MadLabs-Dx
* @file Select.php
* @project Zbase
... | true |
1b4b86ad2d61ffcecb1d9892e8368f122af32b28 | PHP | ariezncahyo/php-crawler-test-work | /tests/HandlerTest.php | UTF-8 | 1,988 | 2.859375 | 3 | [] | no_license | <?php
namespace tests;
require_once(__DIR__ . '/../vendor/autoload.php');
use src\Crawler;
use src\Handler;
use src\writers\HtmlWriter;
/**
* Handler Test
* @package tests
*/
class HandlerTest extends \PHPUnit_Framework_TestCase
{
public $crawler;
public $writer;
/**
* @inheritdoc
*/
p... | true |
9f0a3b61555c650c76dc699b219b1699c12c9100 | PHP | antonioTov/casino-zend | /application/forms/AddEdit.php | WINDOWS-1251 | 3,050 | 2.609375 | 3 | [] | no_license | <?php
class Application_Form_AddEdit extends Zend_Form
{
public function init()
{
$emptyMsg = ' !';
$errorEmail = ' E-mail';
$busyName = ' ';
$this->setMethod('post');
// Username
$username = new Zend_Form_Element_Text('username');
$username->setLabel('Username')
->setRequired(true)
... | true |
3a210c30e9b7ff1c3257c7b3e5beea77da70e86c | PHP | ChechoVillarraga/PlanMejoramientoPHP | /Caso3/mvc/modelo/dto/Persona.class.php | UTF-8 | 1,870 | 2.921875 | 3 | [] | no_license | <?php
/**
* Object represents table 'personas'
*
* @author: http://phpdao.com
* @date: 2016-12-06 20:53
*/
class Persona{
private $idPersonas;
private $nombres;
private $apellidos;
private $correo;
private $clave;
private $rolesIdRoles;
private $areaIdArea;
function get... | true |
352d0d01f418f1cea5a8da5456f5a6cc7248591d | PHP | yii2rails/yii2-extension | /yusrc/account/src/domain/v2/interfaces/services/SocketInterface.php | UTF-8 | 553 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace yubundle\account\domain\v2\interfaces\services;
use yii\base\ErrorException;
use yubundle\account\domain\v2\entities\SocketEventEntity;
/**
* Interface SocketInterface
*
* @package yubundle\account\domain\v2\interfaces\services
*
* @property-read \yubundle\account\domain\v2\Domain $domain
*/
... | true |
8ec4d7e4c165519a445d071f060a9f13cd50fa71 | PHP | RicentCB/adoo_final | /controller/users.controller.php | UTF-8 | 11,372 | 2.5625 | 3 | [] | no_license | <?php
class ControllerUsers{
/*===========================================
I N G R E S O D E U S U A R I O S
===========================================*/
static public function ctrLoginUser(){
if(isset($_POST["ingUser"])){
//Intento de Logeo
if((preg_match('/^[a-zA-Z0-9]+$/', $_POST["ingU... | true |
3dcb2d3c33be2ae948d9c27f528c0b0f46f27f40 | PHP | Pyranth/hackathonPort2018 | /webapp/guest-favorites.php | UTF-8 | 460 | 2.828125 | 3 | [] | no_license | <?php
require_once 'dbscripts/config.php';
$myArray = array();
if ($result = $mysqli->query("SELECT DISTINCT g.NAME, g.SURNAME, s.NAME_SERVICES FROM guest_services gs LEFT JOIN guest g ON gs.ID = g.ID LEFT JOIN services s ON gs.ID_SERVICES = s.ID_SERVICES WHERE g.NAME=\"John\"")) {
while($row = $result->fetch_ar... | true |
34f452354c9adedf76b9e9ecf55c669e6bf92eb1 | PHP | pixelant/pxa_pm_importer | /Classes/Validation/Validator/ValidatorInterface.php | UTF-8 | 573 | 2.546875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Pixelant\PxaPmImporter\Validation\Validator;
use Pixelant\PxaPmImporter\Validation\ValidationResult;
/**
* Interface ProcessorFieldValueValidatorInterface
* @package Pixelant\PxaPmImporter\Domain\Validation
*/
interface ValidatorInterface
{
/**
* Validate given va... | true |
e283eb348d4a8ecd3a97f15e057c6b44d6e62a1e | PHP | JoseAntonio1994/PPI | /ajax/modulos.php | UTF-8 | 1,024 | 2.765625 | 3 | [] | no_license | <?php
require_once '../Controladores/ModuloController.php';
//Una matriz para mostrar las respuestas de la api
$response = array();
if (isset($_GET['apimodulos']))
{
switch ($_GET['apimodulos'])
{
case 'leer_modulos':
$db = new ModuloController();
$response["error"] = false;
$response["message"] =... | true |
73e44491da464d04feefdd85b20527c73ab915aa | PHP | frongpsc-hub/InternAtime | /application/controllers/account/Welcome.php | UTF-8 | 15,806 | 2.515625 | 3 | [] | no_license | <?php
class Welcome extends CI_Controller {
/*public function index()
{
$data = ['test1'=> $this->load->view('Register',NULL,TRUE)];
$this->load->view("first_view",$data);
}*/
public function index()
{
$this->load->view("/account/Register");
}
public function form... | true |
784154d0935b183bad7a0aac75958ec64707212a | PHP | sakamata/happy2 | /views/admin/table.php | UTF-8 | 240 | 2.703125 | 3 | [] | no_license | <?php
echo "<tr>";
$field_no = 0;
foreach ($tableData as $noUseValue){
$fieldNames = array_keys($tableData);
$fieldName = $fieldNames[$field_no];
echo "<td>". $this->escape($tableData[$fieldName]) ."</td>";
$field_no++;
}
echo "</tr>";
| true |
6f40b00e3a6113fed602737eb6c9654777f5414a | PHP | DerDu/SPHERE-Upgrade | /System/Database/Driver/MySqlDriver.php | UTF-8 | 415 | 2.59375 | 3 | [] | no_license | <?php
namespace SPHERE\System\Database\Driver;
/**
* Class MySqlDriver
* @package SPHERE\System\Database\Driver
*/
class MySqlDriver extends AbstractDriver implements DriverInterface
{
/**
* @return string
*/
public function getIdentifier()
{
return 'pdo_mysql';
}
/**
* ... | true |
c70748fdf99d53d2ffd942433deee19284baffd6 | PHP | Rosanyelis/PanelAdmin-Apuesta | /app/Http/Controllers/Api/WebAuthController.php | UTF-8 | 1,814 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\Models\Role;
use Illuminate\Http\Request;
use App\Models\User;
use Illuminate\Support\Facades\Auth;
class WebAuthController extends Controller
{
/**
* Login
*/
public function login(Request $request)
{
... | true |
7632b7697f2c7229565a1485cbe90d0d7fd72a86 | PHP | wcabynessa/LAMP-Web | /php/common.php | UTF-8 | 842 | 3.046875 | 3 | [] | no_license | <?php
if (!function_exists('get')) {
function get($arr, $key, $default = null) {
if (isset($arr[$key])) return $arr[$key];
return $default;
}
}
if (!function_exists('date_difference')) {
// Format: YYYY-MM-DD
function date_difference($date1, $date2) {
$time1 = strtotime($date1);
$time2 = strtotime($date2);... | true |
734762793792bf0455ab8e716d75aeb08436ecad | PHP | bamblebam/water-footprin-calculator | /evs mini project/quiz1.php | UTF-8 | 755 | 2.71875 | 3 | [] | no_license | <?php
session_start()
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form action="quiz2.php" method="POST">
<h4>Number of adults?</h4>
<label fo... | true |
0a4f0919c9a8fd2dddfdc2d0cbe5e4ae5ed25ef1 | PHP | MCLACS/CSCI343-Public | /php/InClassExercises/Module4/CRUD-Users/user.php | UTF-8 | 8,542 | 2.84375 | 3 | [] | no_license |
<?php
require_once "functions.php";
require_once 'dblogin.php';
session_start();
header("Access-Control-Allow-Origin: *");
// Create connection
$conn = new mysqli($db_hostname, $db_username, $db_password, $db_database, $db_port);
// Check connection
if ($conn->connect_error) {
die("Connection failed: " . $conn... | true |
6818e1c09ae81c9bbeaa78bfb27a021d345ef9ee | PHP | rifjan29/masdimas | /uploadbukti.php | UTF-8 | 2,749 | 2.546875 | 3 | [] | no_license | <?php
session_start();
$con = new mysqli("localhost","root","","masdimas");
$username = $_SESSION['username'];
$id = $_GET['id'];
$data = mysqli_query($con, "SELECT id_pembelian, atasnama, username, tanggal, total FROM pembelian WHERE username = '$username' AND id_pembelian = '$id'");
?>
<!DOCTYPE html>
<html>
<head>... | true |
ee34c0938bcd4445c69970fe0038e7978b7ffa25 | PHP | zywkeven/cron_zwshd_com | /applications/library/Model/Base.php | UTF-8 | 2,339 | 2.875 | 3 | [] | no_license | <?php
/**
*
* @author keven.zhong
*
*/
abstract class Model_Base {
/**
* 通过类获取的updata sql
* @param obj $bindArrParams
* @return array $rs
*/
public static function getUpdateVal (&$bindArrParams) {
$rs = array();
$clsName = get_class($bindArrParams);
if($clsN... | true |
a4e1f8a71d8ee2a3430d27da31dfd016d2a7d113 | PHP | rahulyhg/happy-giraffe | /site/frontend/modules/photo/components/thumbs/ImageDecorator.php | UTF-8 | 3,089 | 2.6875 | 3 | [] | no_license | <?php
/**
* Надстройка над Imagine
*
* Добавляет логику к стандартной обработке фото - управляет анимацией, определяет качество.
*
* @author Никита
* @date 03/10/14
*/
namespace site\frontend\modules\photo\components\thumbs;
use Imagine\Filter\FilterInterface;
use Imagine\Image\ImageInterface;
use site\frontend... | true |
497b40c0994154d1061aea95721c80fb09533aa9 | PHP | jdouglas71/sbwp | /wp-content/plugins/sbcs/html-widget.php | UTF-8 | 1,605 | 2.90625 | 3 | [] | no_license | <?php
/**
* Sidebar widget that displays whatever html was given it.
* @author Jason Douglas
*/
class SBCS_HTML_Widget
extends WP_Widget
{
/**
* Widget Function.
*/
function widget($args, $instance)
{
extract($args,EXTR_SKIP);
wp_enqueue_style( "sbcs_widget_style", plugins_url('sbcs.css',_... | true |
22f6b56ebdfde879f7c4d5ac4908306e771ce153 | PHP | hayate/hayate | /lib/Hayate/Image.php | UTF-8 | 9,316 | 2.703125 | 3 | [] | no_license | <?php
/**
* Hayate Framework
* Copyright 2009-2010 Andrea Belvedere
*
* Hayate is free software: you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either
* version 3 of the License, or (at your option) any later ve... | true |
08916e63dcddb74a15cca8d7e9ce35453f1a591d | PHP | db306/BlaBlaCarAPIIntegration | /src/Service/SearchTripService.php | UTF-8 | 3,495 | 2.8125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Service;
use App\ValueObject\Coordinate;
use App\ValueObject\Country;
use DateTime;
use Psr\Cache\CacheItemPoolInterface;
use Symfony\Contracts\HttpClient\HttpClientInterface;
class SearchTripService implements SearchServiceInterface
{
private HttpClientInterface $cl... | true |
eaae6b502463377abb4e82a7329c4a474454e59e | PHP | treaudde/poc-stepper | /Services/StepperService.php | UTF-8 | 1,898 | 2.9375 | 3 | [] | no_license | <?php
namespace Services;
use Models\Email;
use Models\Address;
use Models\PhoneNumber;
use Models\Preferences;
/**
* Class StepperService
*
* @package Services
*/
class StepperService
{
/**
* @var Email
*/
private $email;
/**
* @var Address
*/
private $address;
/**
... | true |
84f784f016f711cc9ca84bbe45b72f862be810d5 | PHP | saeedadabi/Jerkoop-CMS | /include/connection.php | UTF-8 | 456 | 2.65625 | 3 | [] | no_license | <?php
function connect_db() {
$server=constant("db-host");
$user=constant("db-user");
$pass=constant("db-pass");
$db=constant("db-name");
try {
$conn=new PDO("mysql:host=$server;dbname=$db",$user,$pass);
$conn->setAttribute(PDO::ATTR_ERRMODE , PDO::ERRMODE_EXCEPTION);
return $conn;
}// end try... | true |
25eea19cc919d8e9817563d79f028096dc9aff26 | PHP | LoBrs/calendly-sdk-php | /src/CalendlyApi.php | UTF-8 | 4,180 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace LoBrs\Calendly;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
use GuzzleHttp\RequestOptions;
use LoBrs\Calendly\Exceptions\ApiErrorException;
use LoBrs\Calendly\Exceptions\InternalServerErrorException;
use LoBrs\Calendly\Exceptions\InvalidArgumentException;
use LoBrs\Calendly\Except... | true |
6423b31e48986de43968ead9e36b75e2cdf06301 | PHP | leelaplap/php-laravel-blog-manager | /app/Http/Controllers/BlogController.php | UTF-8 | 1,572 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Blog;
use Illuminate\Http\Request;
class BlogController extends Controller
{
protected $blog;
public function __construct(Blog $blog)
{
$this->blog = $blog;
}
public function showAll()
{
$blogs = $this->blog->paginate(5);
... | true |
6bcf776d5da23602e6cecd7b14e260c9fac17821 | PHP | steview/moojon | /0.3/classes/moojon.cache.class.php | UTF-8 | 1,075 | 2.703125 | 3 | [] | no_license | <?php
final class moojon_cache extends moojon_singleton {
static protected $instance;
static protected function factory($class) {if (!self::$instance) {self::$instance = new $class;}return self::$instance;}
static public function fetch() {return self::factory(get_class());}
private $enabled = true;
protected f... | true |
ee3749dc345f249ad51c699893303295ee43f9e2 | PHP | jcalnan/CS-340 | /wm_search.php | UTF-8 | 4,857 | 2.65625 | 3 | [] | no_license | <?php
ini_set('display_errors', 'On');
//Connects to the database
$mysqli = new mysqli("classmysql.engr.oregonstate.edu","cs340_calnanj","6902","cs340_calnanj");
if(!$mysqli || $mysqli->connect_errno){
echo "Connection error " . $mysqli->connect_errno . " " . $mysqli->connect_error;
}
include 'template... | true |
70e5e99b4dd3402a5d651859ba5a2ff5ba60fa48 | PHP | MaxiBatta/TpFinalLab4Utn | /Models/Student.php | UTF-8 | 2,095 | 3.046875 | 3 | [] | no_license | <?php
namespace Models;
use Models\Person as Person;
class Student extends Person {
private $studentId;
private $careerId;
private $firstName;
private $lastName;
private $dni;
private $fileNumber;
private $gender;
private $birthDate;
private $email;
private $phoneNumber;
... | true |
4009cccc7624db36f8cee37996af1aa13c25c721 | PHP | Arink98/HSP-Review | /managers/Validator.php | UTF-8 | 795 | 2.9375 | 3 | [
"Apache-2.0"
] | permissive | <?php
require __DIR__ . '/../AutoLoader.php';
class Validator {
public function __construct() {
}
/**
* @param string $username
* @return int
*/
public function usernameValid($username) {
return preg_match('/^[A-Za-z0-9_]+$/', $username);
}
public function shopNameVal... | true |
11506e033508602a147f78a1bd1841719fa106be | PHP | muhammedkalender/Fridge | /index.php | UTF-8 | 1,971 | 2.765625 | 3 | [] | no_license | <?php
spl_autoload_register(function ($class_name) {
include $class_name . '.php';
});
use Helpers\Logger;
use Objects\Coke;
use Objects\Fridge;
Logger::log("İşlemler Başlıyor");
Logger::log("Obje tanımlanıyor", true);
$fridge = new Fridge();
Logger::log("Kapak açılıyor", true);
$fridge->open();
Logger::log("... | true |
1bf1e75af54a00ab210dfa7d5580df9e7ed07c4d | PHP | leancep/ProyectosAcademia | /Calculadora/CalculadoraTest.php | UTF-8 | 3,185 | 2.9375 | 3 | [] | no_license | <?php
require_once("./vendor/autoload.php");
require_once("Calculadora.php");
use PHPUnit\Framework\TestCase;
final class CalculadoraTest extends TestCase{
function testAndaTodo(){
$this->assertTrue(True);
}
function testExisteCalculadora(){
$this->assertTrue(class_exists("Calculadora")... | true |
452ff1ac2ac5139444e8d34ccc8e384857784ef2 | PHP | tsloncz/xmlTesting | /tabFileInterfaceV2.php | UTF-8 | 9,218 | 2.84375 | 3 | [] | no_license | <?php
/*
* V2
*/
session_start();
/*
* Element can have data
* in just it's attributes
* as headers for csv element string
* as attribute=>value pairs
* in it's attributes and children
* as csv
* in it's childrens
* attributes
* as children element s... | true |
2d1162e7214b9d395fab779a4ee5f7629bd8d59a | PHP | nmb007/excursion | /modules/page/models/Page.php | UTF-8 | 2,462 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace app\modules\page\models;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
use yii\web\UploadedFile;
use Yii;
/**
* This is the model class for table "{{%page}}".
*
* @property integer $id
* @property string $name
* @property string $value
* @property integer $created_at
* @proper... | true |
8106d19630e0281af4cd4ee5d0ab81c42a4680b3 | PHP | atty31/seo-cms | /app/Http/Controllers/Admin/StaticBlocksController.php | UTF-8 | 4,798 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use App\Http\Logs\Admin\Log;
use App\Http\Requests;
use App\Models\Admin\Blocks;
use Exception;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Monolog\Logger;
/**
* Class StaticBlocksController
* @package... | true |
b24d2a96df427ebafa48bf6cdbdedd4f70f85016 | PHP | supelec-rezo/trombinews | /serveur/trombinews.php | ISO-8859-1 | 3,740 | 2.625 | 3 | [] | no_license | <?
/*
* Nouvelle version du script de rcupration des photos trombis adapte a la BDD kettu_web, permettant aussi de rcuperer la photo partir d'un nom dns.
*/
/*
* Le script peut utiliser deux modes de slection de l'utilisateur : via un DNS
* ou via une adresse mail.
*/
if(!isset($_GET['mail']) && !isset($_GET['dn... | true |
89152d4524467414bc7f7574b6626382609d99b0 | PHP | minhtran2401/DuAnTotNghiep | /app/Http/Requests/RequestSanPham.php | UTF-8 | 2,075 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class RequestSanPham extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get th... | true |
b8d859af6c1edd06029c9dae701ba23efb8ef33c | PHP | kbs1/encrypted-api-base | /src/Cryptography/Support/Json.php | UTF-8 | 2,809 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Kbs1\EncryptedApiBase\Cryptography\Support;
use Kbs1\EncryptedApiBase\Exceptions\Cryptography\{UnableToEncodeAsBase64Exception, UnableToEncodeAsJsonException,
UnsupportedVariableTypeException, InvalidDataException};
class Json
{
protected $validator;
public function __construct()
{
$this->vali... | true |
95dec70f8973fc0cb8987cc5f34885a8ce275c53 | PHP | jose1914luis/finder | /docManagement.serie.crear.php | ISO-8859-3 | 1,981 | 2.640625 | 3 | [] | no_license | <?php
/*
session_start();
require_once("Acceso/Config.php"); // Definicin de las variables globales
require_once("Modelos/Perfiles.php");
require_once("Modelos/Acciones.php");
$acciones = new Acciones();
$prf = new Perfiles();
*/
// variables del controlador
$msgError = "";
... | true |
559d9647498b8d0aa5dc9a654b47603d44276d52 | PHP | selimppc/fitbody | /protected/models/Shop.php | UTF-8 | 11,411 | 2.53125 | 3 | [] | no_license | <?php
class Shop extends CActiveRecord {
const STATUS_ACTIVE = 1;
const STATUS_INACTIVE = 0;
const PLACE_NEW = 1;
const PLACE_NOT_NEW = 0;
const PAGINATION_COUNT_SHOPS = 12;
public $validLink = true;
public $addresses = array();
public $radio = 0;
public $chainObject;
priva... | true |
1cf7a5be3e1b5835db562525f558b23c6b9fcd41 | PHP | samiul-sheikh/PHP_Array_Function | /array.php | UTF-8 | 1,995 | 2.5625 | 3 | [] | no_license | <!docttype html>
<html>
<head>
<title> PHP Syntax </title>
<style>
.phpcoding{width:900px; margin:0 auto; background:grey; min-height: 400px;}
.headerportion, .footerportion{background:#444; color:white; text-align: center; padding: 20px;}
.headerportion h2, .footerport... | true |
75e1ddc55c1717f3930a1dc4c22e4e61ad3a7041 | PHP | shalhavit/a3 | /app/Http/Controllers/InspectorController.php | UTF-8 | 1,506 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Twitter;
use File;
class InspectorController extends Controller {
/**
* Post a new tweet to the user account.
*
* @return void
*/
public function postNewTweet(Request $request) {
$this->validate($request, [
... | true |
3125a96ba8c6fb2ebfd1a3ec89871545325cbb33 | PHP | phpjungle/Delete-File-with-Filters | /main.php | UTF-8 | 2,049 | 3 | 3 | [] | no_license | <?php
error_reporting(E_ERROR);
/**
* 移除某个目录下面所有$filter文件目录
*
* @author PHPJungle
* @since 15.01.21 周三
* @param 根目录 $path
* @param 需要删除的文件夹名字 $filter
* @return NULL|boolean
*/
function del_dir_filter($path,$filter='.svn'){
if(!is_dir($path)){
return null;
}
$fh = opendir($path);
while(($row = readdir($... | true |
3e80912d2f3827c6753adc77b7a8a48529eda711 | PHP | MkSaqo/M_Films | /template/functions.php | UTF-8 | 1,378 | 2.53125 | 3 | [] | no_license | <?php
session_start();
function pre($var){
echo "<pre>";
print_r($var);
echo "</pre>";
}
function dbConnect(){
$db = mysqli_connect('localhost','root','root','Filmer');
mysqli_set_charset($db, "utf8");
date_default_timezone_set ( 'Europe/Moscow' );
return $db;
}
function check($page){
$... | true |
f9dc6a27b08297331c0788d9e3ce05046489b755 | PHP | patilvivek261/registration | /app/Controllers/PortfolioController.php | UTF-8 | 929 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
*
*/
namespace App\Controllers;
use CodeIgniter\Controller;
class PortfolioController extends Controller{
function __construct(){
helper(['url','text']);
}//end function __constructor()
public function portfolio(){
$data1 = [
'pageT... | true |
ffbc2a46b684256a8c09faa3b1aa4dd17a74dc94 | PHP | piratesmanX1/shoppa-2020 | /process_contact.php | UTF-8 | 1,036 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
// we will only start the session with session_start() IF the session isn"t started yet //
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
?>
<?php
// including the conn.php to establish connection with database //
include "conn.php";
?>
<?php
//search product from home
if(isset($_POST['c... | true |
e89c237e74cd0654d035bfd036fd43c7652cd1a1 | PHP | Moshamohamed/NPD-FIRST | /vendor/Routing/Router.php | UTF-8 | 940 | 2.90625 | 3 | [] | no_license | <?php
namespace Routing;
use Config\ConfigRepository as config;
use Http\Request;
class Router{
/**
* routes of the current script
*
* @var array
*/
private $routes = array();
/**
* not found route
*
* @var mixed
*/
private $notFound;
/**
* set the main routes of the cu... | true |
048b14aaa13d2244343ecb29356fe7ad3ae3392b | PHP | hostnet/type-inference-tool | /test/Analyzer/Data/AnalyzedFunctionCollectionTest.php | UTF-8 | 7,092 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @copyright 2017-2018 Hostnet B.V.
*/
declare(strict_types=1);
namespace Hostnet\Component\TypeInference\Analyzer\Data;
use Hostnet\Component\TypeInference\Analyzer\Data\Exception\EntryNotFoundException;
use Hostnet\Component\TypeInference\Analyzer\Data\Type\NonScalarPhpType;
use Hostnet\Component\TypeIn... | true |
cf174dfd3c31c1728b30f3814f57cd4bc12bc3f0 | PHP | nh3500/NMS | /admin/admin_edit.php | UTF-8 | 1,444 | 2.796875 | 3 | [] | no_license | <?php
include_once("../sys/check_session.inc.php");
header('Content-Type: text/html; charset=utf-8');
include("../sys/sqlconnect.inc.php");
//如果以 GET 方式傳遞過來的 edit 參數不是空字串
if ($_GET['edit'] !=''){
//查詢 edit 參數所指定帳號的記錄, 從資料庫將原有的資料取出
$sql="SELECT * FROM `ADMIN` WHERE username='{$_GET['edit']}' ";
$result=m... | true |
d38c16569d68561c02f8f05736983f298cc8107b | PHP | wahc1983/blog | /db/createDataBase.php | UTF-8 | 451 | 3.015625 | 3 | [] | no_license | <?php
$host = 'localhost';
$username = 'root';
$passwd = '1234abcd';
$con=mysqli_connect($host,$username,$passwd);
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
// Create database
$sql="CREATE DATABASE myblog";
if (mysqli_query($con,$sq... | true |
104bc916db4978fa59d646a444bcb717417ff554 | PHP | RajaBalawal/CarProject | /Admin_area/Update.php | UTF-8 | 3,940 | 2.578125 | 3 | [] | no_license | <?php
include 'auth.php';
require 'dbconnect.php';
if(isset($_POST['update'])){
// Getting data from the fields
$cars_id = mysqli_escape_string($con, $_POST['CarId']);
$car_make = mysqli_escape_string($con,$_POST['CarMake']);
$car_model = mysqli_escape_string($con,$_POST['CarModel']);
... | true |
326371390440573fb6bd2f66c72761cd15e8b6ef | PHP | CollectiveDesign/nova-page | /src/Pages/TemplatesRepository.php | UTF-8 | 3,016 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Whitecube\NovaPage\Pages;
use Route;
use Whitecube\NovaPage\Exceptions\TemplateNotFoundException;
class TemplatesRepository
{
/**
* The registered Templates
*
* @var array
*/
protected $templates = [];
/**
* The registered pages
*
* @var array
*/
... | true |
f80a01a40766fa3982ad264bc06fbdb05bf89d02 | PHP | limhyejeong/onlineskillup_step1 | /app/sql.php | UTF-8 | 1,389 | 2.90625 | 3 | [] | no_license | <?php
$dsn = 'pgsql:dbname=TEST;host=pgsql;port=5432';
$user = 'postgres';
$pass = 'example';
try {
// DB에 접속
$dbh = new PDO($dsn, $user, $pass);
// 여기서 쿼리실행
// query 메소드(SELECT)
$query_result = $dbh -> query('SELECT * FROM board');
// query 메소드(INSERT)
$sth = $dbh->prepare('INSERT INTO board (name, title, co... | true |
e0346b3c555307f4c9cbbddf85793f3b5fc6d20a | PHP | darchipov/Commerce | /Subject/Model/SubjectInterface.php | UTF-8 | 2,299 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Ekyna\Component\Commerce\Subject\Model;
use Doctrine\Common\Collections\ArrayCollection;
use Ekyna\Component\Commerce\Pricing\Model\TaxGroupInterface;
/**
* Interface SubjectInterface
* @package Ekyna\Component\Commerce\Subject\Model
* @author Etienne Dauvergne <contact@ekyna.com>
*/
interface S... | true |
71ec0147d162f5b049adaaad7c40c3c3719ee06b | PHP | apioo/psx-api | /src/GeneratorFactory.php | UTF-8 | 2,543 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* PSX is an open source PHP framework to develop RESTful APIs.
* For the current version and information visit <https://phpsx.org>
*
* Copyright 2010-2023 Christoph Kappestein <christoph.kappestein@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file... | true |
c01934859ee37118f4f4a5a4e563ef5b1ac15eb9 | PHP | wesleyromualdo/PIM | /includes/library/simec/Importador/Segov.inc | UTF-8 | 5,505 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: victor
* Date: 05/07/17
* Time: 11:33
*/
require_once APPRAIZ . 'includes/library/simec/Importador.php';
class Importador_Segov extends Importador
{
public function __construct ($model = null)
{
parent::__construct($model);
}
public function valid... | true |
15e33c5083ea8f54f82c47decb9a8a0bd44e80c0 | PHP | hoanganh25991/laravel-fish-co | /database/factories/ModelFactory.php | UTF-8 | 3,706 | 2.5625 | 3 | [] | no_license | <?php
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| Here you may define all of your model factories. Model factories give
| you a convenient way to create models for testing and seeding yo... | true |
dc3f900f47f6faa46f4c04b59ca3d307aeb114bb | PHP | richsage/WhiteOctoberAdminBundle | /Action/ActionCollection.php | UTF-8 | 3,846 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the WhiteOctoberAdminBundle package.
*
* (c) Pablo Díez <pablodip@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace WhiteOctober\AdminBundle\Action;
/**
* ActionCollection.
*
... | true |
50a8cfc5210ed54a14989e4f886e46ed9c22eac1 | PHP | marinaAC/ProgramacionIII | /MarinaCardozo-RSP/PracticaSegundoParcial/DAO/Entidades/UsuarioDao.php | UTF-8 | 2,210 | 3.140625 | 3 | [] | no_license | <?php
include_once('./DAO/Interfaces/IUsuarioDao.php');
include_once('./Conecciones/ConexionDb.php');
class UsuarioDao implements IUsuarioDao{
private $conexion;
public function __construct($conexion)
{
$this->conexion = $conexion;
}
public function SaveUsuario($usuario)
{
... | true |
16ae6356014d2d8d0fc8b7f3c901cfe6c36c46c3 | PHP | NursultanMuss/test1 | /controllers/AdminProjectsController.php | UTF-8 | 4,826 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: йойо
* Date: 09.10.2016
* Time: 12:05
*/
class AdminProjectsController extends AdminBase
{
/**
* Action для страницы "Управление проектами"
*/
public function actionIndex()
{
//Access control
self::checkAdmin();
//Get projects ... | true |
807391389156d24a8b07469ffe6a13c6f76dbc60 | PHP | somexoh/moumoon | /backend_bak.php | UTF-8 | 1,057 | 2.765625 | 3 | [] | no_license | <?php
header( "Access-Control-Allow-Origin: *");
/*
* Get Params
*/
$startTime = "";
$endTime = "";
$startTimeSQL = " ";
$endTimeSQL = " ";
$startTime = $_GET["startTime"];
$endTime = $_GET["endTime"];
if ( !empty($startTime)) {
$startTimeSQL = " pubdate > date (\"$startTime\") ";
}
if ( !empty($endTime))... | true |
e715d0e7defb08034972411e728ae42d08044b7e | PHP | gurkiratThind/Asian-Swords | /tools.php | UTF-8 | 6,035 | 2.796875 | 3 | [] | no_license | <?php
/**
* prevent loading of tools.php directly
* must go through index.php first.
*/
if (!isset($index_loaded)) {
die('Direct acces to this file is forbidden');
}
/**
* this file contain utility functions.
*/
/**
* Display any one dimensional array.
*/
function array_display($array_name)
{
$r = '';
... | true |
0c61301b3f194a6fdb3369cc438ad4310cfed251 | PHP | suitmedia/suitcoda | /database/migrations/2015_11_06_163545_createCommandTable.php | UTF-8 | 909 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateCommandTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('commands', function (Blueprint $table) {
$... | true |
43d0139a32bedc34fa5a1dafcf8b71af0104a4b5 | PHP | shawnsandy/atlas-summit | /app/Http/Requests/UserRequest.php | UTF-8 | 2,199 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use App\Notifications\AccountActivation;
use App\User;
use DB;
use Hash;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Notification;
use Silber\Bouncer\BouncerFacade as Bouncer;
use Silber\Bouncer\Database\Role;
class UserRequest extends FormRequest
{
... | true |
1d6a37e2fdb646cbd12f1b1e40e82b002500ba22 | PHP | SahanDisa/web_first | /My_Web_Class/PHP/01-PHP-BASIC/index.php | UTF-8 | 320 | 2.703125 | 3 | [] | no_license | <html>
<head>
<title><?php echo "PHP"?></title>
</head>
<body>
<h1>Hello this is HTML inside a PHP File</h1>
<?php
/**
* Created by IntelliJ IDEA.
* User: sanu-vithanage
* Date: 11/17/18
* Time: 10:18 AM
*/
echo "Hello PHP<br>";
echo "<h1>Hello PHP</h1>";
echo "<script>alert('Haai');</script>";
?>
</body>
</html> | true |
58ac784cbc341c3a7e45cee144e2019d69a46bcb | PHP | devangi2233/WP | /emp.php | UTF-8 | 876 | 2.78125 | 3 | [] | no_license | <?php
$servername="localhost";
$username="root";
$password="";
$database="college";
$conn=mysqli_connect($servername,$username,$password,$database);
if(!$conn){
die("connection failed:".mysqli_connect_error());
}
$query= "create table emp(empid int primary key,ename varchar(30),designation varchar(30))";
... | true |
3f1a9ca82c10ec716481aa793fabaa5efc4f8c9e | PHP | VladimirCVB/internDTT | /app/models/Houses.php | UTF-8 | 1,824 | 2.9375 | 3 | [] | no_license | <?php
use Phalcon\Mvc\Model;
use Phalcon\Messages\Message;
use Phalcon\Validation;
use Phalcon\Validation\Validator\PresenceOf;
use Phalcon\Validation\Validator\Digit;
class Houses extends Model
{
public $id;
public $street;
public $number;
public $addition;
public $zipcode;
public $city;
... | true |
16f007ec78f135f8f8554d11803539a93a88c466 | PHP | jrots/notificato | /tests/Wrep/Notificato/Test/Apns/SenderTest.php | UTF-8 | 3,104 | 2.515625 | 3 | [
"LicenseRef-scancode-proprietary-license",
"MIT"
] | permissive | <?php
namespace Wrep\Notificato\Tests\Apns;
use \Wrep\Notificato\Apns\Sender;
use \Wrep\Notificato\Apns\Certificate;
use \Wrep\Notificato\Apns\Gateway;
use \Wrep\Notificato\Apns\MessageFactory;
use \Wrep\Notificato\Apns\MessageEnvelope;
use \Wrep\Notificato\Test\Apns\Mock\MockGatewayFactory;
use \Wrep\Notificato\Test... | true |
63ee51af192d4704a9703bd6af8bce6779273283 | PHP | riverswan/PHP_patterns_Zandstra | /Prototype/EarthForest.php | UTF-8 | 259 | 2.96875 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace app\Prototype;
class EarthForest extends Forest {
public function __construct() {
$this->title = "Earth forest";
echo $this->getTitle() . "\n";
}
public function __clone() {
$this->title .= " clone";
}
} | true |
185ffa464d3d7a3843cddeadff8b1f3cf0c22182 | PHP | HidekatsuYamamoto/messageboard | /ForThumbnailingPictureClass.php | UTF-8 | 2,092 | 3.078125 | 3 | [] | no_license | <?php
namespace HideSample\MessageBoard;
define('SCREEN_SIZE', '300');
?>
<?php
class ForThumbnailingPictureClass
{
// コンストラクタ
function __construct()
{
}
/**
* @assert (0, 0) == 0
* @assert (300, 300) == 300
* @assert (600, 600) == 300
* @assert... | true |
3c7ad42435ffd75c9438ef6aa494bdf1f8d5d0a0 | PHP | axelPZ/modelo-laravel | /app/Http/Controllers/CategoryController.php | UTF-8 | 4,614 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Category; // importamos el modelo
use Carbon\Carbon;
class CategoryController extends Controller
{
// TRAER LAS CATEGORIAS
public function getCategories(){
$count = Category::where('cat_estate', 1)->count();
$r... | true |
b54bf8053527494addaf49ff420c80d95d0da5b0 | PHP | jsonpeng/SmartHaiDianServer | /app/Repositories/GatewayRepository.php | UTF-8 | 616 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Models\Gateway;
use InfyOm\Generator\Common\BaseRepository;
/**
* Class GatewayRepository
* @package App\Repositories
* @version May 19, 2019, 11:29 am CST
*
* @method Gateway findWithoutFail($id, $columns = ['*'])
* @method Gateway find($id, $columns = ['*'])
* @meth... | true |
1b9cf949acc9ce2957d50b57ef3a564e59305f3e | PHP | lanmediaservice/lms-video-ce-1.x | /src/rss_films.php | WINDOWS-1251 | 4,041 | 2.546875 | 3 | [] | no_license | <?php
header("Content-type: text/xml");
require_once "config.php";
$idSQLConnection = mysql_connect($config['mysqlhost'], $config['mysqluser'], $config['mysqlpass']);
if ( !$idSQLConnection )
{
echo " . .";
exit;
}
$result = mysql_select_db( $config['mysqldb'], $idSQLConnection );
if ( !$result )
{
echo "... | true |
1514114b9949045d945233a3aa5e1f5d398b0daa | PHP | Pfillip/ilias | /Services/Payment/classes/class.ilPaymentPrices.php | UTF-8 | 13,825 | 2.578125 | 3 | [] | no_license | <?php
/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
/**
* Class ilPaymentPrices
*
* @author Stefan Meyer <meyer@leifos.com>
* @version $Id: class.ilPaymentPrices.php 22133 2009-10-16 08:09:11Z nkrzywon $
*
* @package ilias-core
*/
class ilPaymentPrices
{
// private $ilDB;
const TYP... | true |
a7e5bacf532aed74fb7fe74c9724354eac7442b4 | PHP | huesimon/project-planner | /app/Http/Livewire/SkillCreate.php | UTF-8 | 416 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Livewire;
use App\Models\Skill;
use Livewire\Component;
class SkillCreate extends Component
{
public $name;
public function render()
{
return view('livewire.skill-create');
}
public function create()
{
for ($i = 1; $i <= 5; $i++) {
Skill:... | true |
f1ad3004f0a5d23f27e46921e6bcd4c14332069b | PHP | penoonan/toilets | /app/Events/UserSentBusinessMessage.php | UTF-8 | 964 | 2.6875 | 3 | [] | no_license | <?php
namespace Toilets\Events;
use Illuminate\Http\Request;
use Illuminate\Queue\SerializesModels;
use Toilets\Models\Business;
use Toilets\Models\Message;
use Toilets\Models\User;
class UserSentBusinessMessage extends Event
{
use SerializesModels;
/**
* @var Business
*/
public $business;
... | true |
c2a1d5c858a180c0a576a3b18497cb3d28e02378 | PHP | kilabs/archer | /protected/components/FrontUserIdentity.php | UTF-8 | 2,186 | 2.640625 | 3 | [] | no_license | <?php
class FrontUserIdentity extends CUserIdentity
{
const ERROR_USER_NOT_CONFIRM=3;
const ERROR_USER_NOT_ACTIVE = 4;
private $_id;
public function authenticate()
{
$record=Member::model()->findByAttributes(array('username'=>$this->username));
if($record === null){
$reco... | true |
e9f81f93587fe50349d7bdab8ba9d1a2084ebfed | PHP | quekaihua/StudyTest | /Pro_PHP_Patterns_Framework_Testing_And_More/3/3-1.php | UTF-8 | 481 | 2.953125 | 3 | [] | no_license | <?php
class Database{
private $_db;
static $_instance;
private function __construc(){
$this->_db = pg_connect('dbname=example_db'); //pg数据库连接
}
private __clone(){};
public static function getInstance(){
if(!(self::$_instance instanceof self)){
self::$_instance = new self();
}
return self::$_instance... | true |
617380bfda600f127e4fb7ba264af753632fe5c8 | PHP | quesheng12/PHP-Flower-Shop | /trading/shoplist.php | UTF-8 | 946 | 2.6875 | 3 | [] | no_license | <?php
include('../utils/conn.php');
$p = $_POST;
if($p['action'] == 1){
item_query($conn, $p['page']);
}
else if($p['action'] == 2){
item_number($conn);
}
mysqli_close($conn);
function item_query($conn, $page){
$sql = "select * from item limit " . ($page-1)*12 . ", 12";
$rst = mysqli_query($conn, $... | true |
1c94e598b3156b47ec55f56c1e64eb1ec1cdfae0 | PHP | aivijay/mailtics-php | /help/fr/message.php | UTF-8 | 1,913 | 2.640625 | 3 | [] | no_license | Dans le champ réservé au texte de votre message, vous pouvez utiliser des "variables" qui seront remplacées par les valeurs correspondant à chaque utilisateur:
<br />Les variables doivent apparaître sous la forme suivante: <b>[NOM]</b> où NOM peut être remplacé par ... | true |
9ac313cc83818c017d04469b96d10cd696b1f87f | PHP | boxindevelopment/boxin-webbackend | /app/Repositories/Contracts/PickupOrderRepository.php | UTF-8 | 256 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Repositories\Contracts;
use App\Model\PickupOrder;
interface PickupOrderRepository
{
public function create(array $data);
public function update(PickupOrder $order, $data);
public function delete(PickupOrder $order);
}
| true |
b11ce2958a10c6df6d429269a8435f0920cfb8d8 | PHP | bridtobin/webMed | /BackupMaintain.php | UTF-8 | 6,698 | 2.859375 | 3 | [] | no_license | <?php
include_Once("Include/incMaintHeader.php");
if(isset($_REQUEST['pageName'])) {
$_SESSION['pageName'] = $_REQUEST['pageName'] ;
}
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="/gdmedstyle.css" >
<title>GD Med Maintenance</title>
</head>
<body>
<?php
error_reporting(E_ALL);
in... | true |
98f9741b3369383d3971fe549c84c8704a70c239 | PHP | corgisout/oophp | /test/Game/DiceTest.php | UTF-8 | 374 | 2.6875 | 3 | [] | no_license | <?php
namespace sihd\Game;
use PHPUnit\Framework\TestCase;
/**
* Test cases for class Guess.
*/
class DiceTest extends TestCase
{
public function testRoll()
{
$dice = new Dice();
$this->assertInstanceOf("\sihd\Game\Dice", $dice);
$res = $dice->roll();
$exp = $dice->getLastRol... | true |
273f0e9854c14b83f8bf1db54c42b441125a7b78 | PHP | larizarg/School-Administration | /loggedIn/marks/enterScore.php | UTF-8 | 3,126 | 2.9375 | 3 | [] | no_license | <?php
require_once '../../webdev/php/Generators/HTMLGenerator/Generator.php';
require_once '../../webdev/php/Classes/Messages.php';
require_once '../../webdev/php/Classes/ClassPerson.php';
$HTML = new HTMLGenertator\HTMLfile('Enter score for a test', ['marks.css', 'form.css'], NULL, NULL, 1);
$HTML->outputHeader();
if... | true |
d8056fd03e357fe357eaa962ed0c0abe25972f53 | PHP | nbtscommunity/phpfnlib | /mime/header.php | UTF-8 | 712 | 3.15625 | 3 | [] | no_license | <?php
function mime_parse_header($s) {
$lines = explode("\n", str_replace("\r", "", $s));
$o = array();
foreach($lines as $line) {
if(strspn($line, " \t")) {
$o[count($o) - 1] .= str_replace("\t", " ", $line);
} else {
$o[] = $line;
}
}
$lines = array();
foreach($o as $line) {
$temp = ... | true |
08ed1ee078c560dafbaae6ed1880949d2e2d78c4 | PHP | abiusx/php-emul | /samples/sample-constructor.php | UTF-8 | 270 | 3.15625 | 3 | [] | no_license | <?php
class Base {
function __construct($arg1=5,$arg2=10)
{
echo "Base::construct\n";
var_dump($arg1,$arg2);
print_r(func_get_args());
}
}
class Extend extends Base {
// function __construct()
// {
// echo "Extend::construct\n";
// }
}
$x=new Extend;
| true |
5295856c6b121570c7ce5a176ff32268b46e7ddd | PHP | mkungla/aframe-php | /src/Extras/Primitives/Objmodel.php | UTF-8 | 1,965 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/** @formatter:off
* ******************************************************************
* Created by Marko Kungla on Jul 7, 2016 - 9:24:33 PM
* Contact marko@okramlabs.com
* @copyright 2016 Marko Kungla - https://github.com/mkungla
* @license The MIT License (MIT)
*
* @category AframeVR... | true |
77d948cb96e13a091d11239f80fab33b4db93761 | PHP | bmunyoki/mpesa | /src/Mpesa.php | UTF-8 | 11,779 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Bmunyoki\Mpesa;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Cache;
class Mpesa {
public $environment;
private $baseUrl;
public $consumerKey;
public $consumerSecret;
private $cred;
private $accessToken;
/**
* Constructor method
*
... | true |
56875b59ab475e038bb7e1b3890b900aed654494 | PHP | dbeurive/backend | /src/Cli/Adapter/Database/Connector/AbstractConnector.php | UTF-8 | 4,206 | 3.171875 | 3 | [] | no_license | <?php
/**
* This file implements the base class for all "connectors".
*
* Connectors are just very thin wrappers around a low-level database handler, such as PDO or mysqli.
* A connector performs the following actions:
* * It exports the configuration's parameters required to initialise the low-level database h... | true |
167230094e24ad47e2b54fb957ce213427aea7b6 | PHP | tomk79/broccoli-module-std-document | /php/utils.php | UTF-8 | 711 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* broccoli-html-editor fields
*/
namespace tomk79\broccoliModuleStdDocument;
/**
* Utilities
*
* @author Tomoya Koyanagi <tomk79@gmail.com>
*/
class utils{
/**
* Dropped File Operator
*/
static function droppedFileOperator( $type, $options = array() ){
if( is_array($options) || is_object( $opt... | true |
11b2d30218fdf87d1574dd53c7eefafe978b5068 | PHP | devsmt/bin_tools | /compile | UTF-8 | 1,438 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | #!/usr/bin/env php
<?php
declare(strict_types=1);//php7.0+, will throw a catchable exception if call typehints and returns do not match declaration
/*
// TODO: typescript
*/
declare (strict_types = 1);
require_once __DIR__ . '/Utils.php';
function e(string $cmd) {
echo "cmd: " . $cmd . "\n";
echo $r = `$cmd` . ... | true |