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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c83e4b3a5d7f7d6f1c90a34948561bc1f209c02e | PHP | leadscloud/seo-cms | /Kiss/importLocoy.php | UTF-8 | 7,222 | 2.546875 | 3 | [] | no_license | <?php
/**
* #从火车头的access数据库导入到db中。v2.2013.1.8
*
* Release Notes
* =============
* -感谢晓东贡献修正非英语语种乱码问题到方法:找到php.ini。看看是否有extension=php_com_dotnet.dll,如果没有则添加,如果被注释,则取消注释,然后重启apche
* -感谢晓东改进:文章乱序功能。即使采集的时候词是挨着的,导入到db到时候顺序也被打乱。
* -从V2开始,Kiss全面兼容WP,增加了postname字段,新版db请用新版Kiss解析,不要弄错版本。
* -当$dbname存在时,采用追加方式。... | true |
c925965d124df39948b1dd25b5917b6e8c59f00d | PHP | mediatorviolet/Retravailler.re | /src/functions/inscription_atelier.php | UTF-8 | 2,463 | 2.84375 | 3 | [] | no_license | <?php
/**
*
* Fonction qui gère l'inscription d'un utilisateur à un atelier
*
*/
$count_err = 0;
function inscriptionAtelier()
{
if (isset($_POST['inscription_atelier'])) { // On vérifie que l'utilisateur à cliqué sur le bouton 'inscription_atelier'
global $count_err;
// On vérifie que le $_... | true |
8c6e7d889de702fa3ed79b79f2566fae5495bab4 | PHP | xdubois/simpleReader | /website/app/controllers/ArticleController.php | UTF-8 | 1,966 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
class ArticleController extends AuthorizedController {
/**
* Display a listing of the resource.
* GET /article
*
* @return Response
*/
public function index() {
$items = $this->user->getAllArticles();
$id = 'all';
return View::make('front.articles.index', compact('items', 'id'));
}
/**
* ... | true |
ff37ca7ea0778162ba2fd8d99aad914600d6f352 | PHP | pkmed/CodersParty.PhoneBookWeb | /functions/edit.php | UTF-8 | 863 | 2.828125 | 3 | [] | no_license | <?php
error_reporting (E_ERROR);
require_once '../database.php';
if($_GET['name']!=null){
if(preg_match("/[a-z]/i", $_GET['number'])){
print "number contains letters!";
goto form;
} else {
editPhone($_GET['id'],$_GET['name'],$_GET['number'],$_GET['address']);
header("Location: ../index.php");
}
} else ... | true |
8d05dc2a37bef09bf587eb311dcc95226c70752a | PHP | damienalexandre/soap-client | /src/Phpro/SoapClient/Exception/UnexpectedConfigurationException.php | UTF-8 | 527 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Phpro\SoapClient\Exception;
class UnexpectedConfigurationException extends RuntimeException
{
public static function expectedTypeButGot(string $configurationKey, string $expectedType, $value): self
{
throw new self(
sprintf(
'Invali... | true |
5338bfe0279cc0960f66b0026a17f20be87395e0 | PHP | Gimcrack/aptitude-jeremy-w-framework | /framework/protected/Libs/Singleton.php | UTF-8 | 529 | 3.046875 | 3 | [] | no_license | <?php
abstract class Singleton {
protected static $instances = array();
public static function getInstance() {
$class = get_called_class();
if (!isset (static::$instances[$class])) {
$obj = static::$instances[$class] = new $class();
call_user_func_array(array($obj, 'init'), func_get_args());
}
... | true |
9a692acb689b722a8e19dc3f808cec0b22942b7c | PHP | patrickjahns/annotations | /lib/Doctrine/Annotations/Metadata/PropertyMetadata.php | UTF-8 | 1,572 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Doctrine\Annotations\Metadata;
/**
* Property metadata represents information about the definition of a single property of an annotation, it's name,
* accepted types, whether it's required and whether it's default.
*/
final class PropertyMetadata
{
/** @var string */
... | true |
3496665042b47bd9353a3e86cf27cddfab3bd184 | PHP | NuffZetPand0ra/sdv-datetime | /src/Date.php | UTF-8 | 234 | 2.828125 | 3 | [] | no_license | <?php
namespace nuffy\SDV;
class Date extends DateTime{
public function __tooString() : string
{
return $this->format("y-m-d");
}
public function diff($input){
return parent::diffDays($input);
}
} | true |
0ed2b8e00900ee13b75d8bd8134c5b3a939c9ec2 | PHP | solomongbadamosi/quizyclopedia | /application/core/MY_Model.php | UTF-8 | 6,299 | 2.671875 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class My_Model extends CI_Model{
static $table_name;
static $table_pk;
static $table_index;
static $order_by;
static $timestamps = FALSE;
static $pk;
function __construct() {
parent::__construct();
}... | true |
a5b699f6b46e70eb7f1615e7b47cf7772fa38e62 | PHP | woocart/defaults | /src/classes/Importers/WooTaxesValue.php | UTF-8 | 1,369 | 2.796875 | 3 | [] | no_license | <?php
namespace Niteo\WooCart\Defaults\Importers {
use Niteo\WooCart\Defaults\Value;
/**
* Class WooTaxesValue
*
* @package Niteo\WooCart\Defaults\Importers
*/
class WooTaxesValue extends Value {
/**
* Return Locations array.
*
* @return iterable
*/
public function getLocations(): iterabl... | true |
acefdbb08f6f9515fdb01e7a294bd7d286e77341 | PHP | maintainable/framework | /vendor/Mad/View/Helper/Date.php | UTF-8 | 3,670 | 2.890625 | 3 | [] | no_license | <?php
/**
* @category Mad
* @package Mad_View
* @subpackage Helper
* @copyright (c) 2007-2009 Maintainable Software, LLC
* @license http://opensource.org/licenses/bsd-license.php BSD
*/
/**
* @category Mad
* @package Mad_View
* @subpackage Helper
* @copyright (c) 2007-2009 Maintainable Softwar... | true |
f3cb3ba73aa261f50b9b961e581fca7f8e26fd65 | PHP | Sywooch/qbeckson | /models/DirectoryOrganizationForm.php | UTF-8 | 1,101 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "directory_organization_form".
*
* @property integer $id
* @property string $name
* @property integer $is_separator
* @property integer $is_active
*/
class DirectoryOrganizationForm extends \yii\db\ActiveRecord
{
/**
* @inhe... | true |
b9e5aa19cc8f8435196b4c7ddfa1219a06f3ebe4 | PHP | magicbug/Cloudlog | /application/models/LotwCert.php | UTF-8 | 3,728 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class LotwCert extends CI_Model {
/*
|--------------------------------------------------------------------------
| Function: lotw_certs
|--------------------------------------------------------------------------
|
| Returns all lotw_certs for a selected user via the $user_id parameter
|
*/
function lot... | true |
e36f50e82ecaf2379bcda5078f91aaf581501542 | PHP | yoterri/Com | /src/Util/MaxUploadFileSize.php | UTF-8 | 3,254 | 3.21875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Com\Util;
class MaxUploadFileSize
{
protected static $_value = null;
/**
* Detects max size of file cab be uploaded to server
*
* Based on php.ini parameters “upload_max_filesize”, “post_max_size” &
* “memory_limit”. Valid for single file upload form. May be used
* as... | true |
d926bb925ab2b474026e2692d176557ac131ab33 | PHP | Natansab/Camagru | /config/setup.php | UTF-8 | 1,418 | 2.59375 | 3 | [] | no_license | <?php
require_once('./database.php');
$dbh = new PDO('mysql:host=localhost', $DB_USER, $DB_PASSWORD);
// Create dbbase if note exist
$sql = "CREATE DATABASE IF NOT EXISTS camagru_db";
$dbh->exec( $sql );
$dbh = null;
try {
$dbh = new PDO($DB_DSN, $DB_USER, $DB_PASSWORD);
$dbh->setAttribute(PDO::ATTR_ERRMODE,... | true |
f60c077484dfeffb98f63a0fdcc84375fbe7901f | PHP | Azure/azure-mysql | /AKS-Demos/WordPress-Demo/Code/public/wp-includes/ms-settings.php | UTF-8 | 4,124 | 2.5625 | 3 | [
"MIT",
"GPL-1.0-or-later",
"GPL-2.0-only",
"GPL-2.0-or-later",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Used to set up and fix common variables and include
* the Multisite procedural and class library.
*
* Allows for some configuration in wp-config.php (see ms-default-constants.php)
*
* @package WordPress
* @subpackage Multisite
* @since 3.0.0
*/
/**
* Objects representing the current network and c... | true |
fd0d85041cde51f92755d45edb838373b360b72c | PHP | alejo8591/cymetria-php | /lab1/lab1-4/Motocycle.php | UTF-8 | 333 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/** Incluyendo clase Vehicle */
include('Vehicle.php');
class Motorcycle extends Vehicle
{
}
$moto = new Motorcycle;
$moto->color = "blue";
$moto->num_doors = 0;
$moto->price = "4.000.645";
$moto->nid = "BUV88C";
$moto->brand = "AKT";
$moto->numDoors();
$moto->showPrice();
$moto->showNid();
$moto->show... | true |
cac56b9801b9052f38edc77a82946caf9263eab4 | PHP | bassix/voucher-service | /app/src/Service/OrderVoucherService.php | UTF-8 | 2,360 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Service;
use App\Entity\OrderEntity;
use App\Repository\OrderRepository;
use App\Repository\VoucherRepository;
use Doctrine\ORM\EntityManagerInterface;
use Psr\Log\LoggerInterface;
class OrderVoucherService extends AbstractService
{
private OrderService $orderService;... | true |
1781a87741df78b4633c27cf98644ce95f3594dc | PHP | abdiiwan1841/workflow-engine | /BusinessModel/Form.php | UTF-8 | 15,889 | 2.65625 | 3 | [] | no_license | <?php
namespace BusinessModel;
class Form extends FieldFactory
{
private $stepId;
private $objMysql;
private $workflowId;
private $fieldId;
/**
*
* @param type $stepId
* @param type $workflowId
*/
public function __construct (\Task $objTask = null, \Workflow $objWorkflow... | true |
830c7be5cf5fda2568081b74c3505860ee8975e2 | PHP | olegmitrakhovich/INT322 | /sqlid.php | UTF-8 | 437 | 2.625 | 3 | [] | no_license | <?php
$cxn = mysqli_connect("db-mysql.zenit", "int322_163d06", "PASSWORD", "int322_163d06");
if (mysqli_connect_errno()){
echo "Conecction Failed: " . mysqli_connect_error();
}
$sql_query= "ALTER TABLE 'orders' ADD 'id' INT NOT NULL AUTO_INCREMENT PRIMARY KEY";
if (mysqli_query($cxn, $sql_query))
{
echo "Ta... | true |
32734b1d43ee159d8ca75491cb588bc67d64d625 | PHP | programmerPatient/swoole-chat | /common/func/Log.php | UTF-8 | 781 | 2.703125 | 3 | [] | no_license | <?php
namespace app\common\Func;
define("APP_PATH",str_replace("\\","/",dirname(dirname(__DIR__))));
/**
* 日志管理
* Class Log
* @package common
*/
class Log
{
/**
* 日志路径
* @var string
*/
static $logPath = APP_PATH."/Log/";
public static function write($type,$message,$info = array())
... | true |
67c5fa2d1b295ecb798bb65ab073527946e913f3 | PHP | oligriffiths/gunit | /src/PHPUnit/Constraint/StatusCode.php | UTF-8 | 962 | 2.9375 | 3 | [] | no_license | <?php
namespace OliGriffiths\GUnit\PHPUnit\Constraint;
use OliGriffiths\GUnit\Guzzle;
/**
* StatusCode constraint is used to validate an HTTP status code
*/
class StatusCode extends AbstractConstraint
{
/**
* StatusCode constructor, sets the name
*
* @param mixed $expected The expected status co... | true |
e31c6936137cb305b1bcf99c9580523bed99e47f | PHP | stee1cat/archi-delivery | /src/ArchiDelivery/Response/XML.php | UTF-8 | 1,357 | 3.046875 | 3 | [] | no_license | <?php
/**
* @package archi-delivery
* @author Gennadiy Khatuntsev <e.steelcat@gmail.com>
* @link https://github.com/stee1cat/archi-delivery
*/
namespace ArchiDelivery\Response;
use ArchiDelivery\Response;
use SimpleXMLElement;
/**
* Class XML
* @package ArchiDelivery\Response
*/
class XML implements Response... | true |
b00bd9cdb22483d032d39d78c31671ff2de36cd9 | PHP | ThoDinhTien/php-first-project | /profileupdate.php | UTF-8 | 2,525 | 2.703125 | 3 | [] | no_license | <?php session_start(); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Cập Nhật Thông Tin</title>
</head>
<body>
<?php
$tk=$_SESSION['tk'];
include 'admin/include/connect.php';
$query="SELECT * FRom khachhang WHERE tk='$tk'";
$result=mysqli_query($conn,$query);
while ($user=mysqli_fetc... | true |
fb5d6e1a3b142050fbde34bbcab29583abf59db7 | PHP | derek-lu/Entitlement-Admin | /php/getUsers.php | UTF-8 | 1,348 | 2.859375 | 3 | [] | no_license | <?php
require_once "settings.php";
require_once "utils.php";
// ini_set('display_errors', 1);
$guid = escapeURLData($_POST["guid"]);
$csrfToken = escapeURLData($_POST["csrfToken"]);
$mysqli = new mysqli($db_host, $db_user, $db_password, $db_name);
if (!isValidCsrfToken($mysqli, $guid, $csrfToken)) {
echo '{"succes... | true |
a148efa2c510b37007606df3a44c082492d605c7 | PHP | WSFG/The-geek | /app/Image.php | UTF-8 | 1,083 | 2.6875 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Image extends Model
{
public $table = 'image';
protected $fillable = [
'id', 'path'
];
public static function setMainPhoto($file, $category, $id)
{
if ($file) {
$file_name = time().'_'.$file->getClien... | true |
2a3e4ddcf4861c94625b330fd1bed31a12d12e3c | PHP | OrionDB/F-TDA | /F-TDA/src/php/login.php | UTF-8 | 1,763 | 2.515625 | 3 | [] | no_license | <?php
/*
Author : Yvan Cochet
Summary : page with the form to log in
Date : 20.04.2016
*/
//Include page class and create new dbAccess object
include('../class/dbAccess.php');
$dbAccess = new dbAccess();
//Start the session to get $_SESSION
session_start();
?>
<!DOCTYPE html>
<html>
<head la... | true |
f0af72c6c212827acb3787c9a1047da0521f7f2d | PHP | ilivanoff/www | /postupayu.ru/www/kit/core/database/beans/FoldingBean.php | UTF-8 | 3,790 | 2.796875 | 3 | [] | no_license | <?php
/**
* Базовый бин для работы с фолдингами. Чтобы не плодить экземпляры,
* мы будем использовать один единственный бин, а фолдинги, с которыми мы работаем,
* передавать внутрь.
*
* @author Admin
*/
final class FoldingBean extends BaseBean {
/**
* Метод возвращает идентификаторы данного фолдинга, х... | true |
c9862f5937dcf4aea099e64789f69f7d123df35b | PHP | MikaFilleul/forum_2018 | /ajoutUtilisateur.php | UTF-8 | 2,734 | 2.6875 | 3 | [] | no_license | <?php
if(!isset($_SERVER['REQUEST_METHOD']) || !is_string($_SERVER['REQUEST_METHOD']) || $_SERVER['REQUEST_METHOD'] !== 'POST')
{
header('Location: inscrition.php');
exit;
}
session_start();
unset($_SESSION['message']);
if ( isset($_POST['login']) && isset($_POST['pseudo']) && ... | true |
446b8159a0d05d85588bfdb08da671002e85e4d7 | PHP | YannVogel/OpenclassroomsProject4 | /view/adminView.php | UTF-8 | 1,540 | 2.8125 | 3 | [] | no_license | <?php
use Project\Controller\AdminUserController;
use Project\Controller\AdminPostController;
$myAdmin = new AdminUserController();
//This page only displays if the user is logged in AS AN ADMIN
if(isset($_SESSION['nickname']) AND isset($_SESSION['password']) AND $myAdmin->isUserAnAdmin($_SESSION['nickname'], $_SESSI... | true |
caa9af28b6e5015c7331fa9eddea44c87ceb6ba7 | PHP | Bronskiy/shelton | /app/Http/Controllers/Admin/LanguageController.php | UTF-8 | 2,404 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Redirect;
use Schema;
use App\Language;
use App\Http\Requests\CreateLanguageRequest;
use App\Http\Requests\UpdateLanguageRequest;
use Illuminate\Http\Request;
class LanguageController extends Controller {
/**
* Display a listi... | true |
e05aa12804ec78514bde8a6fdf082be809bd8458 | PHP | eaforlife/homeyoutubelikeplayer | /login.php | UTF-8 | 7,133 | 2.609375 | 3 | [] | no_license | <?php
session_start();
if(isset($_SESSION['result'])) {
unset($_SESSION['result']);
}
if(isset($_SESSION['user_name']) && isset($_SESSION['user_level'])) {
$rng = rand(10000,99999);
$_SESSION['user_name'] = "anonymous".$rng;
unset($_SESSION['user_level']);
}
/* NECESSARY HEADER */
$usn = $pwd = $email ... | true |
7b0c08bb321d62324b61da94a647c8e1745b33a8 | PHP | QoboLtd/cakephp-csv-migrations | /tests/TestCase/Event/EventTest.php | UTF-8 | 3,997 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace CsvMigrations\Test\TestCase\Event;
use Cake\TestSuite\IntegrationTestCase;
use RecursiveDirectoryIterator;
use RecursiveIteratorIterator;
use RecursiveRegexIterator;
use ReflectionClass;
use RegexIterator;
class EventTest extends IntegrationTestCase
{
/**
* @var string $dir Path to look for ... | true |
3a8964c052c2fb18f09061e4a69669f137f37e50 | PHP | mrtnmrk/RESTAPI | /github_repo.class.php | UTF-8 | 3,023 | 2.984375 | 3 | [] | no_license | <?php
require_once('repository.class.php'); //should be autoloaded
/**
* Class for working with GitHub repository through it's API
* Currently used only for searching
* @author Martin Marek
* @version 1.337
* @license CC BY-SA 2.0 https://creativecommons.org/licenses/by-sa/2.0/
*/
class github_repo extends ... | true |
1114ae267ed7933b9c65e7da0edad86487e5bc2f | PHP | Mihir-Chauhan-7/php | /Document Practice/q1.php | UTF-8 | 349 | 3.34375 | 3 | [] | no_license | <?php
if(isset($_GET['no']) && !empty($_GET['no']))
{
$no = $_GET['no'];
$fact = 1;
for ($i = $no; $i > 0; $i--) {
$fact = $fact * $i;
}
echo "Factorial of ".$no." is : ".$fact;
}
else
{
echo "Please Enter Valid Number";
}
?>
<form>
<input type="text" name="no">
<input type="submit" name="s... | true |
3b991cb22e19ffa4aac55d30e9c8ba4206755765 | PHP | soitun/microweber | /src/MicroweberPackages/User/Notifications/NewRegistrationAdminNotification.php | UTF-8 | 2,021 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace MicroweberPackages\User\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Messages\MailMessage;
use Illuminate\Notifications\Notification;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use MicroweberP... | true |
34ed503dc8dc2571115dba40308d5b851f89e48d | PHP | jskarpe/RestEncoder | /src/Yuav/RestEncoderBundle/Processor/MediaFileProcessor.php | UTF-8 | 1,701 | 2.75 | 3 | [] | no_license | <?php
namespace Yuav\RestEncoderBundle\Processor;
use Yuav\RestEncoderBundle\Entity\MediaFile;
class MediaFileProcessor
{
/**
* Analyze media file
*
* @param string $input
* Path to medialfile
* @return MediaFile
*/
public function process($inputFile)
{
$... | true |
53688bffd8755ac6e1f04ddd3f8133f0b2c1da81 | PHP | WildCodeSchool/orleans-php-202009-livecoding-bellaciao | /src/Model/GameManager.php | UTF-8 | 1,254 | 3 | 3 | [] | no_license | <?php
namespace App\Model;
class GameManager extends AbstractManager
{
public const TABLE = 'game';
/**
* Initializes this class.
*/
public function __construct()
{
parent::__construct(self::TABLE);
}
public function selectWithCategory()
{
return $this->pdo->qu... | true |
4a304f352c256c8a1e771e7899abd3500c27ac76 | PHP | SphereMall/PHP-MS-Client | /src/Lib/Elastic/Aggregations/Traits/MetricAggregation.php | UTF-8 | 894 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Davidych
* Date: 25.02.19
* Time: 17:23
*/
namespace SphereMall\MS\Lib\Elastic\Aggregations\Traits;
/**
* Trait MetricAggregation
*
* @package SphereMall\MS\Lib\Elastic\Aggregations\Traits
*/
trait MetricAggregation
{
private $field = null;
/**
* MetricA... | true |
8cde2c442384d9724d2a96f8131037a8eafeaa80 | PHP | Fraz0r/P3 | /lib/P3/Routing/Map.php | UTF-8 | 8,502 | 2.859375 | 3 | [] | no_license | <?php
namespace P3\Routing;
use P3\Routed\Route;
/**
* The Routing Map is used by app/routes.php to load routes into the Routing Engine
*
* Please see wiki pages for information on Routing.
*
* @author Tim Frazier <tim.frazier at gmail.com>
* @package P3\Routing
* @version $Id$
*/
class Map
{
//- attr-... | true |
d9065cec21aec55c225c443cc0d180b892e42255 | PHP | david-garage/garage_ericsson | /html/test.php | UTF-8 | 521 | 2.6875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Titre</title>
</head>
<Body>
<h1>TIRE 1</h1>
<p>en dessous du titre 1<br />
<?php echo "ceci est du php \n";
$age = 23;
echo" j'ai $age ans ";
?>
</p>
<h2>TITRE 2</h2>
<p>test de lien vers <a href="index.html">index</... | true |
7a58cfd203d710ead6dc0a792b23428efe9526ca | PHP | HamzaFillai/Biblio-app | /register.php | UTF-8 | 2,744 | 2.640625 | 3 | [] | no_license | <?php
$bdd = new PDO('mysql:host=localhost;dbname=biblio;charset=utf8', 'root', '');
if(isset($_POST["username"]) && isset($_POST["pass"]) && isset($_POST["cin"]) && isset($_POST["phone"]) && isset($_POST["mail"]) && isset($_POST["adresse"]))
{
$res=$bdd->prepare("SELECT * FROM users where username=?");
$res->execute... | true |
ed8ed9e74ae5c2cefff6d3ab6936c6392412b3c1 | PHP | jqhph/framework-lxh | /src/kernel/Admin/Form/Field/Currency.php | UTF-8 | 402 | 2.578125 | 3 | [] | no_license | <?php
namespace Lxh\Admin\Form\Field;
class Currency extends Text
{
protected $symbol = '$';
public function symbol($symbol)
{
$this->symbol = $symbol;
return $this;
}
public function prepare($value)
{
return (float) $value;
}
public function render()
{
... | true |
76f2836c6a1ebb7401168f34fc989b580fa53fcd | PHP | zeidanbm/laravel-nova-lms | /app/Jobs/ProcessImages.php | UTF-8 | 1,996 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Jobs;
use App\Models\Cover;
use Illuminate\Bus\Queueable;
use Illuminate\Support\Facades\DB;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\Storage;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
us... | true |
e0f61fefde31e340e62125c6920cfebb24fe4625 | PHP | EarlMegget21/BeerOverflow | /model/ModelCateBiere.php | UTF-8 | 690 | 2.984375 | 3 | [] | no_license | <?php
/**
*
*/
class ModelCateBiere extends Model
{
/**
* @var int
*/
private $idBiere;
/**
* @var int
*/
private $idCategorie;
protected static $object='catebiere';
//protected static $primary='id';
/**
* ModelCateBiere constructor.
* @param int $idBie... | true |
9bd6e8ca483e8eaf80cb0ef2db5328466f6284a6 | PHP | c9s/CLIFramework | /src/CommandGroup.php | UTF-8 | 1,361 | 3.046875 | 3 | [
"BSD-4-Clause-UC"
] | permissive | <?php
namespace CLIFramework;
use CLIFramework\Command;
use CLIFramework\CommandBase;
class CommandGroup
{
public $id;
public $name;
public $desc;
public $commands = array();
public $isHidden = false;
public function __construct($groupName, $commands = array())
{
$this->name =... | true |
01e5542d5770875df37287d6b6cfa370224b3194 | PHP | AlchemicA/MateriaArchive | /Data/Storages/FlatFile/FlatFile.php | UTF-8 | 18,041 | 2.859375 | 3 | [] | no_license | <?php
namespace Materia\Data\Storages;
/**
* Flat file storage class
*
* @package Materia.Data
* @author Filippo "Pirosauro" Bovo
* @link http://lab.alchemica.it/materia/
**/
class FlatFile extends Storage {
const FILE_READ = 1;
const FILE_WRITE = 2;
const FILE_APPEND = 3;
... | true |
a82450f295a1b41e8f12c08bb8fed86a96f079b3 | PHP | bz4work/reStat_v1_1 | /model/DB.php | UTF-8 | 1,002 | 2.84375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Slava
* Date: 04.05.2016
* Time: 13:44
*/
class DB{
static private $_db = null;
private function __construct(){
}
private function __clone(){
}
/**
* @return mysqli|null
* @throws Exception
*/
static public function getDB()
... | true |
8dbf12ab30013a1c09201527f1079e357a0acd3c | PHP | oyaizu-s/cloud9-git-demo | /bookshelf_memo.php | UTF-8 | 1,551 | 2.53125 | 3 | [] | no_license | <?php
// htmlspecialchars関数を実行するだけの関数 h() を定義
function h($str) {
return htmlspecialchars($str, ENT_QUOTES, 'UTF-8');
}
$id = $_GET["book_id"];
?>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>Bookshelf | カンタン!あなたのオンライン本棚</title>
<link... | true |
57b4ea9636c530f1f1dd913c10697ce559fb95fb | PHP | inunosinsi/soycms | /cms/soyshop/webapp/src/module/plugins/item_stock_manager/page/StockManagerPage.class.php | UTF-8 | 8,257 | 2.515625 | 3 | [] | no_license | <?php
class StockManagerPage extends WebPage{
private $configObj;
private $itemDao;
private $limit = 15;
function __construct(){
$this->itemDao = SOY2DAOFactory::create("shop.SOYShop_ItemDAO");
if(isset($_POST["search_number"])) $this->limit = (int)$_POST["search_number"];
}
function doPost(){
if(soy2... | true |
edd53f4486611087020c35c9c778e502c5d8a324 | PHP | AgencyPMG/Webstalk | /src/PMG/Webstalk/Entity/DefaultTubeList.php | UTF-8 | 1,145 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* This File is Part of Webstalk
*
* @since 1.0
* @package PMG\Webstalk
* @copyright 2014 PMG <http://pmg.co>
* @license http://opensource.org/licenses/Apache-2.0 Apache-2.0
*/
namespace PMG\Webstalk\Entity;
/**
* The default implementation of TubeList.
*
* @since 1.0
* @author ... | true |
f0e33e170e7dc87b7f94b05de5572b95caef6b24 | PHP | hive-school/dmitriy-shumitskiy | /symfony/src/BionicUniversity/UserBundle/Entity/Post.php | UTF-8 | 3,613 | 2.65625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace BionicUniversity\UserBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Post
*/
class Post
{
/**
* @var integer
*/
private $id;
/**
* @var string
*/
private $text;
/**
* @var string
*/
private $theme;
/**
* @var \DateTime
*/
... | true |
1c1d15259df43149929a058cf6cd27eb6f963c0a | PHP | ppeponcio/web | /frontend/models/Fila.php | UTF-8 | 1,358 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "fila".
*
* @property integer $idFila
* @property string $nombreFila
* @property integer $idSala
*
* @property Asiento[] $asientos
* @property Sala $idSala0
*/
class Fila extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
... | true |
1239eeded32f773762bee45f8b47ef032965cfaa | PHP | cikaldev/php-json-storage | /tests/StorageTest.php | UTF-8 | 5,967 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
require __DIR__ . '/../src/Storage/Storage.php';
define('TESTING_STORE', __DIR__ . DIRECTORY_SEPARATOR . 'test.json');
use PHPUnit\Framework\TestCase;
use Cikal\Storage\Storage;
class StorageTest extends TestCase
{
protected $store;
protected $single_dummy;
protected $batch_dummy;
public functi... | true |
ca37b8fa2493213434956accd4c41eff0d689ffa | PHP | July-c/hundred | /vendor/qcloud/cos-sdk-v5/src/Guzzle/Plugin/Cookie/CookieJar/CookieJarInterface.php | UTF-8 | 3,092 | 2.859375 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
namespace Guzzle\Plugin\Cookie\CookieJar;
use Guzzle\Plugin\Cookie\Cookie;
use Guzzle\Http\Message\RequestInterface;
use Guzzle\Http\Message\Response;
/**
* Interface for persisting cookies
*/
interface CookieJarInterface extends \Countable, \IteratorAggregate
{
/**
* Rem... | true |
752d26f3eb88349f5a81d063d34d2ff11c1d4d3f | PHP | leadvertex/plugin-component-translations | /src/Commands/CrawlerCommand.php | UTF-8 | 3,429 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created for plugin-component-translations
* Datetime: 17.02.2020 18:59
* @author Timur Kasumov aka XAKEPEHOK
*/
namespace Leadvertex\Plugin\Components\Translations\Commands;
use Adbar\Dot;
use HaydenPierce\ClassFinder\ClassFinder;
use Leadvertex\Plugin\Components\Translations\Components\Helper;
use P... | true |
92a5aaadd91e94706d844094147cf06c988c67d8 | PHP | GenaP/music | /mysql_connect.php | UTF-8 | 550 | 2.546875 | 3 | [] | no_license | <?php
define('DB_DRIVER','mysql');
define('DB_HOST','localhost');
define('DB_NAME','test');
define('DB_USER','root');
define('DB_PASS','gfyuty');
try
{
$connect_str = DB_DRIVER . ':host='. DB_HOST . ';dbname=' . DB_NAME;
$db = new PDO($connect_str,DB_USER,DB_PASS);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_... | true |
01359510213275a66003ab681cc2b94e4e55f8a5 | PHP | Th3Mouk/coding-standard-php | /tests/Youdot/Sniffs/NamingConventions/data/wrongVariableName.php | UTF-8 | 415 | 3.0625 | 3 | [] | no_license | <?php
$totoTest = true;
class Foo {
public static $yoloTest;
}
class Bar extends Foo {
private $totoMachin;
private $totoMachinTruc;
private $_toto_truc;
private $biduleUUID;
public function __construct()
{
$this->totoMachin = 'truc';
}
public function trySomething(strin... | true |
eef264012ded643a1dbef96fc08011d85ae5edfc | PHP | toann123/franchise2.0 | /libs/Controller/DefaultController.php | UTF-8 | 1,814 | 2.5625 | 3 | [] | no_license | <?php
/** @package AuthExample::Controller */
/** import supporting libraries */
require_once ("AppBaseController.php");
require_once ("UserController.php");
/**
* DefaultController is the entry point to the application
*
* @package AuthExample::Controller
* @author ClassBuilder
* @version 1.0
*/
class DefaultCo... | true |
86299712d9bd6732f8e774ea667774d6a852a4d9 | PHP | mosabbirrakib/edubd | /app/Http/Controllers/Backend/TimeSlotController.php | UTF-8 | 2,040 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Backend;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\TimeSlot;
class TimeSlotController extends Controller
{
public function __construct()
{
//$this->middleware('auth:admin');
}
public function index(){
$time_... | true |
8c0241298052dda03740d91adb46a911b66b30e2 | PHP | jedgarf/NEUST_Tabulating_System | /theme/templates/server/events/controller.php | UTF-8 | 1,630 | 2.65625 | 3 | [] | no_license | <?php
include('../../server/events/model.php');
class EventCtrl {
public static function create($data){
if(isset($data['eventname']) && empty($data['eventname'])){
return print json_encode(array('success'=>false,'status'=>400,'msg'=>'Activity Name is required'));
}
if(isset($data['eventdescription']) && em... | true |
e8cf95ce5bb1a49971123e0e2e33fab8b336adae | PHP | maxym16/ConnectingTalents | /frontend/views/notific/index0.php | UTF-8 | 1,449 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
$date=date('Y-m-d H:i:s');
$i=60;
$h=60*60;
$d=60*60*24;
$m=60*60*24*30;
$y=60*60*24*365;
$nom=0;
?>
<br>
<h2>Notification</h2>
<?php
//debug($idea);
echo date('Y-m-d H:i:s');
?>
<p>Number of notifications :
<?= $cidea ?>
</p>
<p> </p>
<br>
<div class="container">
<table>
<?php
foreach ($idea... | true |
4ccb576426312337d9a4c70a89395ed71cfbc9e1 | PHP | iamMarkchu/www.mcgoldfish.com | /database/migrations/2017_12_27_073728_create_page_visits_table.php | UTF-8 | 850 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePageVisitsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('page_visits'... | true |
ecaa375c83efdd49ab75467d3b54411b58209ceb | PHP | manafkh/testing | /app/Http/Controllers/SectionController.php | UTF-8 | 1,031 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Section;
use Illuminate\Http\Request;
use Laracasts\Flash\Flash;
class SectionController extends Controller
{
public function index(Request $request)
{
$sections = Section::all();
return view('sections.index')
->with('sections', $sect... | true |
0c5eacb963f86cb0dc17eb5c634dc585b578aea4 | PHP | watoki/curir | /src/delivery/WebRouter.php | UTF-8 | 2,633 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace watoki\curir\delivery;
use watoki\deli\Path;
use watoki\deli\Request;
use watoki\deli\router\StaticRouter;
use watoki\deli\router\TargetNotFoundException;
use watoki\deli\Target;
use watoki\deli\target\TargetFactory;
use watoki\factory\Factory;
use watoki\stores\stores\FlatFileStore;
class WebRouter e... | true |
22d3c3971cafd62c60082072edb43734f9905c78 | PHP | Nathaniella/PracticasPHP | /CursoPhp_III UNI/archivo2.php | UTF-8 | 504 | 2.640625 | 3 | [] | no_license | <?php
setcookie("usuario",$_POST["nombre"],time()+3600);
?>
<?php
session_start();
?>
<!Doctype html>
<html lang="es">
<head>
<meta charset = "utf-8"/>
<title>Guardar la sesion </title>
<meta name="description" content="" />
</head>
<body>
<h1>Guardando</h1>
<p>Dos valores seran guardados </p>
<?php
... | true |
f6375bda3b42c76914f4344239364ccbfdbecf65 | PHP | e-kikai/newsystems | /models/Contact.php | UTF-8 | 23,005 | 2.71875 | 3 | [] | no_license | <?php
/**
* お問い合せモデルクラス
*
* @access public
* @author 川端洋平
* @version 0.0.4
* @since 2012/04/13
*/
class Contact extends Zend_Db_Table_Abstract
{
protected $_name = 'contacts';
protected $_mailsend;
function __construct()
{
/// メールサーバ設定 ///
$conf = new Zend_Config_Ini(APP_PAT... | true |
246f301f6677f5235761e4f7164a5595923dd171 | PHP | gamringer/EmyliePHP | /src/Routing/Routes.php | UTF-8 | 221 | 2.671875 | 3 | [] | no_license | <?php
namespace Emylie\Routing
{
interface Routes
{
public function getRoutes();
public function clearRoutes();
public function addRoute(Ventureable $route);
public function route(Routeable $request);
}
} | true |
e40babdcd47f6951e7bb38ab7cbf234a494f5581 | PHP | snikolow/simple-pdns-admin | /www/src/Service/DataTable/MemberDataTable.php | UTF-8 | 817 | 2.578125 | 3 | [] | no_license | <?php
namespace Devzone\Service\DataTable;
use Devzone\Repository\MemberRepository;
use Doctrine\ORM\QueryBuilder;
/**
* Class MemberDataTable
* @package Devzone\Service\DataTable
*/
class MemberDataTable extends BaseDataTable
{
/**
* RecordDataTable constructor.
* @param MemberRepository $reposito... | true |
32530ea5b9d9fa9b3b6474a968ce0ec669be5efa | PHP | zareismail/bonchaq | /src/Helper.php | UTF-8 | 3,278 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Zareismail\Bonchaq;
use Carbon\{CarbonInterface, Carbon};
use Illuminate\Support\Str;
use Laravel\Nova\Nova;
class Helper
{
/**
* The hourly place holder
*/
const HOURLY = 'hourly';
/**
* The daily place holder
*/
const DAILY = 'daily';
/**
* The w... | true |
31598dce2599c6bea8b4703321f8ebc731b45d3f | PHP | onego/php-sdk | /src/OneGoSDK/DTO/DiscountDto.php | UTF-8 | 502 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
final class OneGoSDK_DTO_DiscountDto
{
public $amount;
public $percent;
/**
*
* @return float amount visible
*/
public function getAmount()
{
return is_null($this->amount) ? null : OneGoSDK_Impl_Transform::transform('OneGoSDK_DTO_AmountDto', $this->amount);
}
... | true |
52b6de8ffc4721830ab09780a12c79e2735aada7 | PHP | php-activerecord/activerecord | /examples/orders/orders.php | UTF-8 | 3,159 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
require_once __DIR__ . '/../../ActiveRecord.php';
// initialize ActiveRecord
ActiveRecord\Config::initialize(function ($cfg) {
$cfg->set_connections(['development' => 'mysql://test:test@127.0.0.1/orders_test']);
// you can change the default connection with the below
// $cfg->set_default_connection... | true |
99b75ea60d98cc9c62d91fe601368d78fc46a4d5 | PHP | devel-sys/ProyectoFinal-ProductoDeSoftware | /Backend/OtherData/DetalleActividad.php | UTF-8 | 4,611 | 2.53125 | 3 | [] | no_license | <?php
header('Content-Type: text/html; charset=utf-8');
require 'Database.php';
class DetalleActividad
{
function __construct()
{
}
public static function getAll()
{
$consulta = "select * from detalle_actividad";
try {
// Preparar sentencia
$comando = Data... | true |
04dc7ae42918ff37771d185b3f32f590e27d9af8 | PHP | deweppro/db | /src/Dewep/Sqlite.php | UTF-8 | 297 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Dewep;
/**
* Class Sqlite
*
* @package Dewep
*/
class Sqlite extends PDO\PDO
{
/**
* Sqlite constructor.
*
* @param string $file
*/
public function __construct(string $file)
{
parent::__construct(sprintf('sqlite:%s', $file));
}
}
| true |
6ebf41ca24ff96d98e1a70b09da309672e4e2144 | PHP | ogsmelvin05/flare-php | /system/Flare/Util/String.php | UTF-8 | 1,641 | 3.03125 | 3 | [] | no_license | <?php
namespace Flare\Util;
use Flare\Security\Xss;
/**
*
* @author anthony
*
*/
class String
{
/**
*
* @var string
*/
protected $content;
/**
*
* @param string $content
*/
protected function __construct($content)
{
$this->co... | true |
d4a695f31a237a8e16c65bdb5451ae75cd403bca | PHP | khupi/PanicButtonAPI | /database/migrations/2021_10_19_160638_create_panics_table.php | UTF-8 | 1,156 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreatePanicsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('panics', functio... | true |
06edb826bc329098d7487a37e91b8dbe8a3a47ef | PHP | Ezku/xi-framework | /framework/library/Xi/Config/Yaml.php | UTF-8 | 749 | 2.90625 | 3 | [] | no_license | <?php
Xi_Loader::loadClass('Xi_Config');
/**
* Configuration container using a Yaml reader.
*
* @category Xi
* @package Xi_Config
* @author Eevert Saukkokoski <eevert.saukkokoski@brainalliance.com>
*/
class Xi_Config_Yaml extends Xi_Config
{
/**
* @param string filename
*... | true |
da9241b0320bdb0306930ac8299c94ea81d8909d | PHP | skaut/Skautske-hospodareni | /app/model/Travel/Vehicle/Metadata.php | UTF-8 | 972 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Model\Travel\Vehicle;
use DateTimeImmutable;
use Doctrine\ORM\Mapping as ORM;
/** @ORM\Embeddable() */
class Metadata
{
/** @ORM\Column(type="datetime_immutable") */
private DateTimeImmutable $createdAt;
/** @ORM\Column(type="string") */
private string $auth... | true |
5daf15e806e3b8da8f649c29847ca319abbef6a1 | PHP | PhpNosheenM/mumkins | /src/Model/Entity/ItemRow.php | UTF-8 | 1,446 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Model\Entity;
use Cake\ORM\Entity;
/**
* ItemRow Entity
*
* @property int $id
* @property int $item_id
* @property string $sku
* @property int $color_id
* @property int $size_id
* @property int $quantity
* @property float $sale_rate
* @property float $print_rate
* @property string $feat... | true |
443de954ede725ddecca3658ac3bfad22c23d9ba | PHP | lolsilent/lordsoflords.com | /sotse/shop.php | UTF-8 | 2,156 | 2.5625 | 3 | [] | no_license | <?php
#!/usr/local/bin/php
require_once('AdMiN/www.main.php');
require_once('AdMiN/www.functions.php');
include_once($game_header);
if(!empty($_POST['action'])){$costed=0;
foreach($items as $val){
if(!empty($_POST[$val])){
$amount=clean_post($_POST[$val]);
if($row->Strength >= $row->Intelligence){$max=$row->Strengt... | true |
f0dd82156518a7d57a8cb6dd0d14c9fb382d46a4 | PHP | assoconnect/mjml-bundle | /src/Compiler/Compiler.php | UTF-8 | 1,566 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Assoconnect\MJMLBundle\Compiler;
use Symfony\Component\Finder\SplFileInfo;
class Compiler
{
private $customCompiler;
private $mjmlCompiler;
private $tmpDir;
public function __construct(
CustomCompiler $customCompiler,
MjmlCompilerInterface ... | true |
e4c92333c40daa429b0e7eb612b7cfc18ade4488 | PHP | ryosukemiyazawa/Lasa | /Lasa/src/web/loader/FileLoader.php | UTF-8 | 2,023 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace lasa\web\loader;
use lasa\web\Application;
/*
* FileLoader.php
*/
class FileLoader implements Loader{
private $view;
private $validator;
private $module;
private $viewEngine;
private $validatorLoader;
public function __construct($root, $cache = null){
if(is_array($root)){
if(!isset($... | true |
845410447758715137391c0d063755a3b49fedab | PHP | Raspunkle/FluidPoll | /libs/class.CookiesManager.php | UTF-8 | 1,476 | 2.8125 | 3 | [] | no_license | <?php
//Class: CookiesManager
class CookiesManager {
private static $pCookie;
private static $vCookie;
private static $cCookie;
private static $uState;
public static function init($pID) {
self::$pCookie = (int)$_COOKIE['pl'];
self::$vCookie = (int)$_COOKIE['vt'];
self::$cCookie = $_COOKIE['c... | true |
9e3064060f70de54cbecfe426c93a488331bd9a1 | PHP | Adriel-Solutions/ezekiel | /native/middlewares/id.php | UTF-8 | 2,676 | 2.96875 | 3 | [] | no_license | <?php
namespace native\middlewares;
use native\libs\Middleware;
use native\libs\Options;
use native\libs\UUID;
/**
* Assumption made : The request url parameters injection was done already by a Router
*/
class Id extends Middleware {
// Whether the error should be shown as coming ... | true |
ba0f31a611dc1aa7afc6ea079e51e283127ff87a | PHP | kyleheddon/CSC_4370_db_in_class | /app/artist.php | UTF-8 | 1,017 | 2.734375 | 3 | [] | no_license | <?php
include 'header.php';
include_once 'lib/artist.php';
include_once 'lib/album.php';
$id = fetch_get_var('id');
$artist = Artist::find_by_id($id);
$albums = $artist->get_albums();
?>
<h1><?php echo $artist->name; ?></h1>
<?php if(count($albums) > 0) { ?>
<h2>Albums</h2>
<?php foreach($albums as $album){ ... | true |
9d761b766eb60096cbe252ff41598c37afa9ad48 | PHP | XethalKhan/BackHand | /action/ActionException.php | UTF-8 | 346 | 3.09375 | 3 | [] | no_license | <?php
namespace action;
use Exception;
use action\Action;
class ActionException extends Exception{
private $a;
public function __construct($message, $code = 0, Exception $previous = null) {
parent::__construct($message, $code, $previous);
}
public function setAction(Action $a){
$t... | true |
04a9d1e21eafd367296f32e8e1fcb16c9f05edbf | PHP | CodeBitters/MVC-in-PHP | /models/About_Us.php | UTF-8 | 411 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
class About_Us{
public static function getData(){
$result=Database::executeQuery("root","","SELECT * FROM user");
return $result;
}
public static function setData($userName,$password){
$result=Database::executeQuery("root","","INSERT INTO `user`(`Name`, `userName`, `passwor... | true |
703d040bd6258db936d19bcf043a73ada777d327 | PHP | Vilgefortzz/academic-web-application | /app/Http/Controllers/MessagesController.php | UTF-8 | 3,568 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Mail\EmailMessage;
use App\Message;
use App\Student;
use App\Subject;
use App\Teacher;
use Auth;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use Mail;
use Session;
class MessagesController extends Controller
{
public function add(){
//... | true |
ba2502da7128dee163e9062c57a3c5a2c4ed42ec | PHP | meibk/DigitalSchool | /src/Topxia/Service/User/Dao/Impl/CreditLogDaoImpl.php | UTF-8 | 734 | 2.625 | 3 | [] | no_license | <?php
namespace Topxia\Service\User\Dao\Impl;
use Topxia\Service\Common\BaseDao;
use Topxia\Service\User\Dao\CreditLogDao;
class CreditLogDaoImpl extends BaseDao implements CreditLogDao
{
protected $table = 'credit_log';
public function getCreditLog($id)
{
$sql = "SELECT * FROM {$this->table} WHERE id ... | true |
67468dc86998370249acf9e4c55720e22b8750a1 | PHP | fliegerfaust/virtual-search-system | /app/lib/SletatWebClient.php | UTF-8 | 7,211 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Веб-клиент к сервису sletat.ru
* Документация - http://static.sletat.ru/Files/Manual/XML_gate_Search.pdf
* http://static.sletat.ru/Files/Manual/XML_extension_hotelbase.pdf
*/
class SletatWebClient
{
var $soapClient;
/**
* __construct Конструктор класса, подключение и авторизация на сервисе SLET... | true |
e74025dc00932036bce000fb73eff6665ba73d1c | PHP | QRUQSP/admin | /public/actionLogs.php | UTF-8 | 4,495 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
//
// Description
// -----------
// This function will get the history of a field from the qruqsp_core_api_logs table.
// This allows the user to view what has happened to a data element, and if they
// choose, revert to a previous version.
//
// Arguments
// ---------
// api_key:
// auth_token:
// last_timestamp... | true |
768554f2d460704386677df835dc127bb2bec387 | PHP | olzimmerberg/olz-website | /src/Utils/EmailUtils.php | UTF-8 | 8,967 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Olz\Utils;
use League\CommonMark\Environment\Environment;
use League\CommonMark\Extension\CommonMark\CommonMarkCoreExtension;
use League\CommonMark\Extension\GithubFlavoredMarkdownExtension;
use League\CommonMark\MarkdownConverter;
use Olz\Entity\User;
use Olz\Exceptions\RecaptchaDeniedException;
use ... | true |
3c8c6fc9b7d25a219cf08cbdfa6b1d301136f596 | PHP | Activity-Traces/XAPI-Collector | /classes/Model/Statement.php | UTF-8 | 15,072 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Model;
class Statement
{
/********************************************************************************************************************** */
/********************************************************************************************************************** */
private $actor;
... | true |
a6df18241a76c6ec97ff83f1a3a4dee117724287 | PHP | danddyzhong/sf | /index.php | UTF-8 | 4,308 | 3.734375 | 4 | [] | no_license | <?php
/**
* https://mp.weixin.qq.com/s/vn3KiV-ez79FmbZ36SX9lg
* https://github.com/MisterBooo/LeetCodeAnimation
*/
//冒泡排序
class sf{
var $arr = array();
var $len = 0;
function __construct(){
$this->arr =array(8,1,4,7,8,0,9,5);
$this->len =sizeof($this->arr);
}
/*
* 冒泡排序
... | true |
a7614d315d13072874d79c145c52a6de07fee110 | PHP | itarafath/pastbook | /app/Repositories/IImage.php | UTF-8 | 239 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Models\Image;
/**
* Class ImagesReposotiry
*
* @package \App\Repositories
*/
interface IImage
{
public function __construct(Image $image);
public function insert(array $images);
}
| true |
b61b5ede34d5d2e5648b56d6dba61a1cb6541da2 | PHP | Edwardb11/php | /programacion-php/Semana01/ejemplo3.php | UTF-8 | 2,322 | 3.140625 | 3 | [] | no_license | <?php
include_once('../php/pheader.php');
?>
<div class="column is-half">
<!-- Migas de Pan -->
<nav class="breadcrumb" aria-label="breadcrumbs">
<ul>
<li><a href="../phpbody.php">Inicio</a></li>
<li class="is-active"><a href="#" aria-current="page">Tipos de datos</a></li>
... | true |
eb74d58f1162545c334c7767c8a7ac76a198ac83 | PHP | awesome036/hal_ph18 | /sample/sample04_string.php | UTF-8 | 490 | 3.515625 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="utf-8">
<meta name="author" content="Osamu Kurosawa">
</head>
<body style="font-size: 24px;">
<?php
//文字列連結①
$msg="なかがわ";
print $msg."いさとし先生<br>\n";
//文字列連結②
$num=5;
print '変数$numの内容は'."$num です。<br>\n";
//数値の連結
$suchi=4;
$suchi... | true |
49fa9b2de7504b1d785f71997e3caf47c6f01eb2 | PHP | julien-cibula/filer | /models/folderModel.php | UTF-8 | 2,793 | 2.765625 | 3 | [] | no_license | <?php
function folderContent($path)
{
$files=array();
$dir=array();
if(false !== ($od = opendir($path))){
while (false !== ($filename = readdir($od)))
{
if(is_dir($path."/".$filename)){
$dir[]=$filename;
}else{
$files[] = $filename;
}
}
}else{
die('Error during open folder');... | true |
b4121a52d89607031f506d9ec21c9ac637b867c4 | PHP | palehorse/sailor | /Pussle/ORM/Data/Column.php | UTF-8 | 661 | 2.71875 | 3 | [] | no_license | <?php
namespace Pussle\ORM\Data;
use Pussle\ORM\Interfaces\ColumnInterface;
use Pussle\ORM\Traits\AliasTrait;
use Pussle\ORM\Traits\TableColumnTrait;
class Column implements ColumnInterface
{
use AliasTrait, TableColumnTrait;
/** @var Table */
protected $table;
/** @var string */
protected $name... | true |
70c685b2ce6eeabf1bea3e321ea769ae713caef8 | PHP | devdkn/dominoes | /tests/unit/Game/Stats/StatsTest.php | UTF-8 | 816 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace AppTest\unit\Game\Stats;
use App\Game\Stats\Stats;
use App\Game\Stats\StatsItem;
use App\Player\PlayerInfoInterface;
use PHPUnit\Framework\TestCase;
class StatsTest extends TestCase
{
public function testInitialState(): void
{
$item1 = $this->createItem();
... | true |