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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
2880fa36e28273f3950244b02cdbf1df9b101d33 | PHP | emdecr/woocommerce-product-tally-template | /template-tally.php | UTF-8 | 12,228 | 2.625 | 3 | [] | no_license | <?php
/**
* Template Name: Tally
*
*/
if (isset( $_POST['submitted'] )) {
$cat = $_POST['cats'];
$cat_id = intval($cat);
$from = isset( $_POST['from'] ) ? $_POST['from'] : '';
$to = isset( $_POST['to'] ) ? $_POST['to'] : '';
wp_redirect( get_permalink().'?cat='.$cat_id.'&from='.$from.'&to='.$... | true |
bf7a98811c657710457b1bcee4678d0fd915dfba | PHP | fishingboy/test | /tests/DateTimeTest.php | UTF-8 | 2,374 | 3.046875 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
class DateTimeTest extends TestCase
{
public function testExample()
{
$time = "2021-11-03 08:14:26(GMT+00:00)";
$timer = new \DateTime($time);
$this->assertTrue(True);
}
public function testExample2()
{
$time = "2021-11-03 08:1... | true |
c96cc11eac97b8549c01ca6389732a3d390d9e33 | PHP | w2ll2am/jpegif.uk | /user.php | UTF-8 | 1,687 | 2.71875 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<?php include("header.php");
$user=$_GET['u'];
?>
<meta charset="utf-8">
<?php $mysqli = new MySQLi("localhost","root","root","jpegif");
$query = "SELECT userUsername, userDateCreated FROM user WHERE userID = '$user'";
//$query = "SELECT threadsDate, threadsDescription, threadsUserI... | true |
107f6be34b4cefbe046833b0db49a3ccc74ccf37 | PHP | DSNS-LAB/Dmail | /kronolith/lib/Driver.php | UTF-8 | 20,495 | 2.875 | 3 | [] | no_license | <?php
/**
* Kronolith_Driver defines an API for implementing storage backends for
* Kronolith.
*
* Copyright 1999-2015 Horde LLC (http://www.horde.org/)
*
* See the enclosed file COPYING for license information (GPL). If you
* did not receive this file, see http://www.horde.org/licenses/gpl.
*
* @author Chuck... | true |
31b04e87cce67f895a79e6b66475671d4c2899b2 | PHP | BartoszBartniczak/EventSourcing-Example | /src/User/Command/RegisterNewUser.php | UTF-8 | 3,061 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Bartosz Bartniczak <kontakt@bartoszbartniczak.pl>
*/
namespace BartoszBartniczak\EventSourcing\Shop\User\Command;
use BartoszBartniczak\CQRS\Command\Command;
use BartoszBartniczak\EventSourcing\Shop\Email\Email;
use BartoszBartniczak\EventSourcing\Shop\Email\Sender\Service... | true |
d3d6b5500e641af8f255d263568ac584d8db4395 | PHP | Linathraya/lina | /src/UserBundle/Entity/User.php | UTF-8 | 1,235 | 2.546875 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace UserBundle\Entity;
use FOS\UserBundle\Model\User as BaseUser;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="fos_user")
*/
class User extends BaseUser
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(stra... | true |
4c2bab0a3a85c3435bb9aabdb2684e2b7b49a089 | PHP | Mando1987/speed | /app/View/Components/showButton.php | UTF-8 | 427 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\View\Components;
use Illuminate\View\Component;
class showButton extends Component
{
public $route;
public $id;
public $ability;
public function __construct($route ,$id ,$ability)
{
$this->route = $route ;
$this->id = $id ;
$this->ability = $ab... | true |
731744889a358c2c797457bda876bdbb7d1bad98 | PHP | pgraham/Clarinet | /src/model/Relationship.php | UTF-8 | 1,070 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/*
* Copyright (c) 2014, Philip Graham
* All rights reserved.
*
* This file is part of Clarinet. For the full copyright and license information
* please view the LICENSE file that was distributed with this source code.
*/
namespace zpt\orm\model;
/**
* Interface for relationship representations.
*
* @au... | true |
4380bec8d38d5e4fca028f729a73c2aadd20580c | PHP | GuillaumeRossinot/Parking | /site/attributionplace.php | UTF-8 | 2,293 | 2.546875 | 3 | [] | no_license | <?php
require dirname(__FILE__).'/model/model.php';
function attribuerPlace($iduAplacer, $idpDuPlace){
global $bdd;
$requete = $bdd->prepare("INSERT INTO reserver (id_p, id_u, datefin) VALUE ($idpDuPlace, $iduAplacer,(ADDDATE(CURRENT_DATE, INTERVAL 1 MONTH)))");
$reponse4 = $requete->execute();
//print... | true |
ce4068c41961fe611acbbc7a24ea5131ddb3ca38 | PHP | alexz1124/garage_mp | /classes/CarType.php | UTF-8 | 2,352 | 2.953125 | 3 | [] | no_license | <?php
class Cartype
{
private $db;
public $C_id,
$C_brand,
$C_model,
$C_color,
$C_license,
$C_size,
$M_id;
function __construct($conn)
{
$this->db = $conn;
}
public function Select_all_car()
{
$members = mysqli_query($this->db... | true |
c927dd70cc0fa67b95671a2994a679c1cbdd7002 | PHP | PandLetUsNeverPlay/FeedAndHeal | /src/LePandiLP/Main.php | UTF-8 | 1,248 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace LePandiLP;
use pocketmine\plugin\PluginBase;
use pocketmine\command\Command;
use pocketmine\command\CommandSender;
use pocketmine\utils\Config;
use pocketmine\Player;
class Main extends PluginBase{
public function onEnable(){
$this->getLogger()->info("FeedAndHeal is loading...");
@mkdir($thi... | true |
a1087c1ff7ca828f1fc3784d33a3e87d8ee118be | PHP | efseb/eShop-StarWars | /database/migrations.php | UTF-8 | 3,660 | 2.6875 | 3 | [] | no_license | <?php
$pdo = new PDO('mysql:host=localhost;dbname=db_starwars', 'seb', 'seb');
$pdo->exec("
CREATE TABLE IF NOT EXISTS users(
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
username VARCHAR(20),
password VARCHAR(100),
PRIMARY KEY(id)
)ENGINE=InnoDB AUTO_INCREME... | true |
f6eba2ac4c9f0f25939e80403440f6e9951829e7 | PHP | dbartel/kanm_web | /src/api/application/application.php | UTF-8 | 5,253 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/** @file application.php
* @brief API Methods for KANM Applications
*/
require "appUtils.php";
require "apptype.php";
require "getapps.php";
require "postapps.php";
$path = "/application";
/**
* @brief Generates an application ID
* @details Generates the id stored internally for referencing applicatio... | true |
34534eebf30b61786167fdb1fd3d13eac1223ec0 | PHP | isc-valeria/Prueba_ISC601 | /HP_M/AppData/Model/tipos_habitacion.php | UTF-8 | 1,708 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Mutsorini
* Date: 17/06/2018
* Time: 01:52 PM
*/
namespace AppData\Model;
class tipos_habitacion
{
private $tabla="tipos_habitacion";
private $id_tipoh;
private $tipo_ha;
private $precio;
private $maximo_personas;
private $conexion;
function... | true |
c2d173cccb5d08047840985bcb23ec70b161ae19 | PHP | FurkanKuyular/CorporateWebHelp | /app/Http/Middleware/RedirectIfAuthenticated.php | UTF-8 | 998 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use App\Providers\RouteServiceProvider;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class RedirectIfAuthenticated
{
/**
* @param $request
* @param Closure $next
* @param null $guard
*
* @return \Illuminate\Contracts\... | true |
ab63bdb85503038eaf9db31dfa858a793a95f3f7 | PHP | geekzy/secret | /xigit/lat/array1.php | UTF-8 | 183 | 2.734375 | 3 | [] | no_license | <?php
/**
* @author firmansyah
* @copyright 2010
*/
$hari=array("senin","selasa","rabu","kamis","jumat","sabtu");
foreach($hari as $namahari)
echo"$namahari <br>";
?> | true |
4afda1864bb0a30060edb1340cac1ce5931d34c6 | PHP | mdoutreluingne/Github-notifier | /src/EventSubscriber/ExceptionSubscriber.php | UTF-8 | 2,291 | 2.671875 | 3 | [] | no_license | <?php
namespace App\EventSubscriber;
use Psr\Log\LoggerInterface;
use Symfony\Component\Mime\Email;
use Symfony\Component\Mailer\MailerInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\HttpKernel\Event\ExceptionEvent;
use Symfony\Component\E... | true |
f5cd54b5dd58e0ed6eb9bc19fc8dabbaf29ac2ef | PHP | palaphon/wealthbot | /system/Pas/TwrCalculator/Functions.php | UTF-8 | 1,770 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
namespace Pas\TwrCalculator;
class Functions
{
/**
* Calculate today's TWR value
*
* @param float $todayValue
* @param float $yesterdayCashFlow
* @param float $yesterdayValue
* @throws \RangeException
* @return float
*/
public static function calculateTodayTwr($to... | true |
8d629b3d61b25fc3c32b666a1df14ab10fb9a25e | PHP | ShubhamGulia/Library---Full-Stack-Project- | /front end/login_admin.php | UTF-8 | 1,537 | 2.953125 | 3 | [] | no_license | <?php
include 'dbinfo.php';
?>
<html>
<body style="background-image:url('Images/library.jpg')">
<h1>Admin Login</h1>
<?php
//always start the session before anything else!!!!!!
session_start();
if(isset($_POST['userid']) and isset($_POST['pwd'])) { //check null
$userid = $_POST['userid']; // text field for useri... | true |
c341bf4259a1a5ab00b63a3a66e0d46471edc921 | PHP | khinthidamyint/Pre_Intern01 | /TUAS/citizenidcheck.php | UTF-8 | 738 | 2.84375 | 3 | [] | no_license | <?php
include 'db2.php';
try{
$conn = Database::connect();
$conn->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
}catch(PDOException $e){
die('Unable to connect with the database');
}
if(isset($_POST['citizenid'])){
$citizenid = $_POST['citizenid'];
// Check citizenid
... | true |
5ff6265495b1ae3d3df31c50dfc22d20a5251997 | PHP | LiamMartens/php_graphcms_helper | /GraphCMS.php | UTF-8 | 13,511 | 3.25 | 3 | [] | no_license | <?php
namespace GraphCMS;
abstract class CacheAdapter {
/**
* For getting a value from cache
*
* @param string $query
* @param array $default
* @return array
*/
public abstract function get(string $query, bool &$expired = null) : array;
... | true |
9a537b459bcdacbc882e7262d036478705fc386f | PHP | x-o-r/PhpDependencyManager | /src/DTO/InterfaceDTO.php | UTF-8 | 2,852 | 3.0625 | 3 | [] | no_license | <?php
namespace PhpDependencyManager\DTO;
class InterfaceDTO implements DTOInterface
{
private $interfaceID;
private $interfaceName;
private $namespace;
private $rootNamespace;
private $extend;
private $uses = array();
private $injectedDependencies = array();
/**
* @return strin... | true |
75e2139e4a775d8bb3912e71bfb0b8090668d5a9 | PHP | galvani/my-bench | /src/MyBenchBundle/Command/RunCommand.php | UTF-8 | 3,868 | 2.609375 | 3 | [] | no_license | <?php
namespace MyBenchBundle\Command;
use MyBenchBundle\Model\BenchQueryTask;
use MyBenchBundle\Model\BenchTask;
use MyBenchBundle\Service\TaskRunner;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Exception\InvalidArgume... | true |
d7181966a89e99d5c224a7c5044ddb58013d0672 | PHP | bertojuni/CRUD-login-multilevel | /cek_registrasi.php | UTF-8 | 1,575 | 2.515625 | 3 | [] | no_license | <?php include "database/koneksi.php.php"; $username = addslashes(strip_tags ($_POST['username'])); $password = addslashes(strip_tags ($_POST['password'])); $confirm = addslashes(strip_tags ($_POST['confirm'])); //script ini untuk mengecek apakah form sudah terisi semua if ($username&&$password&&$confirm) { //berfunsgi ... | true |
281d140a0659ae86e8744b5665de53fcca43985c | PHP | shawnvan/ufs | /KMMAX/protected/modules/admin/controllers/CooperativepartnerController.php | UTF-8 | 25,960 | 2.53125 | 3 | [] | no_license | <?php
class CooperativepartnerController extends AppController
{
/**
* Displays a particular model.
* @param integer $id the ID of the model to be displayed
*/
public function actionView($id)
{
$model=Cooperativepartner::model()->with('company')->findByPk($id);
$model->fCooperativeCompanyID=empty($model->... | true |
e22c74ebea799d82d1ed8c4bc5c39bbd8aab6bba | PHP | verdonarthur/HEIG_MEDIA_MDT_ProjetAssurance | /app/Models/Contrat.php | UTF-8 | 2,228 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Validator;
class Contrat extends Model
{
protected $table = 'contrat';
public $timestamps = false;
public static $rules = [
'clientNo' => 'required|integer|min:0',
'type' => 'required|in:"RC","RC + Casco","RC ménage ... | true |
aa10f705567c0f730f5cd3f5635aaa940f5b47a1 | PHP | thiago-you/project-plus | /controllers/AcionamentoController.php | UTF-8 | 5,227 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\controllers;
use Yii;
use app\base\Helper;
use yii\helpers\Json;
use yii\web\Controller;
use app\models\Contrato;
use app\base\AjaxResponse;
use app\models\Colaborador;
use yii\filters\VerbFilter;
use app\models\Acionamento;
use yii\web\NotFoundHttpException;
/**
* AcionamentoController implement... | true |
f944b2719b889db91fd8488f58494520c1675dfc | PHP | TechFit/LoadCount | /classes/VisitorRepository.php | UTF-8 | 1,941 | 2.90625 | 3 | [] | no_license | <?php
class VisitorRepository
{
/** @var Database */
private $db;
public function __construct(Database $db)
{
$this->setDb($db);
}
/**
* @return Database
*/
public function getDb(): Database
{
return $this->db;
}
/**
* @param Database $db
... | true |
9f443cc8cf19fa80896846460d610ccca49d366e | PHP | pubsajib/laravel.blog | /database/seeds/PostTagTableSeeder.php | UTF-8 | 1,372 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class PostTagTableSeeder extends Seeder {
public function run() {
$relations = 200;
$posts = 150;
$tags = 16;
$postTags = [];
for ($i=0; $i < $relations; $i++) {
$postTags[] = [
'post_id' => rand(1,$posts),
... | true |
d2c63a6f38ee8d5066f09282f05988bec783efc8 | PHP | gideaoms/projeto-blob | /index.php | UTF-8 | 1,195 | 2.671875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Arquivos Blob</title>
<meta charset="utf-8">
</head>
<body>
<form action="save.php" enctype="multipart/form-data" method="post">
<?php
if (isset($_GET['codigo'])) {
require('conexao.php');
$sql = "SELECT * FROM arquivos WHERE codigo = ?";
$stm = $... | true |
d4a390bc4431e8a72f1644e55e250929bbd2174a | PHP | kusoinlol/LineBot | /app/model/service/SongService.php | UTF-8 | 8,395 | 2.5625 | 3 | [] | no_license | <?php
namespace Anthony\LineBot\Model\Service;
use \Exception;
/**
*
*/
class SongService
{
/**
* [getHsingFile description]
* @param [type] $message [description]
* @return [type] [description]
*/
public function getHsingFile($message)
{
// http://17sing.tw/share_... | true |
150e965aeaaab9d7e7fdb4f73b537912805a8c70 | PHP | BenArfanour/TechnicalTest | /src/Manager/ClubManager.php | UTF-8 | 342 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Manager;
use App\Repository\ClubRepository;
class ClubManager
{
protected $clubRepository;
public function __construct(ClubRepository $clubRepository)
{
$this->clubRepository = $clubRepository;
}
public function getListClub()
{
return $this->clubRepository-... | true |
a7604d434d83b56fe09e4522092217f36337feff | PHP | xavieremerson/buckingham-tdw2 | /installs/chartdir/phpdemo/borderpie.php | UTF-8 | 1,304 | 2.84375 | 3 | [
"IJG"
] | permissive | <?php
include("phpchartdir.php");
#The data for the pie chart
$data = array(25, 18, 15, 12, 8, 30, 35);
#The labels for the pie chart
$labels = array("Labor", "Licenses", "Taxes", "Legal", "Insurance",
"Facilities", "Production");
#Create a PieChart object of size 360 x 280 pixels
$c = new PieChart(360, 280);
#... | true |
a98d3e0c2c199dadb6c300b9e1dbeb43d6530e85 | PHP | radodi/homework | /php_strings/task1.php | UTF-8 | 1,668 | 3.484375 | 3 | [] | no_license | <?php
function print_text($str, $type){
$res = NULL;
switch ($type) {
case '1':
$reg = "/[A-Z]/"; //Rregular expression
$arr = str_split($str, 1); //Convert string to array
for ($i=0; $i < count($arr); $i++) {
if (preg_match($reg, $arr[$i])) { //Check for regular expression match
$res = $res . $... | true |
e2d80d5b159f7aaedab8256b6116bc2998bfabb3 | PHP | stephanielevon/Databases-Project | /search_exam.php | UTF-8 | 2,067 | 2.53125 | 3 | [] | no_license | <!-- On lance la session php -->
<?php session_start();?>
<!-- On vérifie que l'utilisateur est bien connecté et présent dans la base de données -->
<?php include('verification.php');?>
<?php if ($resultat) { ?>
<?php
$req_exam = $bdd->prepare("SELECT `examen_id`,`examen_nom`,`examen_date`,`examen_pathologie`,`patie... | true |
85fa492202a6f9b84889bf79295f9126eea02fc9 | PHP | abdelhak002/QLSocialSite | /database/migrations/2021_05_24_164237_create_profiles_followers_table.php | UTF-8 | 989 | 2.53125 | 3 | [] | no_license | <?php
use App\Models\Follow;
use App\Models\Profile;
use Database\Seeders\MigrationHelper;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateProfilesFollowersTable extends Migration
{
/**
* Run the migrations.
*
... | true |
3ab25b5ea41a05df12dd6d370743a2defe01f5f9 | PHP | aosmorac/nutrifami_admin | /module/Tcontent/src/Tcontent/Model/Module.php | UTF-8 | 3,730 | 2.65625 | 3 | [] | no_license | <?php
/**********************************************************
* CLIENTE: PMA Colombia
* ========================================================
*
* @copyright PMA Colombia 2016
* @updated
* @version 1
* @author {Abel Oswaldo Moreno Acevedo} <{moreno.abel@gmail.com}>
**********************************************... | true |
d8b9ef82fc3530c8e16c7db52af0707a4e3d4a28 | PHP | TF03/yii2-advanced-def | /console/migrations/m160413_092609_create_currency_table.php | UTF-8 | 1,842 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Schema;
use yii\db\Migration;
class m160413_092609_create_currency_table extends Migration
{
const TABLE_CURRENCY_BASE = '{{%currency_base}}';
const TABLE_CURRENCY = '{{%currency}}';
public function safeUp()
{
$this->createTable(self::TABLE_CURRENCY_BASE, [
'id' =... | true |
fe39949f8ab93a5c58d1183fb326c7622dd07b1d | PHP | macielbombonato/docker-chamilo | /1.11.2/chamilo-lms-1.11.2/main/inc/lib/pear/HTML/QuickForm/Rule/MinText.php | UTF-8 | 712 | 3.109375 | 3 | [
"GPL-3.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/* For licensing terms, see /license.txt */
/**
* QuickForm rule to check a text field has a minimum of X chars
* @package chamilo.include
*/
class Html_Quickform_Rule_MinText extends HTML_QuickForm_Rule
{
/**
* Function to check a text field has a minimum of X chars
* @see HTML_QuickForm_Rule
... | true |
e524414c98c576f6db8806fc0df414abc12037d0 | PHP | jimmiw/php-flash-message | /flashmessage.inc.php | UTF-8 | 1,438 | 3.28125 | 3 | [] | no_license | <?php
/**
* This is a small library for maintaining flash messages in PHP.
* It provides an easy way, for sending data back to the views, from the
* controller, by adding a "flash(type,message)" function.
*
* The flash message will only remain there for one request!
*
* Internally, the flash message is removed,... | true |
6831259ff545ed8640ca35b9f87b994cffe4430d | PHP | dianamontes1516/PHP-OO | /Curso11-19/PHP-Patronato/modelo/Database.inc.php | UTF-8 | 4,501 | 3.078125 | 3 | [] | no_license | <?php
require_once 'configuracion.inc.php';
require_once 'Persona.php';
/**
* Clase Database para la conexión a la base de datos
*/
class Conexion {
private $connection;
public function __construct() {
$dsn = "pgsql:host=".DB_HOST
.";port=".DB_PORT
.";dbname=".DB_NAME
.";u... | true |
8697732714c8735b5665b985bc2efdfb42e80402 | PHP | j0ha/wahlsystem | /app/Casts/Encrypted.php | UTF-8 | 998 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Casts;
use Illuminate\Contracts\Database\Eloquent\CastsAttributes;
class Encrypted implements CastsAttributes
{
/**
* Entschlüsselt die Daten aus der Datenbank und übergibt sie an das Model
*
* @param \Illuminate\Database\Eloquent\Model $model
* @param string $key
... | true |
d01149fbd7ff48cba566ba032627b6b52c681a1f | PHP | jiangbaiyan/bio | /app/Http/Controllers/Pc/Common/Login.php | UTF-8 | 3,067 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: baiyanzzZ
* Date: 2019/1/13
* Time: 22:44
*/
namespace App\Http\Controllers\Pc\Common;
use App\Exceptions\OperateFailedException;
use App\Exceptions\ParamValidateFailedException;
use App\Library\Response;
use App\Model\MBio;
use App\Model\MBioLog;
use Firebase\JWT\JWT;
us... | true |
49dc1566d7765e53d527fbdbd3cebe8470411f4c | PHP | MD-123Dev/Gesion-Produits--Php_PDO-Msql- | /Controller/Cvs.php | UTF-8 | 966 | 2.734375 | 3 | [] | no_license | <?php
require '../env/Config.php';
if (isset($_POST["import"])) {
$fileName = $_FILES["file"]["tmp_name"];
if ($_FILES["file"]["size"] > 0) {
$file = fopen($fileName, "r");
while (($column = fgetcsv($file, 10000, ",")) !== FAL... | true |
068e83044ad8cd2c515540247e033473b0fbe0d5 | PHP | AlexSunChen/ewatermark | /php/uploadprocess.php | UTF-8 | 6,263 | 2.5625 | 3 | [] | no_license | <?php
/*
* File UploadProcess PHP 1.1.0
*
* Copyright 2014, SunChen
* http://153.121.76.133/ewatermark/ImgList.html
*/
//file_get_contents();
require_once('conn.php');
header("Content-Type: text/html;charset=uft-8");
header("Cache-Control: no-cache");
if(isset($_FILES["imgaccess"]) && $_FILES["imgaccess"]["erro... | true |
03bb6d92cee35ef44fff69b77c7977a6172d91cb | PHP | anastasija-stepanova/ood | /lab3/Beverages/GreenTea.php | UTF-8 | 159 | 2.640625 | 3 | [] | no_license | <?php
class GreenTea extends Tea
{
public function __construct(string $description = "Green Tea")
{
parent::__construct($description);
}
} | true |
20786a7a1547466109d75defb7360792bb4ab6ae | PHP | AidanDai/study | /basic-knowledge/Designer-Pattern/php/A-03-Abstract Factory Pattern/example-001.php | UTF-8 | 3,059 | 3.53125 | 4 | [
"MIT"
] | permissive | <?php
/**
* Springfunction 和 Summerfunction 构成一个产品族
* function 和 SpringButton、function 和 SummerButton构成一个产品等级结构
*
*/
// 按钮接口:抽象产品
interface Button {
public function display();
}
// Spring 按钮类:具体产品
class SpringButton implements Button {
public function display() {
... | true |
1d5f4845034a7b9b5b6f84edae1eb39dbb85b762 | PHP | fikri215/quiz-3-im-laravel-juni-2020 | /app/Models/ArtikelModel.php | UTF-8 | 1,091 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Str;
class ArtikelModel {
public static function getAll()
{
$artikel = DB::table('artikels')->get();
return $artikel;
}
public static function save($data)
{
$artikel = DB::table('artikel... | true |
4bba8434e2a2404d6d587214fe2555b94210947a | PHP | Sherydan/Curso-rapido-php | /php_cc1/contact_form.php | UTF-8 | 5,047 | 2.703125 | 3 | [] | no_license | <?php
$msg = '';
$msgClass = '';
if (filter_has_var(INPUT_POST, 'submit')) {
$name = htmlspecialchars($_POST['name']);
$email = htmlspecialchars($_POST['email']);
$message = htmlspecialchars($_POST['message']);
if (!empty($email) && !empty($name) && !e... | true |
146a7e19ddb7baff4fbb2e995bf704e49fd41587 | PHP | Kark3ys/CS139_Lab_1617_ADES | /header.php | UTF-8 | 1,137 | 2.515625 | 3 | [] | no_license | <?php
if(!isset($_SESSION)) {
session_start();
}
error_reporting(E_ALL);
ini_set('display_errors', 1);
require_once 'database.php';
$isLog = !empty($_SESSION["uid"]);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>ToDo.list</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<scri... | true |
47889593dd91c1cc6f25fc7cfd571e20ef966293 | PHP | wemecan/Discuz-Q | /app/Trade/NotifyTrade.php | UTF-8 | 1,549 | 2.546875 | 3 | [] | no_license | <?php
/**
* Discuz & Tencent Cloud
* This is NOT a freeware, use is subject to license terms
*/
namespace App\Trade;
use App\Trade\Config\GatewayConfig;
use Omnipay\Omnipay;
class NotifyTrade
{
/**
* 通知
* @param string $notify_type 通知类型
* @param array $config 配置信息
* @param mixed ... | true |
f0eed5efa86208d469aaaa6df27314340bb212a4 | PHP | slavicc064/yaroslavdz | /php_step064/galery/index.php | UTF-8 | 597 | 2.671875 | 3 | [] | no_license | <form method="post" enctype="multipart/form-data">
<input type="file" name="file[]" multiple>
<input type="submit" name="submit">
</form>
<?php
foreach($_FILES['file']['name'] as $key => $name){
$tmp_name = $_FILES['file']['tmp_name'][$key];
$dir = 'photo';
//if ( )
$i++;
$photo = explode(".", $name);... | true |
6678de4226ca79da684fa36dd61ada1a7e89c0ab | PHP | monkeycraps/flight-local-picture | /vendor/gabordemooij/redbean/testing/RedUNIT/Base/Extassoc.php | UTF-8 | 1,787 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* RedUNIT_Base_Extassoc
*
* @file RedUNIT/Base/Extassoc.php
* @desc Tests extended associations, associations with additional properties in
* @author Gabor de Mooij and the RedBeanPHP Community
* @license New BSD/GPLv2
*
* (c) G.J.G.T. (Gabor) de Mooij and the RedBeanPHP Community.
* This sour... | true |
c66148f552745f88edc83c3e1a43b7a615851907 | PHP | nahakiole/Guestbook | /View/BootstrapGenerator.php | UTF-8 | 930 | 2.71875 | 3 | [] | no_license | <?php
namespace View;
class BootstrapGenerator extends HTMLGenerator
{
function getInput($name, $value, $options = [])
{
return "<div class=\"control-group " . $options['valid']
. "\"><label class=\"control-label\" for=\"$name\">$name<br/></label><input class=\"form-control\" value=\"$value... | true |
d121e235043d32e5043bce338251919ff2edbf0c | PHP | chryswoods/siremol.org | /deploy/deploy.php | UTF-8 | 1,377 | 2.90625 | 3 | [] | no_license | <?php
print("PENDING: STARTED DEPLOYMENT...\n");
// Get the information posted by the user - this will be a key
// that will ensure that the deploy script is only called by
// travis (who also has the key)
$userkey = $_POST["userkey"];
if (empty($userkey))
{
print("ERROR: NO USER KEY");
die ("ERROR: NO USER ... | true |
1f5f9d83e68f13b9bf4221a76749cd2d5d781d95 | PHP | araaaaar/laravel_app | /app/Http/Middleware/RedirectIfAuthenticated.php | UTF-8 | 824 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
// ミドルウェア:'guest'で使用されるクラス
class RedirectIfAuthenticated
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
... | true |
1787bf14c9241a17cdbcac996122888e0b82a537 | PHP | Garabec/smf | /symfony_project/src/Blog/ModelBundle/DataFixtures/ORM/20-Comments.php | UTF-8 | 1,121 | 2.515625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace Blog\ModelBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Blog\ModelBundle\Entity\Comment;
use Blog\ModelBundle\Entity\Post;
use Faker\Factory as FakerFactory;
clas... | true |
178164753a580b3c2366365dfda324107a40139c | PHP | JosueInitDev/newsletter | /phpmailer/sendMyMail.php | UTF-8 | 2,741 | 2.828125 | 3 | [
"Apache-2.0"
] | permissive | <?php
// Import PHPMailer classes into the global namespace
// These must be at the top of your script, not inside a function
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
// Load Composer's autoloader
require 'vendor/autoload.php';
// Instantiation and passing `t... | true |
3d1b10149c087b409dea4ec19043c37be57de371 | PHP | gapatmej/ecolac-api | /core/BaseDAO.php | UTF-8 | 6,492 | 2.828125 | 3 | [] | no_license | <?php namespace core;
require_once CONFIG . 'Conexion.php';
use config\Conexion;
use Exception;
/**
* Description of BaseDAO
*
* @author : Andres Peralta
* @email : gapatmej@gmail.com
* @date : 28/05/2019
*
*/
class BaseDAO extends Conexion {
private $tabla;
private $primaryKey;
priv... | true |
b86bd1b02ed8ef7e613cf4a64a900ff9ad367b06 | PHP | yiyeqicilang/kimchi | /src/Kimchi/Method/Digital5/ZU3BD.php | UTF-8 | 2,235 | 2.75 | 3 | [] | no_license | <?php namespace Qicilang\Kimchi\Method\Digital5;
use \Qicilang\Kimchi\Utils\Algorithm;
//组选包胆
class ZU3BD extends Base
{
//1
public $all_count =486;
public function getMName()
{
return '组选包胆';
}
public function getDetail()
{
return [
'total' => 1000,
... | true |
36868ed94347ef2956352706e2bdebe51a6f78a2 | PHP | OpenMageModuleFostering/gomage_social_connector | /app/code/local/GoMage/Social/Model/Type.php | UTF-8 | 1,447 | 2.703125 | 3 | [] | no_license | <?php
/**
* GoMage Social Connector Extension
*
* @category Extension
* @copyright Copyright (c) 2013-2015 GoMage (http://www.gomage.com)
* @author GoMage
* @license http://www.gomage.com/license-agreement/ Single domain license
* @terms of use http://www.gomage.com/terms-of-use
* @version ... | true |
434f5ec7fdc03eb95fade8e33c1061a103e2aaa8 | PHP | TeSdY14/mini-game-v2 | /index.php | UTF-8 | 8,019 | 2.734375 | 3 | [] | no_license | <?php
spl_autoload_register(function ($class) {
include $class . '.php';
});
session_start();
if (isset($_GET['deconnexion'])) {
session_destroy();
header('Location: .');
exit();
}
$pdo = new PDO('mysql:dbname=mini_game;host=127.0.0.1;port=3306', 'tesdy', 'demo');
$pdo->setAttribute(PDO::ATTR_ERRMOD... | true |
31649b5b9c4c2f0f05b7adfbef6cb0203d2bc3d3 | PHP | SJT-Computer-Club/SJTTournamentTools | /src/Psycle/SJTTournamentTools/EverySecondTask.php | UTF-8 | 992 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Psycle\SJTTournamentTools;
use pocketmine\scheduler\PluginTask;
/**
* Background tasks
*/
class EverySecondTask extends PluginTask {
private $running = false;
private $plugin = null;
/**
* Constructor
*
* @param pocketmine\plugin\PluginBase $plugin
*/
public fu... | true |
d8a4c7693c335364a2241a2c98be30b7e2e2d3d6 | PHP | Faulo/slothsoft-core | /src/IO/Memory.php | UTF-8 | 211 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Slothsoft\Core\IO;
class Memory {
const ONE_BYTE = 1;
const ONE_KILOBYTE = 1024;
const ONE_MEGABYTE = 1048576;
const ONE_GIGABYTE = 1073741824;
}
| true |
c3d8ddbd8bddc118c7eb5bd564077392a4fc84a0 | PHP | DDDominio/event-sourcing | /src/EventSourcing/EventStore/InMemoryEventStore.php | UTF-8 | 4,489 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace DDDominio\EventSourcing\EventStore;
use DDDominio\EventSourcing\Common\EventStream;
use DDDominio\EventSourcing\Common\EventStreamInterface;
use DDDominio\EventSourcing\Serialization\SerializerInterface;
use DDDominio\EventSourcing\Versioning\EventUpgraderInterface;
use DDDominio\EventSourcing\Version... | true |
e87991397f457467e751945ea1d16b5337a029bd | PHP | wadelu/worklist | /api.0101jz.com/app/Models/CompanyRolesPower.php | UTF-8 | 656 | 2.609375 | 3 | [] | no_license | <?php
// 角色权限
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class CompanyRolesPower extends BaseModel
{
/**
* 关联到模型的数据表
*
* @var string
*/
protected $table = 'company_roles_power';
/**
* 获取角色权限对应的统功能操作--一维
*/
public function powerSysOperate()
{
... | true |
0e3d4bc87808e4edfb97b6ec8ea3ae42e9fefad4 | PHP | meettomangesh/bigmee_api | /application/libraries/Postal_api.php | UTF-8 | 1,628 | 2.71875 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Postal_api class
* Postal PIN Code API allows to get details of Post Office by searching Postal PIN Code or
* Post Office Branch Name of India. - See more at: http://postalpincode.in/
*
*/
class Postal_api {
public $pincode;
private $... | true |
bcce7c4cdd313730da2cfc559535c9af9fa61b71 | PHP | rbartolay/Hummer | /Hummer/application/core/helpers/URL.helper.php | UTF-8 | 1,590 | 3.390625 | 3 | [] | no_license | <?php
/**
* URL Helper class used mostly like in url redirection, html anchor, etc.
* @author levi.bautista
*
*/
class URL {
/**
* URL Redirect method used to redirect to specific path
* @param unknown_type $object
* @param unknown_type $path
*/
public static function redirect($object,$path) ... | true |
77df847a58054fda676129e5318d423b716a5dc1 | PHP | Mena-Shafik/Mena-Shafik.github.io | /Old/Assignment 3/Account/change.php | UTF-8 | 2,644 | 2.953125 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<?php
session_start();
?>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<fie... | true |
4cef526a36aba9c7d581fb5722019387cced5c5b | PHP | 0x0000017/bootlegShopee | /checkout.php | UTF-8 | 6,132 | 2.734375 | 3 | [] | no_license | <?php
session_start();
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === false){
$_SESSION["login_redirect"] = $_SERVER["PHP_SELF"];
header("Location: login.php");
exit;
}
if(isset($_SESSION["filled"]) && $_SESSION["filled"] === true){
header("refresh: 1; url=payment.php");
exit;
}
//... | true |
c76a8ad4f81cc7d34c68ffcff496118a13988287 | PHP | paulcmal/noapi-api | /classes/Views.php | UTF-8 | 1,539 | 2.625 | 3 | [] | no_license | <?php
namespace cmal\NoApi;
use \alct\noapi\NoAPI;
class Views {
// Removed filter plugins, replaced with an array of regexes
// Could be reimplemented if there is a need for it
//static $filters = ['twitterize' => '\cmal\NoApi\Twig\twitterize'];
static $extensions ... | true |
1b6aca21a772d1ee9e51b3293a7dbb529904f748 | PHP | hitakshijoshi/training | /TrainingHitakshi/OrderProcessFee/Observer/Frontend/Sales/QuoteSubmitBefore.php | UTF-8 | 681 | 2.59375 | 3 | [] | no_license | <?php
namespace TrainingHitakshi\OrderProcessFee\Observer\Frontend\Sales;
class QuoteSubmitBefore implements \Magento\Framework\Event\ObserverInterface
{
/**
* Execute observer
*
* @param \Magento\Framework\Event\Observer $observer
* @return void
*/
public function execute(
\M... | true |
3f9e9bd1e2a52688b323900fc8ea9cda0ca43df2 | PHP | shadoskill/yetonemorephpframework | /tests/filter/string_Test.php | UTF-8 | 4,276 | 2.609375 | 3 | [] | no_license | <?php
namespace YAPFtest;
use PHPUnit\Framework\TestCase;
use YAPF\InputFilter\InputFilter as inputFilter;
class inputFilter_string_test extends TestCase
{
protected $_testingobject;
protected function setUp(): void
{
$this->_testingobject = new inputFilter();
}
public function test_strin... | true |
c60991c5f7418a083e2f7304ac07576241fea15d | PHP | yyg2014/mr_yang | /EarlyDemo/Early_PHP_Learning/课堂练习与笔记PHP/11-13.php | UTF-8 | 5,032 | 3.515625 | 4 | [] | no_license | <?php
header("content-type:text/html;charset=utf-8");
/* $arr=array(10,20,40,70,100);
for($a=0,$sum=0;$a<=count($arr)-1;$a++){
$sum+=$arr[$a];
}
echo $sum;
数组内所有元素的和
echo array_sum($a);
______________________________________________________________________--
将数组内的所有元素倒着输出
$a=array(10,30,50,20,1... | true |
4566211097f5e25db37ea83bc5010c3e0388f498 | PHP | yljphp/sms | /src/Tools/EntinfoSms.php | UTF-8 | 2,063 | 2.53125 | 3 | [] | no_license | <?php
namespace Yljphp\Sms\Tools;
use Illuminate\Support\Facades\Config;
class EntinfoSms extends BaseSms
{
protected $baseUrl;
protected $config;
public function __construct()
{
$this->config = Config::get('sms.connections.entinfo');
$this->baseUrl = 'http://sdk2.entinfo.cn/webse... | true |
cc820b68c3fee2ad181977c441a4e7a7adc64555 | PHP | Abk47/Php-CRUD | /update.php | UTF-8 | 341 | 2.53125 | 3 | [] | no_license | <?php
include('config/db.php');
$id = $_GET['bookid'];
$title = $_GET['btitle'];
$price = $_GET['bprice'];
$query = "UPDATE books SET book_title = '$title', book_price = '$price' WHERE book_id = $id";
if (mysqli_query($conn, $query)) {
header("Location:index.php");
} else {
echo "Error in your query";
}
... | true |
34cf2cf52f3d131848edb330c275c9e8d6f82b79 | PHP | qiqizjl/phpkafka | /src/Protocol/DeleteAcls/DeleteAclsFilterResult.php | UTF-8 | 2,079 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace longlang\phpkafka\Protocol\DeleteAcls;
use longlang\phpkafka\Protocol\AbstractStruct;
use longlang\phpkafka\Protocol\ProtocolField;
class DeleteAclsFilterResult extends AbstractStruct
{
/**
* The error code, or 0 if the filter succeeded.
*
* @var int
... | true |
f87d159c7465df77e1c592332b52b87da0c25f02 | PHP | ramondelafuente/bowlingkata | /src/Roll.php | UTF-8 | 374 | 3.28125 | 3 | [] | no_license | <?php
namespace JOR;
class Roll
{
private $pins;
public function __construct($pinsKnockedDown)
{
if ($pinsKnockedDown < 0 || $pinsKnockedDown > 10) {
throw new InvalidNumberOfPins("InvalidNumberOfPins");
}
$this->pins = $pinsKnockedDown;
}
public function num... | true |
f73335ceaa3ab9c96b2bf60ffaf8255ab74bbfbe | PHP | GustavoCarraro/Vestibo-Alpha | /accounts/classes/Registration.php | UTF-8 | 4,436 | 3.296875 | 3 | [] | no_license | <?php
class Registration
{
private $db_connection = null;
public $errors = array();
public $messages = array();
/**
* contrutor do registro
*/
public function __construct()
{
if (isset($_POST["register"])) {
$this->registerNewUser();
}
}
//chec... | true |
5885b248505bafa794bfa0663a1c14c402df3a65 | PHP | gyaikhom/ngembryo | /updateUser.php | UTF-8 | 2,576 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Change user details.
*/
include 'login.php';
function die_error($c, $m) {
die('{success: false, errcode: ' . $c . ', message: "' . $m . '"}');
}
function echo_success($m) {
echo '{success: true, errcode: 0, message: "' . $m . '"}';
}
/**
* Changes user details. Returns true on success, false o... | true |
8bf204b6cebb08d30b7fa870e2bf81159a99d941 | PHP | David761/gardeEnfantPHPSansFramework | /gardeEnfantPhp/Application/Model/Admin.php | UTF-8 | 1,564 | 2.671875 | 3 | [] | no_license | <?php
class Admin extends Framework
{
public function index(){
$db = new PDO('mysql:host=172.16.18.128;dbname=childcare','joffrey','azerty');
$requete = $db->prepare("SELECT * FROM professionnels");
$requete->execute();
$data = $requete->fetchAll();
$this->render('admin... | true |
046127389906dc2c405d50c633d756c6746263e0 | PHP | dimaxp/php-base | /lesson8/Cat.php | UTF-8 | 512 | 3.703125 | 4 | [] | no_license | <?php
include_once "Pet.php";
// дочерний класс
class Cat extends Pet
{
// public $name = "Без имени";
// public $age;
public $color;
// конструктор
public function __construct($cat_name, $cat_age, $cat_color)
{
parent::__construct($cat_name, $cat_age);
$this->color = $cat_colo... | true |
b75829c371e93c5938b7a26e73cd6f2dbaec264a | PHP | mhjony/Tramigo_laravel | /laravel_app/app/Console/Commands/Tracking.php | UTF-8 | 1,169 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\DB;
class Tracking extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'track';
/**
* The console command description... | true |
d9e464882382011ae8c57abb3d928e2ae1a53c85 | PHP | Jibichang/missing-person-finder | /api/member/get_contact.php | UTF-8 | 957 | 2.515625 | 3 | [] | no_license | <?php
// header("Access-Control-Allow-Origin: http://localhost/rest-api-authentication-example/");
header("Content-Type: application/json; charset=UTF-8");
header("Access-Control-Allow-Methods: POST");
header("Access-Control-Max-Age: 3600");
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Heade... | true |
0c54f45d2582b64ef7d8e925c503cde646547cc1 | PHP | ruslan-valis/uri | /www/src/Controller/ApiController.php | UTF-8 | 1,409 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
use App\Entity\Link;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
class ApiController extends AbstractController
{
/**
... | true |
f6bbfd1dd9cc2fb2eae655527a955a26fd88de1a | PHP | romerowr/thefancycards | /app/models/mgestionusuarios.php | UTF-8 | 6,235 | 2.90625 | 3 | [] | no_license | <?php
namespace X\App\Models;
use \X\Sys\Model;
class mGestionUsuarios extends Model{
public function __construct(){
parent::__construct();
}
/**
* Este DocBlock documenta la función valusername()
* Comprobacion si existe ya el usuario en la DDBB
* @param [string] $em [Nombre del usuario a busc... | true |
a8c8f4bccf1fa4dfd3e5bb8e9cf726f8aa197dd5 | PHP | ttungbmt/botble | /platform/packages/api/src/Http/Controllers/AuthenticationController.php | UTF-8 | 4,175 | 2.59375 | 3 | [] | no_license | <?php
namespace Botble\Api\Http\Controllers;
use ApiHelper;
use App\Http\Controllers\Controller;
use Botble\Base\Http\Responses\BaseHttpResponse;
use Botble\Api\Http\Requests\LoginRequest;
use Botble\Api\Http\Requests\RegisterRequest;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Su... | true |
41791d97c438822cca05e9db4a264ccb9ef67810 | PHP | jinpan1067/Auction-Website | /phpProject/App/Models/Users.php | UTF-8 | 1,945 | 3.078125 | 3 | [] | no_license | <?php // Users model
class Users extends DB\SQL\Mapper
{
function __construct(DB\SQL $db)
{
parent::__construct($db, 'users');
}
// insert a new row into db
function createUsers(){
$this->copyFrom('POST');
$this->save(); // execute
}
function usernameExistes($f):bool
{... | true |
ef01e1e1a6e10211be917070e2ad7a9bb822cd91 | PHP | jaabee/DesignPattern | /Behavioral/Observer/UserObserver.php | UTF-8 | 311 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: 小粽子
* Date: 2018/12/19
* Time: 11:23
*/
namespace DesignPattern\Behavioral\Observer;
use SplSubject;
class UserObserver implements \SplObserver
{
public function update(SplSubject $subject)
{
echo get_class($subject) . '被更新';
}
} | true |
943964c72dedca440615c7088162f4b90199bcd0 | PHP | jogs78/vinculacionisc | /app/Models/Service.php | UTF-8 | 534 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Service extends Model
{
public $table = "services";
public $primaryKey = "id";
public $timestamps = true;
public $fillable = [
"task",
"area",
"contact",
"period",
"company_id"
];
public static $rules = [
"t... | true |
7bd42623d0546ab354ebb0fa8944769e3b2f0228 | PHP | TycheLaughs/DinnerWizard | /php/stretch_goals.php | UTF-8 | 9,263 | 2.9375 | 3 | [] | no_license |
<!-- PROTOTYPE UPDATE FUNCTIONS
/**
* Summary:
* Try to update the database with the row for the given objType.
*
* @param $objDinnerWizard
* The object we want to put into the database
*
* @param $strTableName
* The table we want ... | true |
d2d7a0c86560fdc4167ae79efcffa8a5bb6505c9 | PHP | mybsdc/mvc_old | /system/functions.php | UTF-8 | 870 | 2.921875 | 3 | [] | no_license | <?php
/*
* 底层公共方法库
*
* */
/*
* 调试输出函数
* @param mix $val 调试输出源数据
* @param bool $dump 是否启用var_dump调试
* @param bool $exit 是否在调试结束后设置断点
* @return void
*
* */
function p($val, $dump = false, $exit = true)
{
// 自动获取调试函数名称$print_method
if ($dump){
$print_method = 'var_dump';
} else {
$p... | true |
78aee4e121602897238157051056e3e77bbd4725 | PHP | oworyoakim/hrms | /app/Models/Comment.php | UTF-8 | 422 | 2.625 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Support\Carbon;
/**
* @property int id
* @property string body
* @property int user_id
* @property int commentable_id
* @property string commentable_type
* @property Carbon created_at
* @property Carbon updated_at
*/
class Comment extends Model
{
protected $... | true |
09391317b0abda7ec4fe3b46e76cc07e8dfd0833 | PHP | Bytebox-Spain/rmax | /protected/models/base/_BASEActiveRecord.php | UTF-8 | 3,455 | 2.890625 | 3 | [] | no_license | <?php
/**
* Prepara los campos de auditoria antes de que se realice la validación
*
* @author kublai
*/
abstract class _BASEActiveRecord extends CActiveRecord{
/**
* Función para actualizar datos en campos de auditoria (si existen en la tabla)
* el formato de la fecha es d/m/Y (formato de aplic... | true |
ac98aefdd02e560ae517ce66e0780098063d4710 | PHP | Mikezhiwei/yxh | /travel_love/JSONtest/test.php | GB18030 | 1,049 | 2.875 | 3 | [] | no_license | <?php
/*$arr=array('name'=>"־ΰ ",'nick'=>"lzw",'email'=>"lzw00000@qq.com");
$arr['name']=iconv("gbk","utf-8",$arr['name']);
$encode = mb_detect_encoding($arr['name'], array("ASCII","gbk","utf-8","big5"));
echo $encode."<br>";
$json_string=json_encode($arr);
echo $json_string;*/
// $tes... | true |
760aa7db4ee6216b694410d45b4742cef59031d8 | PHP | hyperbolaa/Ylpay | /src/Hyperbolaa/Ylpay/Mobile/SdkPayment.php | UTF-8 | 7,571 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Hyperbolaa\Ylpay\Mobile;
use Hyperbolaa\Ylpay\Lib\Des;
use Hyperbolaa\Ylpay\Lib\Rsa;
class SdkPayment
{
private $sign_type = 'RSA';
private $private_key_path;
private $public_key_path;
private $private_key;
private $public_key;
private $amount; //单位为分
private $mer_ord... | true |
db1ad41d02bbd57b7fed2c600a87744404009962 | PHP | k-sato-trw/temp_repository_tsu | /app/Library/ExchangeText.php | UTF-8 | 8,305 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Library;
use App;
class ExchangeText
{
public function compile($text,$images=[])
{
$text = str_replace("(","(",$text);
$text = str_replace(")",")",$text);
$exchange_rules = [
'(リ始)' => '<a href="',
'(リ中)' => '">',
'(リ終)' => '</a>'... | true |
670c41f1a7a0a4910d6a7de3b001219cf6c04c6b | PHP | orioliz/UF2_prova_Compl | /quadre.php | UTF-8 | 427 | 2.921875 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ini_set('display_errors',1);
class Quadre {
protected $color;
function __construct($color) {
// Cojemos el color de la variable de tauler
$this->color=$color;
// Mostramos...
$this->show();
}
function show() {
//Montamos la tabla...
echo '<td style="padding-left:4... | true |
cee47d96e137a6ef462c26e19966bb9e529eeeca | PHP | vc0754/fujia_demo | /application/lib/enum/RefundStatus.php | UTF-8 | 435 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2020-10-10
* Time: 21:29
*/
namespace app\lib\enum;
/**
* 退款状态
* Class RefundStatus
* @package app\lib\enum
*/
class RefundStatus
{
/**
* 未处理
*/
const Untreated = 0;
/**
* 处理中
*/
const Handling = 1;
/**
... | true |
f5c4f7bd913623f9984a3ee4b3f3ccec9e074739 | PHP | LinioIT/microlog | /src/Log.php | UTF-8 | 3,430 | 2.765625 | 3 | [] | permissive | <?php
declare(strict_types=1);
namespace Linio\Component\Microlog;
use Psr\Log\LoggerInterface;
use Psr\Log\LogLevel;
use Psr\Log\NullLogger;
class Log
{
public const DEFAULT_CHANNEL = 'default';
/**
* @var LoggerInterface[]
*/
private static $loggers = [];
public static function setLogg... | true |