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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ce7ddf4a08fafb2aa1a85dbbca63fd5c412a47d3 | PHP | pikadjou/JudoShirt | /api/src/Services/Entity/Basket.php | UTF-8 | 1,386 | 3.03125 | 3 | [] | no_license | <?php
namespace App\Services\Entity;
class Basket
{
public $id = "";
public $checkoutLink = "";
public $priceItems = 0;
public $priceShipping = 0;
public $priceTotal = 0;
public $basketItems = [];
public $discounts = [];
function __construct($basket){
if($ba... | true |
71a9cf10896062a4ad82cebb3934b6d0e77037a7 | PHP | pankaj-php/Hypleystaging | /staging/wp-content/plugins/wp-security-audit-log/classes/AbstractSensor.php | UTF-8 | 2,401 | 2.953125 | 3 | [
"MIT",
"GPL-1.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-only",
"GPL-3.0-only"
] | permissive | <?php
/**
* Abstract Class: Sensor
*
* Abstract sensor class file.
*
* @since 1.0.0
* @package Wsal
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Abstract class used in all the sensors.
*
* @see Sensors/*.php
* @package Wsal
*/
abstract class WSAL_AbstractSensor {
/**
... | true |
7a8bf841382bf4cd3a9bdc7a985d8ad09454bde5 | PHP | k8704020/test | /service/read_the_registration_code/borrow_return_book/m_return_book/add/book_library_process/addA.php | UTF-8 | 12,124 | 2.53125 | 3 | [] | no_license | <?php
//-------------------------------------------------------
//閱讀登記條碼版
//-------------------------------------------------------
//---------------------------------------------------
//設定與引用
//---------------------------------------------------
//SESSION
@session_start();
//啟用B... | true |
b96d5ee98046fb6593ff901481d3d0375fef9516 | PHP | vgip/Intime | /src/Intime/Type/TypeDateTime.php | UTF-8 | 2,070 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
declare(strict_types=1);
namespace Vgip\Intime\Type;
use Vgip\Intime\Type\TypeInterface\TypeInterface;
use Vgip\Intime\Type\TypeInterface\TypeTrait;
use Vgip\Intime\Type\Validator\ByType;
class TypeDateTime implements TypeInterface
{
use TypeTrait;
private $hasTime;
private $hasMicrotim... | true |
9f035eec6539047fbb3a562c39b3e43c02138d93 | PHP | AlenaMitrakhovich/INT322---Internet-II---Web-Programming-on-UNIX | /Labs/Lab5/protectedstuff.php | UTF-8 | 447 | 2.8125 | 3 | [] | no_license | <?php
session_start();
/*when session_start() is called, php retrieves any variables for the
current session (based on the session ID) into this autoglobal (or
initializes a new autoglobal)*/
if(isset($_SESSION['username']))
{
echo 'You are logged in!';
}
else
{
header("location: login.php");... | true |
8696eab184f3453fae3a105e914f63d7e3732e71 | PHP | jakubnakielski/PHP-Login-and-registration-system | /register.php | UTF-8 | 9,739 | 2.75 | 3 | [] | no_license | <?php
// header('Content-Type: application/json');
session_start();
error_reporting(0);
if(isset($_SESSION['logged_in']) && ($_SESSION['logged_in'] == true)){
header('Location: game.php');
die();
}
if(isset($_POST['email'])) {
$login = trim($_POST['login']);
$email = trim($_POST['email']);
$passw... | true |
ec5ab98c6786f1945038b657548ec556cecb7868 | PHP | helaveesa/PHP_Baziskurse | /photogallery/index.php | UTF-8 | 5,258 | 2.609375 | 3 | [] | no_license | <?php
# Обработчик
if (isset ($_POST[z1])) {
if($_FILES[photo][size] <= 2*1024*1024) { #если размер файла подходящий
if (stripos ($_FILES[photo][type], "image") !== false) #поиск директории image, чтобы по ней отсеивать ненужные ... | true |
301eaa5d786c4d4cd26541241611be45c75e843c | PHP | nmcxx/Diemdanhdihoc | /web/css/thongtin.php | UTF-8 | 1,222 | 2.734375 | 3 | [] | no_license | <?php
require('json.php');
$username = "";
if(isset($_POST['username']))
{
$username = mysqli_real_escape_string($con, $_POST['username']);
}
$query = "Select * from `TaiKhoan` where `username`='$username'";
$data = mysqli_query($con,$query);
class User{
function User($username,$password,$hoten,$us... | true |
47b1cb7ff78dee413cfadb85a8fc2a317d99c6a0 | PHP | zhangchongcai/aolaigo | /src/api/searchBrand.php | UTF-8 | 947 | 2.671875 | 3 | [] | no_license | <?php
header("content-type:text/html;charset=utf-8");
include 'connect.php';
$case = isset($_GET['case']) ? $_GET['case'] : "";
$page = isset($_GET['page']) ? $_GET['page'] : "1";
//查询语句 1、写sql语句
$sql="SELECT brand FROM brandname WHERE brandname.case='$case' ";
//查询语句 2、执行语句
$conn... | true |
4d8add3260de7fb2a0e9c0ecdddc8f6989e7a9b7 | PHP | antonio06/Php | /prueba/suma.php | UTF-8 | 927 | 3.484375 | 3 | [] | no_license | <?php session_start(); ?>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
$numero = $_POST['numero'];
if ((!isset($_SESSION['suma'])) && (!isset($_SESSION['contador']))) {
$_SESSION['suma'] = 0;
$_SESSION['contador'] ... | true |
9a9bee2f6bee4197b5d6f5d3703d27086c89362f | PHP | ieyring/Bigpipe | /View.php | UTF-8 | 2,862 | 3.09375 | 3 | [] | no_license | <?php
/*~ View.php
.---------------------------------------------------------------------------.
| File: View.php class file |
| Version: 1.3 |
| Site: Uknown |
| ... | true |
6675d32066b0b10811239e9ddb477b674b92903b | PHP | roniwahyu/Tracerstudy2020 | /application/modules/users_permissions/models/Users_permissionss.php | UTF-8 | 5,767 | 2.609375 | 3 | [] | no_license | <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* Description of users_permissions
* @created on : Wednesday, 09-Oct-2019 09:11:38
* @author DAUD D. SIMBOLON <daud.simbolon@gmail.com>
* Copyright 2019
*/
class Users_permissionss extends CI_Model
{
public function __const... | true |
7046ecacb423199f675fd718621262d617689570 | PHP | arunras/kh-rotyun | /application/car/car.class.php | UTF-8 | 30,785 | 2.609375 | 3 | [] | no_license | <?php
ob_start();
if(!isset($_SESSION))session_start();
/*
* This class is used to design and access to database for tbl_performer
* Creator: Rith Phearun
* Date Created: Oct-01-2011
*/
class car{
private $car_id;
private $car_code;
private $car_model;
private $car_name;
private $car_picture;
pri... | true |
467eb8cdefa5a98b5242d42bf5325cba55791656 | PHP | hualaw/nahao | /application/models/model/admin/model_subject.php | UTF-8 | 2,984 | 2.78125 | 3 | [] | no_license | <?php
class Model_subject extends NH_Model
{
/**
* 获取全部学科
* @author shangshikai@tizi.com
*/
public function subject_all($status,$name)
{
self::search_subject($status,$name);
return $this->db->get()->result_array();
}
/**
... | true |
5d86016237fd26a374eb1ece974e9113de2576ed | PHP | FranLopezFreelance/chat | /models/Usuarios.model.php | UTF-8 | 3,240 | 2.796875 | 3 | [] | no_license | <?php
class Usuario {
private $db;
public function __construct($db){
$this->db = $db;
}
public function check_login($usuario){
if(!$usuario){
$login = null;
}else{
$login = $usuario;
}
return $login;
}
public function login($data){
$usuario = $data['usuario'];
$pass = $data['pass'];
... | true |
3768c40fe7baccdfbc3fbd54b3be978f35cdd509 | PHP | pupuga/lighthouse | /simple-lighthouse/pupuga/Custom/Lighthouse/SendingMessage.php | UTF-8 | 2,094 | 2.78125 | 3 | [] | no_license | <?php
namespace Pupuga\Custom\Lighthouse;
final class SendingMessage
{
private static $instance = null;
private $home;
private $message = '';
private $i = 0;
public static function app(): self
{
if (self::$instance === null) {
self::$instance = new self();
}
... | true |
4574ae8b3d9ff78208a14239740beba83100a79a | PHP | manojveluru/Pysiotherapy_Management | /csci566/patientrecord.php | UTF-8 | 2,770 | 2.578125 | 3 | [] | no_license | <?php
include("template.php"); // Template file contains header template
require("conn.php"); // connection file
//Check if session is active or not
if(isset($_SESSION["isLoggedin"]) && $_SESSION["isLoggedin"]){
$therapistid = $_SESSION["therapistID"];
?>
<header class="w3-container w3-blue w3-center" style="padding... | true |
cee1a6f275b217289c4b37f4885c3cd60bf27e9a | PHP | biniyam17/cs135 | /PHP/More PHP Examples/XML/cast_example.php | UTF-8 | 838 | 3.203125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Cast Example</title>
<link rel="stylesheet" type="text/css" href="css/baseA.css" />
</head>
<body>
<pre><?php print_r( $_GET );?></pre>
<?php
$xmlstr = file_get_contents( "data.xml" );
if ( FALSE == ( $xmlstr ) )
die( "Unabl... | true |
b925a5b940d616cbb52e59d456b0df31133f67f3 | PHP | harperaa/echoCTF.RED | /backend/commands/GameCommand.php | UTF-8 | 617 | 2.796875 | 3 | [] | no_license | <?php
class GameCommand extends CConsoleCommand {
public function run($args)
{
parent::run($args);
}
public function actionStart($at=false,$in=false)
{
// Start the competition $at a specific time
// Start the competition $in number of seconds from now
}
public function actionStop($at=false,... | true |
ab1a963129ea3cee856ec6044b3b9c11b820f7ff | PHP | piotrm1991/BalanceSheetWebBootstrap | /class/GetDB.php | UTF-8 | 327 | 2.59375 | 3 | [] | no_license | <?php
class GetDB
{
function getPDO($config)
{
$dbo = new MyDBPDO("mysql:host={$config['host']}; dbname={$config['database']}; charset=utf8", $config['user'], $config['password'], [
PDO::ATTR_EMULATE_PREPARES => false,
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);
return $dbo;
... | true |
8118e1f73fb581ed48eb08f3e26988c4e8a16e7d | PHP | piephpframework/framework | /Crust/Util/ArrayList.php | UTF-8 | 5,178 | 3.1875 | 3 | [] | no_license | <?php
namespace Pie\Crust\Util;
use Exception;
use Iterator;
use Pie\Crust\Service;
/**
* @property int $count Count of items in list
*/
class ArrayList extends Service implements Iterator{
protected $items = [];
protected $type = '';
/**
* Sets the allowed object type
* @param mixed $type... | true |
c6188e009a58e65e9923d12f8ed7e6f518a147e2 | PHP | triforce/shoppeJs | /sessionHandler.php | UTF-8 | 1,970 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
// shoppeJs session handling
header("Content-Type: application/json");
$error = array();
$error['error'] = true;
if ($_SERVER["REQUEST_METHOD"] === "POST") {
$data = json_decode(file_get_contents('php://input'), true);
if (isset($data['init'])) {
if ($data['init'] == TRUE) {
... | true |
eecfe5fc06fe56adf05af862bb9791077ce829a5 | PHP | amratef84/Emergency-system | /models/CovidCases.php | UTF-8 | 1,798 | 2.640625 | 3 | [] | no_license | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "covid_cases".
*
* @property int $Patient_Id
* @property int $Covid_Status
* @property string $Date
* @property string $Case_Status
*
* @property RegisteredPatientAccount $patient
*/
class CovidCases extends \yii\db\ActiveRecord
{
... | true |
26981f9f4573a4880760eb6dac77248a7d4c3c35 | PHP | FSBurn/test-pic | /image.php | UTF-8 | 197 | 2.53125 | 3 | [] | no_license | <?php
$filename = 'file.txt';
if(file_exists($filename)) $num = file_get_contents($filename);
isset($num) ? $num++ : $num = 0;
file_put_contents($filename, $num);
$pic = "pic\bbyYoda.jpg"; | true |
3245ea00017d5b3514f4b604d87bd173825503d8 | PHP | atom-box/tatll | /web/core/helpers/getLinkCards.php | UTF-8 | 1,377 | 2.703125 | 3 | [] | no_license | <?php
require_once 'core/config/dbConfig.inc.php';
require_once 'core/config/linksFlatFileConfig.php';
$user = USER;
$password = SECRET;
$database = NAMEOFDATABASE;
$host = 'localhost';
$table = 'sessions'; // todo NOT USED?
try {
$db = new PDO('mysql:host=' . $host . ';dbname=' . $database, $user, $password);... | true |
2f0840b6ee60bc8d902afa5e558cf6dd625b2400 | PHP | alexmolchanov18/bestkredit | /www/vitrina-old/images/MediaBuying.php | UTF-8 | 3,413 | 2.515625 | 3 | [] | no_license | <?php
class MediaBuying
{
const UTM_SOURCE = 'utm_source';
const UTM_MEDIUM = 'utm_medium';
const UTM_CAMPAIGN = 'utm_campaign';
const UTM_CONTENT = 'utm_content';
const GCLID = 'gclid';
const USER_AGENT = 'user_agent';
const IP ... | true |
2e0eb0f8409f7084d5ae64cfdf826557919b385c | PHP | srgvnv/example_app | /app/Models/Poster.php | UTF-8 | 625 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* Poster model.
*
* @property string $url
*
* @method static Poster firstOrNew(array $attributes, array $values = [])
*/
class Poster extends Model
{
/**
* Mass Assignment.
... | true |
72c2cfe377dd3d6d990a5c6f5588380ee5f917d1 | PHP | Eureka-Cachet/zoomlion_bid_server | /app/Attendance.php | UTF-8 | 370 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace clocking;
use clocking\Model;
class Attendance extends Model
{
protected $fillable = ['beneficiary_id', 'date', 'time', 'device_id'];
public function beneficiary(){
return $this->belongsTo(Beneficiary::class, 'beneficiary_id');
}
public function device(){
return $thi... | true |
0d263d5f956058d6e91f5cd9f6dcd660a14ed62b | PHP | mhwayez/SEMS | /SEMS/function.php | UTF-8 | 313 | 2.9375 | 3 | [] | no_license | <?php
// get users name by id
function getName($id){
global $connection;
$sql="SELECT * FROM users WHERE id='{$id}'";
$query=mysqli_query($connection, $sql);
$name=NULL;
if(mysqli_num_rows($query)==1){
while($row=mysqli_fetch_array($query)){
$name=$row['name'];
}
}
return $name;
}
?> | true |
3664085a8aa633f1bb7784f589402cc4547ec9db | PHP | dkrusteva1/WEB2020-php | /db_task1/index.php | UTF-8 | 1,412 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
Include "./dbOperation.php";
$valid=array();
$errors=array();
$maxSizeCourse =128;
$maxSizeName=128;
$maxLengthDescription=1024;
function validate ($name, $limit, &$valid, &$errors)
{
$check=$_POST["$name"];
if (!$check)
{
$errors["$name"]="$nam... | true |
ec272eca889f5e9a4e640c99030f415e84a27e88 | PHP | BasvanEvelingen/Weekopdracht_3 | /leesbericht.php | UTF-8 | 4,061 | 3.015625 | 3 | [] | no_license | <?php
/**
* @author Bas van Evelingen <BasvanEvelingen@me.com>
* Weekopdracht 3 maak een blog
* C(R)UD opzet <- Read
* Berichten uit Database lezen
* DB name = basblog Table = berichten
* Veldnamen BerichtID|BerichtTitel|BerichtOmschrijving|BerichtInhoud|AuteurID|BerichtDatum
*/
// Is er een parameter meegegev... | true |
560d15b38ae5591b372304507fa4006de9fa5df1 | PHP | meloniq/wp-orphanage-extended | /wp-orphanage-extended-options.php | UTF-8 | 2,917 | 2.640625 | 3 | [] | no_license | <?php
if ( ! current_user_can( 'manage_options' ) ) {
wp_die( __( 'You do not have sufficient permissions to access this page.', WPOEX_TD ) );
}
// Update options
if ( isset( $_POST['action'] ) && $_POST['action'] == 'update' ) {
update_option( 'wporphanageex_role', $_POST['wporphanageex_role'] );
if ( isse... | true |
b492f58f2f896c97cd66fc3ce2fd2cb6859845ec | PHP | badtomcat/ui | /src/Base/Input/Radio.php | UTF-8 | 1,484 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017/11/29
* Time: 12:45
*/
namespace Badtomcat\Ui\Base\Input;
use Badtomcat\Ui\Base\Element;
class Radio extends Element {
public $label = "";
/**
*
* @param string $name
* @param string $value
*/
public function __... | true |
85cd616efed35eae341f4f0004131957cee80b0f | PHP | ussignal/ResqueBoard | /src/ResqueBoard/Lib/PageHelper.php | UTF-8 | 3,200 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* PageHelper file
*
* Various global helpers functions
*
* PHP version 5
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @package ResqueBoard
* @subpackage ResqueBoard.Lib
* @author Wan Qi Chen <kami@kamisama.me>
* @copyright 2012-... | true |
0cf302d074c5383a3fee635193484bc6f7da27f6 | PHP | roryphillipsjcu/webdesign | /event.php | UTF-8 | 2,861 | 2.59375 | 3 | [] | no_license | <?php
include("dbconnect.php")
?>
<!doctype html>
<html xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
<head>
<meta charset="utf-8">
<title>Event Database</title>
</head>
<body>
<a href="eventIndex.html">Home</a>
<h1>Events</h1>
... | true |
d5deae46eac092963b7228c2b54958155dd49577 | PHP | zw2009/201905 | /szjk后台管理/application/common/model/Advert.php | UTF-8 | 2,249 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\common\model;
class Advert extends Base{
protected $autoWriteTimestamp = true;
public function getPicturePathAttr($value,$data){
return filterPic($data['picture']);
}
public function position(){
return $this->belongsTo('AdvertPosition','position_id');
}
public function updates(){
$da... | true |
67933e77d216e3e3ea27dd3d51783ba042219666 | PHP | chenstrace/practise | /php/pipeline.php | UTF-8 | 912 | 2.6875 | 3 | [] | no_license | <?php
if ($argc != 3) {
$argv0 = $argv[0];
echo "usage: php $argv0 ip port\n";
exit;
}
$ip = $argv[1];
$port = $argv[2];
$buf = "GET / HTTP/1.1\r\nUser-Agent: curl/7.85.0\r\nHost: $ip:$port\r\nAccept: */*\r\n\r\n";
$buf_404_a = "GET /a HTTP/1.1\r\nUser-Agent: curl/7.89.0\r\nHost: $ip:$port\r\nAccept: */*\... | true |
4fbd232b7d15909542ce79130a6e3a82874848df | PHP | zwq/unpei | /protected/modules/user/components/UserIdentity.php | UTF-8 | 2,418 | 2.90625 | 3 | [] | no_license | <?php
/**
* UserIdentity represents the data needed to identity a user.
* It contains the authentication method that checks if the provided
* data can identity the user.
*/
class UserIdentity extends CUserIdentity {
private $_id;
const ERROR_EMAIL_INVALID = 3;
const ERROR_STATUS_NOTACTIV = 4;
con... | true |
3ceddfc4fc7c96d343ce579eb01d5ccf6b02e791 | PHP | GDATASoftwareAG/vaas-php | /Message/VaasVerdict.php | UTF-8 | 397 | 2.671875 | 3 | [] | no_license | <?php
namespace VaasSdk\Message;
class VaasVerdict
{
public function __construct(VerdictResponse $verdictResponse)
{
$this->Sha256 = $verdictResponse->sha256 ?? "";
$this->Verdict = $verdictResponse->verdict ?? Verdict::UNKNOWN;
$this->Guid = $verdictResponse->guid ?? "";
}
pu... | true |
d6d6689fb27a8ff672c8e78dd520d822a92b2e56 | PHP | joelrbrandt/how-s-ian-doing | /feed.php | UTF-8 | 1,537 | 2.84375 | 3 | [] | no_license | <?php
header("Content-Type: application/xml; charset=ISO-8859-1");
function parse($l) {
$r = explode(" ", $l);
$r[0] = intval($r[0]);
$r[1] = intval($r[1]);
return $r;
}
function getData() {
$a = file('log.txt');
$b = array_map(parse, $a);
$c = Array();
$last = 0;
for ($i = 0 ; $i... | true |
f38dc93c7ddd22f13a2ea39de29331b0a1f1f4e4 | PHP | I-am-bad-boy/Degree-workbench | /学委工作台/parts/ShowDeletesayboard.php | UTF-8 | 1,078 | 2.5625 | 3 | [] | no_license | <?php
$sql="select * from isay where class='{$class}' order by id desc";
$result=mysqli_query($link,$sql);
?>
<html>
<head>
<link type="text/css" rel="stylesheet" href="../parts/DeleteSayboard.css">
</head>
<body>
<div class="DeleteSayboard">
<table>
<tr class="Obvious">
<td>id</td>
... | true |
05f428ebbfc1043c0ff72566bbc0b07aad85cb8e | PHP | hiphp7/qirui_saas | /app/model/goods/InformSubject.php | UTF-8 | 3,551 | 2.65625 | 3 | [] | no_license | <?php
/**
* KirySaaS--------||bai T o o Y ||
* =========================================================
* ----------------------------------------------
* User Mack Qin
* Copy right 2019-2029 kiry 保留所有权利。
* ----------------------------------------------
* ========================================================... | true |
4dbf735e3f013345a3aadce3507735e1627deb96 | PHP | strstensky/laracom | /app/Shop/Addresses/Requests/CreateAddressRequest.php | UTF-8 | 976 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Shop\Addresses\Requests;
use App\Shop\Base\BaseFormRequest;
class CreateAddressRequest extends BaseFormRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'alias' => ['requi... | true |
15fc7fbb3c6759f9adfd4f2470f38a311d9636af | PHP | jhonatancruzmail/instructor_sergio | /ejrcicios php/10.php | UTF-8 | 57 | 2.6875 | 3 | [] | no_license | <?php
for ($x=50; $x >= 1; $x--) {
echo $x."<br>";
}
?> | true |
92e146126315eb6496180046a0f7b902c115ca39 | PHP | pub007/dstruct | /src/mobile/URLTranslatorInterface.php | UTF-8 | 601 | 2.9375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* URLTranslatorInterface class
*/
/**
* Interface for mobile translator classes.
* @package dstruct_mobile
*/
interface URLTranslatorInterface {
/**
* Class constructor
* @param string $main Main site
* @param string $alt Alternative 'mobile' site
*/
public function __construct($main, $alt);
/**
* ... | true |
5de59d8b96728a322fe696c53758367437ab13f0 | PHP | melenchenko/memcache-raw | /src/MemcachedTelnet.php | UTF-8 | 1,521 | 2.71875 | 3 | [] | no_license | <?php
ini_set('display_errors', 'On'); // сообщения с ошибками будут показываться
error_reporting(E_ALL); // E_ALL - отображаем ВСЕ ошибки
use \Graze\TelnetClient\TelnetClient;
use \Graze\TelnetClient\TelnetResponse;
class MemcachedTelnet extends TelnetClient {
protected function getResponse($prompt = null)
{... | true |
7f5670e3555772b2967dd575ef5ca597984c8773 | PHP | mahmut/fileupload | /tests/FileUpload/FileUploadTest.php | UTF-8 | 1,906 | 2.609375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace FileUpload;
use PHPUnit\Framework\TestCase;
class FileUploadTest extends TestCase
{
protected function setUp(): void
{
$playground_path = __DIR__ . '/../playground';
$fixtures_path = __DIR__ . '/../fixtures';
if (! is_dir($playground_path)) {
mkdir($playgr... | true |
be61923f5c96d9dce5e4376f32b70042c293d97d | PHP | VishnuDhaya/karka_projects | /pgm20.php | UTF-8 | 275 | 3.875 | 4 | [] | no_license | <?php
echo "I will add up the numbers you give me.\n";
$number=(int)readline('Number: ');
$add=0;
while($number != 0)
{
$add=$add + $number;
echo "\nThe total so far is :".$add."\n";
$number=(int)readline('Number: ');
}
echo "\nThe total is ".$add;
?> | true |
026e4b5b1c744cd9c22d187ba1b5104940c838ca | PHP | Velkezar/xauth | /tests/GroupTest.php | UTF-8 | 4,674 | 2.671875 | 3 | [] | no_license | <?php
/**
* User Group Tests
*
* @author Alexander Shepetko <a@shepetko.com>
* @since 0.0.1
*/
/**
* User Group Tests
*/
class GroupTest extends TestCase {
protected $id = null;
protected $name = null;
protected $desc = null;
protected $group = null;
public function setUp() {
parent... | true |
b655508e54d07e66aff10a8357db13cc58d780e9 | PHP | andrew-yt-wong/QuizInfinite | /db/db_quiz_deletion.php | UTF-8 | 1,726 | 2.65625 | 3 | [] | no_license | <?php
require '../config/config.php';
$mysqli = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
if($mysqli->connect_errno) {
echo $mysqli->connect_error;
exit();
}
$sql_find_questions = "SELECT * FROM questions WHERE quiz_id = " . $_GET['quiz_id'] . ";";
$results_find_questions = $mysqli->query($sql_find_qu... | true |
bf168d96a8d42c3392a51af28a4dc50a78f6a2c7 | PHP | mathiasrove/Assignment1 | /login.php | UTF-8 | 2,042 | 2.734375 | 3 | [] | no_license | <!DOCTYPE html >
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title>GuessGame - Login</title >
</head>
<body>
<?php
session_save_path('sess');
session_start();
?>
<h1> Welcome to ToDo </h1>
<form action="login.php" method="post">
<p> Enter username and password: </p>
... | true |
32879ae7761aa718f6b6e6e1b6013736e8c61266 | PHP | comerciopartners413/tradefi | /app/Mail/DepositMail.php | UTF-8 | 616 | 2.609375 | 3 | [] | no_license | <?php
namespace TradefiUBA\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
use TradefiUBA\CashEntry;
class DepositMail extends Mailable
{
use Queueable, SerializesModels;
public $deposit;
public functio... | true |
dfffd29690fd903c7b39c1bc63f768d9af3520fe | PHP | joeworld/car-service | /app/Adapters/InspectionAdapter.php | UTF-8 | 348 | 2.984375 | 3 | [] | no_license | <?php
namespace App\Adapters;
use App\Contracts\ServiceInterface;
/**
* The inpection adapter would implement the service interface
*/
class InspectionAdapter implements ServiceInterface
{
protected $_cost;
public function setCost($cost = 50){
$this->_cost = $cost;
}
public function getServiceCost()
{
... | true |
66f8cf00515ce4b6316cd5942ba55a08b4dfe2c3 | PHP | n2ayalew/XLearning | /database/seeds/GradeTableSeeder.php | UTF-8 | 1,618 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class GradeTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('grades')->delete();
\App\grade::create(array(
'test_id' => 1,
'class_id' =>1,
... | true |
f99840585d48f983db37ffeb20517508afa03a74 | PHP | freel/ootitb | /app/Http/Controllers/QuizController.php | UTF-8 | 7,526 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Category;
class QuizController extends Controller
{
public function index($parent_id = '0'){
$categories = Category::select('id', 'title', 'description_short')
->where('parent_id', $parent_id)
// ->whereHas('ch... | true |
7da6d12a8172f3229d627e8e01966e2bbdf82592 | PHP | ANUSHAVAVILTHOTA/PHP-Programs | /10-06-2021/ascii_values.php | UTF-8 | 723 | 3.703125 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<?php
// for every char/number/spl char === ascii values
//chr == ascii values to char
// ord == chr == ascii
echo chr(65);
echo "<br/>";
echo ord('A');
// ascii values of a char / string (word) /sent
echo "<br... | true |
b2e6d6fbe159827000f76645f5bec5e90ec53b73 | PHP | j0k3r/safecurl | /src/SafeCurl.php | UTF-8 | 6,110 | 2.953125 | 3 | [] | no_license | <?php
namespace fin1te\SafeCurl;
class SafeCurl
{
/**
* cURL Handle.
*
* @var resource
*/
private $curlHandle;
/**
* SafeCurl Options.
*
* @var Options
*/
private $options;
/**
* Returns new instance of SafeCurl\SafeCurl.
*
* @param $curlHan... | true |
246978b926ddb92fcb1ee4b6a9bd523e794ce821 | PHP | HaykZiroyan/tasks-php | /task11.php | UTF-8 | 827 | 3.671875 | 4 | [] | no_license | <!-- example 11 -->
<!-- Write a PHP program to merge (by index) the following two arrays.
Sample arrays :
$array1 = [array[77, 87], [23, 45]];
$array2 = ["w3resource", "com"];
Expected Output :
Array
(
[0] => Array
(
[0] => w3resource ... | true |
ed27eb96e5bc1d4a23a2e6dc459270ebc9b35abe | PHP | paulgoulpie/agora-project-webdav | /FileAgoraProject.php | UTF-8 | 2,326 | 2.546875 | 3 | [] | no_license | <?php
use Sabre\DAV;
use Sabre\DAV\Exception;
use function GuzzleHttp\Psr7\mimetype_from_filename;
require_once '../app/misc/google-api-php-client/vendor/guzzlehttp/psr7/src/functions.php';
class FileAgoraProject extends DAV\File
{
private $strName;
private $idFile;
private $pdo;
private $size;
... | true |
dc5a1e88bfb26c9438c0ad0ad09f09986dc93a19 | PHP | malihassan20/LicenseManagementSystem | /database/migrations/2017_03_16_102149_create_projects_table.php | UTF-8 | 1,036 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateProjectsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('projects', fun... | true |
1da8210bbadf6f4813c4fbd2dc1fcea852a660f7 | PHP | aaiche/42-piscine_php | /piscine.b/rush00/rush-exemple-par-alex/rush00_amottier/products_list.php | UTF-8 | 1,432 | 2.578125 | 3 | [] | no_license | <?php
include_once 'db_connect.php';
$conn = OpenCon();
$cat = $_GET['cat'];
$sql = "SELECT
shop.products.id,
shop.products.`name`,
shop.products.description,
shop.products.image_sm,
shop.products.image_xl,
shop.products.price,
shop.products.`status`
FR... | true |
053867617aebcf70f45feff40c0e374a65dda088 | PHP | ranaamrita/form | /static.php | UTF-8 | 1,550 | 4 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>static demo</title>
</head>
<body>
<?php
class Car {
function Car(){
$this->model ="VW";
}
}
//create an object
$herbie = new Car();
//show object properties
echo $herbie->model;
echo "<br>";
?>
<?php
define("GREETING","Welcome to W3Schools.com!");
echo GREETING;
echo"<br>";
... | true |
05fad7b10858fd02b227b8c320ef798a43092c91 | PHP | ThomasAltena/SrgConcept | /manager/UserManager.php | UTF-8 | 2,758 | 2.921875 | 3 | [] | no_license | <?php
class UserManager
{
private $_Db;
public function __construct($db){$this->setDb($db);}
public function SetDb(PDO $db){$this->_Db = $db;}
public function AddUser(User $User){
$q = $this->_Db->prepare('INSERT INTO users VALUES(:IdUser, :NomUser, :SiretUser, :AdresseUser, :DateConnexionUser, :PseudoUser, ... | true |
30061479cf731aca68d72ec78ad1d0d06df8f81a | PHP | nanashiRei/osumirror-childv2 | /library/AutoLoader.php | UTF-8 | 1,696 | 2.859375 | 3 | [] | no_license | <?php
class OsuMirror_AutoLoader
{
private static $_instance;
protected $_separator = '_';
protected $_map = null;
public function __construct()
{
$this->_map = array();
$mapConfig = parse_ini_file(APPLICATION_PATH . '/config/map.ini',true);
foreac... | true |
f4cf48085cbf4da434fe39c792403dbb300c111c | PHP | melightcap/School-Database-Project | /select_9b.php | UTF-8 | 1,338 | 2.59375 | 3 | [] | no_license | <?php
$con=mysqli_connect("db.soic.indiana.edu","i308f17_team73","my+sql=i308f17_team73","i308f17_team73");
//Check connection
if (mysqli_connect_errno())
{echo nl2br("Failed to connect to MySQL:" . mysqli_connect_error() . "\n");}
$sanmajor = mysqli_real_escape_string($con, $_POST['major']);
echo "<title>Team 73 - 9b... | true |
4cb482c9017ad66dc228d4ac8e20cac02f968002 | PHP | fendy3002/QzPhp | /src/QzPhp/FileReader.php | UTF-8 | 2,642 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
namespace QzPhp;
class FileReader{
/**
* read file by part and process each part. Separated by newline
* @param string $file file path
* @param closure $process function to be processed
* @param integer $chunk chunk size, default 32 kb or 2 ^ 15
* @return void
*/
p... | true |
213241e5ccb24481aa87d0901777eb3be6987369 | PHP | henrik2311/lamee.2.0.5-paypal-update | /includes/external/easycredit/EasyCredit/Transfer/ModelCalculation.php | UTF-8 | 1,160 | 2.59375 | 3 | [] | no_license | <?php
namespace EasyCredit\Transfer;
/**
* Class ModelCalculation
*
* @package EasyCredit\Transfer
* @apiName modellrechnungDurchfuehrenResponse
*/
class ModelCalculation extends AbstractObject
{
/**
* @var InstallmentPlanCollection
* @apiName ergebnis
* @transferClass EasyCredit\Transf... | true |
385202d3eeafbd9562eeae96324bd04f8febab2f | PHP | rudestan/Teebot | /src/Api/Method/SendAudio.php | UTF-8 | 1,398 | 2.625 | 3 | [] | no_license | <?php
/**
* Class that represents Telegram's Bot-API "getUserProfilePhotos" method.
*
* @package Teebot (Telegram bot framework)
*
* @author Stanislav Drozdov <rudestan@gmail.com>
*/
namespace Teebot\Api\Method;
use Teebot\Api\Entity\Message;
use Teebot\Api\Traits\File;
use Teebot\Api\Entity\InputFile;
class ... | true |
fed6bac3ec6157a9e4c522989a7de6b44193b4a7 | PHP | cuisine-wp/chef-sections | /Classes/Contracts/Section.php | UTF-8 | 427 | 2.8125 | 3 | [] | no_license | <?php
namespace ChefSections\Contracts;
interface Section{
public function sanitizeArgs( $args );
public function setAttributes( $args );
public function getAttributes();
public function beforeTemplate();
public function afterTemplate();
public function getClass();
public function getProperty( $n... | true |
7d6a6f190bff20b8ae05c68bfe77faf92cc736b0 | PHP | mukesh2122/samlink | /protected/model/CalendarDay.php | UTF-8 | 1,205 | 2.96875 | 3 | [] | no_license | <?php
/**
* NOT ASSOCIATED WITH DB
*
Subclass of Calendar - Used for managin days and what state they should be
* And in view viewc/events/calendar.php file
**/
class CalendarDay{
/**
* @var string $when Used for defining state ('empty','future','now','past')
**/
public $when;
/**
* @var boolean $empty true if ... | true |
b0502cbc0089251d1f2a9b9f55b21ccd0003f0cf | PHP | mikijakov/donesivolonter | /includes/getcoords.php | UTF-8 | 751 | 2.625 | 3 | [] | no_license | <?php
if (isset($_POST['id'])) {
require "dbset.php";
$id = filter_input(INPUT_POST, 'id', FILTER_VALIDATE_INT);
$sql = "SELECT latitude, longitude FROM dostave WHERE id=?";
$stmt = $connection->prepare($sql);
$stmt->bind_param("i", $id);
$stmt->exe... | true |
d3dcf956f3e3ae9bc4347392459bf73d6b2070cd | PHP | SAINI673/laravel-table | /src/Traits/Column/HasTitle.php | UTF-8 | 611 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Okipa\LaravelTable\Traits\Column;
use Okipa\LaravelTable\Column;
trait HasTitle
{
protected ?string $title;
public function title(?string $title): Column
{
$this->title = $title;
/** @var \Okipa\LaravelTable\Column $this */
return $this;
}
public functio... | true |
8b96ee67dd71922e85a1eb277f8ac57376e729df | PHP | fearussia86/php-homework | /DogCatMouse/Objects.php | UTF-8 | 326 | 3.015625 | 3 | [] | no_license |
<?php
require_once "Dog.php";
require_once "Cat.php";
require_once "Mouse.php";
//$handler1 = Animal::getAnimalName($name);
//$animal = Animal::setAnimalName($name);
$dog1 = new Dog();
$dog1->run('25', "Мышкой");
$cat = new Cat();
$cat->eat("мышку");
//var_dump($dog1::eat('Шарик', $cat));
?>
| true |
aea9fa4b5d5b34d680cd705eb6dbd6e4c4f1d999 | PHP | sasigit7/PersonalHomePHP | /PHP-Tasks/37.Task37/Task37Solution/WebTask37.php | UTF-8 | 402 | 3.484375 | 3 | [] | no_license | <?php
class array_sort {
protected $_asort;
public function __construct(array $asort){
$this->_asort = $asort;
// print_r($asort);
}
public function alhsort() {
$sorted = $this->_asort;
sort($sorted);
return $sorted;
}
}
$sortarray = new... | true |
d71e850caa8e59985210df91f40d698733b4cbf6 | PHP | laboule/pangolin-pierre | /app/Mail/Mailer.php | UTF-8 | 1,173 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Mail;
use \Mailjet\Client;
use \Mailjet\Resources;
class Mailer {
private $mj;
/**
*
*/
public function __construct() {
$this->mj = new Client(env('MJ_APIKEY_PUBLIC'), env('MJ_APIKEY_PRIVATE'), true, ['version' => 'v3.1']);
}
/**
* Send a mail
*/
public function constructBody($da... | true |
6305ba5659a7a5e7f16954a0d4e88a049001b758 | PHP | Tuscann/PHP_MVC | /04.Exercise MVC Fundamentals/Example/Services/UserServiceInterface.php | UTF-8 | 385 | 2.5625 | 3 | [
"Artistic-2.0"
] | permissive | <?php
namespace SoftUni\Services;
use SoftUni\Models\Binding\Users\UserProfileEditBindingModel;
use SoftUni\Models\DB\User;
interface UserServiceInterface
{
public function login($username, $password): bool;
public function register($username, $password): bool;
public function findOne($id): User;
p... | true |
1f8b98f858452221774e03c194bf65cc5a2f6c98 | PHP | KrystalKZ/Secure-Web | /Toko Kodok/controllers/registercontrollers.php | UTF-8 | 2,497 | 2.5625 | 3 | [] | no_license | <?php
if ($_SERVER['REQUEST_METHOD'] === 'POST')
{
require_once "./../db/db.php";
require_once "./../assets/generateToken.php";
session_start();
$username = $_POST['username'];
$pass = $_POST['password'];
$email = $_POST['email'];
$captcha = trim($_POST['captcha']);
$token = $_POST['token']... | true |
cd662f1332004b8eab25a6b51a339a75a56b7a8a | PHP | erwan-neel/Navigo | /tests/TimerTest.php | UTF-8 | 1,588 | 2.984375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Erwan
* Date: 20/05/2017
* Time: 16:08
*/
namespace Library;
require 'vendor/autoload.php';
use Library\Timer;
use PHPUnit\Framework\TestCase;
function time()
{
return TimerTest::$now ?: \time();
}
class TimerTest extends TestCase
{
public static $now;
public fun... | true |
602ff7d7739c758b3c2581422ebc45cc8f1e2378 | PHP | Ahmad-Mohammad-Kouja/Project-Assistant | /src/Rules/Phone.php | UTF-8 | 500 | 2.75 | 3 | [] | no_license | <?php
namespace Kouja\ProjectAssistant\Rules;
use Illuminate\Contracts\Validation\Rule;
class Phone implements Rule
{
public function passes($attribute, $value)
{
return preg_match('/(\+|00)(9[976]\d|8[987530]\d|6[987]\d|5[90]\d|42\d|3[875]\d|
2[98654321]\d|9[8543210]|8[6421]|6[6543210]|5[... | true |
7079831b106674be549a2e6d72a8688272831b0a | PHP | balrok/aiajaya | /modules/page/controllers/PageController.php | UTF-8 | 8,690 | 2.625 | 3 | [] | no_license | <?php
if (count($_POST)>0)
Yii::log(serialize($_POST), 'info', 'PAGECONTROLLER-POST');
class PageController extends Controller
{
/**
* @var CActiveRecord the currently loaded data model instance.
*/
private $_model;
/**
* @return array action filters
*/
public function filters()
{
return array(
'ac... | true |
d597049c427aecbf9fc4e11538f490be35105638 | PHP | onward-web/yii2-multilingual | /src/validators/IpValidator.php | UTF-8 | 1,191 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace DevGroup\Multilingual\validators;
use yii\validators\Validator;
/**
* Validates if string is a valid ip
* @package DevGroup\Multilingual\validators
*/
class IpValidator extends Validator
{
/**
* @var bool Filter for IPV4 only
*/
public $ipv4 = false;
/**
* @var bool Filt... | true |
f2c0b377349d7086654ae6a771cd3b6b6c48cf36 | PHP | sugengstiki/ci2 | /application/controllers/seminar.php | UTF-8 | 7,988 | 2.53125 | 3 | [] | no_license | <?php
/**
* @file seminar.php
* @brief Digunakan untuk mengelola request dari user yang berhubungan dengan data seminar, seperti
* - permintaan untuk form isi dan edit data seminar,
* - permintaan daftar seminar
*/
class Seminar extends CI_Controller {
var $message;
var $file;
var $path;
/**... | true |
1207768fd7e6bc5d3fa883164bd454862338691f | PHP | zakirovir6/orm-sample | /src/ORM/Query.php | UTF-8 | 6,126 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: igorek
* Date: 10.01.18
* Time: 0:55
*/
namespace TestWork\ORM;
use TestWork\ConnectionFactory;
use TestWork\ORM\Filter\Filters\EqualsFilter;
use TestWork\ORM\Filter\Filters\InFilter;
use TestWork\ORM\Iterator\BufferedIterator;
use TestWork\ORM\Iterator\UnbufferedIterato... | true |
fd41cee4a56c581ed9e7bafe9bd13bc3e9bd2dca | PHP | tetz2442/Grumble | /grumblemvc/model/notificationmodel.php | UTF-8 | 556 | 2.625 | 3 | [] | no_license | <?php
class Notifications extends BaseModel {
public function update() {
}
public function save() {
}
public function delete() {
}
//gets grumble and creates 3 new objects
public function load() {
if(isset($_SESSION["user_id"])) {
$sql = "SELECT notification_id, notification_message, notific... | true |
ccb9e402e52ceba17956dfbde5c3ddfdbead3116 | PHP | riskidwiputra/StatisticInvestor | /app/Core/Controller.php | UTF-8 | 5,487 | 2.65625 | 3 | [] | no_license | <?php
class Controller {
public function __construct()
{
$this->db = new Database;
}
public function view($view, $data = [])
{
require_once 'app/Views/' . $view . '.php';
}
public function model($model){
... | true |
ede451d978f6ee761c7d8ff8405fdcf2da1b6ec1 | PHP | zeevx/easy-law | /app/Models/Court.php | UTF-8 | 800 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Models;
use App\Traits\HasCustomFields;
use Illuminate\Database\Eloquent\Model;
class Court extends Model {
use HasCustomFields;
protected $with = ['court_category'];
protected $table = 'courts';
protected $primaryKey = 'id';
protected $fillable = ['country_id', 'state_id', 'city_id', '... | true |
5fa296277b8f035ae9a41b8c705a02ab7d3f35f2 | PHP | haucoin/assessment | /app/Models/Data.php | UTF-8 | 1,310 | 3.578125 | 4 | [
"MIT"
] | permissive | <?php
namespace App\Models;
class Data {
// Define variables for the data object
private $input1;
private $input2;
private $input3;
private $input4;
/**
* Non-default constrcutor to initialize a data object
*
* @param $input1 - String: The first variable input of the form for the data object
* @pa... | true |
64bc8b35370ac83d847218abbac45ea187de2ef5 | PHP | cdcharlebois/cc | /app/controllers/PeeController.php | UTF-8 | 1,038 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: charlebo
* Date: 12/9/14
* Time: 1:08 PM
*/
class PeeController extends BaseController
{
public function index()
{
// Get all Guys and their locations
return View::make('game',['foo'=>'bar']);
}
public function sendToBathroom($guyId, $urina... | true |
7a78d501a6a3dd1d891cfd22f36829306adb0a58 | PHP | Daaarkling/benchmark | /benchmark-php/app/Metrics/Info.php | UTF-8 | 1,650 | 3.078125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Jan
* Date: 14. 2. 2017
* Time: 13:18
*/
namespace Benchmark\Metrics;
use Benchmark\Config;
class Info
{
/** @var string */
private $format;
/** @var string */
private $name;
/** @var string */
private $url;
/** @var string */
private $version;
/**
* Info... | true |
ea1b1c3a87e6a4ca4808bcb1e0d5d25dfaafc0c3 | PHP | kellyguimarans/email | /upload.php | UTF-8 | 732 | 2.65625 | 3 | [] | no_license | <?php
$nomePasta = $_POST['nomePasta'];
$pasta = 'emails/'.$nomePasta.'/images/';
$images_arr = array();
foreach ($_FILES["fileUpload"]["error"] as $key => $val) {
$tmp_name = $_FILES["fileUpload"]["tmp_name"][$key];
$nome = $_FILES["fileUpload"]["name"][$key];
... | true |
709bad671f4704d8dad9cc8cdd040a55b5030ce8 | PHP | abrardev99/samples | /Platform to conduct match, tournament and competition/Jobs/UpdateCompetitionWinnerLevel.php | UTF-8 | 2,130 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Jobs;
use App\CompetitionLevel;
use App\CompetitionMatchPlayerPoints;
use App\CompetitionPlayerLevel;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels... | true |
cdcfce026f54937fc90e8a906c4593aa5103afb5 | PHP | tafadzwagonera/dutuphp | /lib/dutuphp/Database.php | UTF-8 | 6,372 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Describes a set of operations that a database implementation
* provides to its clients
*
* @package dutu
* @subpackage fieldbase
*
* @author Tafadzwa Gonera <tafadzwagonera@gmail.com>
* @version v1.0.0
* @since v1.0.0
*
* @filesource Database.php
*/
interface Database {... | true |
798b6b2edcc20adf9d027687d14ada109528aea2 | PHP | LadikViktor/First.progect | /OOP/DZ_OOP_TEGI/Br.php | UTF-8 | 130 | 2.765625 | 3 | [] | no_license |
<?php
class Br extends Tag
{
public function html()
{
return "<br $this->id$this->class$this->style>";
}
}
| true |
9ad3eb5908abcd6d4aeecf0a383da9e844f4284d | PHP | phux/phpcs-calisthenics-rules | /src/ObjectCalisthenics/Sniffs/ControlStructures/NoElseSniff.php | UTF-8 | 551 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace ObjectCalisthenics\Sniffs\ControlStructures;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
final class NoElseSniff implements Sniff
{
/**
* @return int[]
*/
public function register(): array
{
return [T_ELSE, T_ELSEIF];
}
... | true |
fa14fd17f9261a829cbb02281bbf307e34715d21 | PHP | xiaochongchong86/hadoop | /countcdn/map.php | UTF-8 | 189 | 2.515625 | 3 | [] | no_license | <?php
$btime = "/btime.com/";
while(($line = fgets(STDIN))!== false) {
if (empty($line)) {
continue;
}
if (preg_match($btime, $line, $match)) {
}
}
| true |
ef2723a87eca1151e81ca02418789dcdd9952625 | PHP | tumao/phonetop | /backend/orm/phonepro_v2/AppTopic.orm.php | UTF-8 | 831 | 2.53125 | 3 | [] | no_license | <?php
namespace ORM\phonepro_v2
{
class AppTopicORM extends \ORM
{
const TABLE = 'app_topic';
public function get_app_selected($arr_app_id)
{
if (empty($arr_app_id))
{
return array();
}
$arr_app_id = explode(',', $arr_app_id);
$valified = array();
foreach ($arr_app_id ... | true |
98b89cdae454de5305c52f8cf356e06722d4d19a | PHP | Starportcom/Starport | /Controllers/LessonController.php | UTF-8 | 8,386 | 2.703125 | 3 | [] | no_license | <?php
/**
* レッスン情報に関するページの処理を行うクラス
*
* @package starport
* @subpackage Controllers
* @author yKicchan
*/
class LessonController extends AppController
{
/**
* レッスンの詳細情報を表示するページ
*
* @return void
*/
public function detailAction()
{
// URLからレッスンidを取得
$id = $th... | true |
68b5672b0fa5b214e49418c831b12a31bb21458f | PHP | switchforce1/hepatron-server | /src/Entity/Admin/Member.php | UTF-8 | 771 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Dadja
* Date: 04/08/2018
* Time: 22:59
*/
namespace App\Entity\Admin;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Security\User;
use App\Entity\EntityInterface;
/**
* Class Member
* @package App\Entity\Admin
* @ORM\MappedSuperclass
*/
class Member implements Enti... | true |
820887f9dbd21d3839dac5cc377817d126e7019e | PHP | ekino/EkinoDrupalBundle | /Security/Voter/RoleVoter.php | UTF-8 | 1,649 | 2.5625 | 3 | [] | no_license | <?php
namespace Ekino\Bundle\DrupalBundle\Security\Voter;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\VoterInterface;
/**
* RoleVoter votes if drupal permission attribute.
*
* @author Florent Denis <fdenis@ekino.com>
*/
class Ro... | true |
62fc4aec0dab6f596cb1f57948fdc5e6c0ac3337 | PHP | Alf74570/mes_petites_annonces | /src/Entity/Ad.php | UTF-8 | 3,259 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity(repositoryClass="App\Repository\AdRepository")
*/
class Ad
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Colum... | true |