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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
79e03733587930205c349f3031b8507c121e5daa | PHP | OurTimeMedia/votenet | /voter/cron/send_reminders.php | UTF-8 | 2,892 | 2.546875 | 3 | [] | no_license | <?php
$_SERVER['HTTP_HOST'] = '';
require_once(__DIR__ . "/../include/common_includes.php");
require_once(COMMON_CLASS_DIR . "clscommon.php");
require_once (COMMON_CLASS_DIR . "clsvoter_reminder.php");
$voterReminder = new voter_reminder();
$reminders = $voterReminder->loadReminders();
foreach ($reminders as $remind... | true |
31176acb2176e01d152bb3587bd468712f60f058 | PHP | prosto7/centaprint | /pages/connect.php | UTF-8 | 630 | 2.875 | 3 | [] | no_license | <?php
function connect($host="127.0.0.1", $user="root", $pass="", $dbname="print") {
$link = mysqli_connect($host, $user, $pass, $dbname);
if(!$link) {
echo "Ошибка: невозможно установить соединение с MySQL";
echo "Код ошибки errno".mysqli_connect_errno();
echo "Текст ошибки".mysql... | true |
5a3d20570870abdb263376b1d86233ae7cf547d3 | PHP | HelmDefense/HelmDefense-Web | /www/modules/panel/mod_redac/PanelRedacModule.php | UTF-8 | 1,413 | 2.546875 | 3 | [] | no_license | <?php
namespace Module;
use Utils;
class PanelRedacModule extends Module {
public function __construct() {
parent::__construct(new PanelRedacController(), "Panel de rédaction");
}
/**
* @inheritDoc
*/
protected function execute() {
$this->controller->verifyAccess();
switch (Utils::get("action", "home"... | true |
3dc581806548f67dd03671705b01ebf262c14134 | PHP | Olrand-dev/dbtools_modules | /GlobalQueue/Src/Tasks/ProdsCacheUpdateDatacacheSelectedTask.php | UTF-8 | 1,021 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace NutixApp\GlobalQueue\Src\Tasks;
use NutixApp\GlobalQueue\GlobalQueue;
use NutixApp\GlobalQueue\Src\GlobalTaskFileStorage;
class ProdsCacheUpdateDatacacheSelectedTask extends GlobalTaskFileStorage
{
public function __construct(int $id = 0, bool $onlyInfo = true)
{
... | true |
a1c9fb93b7e0f92c96fd08b8d14712e7c63cba2d | PHP | MatijaTeamFocus/eudc_app | /app/controllers/UniversityController.php | UTF-8 | 2,511 | 2.90625 | 3 | [] | no_license | <?php
namespace Controllers;
use Models\University;
class UniversityController extends ControllerBase
{
public function createNewUniversity()
{
$response = $this->response;
try {
$name = $this->getJsonParameterFromPost('name', 'string', true);
$city = $this->getJsonPa... | true |
eeac0be2f04b89f59d0876612d99d6697a0d10e8 | PHP | kikwik/user-log-bundle | /src/Entity/RequestLog.php | UTF-8 | 5,222 | 2.609375 | 3 | [] | no_license | <?php
namespace Kikwik\UserLogBundle\Entity;
class RequestLog
{
/**************************************/
/* PROPERTIES */
/**************************************/
/** @var integer */
private $id;
/** @var string */
private $sessionLogIdentifier;
/** @var stri... | true |
fa4c84247a52d67f635a7acdc38d75c0715daec0 | PHP | tumingke0/DesignPattern | /builder/Burger.php | UTF-8 | 273 | 2.75 | 3 | [] | no_license | <?php
/**
* @description:
* @author: wzzjjboy@126.com
* DateTime: 16/11/1 下午10:40
*/
namespace designPattern\builder;
abstract class Burger implements Item
{
public function packing()
{
return new Wrapper();
}
abstract public function price();
} | true |
db43326c1fa158e0cba1f34d15be7fbd2bc7177a | PHP | C3S-Data-Rescue-Lot1-WP3/Digihom | /opc/opc_item.php | UTF-8 | 13,706 | 2.78125 | 3 | [] | no_license | <?php
interface opi_dist{
static function newobj($type);
}
class opc_dist_item implements opi_dist{
static public $decode_table = array(); // allows direct mapping between type and target class
static function newobj($type /* ... */){
if(is_null($type)) return;
$ar = func_get_args();
$type = arra... | true |
1e7465fbd8e0e87018a57bd94832d50622c7cab3 | PHP | JaimeVelasco/codeup_exercises | /PHPchallenge/currency_converter.php | UTF-8 | 625 | 3.703125 | 4 | [] | no_license | <?php
echo "Enter the amount that you want want to convert: $";
$amount = trim(fgets(STDIN));
echo "What currency do you want to convert to? (E)uros, (P)esos, (B)ritish Pounds: ";
$input = strtoupper(trim(fgets(STDIN))) ;
$euro = 0.73;
$pound = 0.60;
$peso = 13;
if ($input == 'E') {
$euros = $amount *... | true |
e63476938cc3f5e998464236f5e5644fc5ffde45 | PHP | SIU-Toba/SecurityMultiTool | /library/SecurityMultiTool/BBCode/Parser.php | UTF-8 | 2,230 | 2.71875 | 3 | [] | no_license | <?php
namespace SecurityMultiTool\BBCode;
use Decoda\Decoda;
use Decoda\Filter;
use Decoda\Hook;
use SecurityMultiTool\Html\Sanitizer;
use SecurityMultiTool\Exception;
use SecurityMultiTool\Common;
class Parser implements Common\OptionsInterface
{
protected $parser = null;
protected $sanitizer = null;
... | true |
dc4e21981ad523432aaa916d8b3ebcabe378d472 | PHP | mmshi/gt-is-good | /OutOfDate/GTMob/scripts/GtIsGoodObjects.php | UTF-8 | 2,073 | 2.796875 | 3 | [] | no_license | <?php
class GTIGScheduleTypes {
const DAY = '1day';
const HOUR = '1hour';
const HALFHOUR = '30min';
}
class GTIGSchedule {
private $id;
private $creatorId;
public $startDate;
public $endDate;
public $alias;
public $type; // GTIGScheduleTypes
function __construct($id, $creatorId, $startDate, $... | true |
05c3324c4428bdf25ae6958f5524147204323348 | PHP | sahapranta/test | /app/Utils/ImageUplaodTrait.php | UTF-8 | 445 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Utils;
use Illuminate\Support\Str;
trait ImageUplaodTrait{
public function imageUpload($query)
{
$imagName = Str::random(20);
$ext = strtolower($query->getClientOriginalExtension());
$imageFullName = $imagName.'.'.$ext;
$uploadPath = 'candidate/';
... | true |
276cff1de3652f301093333b89f54ca683fb5c62 | PHP | mlades/ca-homeworks | /Homework23/HW_23_02/hw02-else-if.php | UTF-8 | 1,853 | 3.390625 | 3 | [] | no_license | <?php
$displayForm = True;
$heading = "";
if(isset($_POST['day'])){
$heading = "<h1>Pick a day</h1>" ;
if ($_POST['day'] === "Monday") {
$heading .= "<p>Laugh on Monday, laugh for danger.</p>";
} elseif ($_POST['day'] === "Tuesday") {
$heading .= "<p>Lau... | true |
b9ba9796936892f331e4369e256ac91d7a817acd | PHP | KoenPasman/PHPEulerProject | /15/Solution.php | UTF-8 | 2,858 | 3.671875 | 4 | [] | no_license | <?php
/*************************************************************************
* Project Euler Problem 15 (http://projecteuler.net/problem=15)
*
* A PHP implementation by Koen Pasman
* http://koenpasman.nl
*************************************************************************/
class Solution implements Solut... | true |
5b4085397b4e16087fd35c0cd198ada454326880 | PHP | StrasWeb/chaton-cms | /plugins/about_box/AboutBox.php | UTF-8 | 1,268 | 2.75 | 3 | [] | no_license | <?php
/**
* AboutBox class
* Displays the box
*
* PHP Version 5.3.6
*
* @category Plugin
* @package Chaton
* @author Pierre Rudloff <rudloff@strasweb.fr>
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License
* @link http://cms.strasweb.fr
*/
if (isset($dom) || isset($this)) ... | true |
0c0406097226d07074477a7529ab048a2f9d30f0 | PHP | Verdient/dora | /src/Utils/Token.php | UTF-8 | 1,096 | 2.734375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Verdient\Dora\Utils;
use Verdient\token\Token as TokenToken;
/**
* 令牌
* @author Verdient。
*/
class Token
{
/**
* 生成秘钥
* @param int $id 用户编号
* @param string $type 类型
* @return array
* @author Verdient。
*/
public static function generat... | true |
e7a43c936fce2e023303b3343e26d63250646962 | PHP | aldridche/ProyectosPHP | /MOD-4/for.php | UTF-8 | 432 | 2.84375 | 3 | [] | no_license | <?php
for( $i = 1; $i < 4; $i++ )
echo $i . " ";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bucle for</title>
</head>
<body>
<select name="" id="">
<?php for( $i = 10 ;$i >= 0; $i-... | true |
dd76d01588690bf9445128dce3f297589a5cf93f | PHP | Felidaeblackblue/php_new | /index.php | UTF-8 | 475 | 3.703125 | 4 | [] | no_license |
<?php
$name = "John"; // Commentaire
$email = "jon@yahoo.com";
$age = 12;
$users = ['lulu','Marco', 'beber','Juju'];
/*echo $name;
echo "<br>";
echo "mon nom est"." ".$name;
$a = 0;
while ($a <= 10){
echo $a;
echo '<br>'
$a++;
}
for ($i=0; $i < count($users) ; $i++) {
echo "<p>$users[$i]</p>"
}
*/
foreac... | true |
10897cdbaada7fec468a7ea4799ba4222cb8801b | PHP | biletnam/event-tickets-1 | /code/fields/AttendeeField.php | UTF-8 | 2,565 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* AttendeesField.php
*
* @author Bram de Leeuw
* Date: 10/03/17
*/
namespace Broarm\EventTickets;
use ArrayList;
use CompositeField;
use DBField;
use FieldGroup;
use FieldList;
use FormField;
use HiddenField;
use LiteralField;
use Member;
/**
* Class AttendeeField
*
* @package Broarm\EventTickets
... | true |
8876831cb0accb91e2613c105738f369ab12c211 | PHP | edcorant/Runtime-Terror | /action_page10.php | UTF-8 | 1,512 | 2.8125 | 3 | [] | no_license | <body bgcolor="#a4afa0">
<?php
$dbServername = "localhost";
$dbUsername = "root";
$dbPassword = "";
$dbName = "insurance_match";
$conn = mysqli_connect($dbServername, $dbUsername, $dbPassword, $dbName);
$dName = $_POST['FirstName'];
$lName = $_POST['LastName'];
$name = $dName .... | true |
c9d1bebc9fe31a2a9ebd921c8ceb108ad1b69392 | PHP | crmdevtool/curso-completo-php7 | /pdo/delete.php | UTF-8 | 383 | 2.703125 | 3 | [] | no_license | <?php
$conn = new PDO("mysql:host=localhost;dbname=dbphp7", "root", ""); //Configuração de conexão com banco de dados;
$stmt = $conn->prepare("DELETE FROM tb_usuarios WHERE idusuario = :ID"); //inserindo dados na tabela por parametros;
$id = 4;
$stmt->bindParam(":ID", $id);
$stmt->execute(); //Executando;
echo "D... | true |
561b15450065014079e73f0f5f3aac7758869b9d | PHP | raei/oophpBTH | /kmom02_03/RalfHangmanSVG.php | ISO-8859-1 | 20,293 | 3.046875 | 3 | [] | no_license | <?php
// ===========================================================================================
//
// RalfHangmanSVG.php
//
// Class for drawing the hangman picture. Can draw parts of it.
// The picture is drawn using SVG Illustrator 6 (http://www.w3.org/Graphics/SVG/)
<<<<<<< HEAD
// // ==================... | true |
ec8711cd859992d4aad639166521d71908c2ff44 | PHP | ZLamb101/RecruitmentPortalProject | /web/src/model/Model.php | UTF-8 | 24,941 | 3.0625 | 3 | [] | no_license | <?php
namespace bjz\portal\model;
use mysqli;
/**
* Class Model
*
* Base class for all Models, establishes link to the database.
*
* @package bjz/portal
**/
class Model
{
/**
* @var mysqli, the database used by the application
*/
protected $db;
/**
* @var string, the host of the dat... | true |
701d0ccbcb5e435c423a5cb23f8363ea4ef46491 | PHP | Vin4er/markups | /upinsmoke/send.php | UTF-8 | 1,922 | 2.78125 | 3 | [] | no_license | <?php
$send = isset( $_POST['send'] ) ? $_POST['send'] : null;
$status = false;
$emails = array('Info@up-in-smoke.ru');
if( !$send ){
throw new Exception('Bad request!');
}else{
$error = array();
$result = array();
$filter = array(
'name' => array( 'required' => true, 'regexp' => '/^[ \wа-яА-Я]+$/i' ),
't... | true |
dc2103e8c69f274e1446b5d62d2ce7706283b1be | PHP | szmachinsky/_IOS_Proj | /_MY_OLD_WORK/tvprogram/server/lib/Model/Channel/Parser/Default.php | UTF-8 | 3,617 | 2.8125 | 3 | [] | no_license | <?php
/**
* User: mamont
* Date: 25.08.11
* Time: 17:42
*/
class Model_Channel_Parser_Default {
/**
* @param string $xml
* @return array|bool
*/
function parse($xml) {
$data = simplexml_load_string($xml);
$result = array();
// Идентификатор канала
if (iss... | true |
6d685e33a0ba8f9cfe149e3c1ba9b3fa568e2e0f | PHP | valerymarc/Testcevup | /src/Entity/Achat.php | UTF-8 | 4,268 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\AchatRepository;
use DateTime;
use DateTimeImmutable;
use DateTimeInterface;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=AchatRepository::class)
*/
class Achat
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer"... | true |
641ec03000ac05829b77fdf356a78239a786c34e | PHP | astromzimmer/Nn | /Nn/Core/Template.php | UTF-8 | 5,102 | 2.640625 | 3 | [] | no_license | <?php
namespace Nn\Core;
use Nn;
use Utils;
class Template extends Basic {
protected $vars = array();
protected $_dir;
protected $_action;
protected $render_as = "default";
protected $content_type = 'text/html';
function __construct($module,$action) {
$this->_dir = $module.DS.'views';
$this->_action = $a... | true |
4da6598e757ee5e9d44778e14c2f3786428985eb | PHP | yobonill/kitchenMaster | /core/controllers/login.controller.php | UTF-8 | 2,388 | 2.890625 | 3 | [] | no_license | <?php
//Start the session if it is not already started
if (!isset($_SESSION)) {
session_start();
}
//Start the session if it is not already started
//Load Configuration with config data as an array, to be able to use the directory root parameter
require_once($_SERVER['DOCUMENT_ROOT'] . '/plantillaph... | true |
8383c6e2f44000c54adb944bee29310fb8046ed0 | PHP | victory325/moneyball-api | /moneyball-api/app/Services/TwilioService.php | UTF-8 | 1,905 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Repositories\UserRepository;
use Twilio\Rest\Client;
use App\Models\User;
/**
* Class TwilioService
* @package App\Services
*/
class TwilioService
{
protected $client;
protected $senderNumber;
protected $userRepository;
protected $tokenMessage = 'Your auth tok... | true |
9ae69b7938c0ae1fdd62368083e7c57f42a3feca | PHP | sample-of-zunema/PHPVSCode2 | /htdocs/lesson2_07.php | UTF-8 | 186 | 3.390625 | 3 | [] | no_license | <?php
for ($i = 3; $i >= 1; $i--) {
for ($j = 1; $j <= $i; $j++) {
echo $j;
}
echo "<br>";
}
// 以下をfor文を使用して表示してください。
// 123
// 12
// 1
| true |
413ff601ec88066bcb6d52ddfba7a52fbda5a4d6 | PHP | ArtiAiry/p-ship | /models/Profile.php | UTF-8 | 2,975 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use yii\db\ActiveRecord;
/**
* This is the model class for table "profile".
*
* @property int $id
* @property int $user_id
* @property string $skype
* @property int $phone
* @property string $country
* @property string $city
* @property int $age
* @property string $gend... | true |
1363332f30e85c3bb9e222ad4f208828329f4a87 | PHP | mcerjan/Multiple-Databases | /01_konekcija.php | UTF-8 | 1,082 | 2.53125 | 3 | [] | no_license | <?php
$db_host = 'localhost';
$db_user = 'root';
$db_pass = '';
$db_name = 'fakultet';
$db = mysql_connect ($db_host, $db_user, $db_pass, true);
mysql_set_charset('utf8',$db);
if (!$db)
{
echo 'Doslo je do problema kod spajanja na bazu.<br/>';
}
else {
echo 'Uspjesno ste spojeni na bazu.<br/>';
if (my... | true |
bf8ec25474936c3b2a5f55360be7c99dcf41bff7 | PHP | harvardinformatics/specify_rapid | /htdocs/transcribe_lib.php | UTF-8 | 18,586 | 3.0625 | 3 | [] | no_license | <?php
include_once("imagehandler.php");
include_once("connection_library.php");
# Data Structures *********************************
class PathFile {
public $path; // path to batch
public $filename; // next file in batch
public $webPath; // path to file served by AWS, Cyverse, etc.
public $position; //... | true |
818b0a6d1530ba77289d75aabf6d0e4ad07ad619 | PHP | CarterBrehm/metro-scripting | /assignment09/part02/index.php | UTF-8 | 712 | 3.421875 | 3 | [
"Apache-2.0"
] | permissive | <!DOCTYPE html>
<head>
<title>Assignment 9, Part 2</title>
</head>
<body>
<?php
//Task 3.1: Change these items to reflect
//four of your favorite things
$my_favorite_things = array (
"Epic gaming",
"Flying",
"Fighting for the inclusion of male deer",
... | true |
6494fbd3dc1261f0203cd505648dc8de07f78dcb | PHP | go123/halva202.bySomewhereBefore160822 | /backend/models/LessonTopic.php | UTF-8 | 1,738 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "lesson_topic".
*
* @property integer $id
* @property integer $lesson_section_id
* @property string $title
* @property integer $serialNumber
* @property string $additionalInformation
*
* @property LessonSection $lessonSection
*/
c... | true |
913a037f321fd6b155cd4882cb18f26509b0f62c | PHP | parhuzamos/android-tools-cpu | /ajax.php | UTF-8 | 4,567 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
include_once('utils.php');
set_time_limit(0);
//TODO: parse the header line and use those columns to find the correct cpu column, as some adb shell top produces 10 columns not 9
function processOutput($device,$out) {
$out = trim($out);
$out = preg_split("/\n/", $out);
$result = array(
"device"=>... | true |
c7eed4b06e5aacee7a759b2abc2db6ab984bb00d | PHP | Ko2doo/shorturlmaker | /r.php | UTF-8 | 1,831 | 2.953125 | 3 | [] | no_license | <?php
include "include/config.php";
include "include/ShortUrl.php";
$shortUrl = new ShortUrl($pdo);
$shortCode = $_GET["c"];
if ($shortCode) {
$code = $shortCode;
} else {
if (empty($_POST["long_url"])) {
return print_r("Введите адрес");
}
$longUr... | true |
6cbfa2a98015105db4271474eb1954d4e7f4214e | PHP | gaecom/swoole_net_utils | /swoole_http_proxy.php | UTF-8 | 3,204 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
//监听ip, 127.0.0.1只监听本地的连接,0.0.0.0监听全网
$listenHost = "0.0.0.0";
//监听端口
$listenPort = "9999";
//创建一个 swoole tcp 服务
$serv = new Swoole\Server($listenHost, $listenPort);
//设置参数
$serv->set([
'worker_num' => 16, //工作进程数量,决定最大并发量,一个进程可以hold n个连接
'daemonize' => false, //是否以守护进程(后台)方式... | true |
8355fceba32c1a8cac7bd7a8d46c5cc26d24a419 | PHP | Hramosm1/proyectoDWeb | /app/Http/Controllers/bodegasController.php | UTF-8 | 3,497 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Requests\CreatebodegasRequest;
use App\Http\Requests\UpdatebodegasRequest;
use App\Repositories\bodegasRepository;
use App\Http\Controllers\AppBaseController;
use Illuminate\Http\Request;
use Flash;
use Response;
class bodegasController extends AppBaseController
{
... | true |
772f734f57f3bafb9594dfc6954d8894924d9d87 | PHP | praneeth2016/master_live_intl | /master_live_intl/views/modellogin.php | UTF-8 | 124,135 | 2.65625 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of modellogin
*
* @author Administrator
*/
class modellogin extends CI_Model{
public function __construct()
{
parent::__construct();
... | true |
b50e858f6987c31b69ca300ce90159cc9ead560f | PHP | JamesBondsky/4lapy | /src/MobileApiBundle/Dto/Object/PetSizes.php | UTF-8 | 2,443 | 2.609375 | 3 | [] | no_license | <?php
namespace FourPaws\MobileApiBundle\Dto\Object;
use FourPaws\Decorators\FullHrefDecorator;
use FourPaws\MobileApiBundle\Dto\Parts\Pet;
use JMS\Serializer\Annotation as Serializer;
class PetSizes
{
/**
* @Serializer\Type("FourPaws\MobileApiBundle\Dto\Object\PetSize")
* @Serializer\SerializedName("s... | true |
7bae891d1c070b73ccc26257bdcdd6cd9bd63f77 | PHP | rpenco/fut15-autobuyer | /src/Fut/Log.php | UTF-8 | 966 | 2.78125 | 3 | [
"Unlicense"
] | permissive | <?php
namespace Fut;
class Log
{
public static function V($message, $write = false){
Log::LOG('verb', $message, $write);
}
public static function D($message, $write = true){
Log::LOG('debu', $message, $write);
}
public static function I($message, $write = true){
L... | true |
f94c360e99ea16a45a7c00a78dc14d3b647fd36e | PHP | CamCordier/jeudecombat | /views/coffre.php | UTF-8 | 282 | 3.09375 | 3 | [] | no_license | <?php
class Coffre // Présence du mot-clé class suivi du nom de la classe.
{
// Déclaration des attributs et méthodes ici.
public $potion = 1;
public $baton = 2;
public function ouvrir($potion)
{
return $this->potion = $potion;
}
}
?> | true |
7a137869837f29f156e1d884815c780752996fca | PHP | GunnJerkens/wp-boilerplate | /public/content/plugins/enable-media-replace/classes/functions.php | UTF-8 | 2,714 | 2.765625 | 3 | [
"GPL-2.0-only",
"MIT"
] | permissive | <?php
namespace EnableMediaReplace;
// Legacy functions.
/**
* Maybe remove query string from URL.
*
* @param string $url
*
* @return string
*/
function emr_maybe_remove_query_string( $url ) {
$parts = explode( '?', $url );
return reset( $parts );
}
/**
* Remove scheme from URL.
*
* @param string $url
... | true |
60bc0f41de473a918b8e89b570bb7cbb7703e0f9 | PHP | giansalex/sufel | /src/app/Controllers/ClientApi.php | UTF-8 | 3,694 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Giansalex
* Date: 28/08/2017
* Time: 19:50.
*/
namespace Sufel\App\Controllers;
use Sufel\App\Models\ApiResult;
use Sufel\App\Models\DocumentConverter;
use Sufel\App\Repository\ClienteRepositoryInterface;
use Sufel\App\Repository\DocumentFilterRepositoryInterface;
use Suf... | true |
33b69a260993d0dbe45bf4b378bb99e8147d1437 | PHP | kokolina1888/php7_cookbook | /Mine/ch03/using_type_hints.php | UTF-8 | 1,063 | 2.984375 | 3 | [] | no_license | <?php
include('developing_functions_library_type_hints.php');
// try{
// $callable = function(){
// return 'Callback return';};
// echo someTypeHint([1, 2, 3], new DateTime(), $callable);
// echo someTypeHint('A', 'B', 'C');
// } catch(TypeError $e){
// echo $e->getmessage();
// echo PHP_EOL;
// }
// t... | true |
05fc7bfd71234a0c93728a2442b198cf3003e2ed | PHP | dwelling41/edgeauthexample | /Src/Example.php | UTF-8 | 310 | 2.546875 | 3 | [] | no_license | <?php
namespace EdgeAuthExample;
use EdgeAuth\TokenBuilder;
class Example
{
function __construct()
{
$theToken = (new TokenBuilder())
->withApplicationId('test')
->withSecret('abc')
->expiresInSeconds(300);
$result = $theToken->build();
}
}
| true |
d6454e374b3d82014ec399375ff627ad4828632b | PHP | JohanDuran/Web-Projects | /Variables/variables.php | UTF-8 | 95 | 3.171875 | 3 | [] | no_license | <?php
//varibles
$nombre = "Johan";
echo $nombre;
//constantes
define ('PI', 3,14);
echo PI;
?> | true |
3a6d8e0077586bcba97f067f7206436cb5b06eeb | PHP | AlexanderSovpel/kinologbel | /php/User.php | UTF-8 | 3,011 | 3.015625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Alexander
* Date: 22.04.15
* Time: 05:37
*/
include("Article.php");
class User
{
private $id;
private $name;
private $password_hash;
private $articles;
private $gallery;
function __construct($id, $name, $password_hash)
{
$this->id = $i... | true |
22451c39a7539b6b80fddd86b3361fa98a3de1d7 | PHP | et-nik/gameap-legacy | /application/libraries/Rcon/Rcon.php | UTF-8 | 4,002 | 2.828125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* Game AdminPanel (АдминПанель)
*
*
*
* @package Game AdminPanel
* @author Nikita Kuznetsov (ET-NiK)
* @copyright Copyright (c) 2014, Nikita Kuznetsov (http://hldm.org)
* @license http://www.gameap.ru/license.html
* @link http://... | true |
8c5187a108375eb37ea920afeec8934e8c85b7cb | PHP | nathanfrc/Trade-Bitcoins-Nathan | /Trade-moedas/view/moedas.php | UTF-8 | 4,700 | 2.984375 | 3 | [] | no_license | <?php
class moedas {
public $maiorPreco;
public $menorPreco;
public $vol;
public $ultimonegociadoMaior;
public $maiorPrecoOferta;
public $menorPrecoOferta;
public $data;
function formatarValor($param)
{
$result = number_format($param,2);
$result = str_replace(".","",$result); //tira ponto
$result ... | true |
b3ae5c4ba07b92efa9a41c7b910f5b0f654db8d1 | PHP | ProjectCleverWeb/PHP-URI | /tests/04_ModifyTest.php | UTF-8 | 10,102 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace URI;
/**
* @requires PHP 5.4
*/
class ModifyTest extends \PHPUnit_Framework_TestCase {
/**
* @test
* @depends URI\GenerateTest::Reset
*/
public function Modify_Scheme_Name() {
// Test both when there is and isn't pre-existing data
$uri1 = new \uri('example.com');
$uri2 = new \uri('ht... | true |
489f2ad8fd0c69765d3985bda86f3aa24be7c129 | PHP | MichaelAkhnoukh/laravel-smsmisr | /src/Contracts/SmsMisr.php | UTF-8 | 832 | 2.671875 | 3 | [] | no_license | <?php
namespace Caishni\SmsMisr\Contracts;
use Illuminate\Support\Carbon;
interface SmsMisr
{
/**
* @param string|array $recipients
* @return SmsMisr
*/
public function to($recipients): SmsMisr;
/**
* @param string $sender
* @return SmsMisr
*/
public function from(strin... | true |
ccc4ee612693eaa31cdfaafa9e6469fe502c059a | PHP | jatinparmar96/EmpocusApisV2 | /app/Api/V1/Controllers/Masters/AddressController.php | UTF-8 | 2,138 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Api\V1\Controllers\Master;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Models\Master\Address;
class AddressController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function in... | true |
45b4432ad0a9b6c8c54b2c249f9bdcf459b2a079 | PHP | laramore/laramore | /src/Elements/ElementManager.php | UTF-8 | 6,764 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Define a element manager used by Laramore.
*
* @author Samy Nastuzzi <samy@nastuzzi.fr>
*
* @copyright Copyright (c) 2019
* @license MIT
*/
namespace Laramore\Elements;
use Illuminate\Support\{
Arr, Str
};
use Laramore\Traits\IsLocked;
class ElementManager
{
use IsLocked;
/**
* T... | true |
41844f70c357978be9c9f5b755ef0450b8a6ee91 | PHP | mkoppanen/php-tokyo_tyrant | /tests/025-table-multiget.phpt | UTF-8 | 981 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | --TEST--
Test multiget on a table
--SKIPIF--
<?php
include dirname(__FILE__) . "/skipif.inc";
?>
--XFAIL--
This test uses unsupported functionality
--FILE--
<?php
include dirname(__FILE__) . '/config.inc';
$tt = new TokyoTyrantTable(TT_TABLE_HOST, TT_TABLE_PORT);
$tt->vanish();
$rec = $tt->put('hi1', array('test1' =>... | true |
6dd94f6814d3994ad4416556e8d0445f3cd69a96 | PHP | vaibhavsharmakv/UofR-CS215-classProject | /messagePostPage.php | UTF-8 | 4,020 | 2.6875 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION["userEmail"])) {
header("Location: index.php");
exit();
} else
{
$page1='messageListPage.php';
$userEmail=$_SESSION['userEmail'];
$target_dir = "upload/";
$target_file = $target_dir . basename($_FILES["fileToUpload"]["name"]);
$uploadOk = 1;
... | true |
df4a86a0455fe52b687879988b0462a1e3de2396 | PHP | mabel03/Registrar_personas_hotel | /Registrar_Personas_hotel/Registrar_Personas_hotel/Libreria/Conexion.php | UTF-8 | 708 | 2.859375 | 3 | [] | no_license | <?php
class conexion{
static $o_con = null;
static function obj(){
if(self:: $o_con == null){
self:: $o_con = new conexion();
}
return self::$o_con->instancia;
}
public $instancia = null;
function __construct(){
$this->instancia = mysqli_co... | true |
5dd0ad7b932e6e1739503a8a18ef7c8b94e59f59 | PHP | nekudo/shiny_deploy | /src/ShinyDeploy/Action/WsDataAction/UpdateDeployment.php | UTF-8 | 2,277 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace ShinyDeploy\Action\WsDataAction;
use ShinyDeploy\Domain\Database\Auth;
use ShinyDeploy\Domain\Database\Deployments;
use ShinyDeploy\Exceptions\InvalidPayloadException;
use Valitron\Validator;
class UpdateDeployment extends WsDataAction
{
/**
* Updates deployment data in database.
*
... | true |
c6587829a7501b4a09f91c9bea5a8c302e95bfab | PHP | linyuee/lyue | /app/Models/UserCollectModel.php | UTF-8 | 1,498 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Models;
use Lyue\Database\AbstractModel;
/**
* Model UserCollectModel
*
* @property int $id
* @property int $type
* @property int $collect_id
* @property int $user_id
* @property int $created_at
* @property int $updated_at
*
* @method static \Lyue\Database\DB | \App\Models\UserCollectMod... | true |
196059c1ae520da4af1e62e63d2f1f1ca065c524 | PHP | louddog/postyper | /types/date.php | UTF-8 | 997 | 2.65625 | 3 | [] | no_license | <?php
Postyper::register_field_type('PostypeDate');
class PostypeDate extends PostypeField {
var $type = 'date';
function admin_enqueue_scripts() {
wp_enqueue_script('jquery-ui-datepicker');
}
function output($post_id) { ?>
<input
type="text"
class="postyper_date"
name="postype[<?php echo $thi... | true |
532ab04549cb8ddaa9bc1c5546e909592f2ef911 | PHP | AntonyBowker/PBCounselling | /php/connection.php | UTF-8 | 296 | 2.90625 | 3 | [] | no_license | <?php
class Connection {
private
$host = 'localhost',
$name = 'pages',
$user = 'root',
$pass = '';
public function connect(){
return new PDO("mysql:host=$this->host; dbname=$this->name", $this->user, $this->pass);
// echo "<pre";
// print_r($statement->errorInfo());
}
}
?> | true |
f27bc65aedf737cbd0b1dda04b476648cca0fb82 | PHP | Jonbodoe/RailPix | /assets/googleMap.php | UTF-8 | 1,839 | 2.640625 | 3 | [] | no_license | <?php
// echo 'hello';
$post = $_GET['post'];
$sql = "SELECT posts.post_id, posts.google_ref, google.google_id, google.latitude, google.longitude
FROM posts JOIN google ON (posts.google_ref = google.google_id)
WHERE $post = google.post_ref
";
$result = $connect->quer... | true |
3dc19548d6757f52f8d6e167128e831b3a4b5583 | PHP | SravanthiVillanova/Bibliography_old | /admin/tree.php | UTF-8 | 23,121 | 2.65625 | 3 | [] | no_license | <?php
$langVar = 'text_fr';
$interface->assign('langVar', $langVar);
// Process Action
$action = getRequest('action');
if (!is_callable($action)) {
$action = "showList";
}
$interface->assign('action', $action);
call_user_func_array($action, array(&$interface));
function showList(&$interface)
{
global $transla... | true |
6d05b7c545e861fc78c730063ae004a21f28399b | PHP | zyprosoft/ZYBlog | /hyperf-skeleton/app/Controller/Common/ArticleController.php | UTF-8 | 4,577 | 2.5625 | 3 | [] | no_license | <?php
/**
* This file is part of ZYProSoft/ZYBlog.
*
* @link http://zyprosoft.lulinggushi.com
* @document http://zyprosoft.lulinggushi.com
* @contact 1003081775@qq.com
* @Company ZYProSoft
* @license MIT
*/
declare(strict_types=1);
namespace App\Controller\Common;
use App\Service\ArticleService;
use Hy... | true |
9ac1ddc9e8b4739923baba9d69efe705b37c14d8 | PHP | Optimovl/optimosite | /classes/system/subsystems/import/UmiDump/Demolisher/Type/ObjectType.php | UTF-8 | 1,914 | 2.609375 | 3 | [] | no_license | <?php
namespace UmiCms\System\Import\UmiDump\Demolisher\Type;
use UmiCms\System\Import\UmiDump\Demolisher;
/**
* Класс удаления объектных типов данных
* @package UmiCms\System\Import\UmiDump\Demolisher\Type
*/
class ObjectType extends Demolisher {
/** @var \iUmiObjectTypesCollection $objectTypeCollectio... | true |
99591c1cec373aea4e89804983d8fc26ffda4cf5 | PHP | delaga/PP20 | /Završni radovi/pp20.delaga.hr/model/Dokument.php | UTF-8 | 1,815 | 3.25 | 3 | [] | no_license | <?php
class Dokument
{
private $sifra;
private $naziv;
private $vrijemeKreiranja;
private $URLDokumenta;
private $korisnik;
/**
* Get the value of sifra
*/
public function getSifra()
{
return $this->sifra;
}
/**
* Set the value of sifra
*
... | true |
7630c07798c9cb96c769eb652c05afab23f4b138 | PHP | Code-keyth/Keyth_frame | /Keyth/View.php | UTF-8 | 1,216 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: keyth
* Date: 12/3/18
* Time: 7:36 PM
*/
namespace Keyth;
use Config;
class View
{
public $view;
public $data;
public $twig;
public $path = APP. '/Views/';
/**
* Twig constructor.
* @param $view
* @param $data
*/
public function... | true |
35a2c3c6f27e28f121748815b460f899104054d7 | PHP | raziel23x/Obsedb_CMS | /register.php | UTF-8 | 2,386 | 2.59375 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"BSD-2-Clause"
] | permissive | <?php
/*
##############################################################
Obsedb CMS Content Management System
Copyright (C) 2009 Joshua Kimbrel
This program is free software; you can redistribute it and/or modify
it under the terms of the BSD License as published by
the Free Software Foundation.
This program is... | true |
039a0cecf23bc508fdf4a68c8c1ff91a7ce77737 | PHP | a-ayala/notion-sdk-php | /src/Common/Mention.php | UTF-8 | 3,962 | 3.140625 | 3 | [] | no_license | <?php
namespace Notion\Common;
use Notion\Users\User;
/**
* @psalm-import-type UserJson from \Notion\Users\User
* @psalm-import-type DateJson from Date
*
* @psalm-type MentionJson = array{
* type: string,
* page?: array{ id: string },
* database?: array{ id: string },
* user?: UserJson,
... | true |
8cf198d47a4a0d8654cec33aba970d2ac03d9c09 | PHP | WebGateTec/omnipay-webdosh | /src/WebDoshResponseFactory.php | UTF-8 | 1,614 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Omnipay\WebDosh;
use Omnipay\WebDosh\Exceptions\WebDoshGatewayException;
class WebDoshResponseFactory
{
static public function parse($raw_response, WebDoshTransaction $request)
{
try {
$response = json_decode($raw_response, true);
if (is_null($response))
... | true |
78c220690a179c1457fd2a8af03aeae0c04c6ad4 | PHP | sourcegr/appx | /lib/tests/Database/QueryBuilder/QueryBuilderTest.php | UTF-8 | 3,455 | 2.515625 | 3 | [] | no_license | <?php
namespace Sourcegr\Tests\Database\QueryBuilder;
use Sourcegr\Framework\Database\DBConnectionManager;
use Sourcegr\Framework\Database\QueryBuilder\QueryBuilder;
use Sourcegr\Framework\Database\QueryBuilder\DB;
use Sourcegr\Stub\Grammar;
use PHPUnit\Framework\TestCase;
class QueryBuilderTest extends TestCase
{... | true |
43c18d810c2f1d9710de21a5fea517b9ff66e30a | PHP | soulhez/kvwebme | /ww.incs/saorfm/rpc.php | UTF-8 | 4,016 | 2.5625 | 3 | [] | no_license | <?php
/**
* SaorFM rpc file
*
* PHP Version 5
*
* This file holds the SaorFM rpc handler, which uses
* the saorFM core
*
* @category SaorFM
* @package RPC
* @author Conor Mac Aoidh <conormacaoidh@gmail.com>
* @author Kae Verens <kae@verens.com>
* @license http://www.opensource.org/licenses/bsd-license... | true |
0655cda6b8e0d2ed877c090b657da6245cade932 | PHP | puissance4team9/EasyQuest | /PETUD/index3.php | UTF-8 | 16,438 | 2.5625 | 3 | [] | no_license | <?php
Session_name('p1422662');
session_start();
//Appel fonctions
include('Model/Model.php');
include('Model/questionManager.php');
//include('Model/CategorieManager.php');
include('Model/UtilisateurManager.php');
//include('Model/aimePhoto.php');
if(isset( $_GET['page']))
{
if($_GET['page'] == 'connexio... | true |
38e593fada0996b2579bf1acc8768bc20418d395 | PHP | DmitryPacificAtion/phpAcademy | /Backend/functions_forms_tasks/8/8.php | UTF-8 | 2,737 | 2.984375 | 3 | [] | no_license | <?php
//8. Создать гостевую книгу, где любой человек может оставить комментарий в текстовом поле и добавить его.
// Все добавленные комментарии выводятся над текстовым полем.
// Реализовать проверку на наличие в тексте запрещенных слов, матов.
// При наличии таких слов - выводить сообщение "Некорректный комментарий".
/... | true |
ec3fc072cdaa6fb7b358bdfee5c383e4f73eccfc | PHP | olesmith/Sivent2 | /Sivent2/Schedules/Dates.php | UTF-8 | 5,558 | 2.65625 | 3 | [] | no_license | <?php
class SchedulesDates extends SchedulesTimes
{
var $DatesSelectField="Dates";
var $DateGETField="Date";
//*
//* function Dates, Parameter list:
//*
//* Reads event dates, if necessary.
//*
function Dates()
{
if (empty($this->Dates))
{
$this->D... | true |
a1cb90e3a257f13618ff40a23847a5d0780340af | PHP | Asper17/GuestBook | /public/index.php | UTF-8 | 902 | 2.515625 | 3 | [] | no_license | <?php
declare(strict_types=1);
use App\Application;
use App\Template;
use App\Database;
require __DIR__ . '/Dev.php';
require __DIR__ . '/../vendor/autoload.php';
$tem = new Template(__DIR__ . "/../templates/");
$app = new Application;
$db = new Database();
$app->get('/', function () use ($tem, $db) {
$posts = $... | true |
2498c829ccc7320f503fb427dfb7e87fcafea807 | PHP | pfpayments/prestashop-1.6 | /inc/Helper.php | UTF-8 | 25,284 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* PostFinance Checkout Prestashop
*
* This Prestashop module enables to process payments with PostFinance Checkout (https://postfinance.ch/en/business/products/e-commerce/postfinance-checkout-all-in-one.html).
*
* @author customweb GmbH (http://www.customweb.com/)
* @copyright 2017 - 2023 customweb GmbH... | true |
315d7802cf6e0cc5dd24f32c52b609725101da4c | PHP | rockywilkins/kohana-datamapper | /classes/datamapper.php | UTF-8 | 13,833 | 2.96875 | 3 | [] | no_license | <?php
/**
* DataMapper
*
* @package DataMapper
* @author R.Wilkins (rocky.wilkins@internetware.co.uk)
*/
class DataMapper
{
protected static $instances = array();
protected $entityClass = 'DataMapper_Entity';
protected $fields = array();
protected $relations = array();
protected $primaryKeyFiel... | true |
3a6970a9e4fa315939e88e23df0076335edb4916 | PHP | jonsa709/UpdatedProject | /system/DB/Mysql.php | UTF-8 | 662 | 2.859375 | 3 | [] | no_license | <?php
namespace System\DB;
class Mysql
{
private $conn;
private $result;
public function __construct()
{
$this->conn = new \PDO("mysql:host=".config('db_host').";dbname=".config('db_name'), config('db_user'), config('db_pass'));
$this->conn->setAttribute( \PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
}
p... | true |
6296bcad27963eadb9e1fc61c86026c55fab1cd2 | PHP | activelamp/UtilsBundle | /Tests/Fixtures/Entity/Event.php | UTF-8 | 511 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace ActiveLAMP\Bundle\UtilsBundle\Tests\Fixtures\Entity;
use ActiveLAMP\Bundle\UtilsBundle\Validation\Constraints as Assert;
/**
* Class Event
*
* @author Bez Hermoso <bez@activelamp.com>
*
*
* @Assert\DateRange(
* start="startDate",
* end="endDate"
* )
*
*/
class Event
{
protec... | true |
5e76e3220d5551dc7aecae674c680978462bf361 | PHP | graphpudding/wp-template | /inc/controls.php | UTF-8 | 14,507 | 2.859375 | 3 | [] | no_license | <?php
if ( ! class_exists( 'WP_Customize_Control' ) )
return NULL;
/**
* A class to create a dropdown for all google fonts
*/
if ( ! class_exists( 'Brand_Google_Font_Dropdown_Custom_Control' ) ) :
class Brand_Google_Font_Dropdown_Custom_Control extends WP_Customize_Control
{
private $fonts = false;
publ... | true |
40a574ec8897f912132f3c260f3bbcf490c0abaf | PHP | ntgnn/swagger | /src/Commands/SwaggerInitCommand.php | UTF-8 | 855 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Ntgnn\Swagger\Commands;
use File;
use Illuminate\Console\Command;
use Ntgnn\Swagger\SwaggerServiceProvider;
class SwaggerInitCommand extends Command
{
protected $name = 'swagger:init';
protected $description = 'Initializes the Swagger structure';
public function handle()
{
tr... | true |
c7a0616108cf16eb33b134ac7190239e3ee2e240 | PHP | salestef/apicon | /app/src/implementation/GoogleAnalytics/GoogleAnalyticsProvider.php | UTF-8 | 1,598 | 2.703125 | 3 | [] | no_license | <?php
namespace ApiCondor\src\implementation\GoogleAnalytics;
use ApiCondor\src\providers\ApiProviderAbstract;
use ApiCondor\src\structure\ResponseProvider;
class GoogleAnalyticsProvider extends ApiProviderAbstract
{
/** @var string $providerName Provider Name. */
public $providerName = "GoogleAnalyticsProvi... | true |
5a0aa379d94b68db830c024f40bf47869014841e | PHP | tribecloud/today | /routes/api.php | UTF-8 | 1,828 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Http\Request;
use App\Todo;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the ... | true |
5180f3d8331a6fffff51cf7b8aaf21e3ed16fcb2 | PHP | billybateman/PHPFramework | /system/core/router.class.php | UTF-8 | 2,216 | 2.6875 | 3 | [] | no_license | <?php
class Router
{
private $path, $ismodule, $controller, $action;
static $instance;
public function __construct()
{
$request = (empty($_GET['request'])) ? '' : $_GET['request'];
$split = explode('/',trim($request,'/'));
$route = (empty($_GET['request'])) ? '' : $_GET['request'];
$this->route = e... | true |
9fa95a5cf4168b4724621607ad1542c04d6630e0 | PHP | Danack/AurynWorkshop | /exercises/8_two_objects_same_type_solution_1.php | UTF-8 | 3,464 | 3.0625 | 3 | [] | no_license | <?php
declare(strict_types=1);
require_once __DIR__ . "/../vendor/autoload.php";
use Auryn\Injector;
$injector = new Injector();
// Task
// The code below doesn't use dependency injection - this is intolerable!!!!!
// Please change the function transferData to take two parameters, one of which
// is the live data... | true |
cb8ac1d554ba67a3863b521b5c551fa9f2d25031 | PHP | bighead-dev/api-kernel | /src/Config.php | UTF-8 | 1,844 | 2.875 | 3 | [] | no_license | <?php
namespace Kern;
class Config
{
public static $cfg = null;
public static $cfg_path = './application/config';
public $data;
private function __construct()
{
/* singleton */
$this->data = [];
}
public static function instance()
{
if (self::... | true |
c8cae1d229ec307e8d96a6faa7ed9c4d202b2da1 | PHP | sarriagada/guorpres | /php/noticias.php | UTF-8 | 5,828 | 2.734375 | 3 | [] | no_license | <?php
include("../html/header.html");
include("../html/nav.html");
include("conexion.php");
conectar();
?>
<div class="content">
<section>
<article class="first">
</ul>
<h3>Novedades</h3>
<ul>
<a href="noticias.php?quemostrar=todas&num=1">Todas</a><br>
<a href="noticias.php?quemostrar=lsa&num=1">S... | true |
2afe7f69880a3f361ff579d119951a2ab55136a6 | PHP | ishaqchughtai/confor | /SimpleRatings/rClass.php | UTF-8 | 10,777 | 2.8125 | 3 | [] | no_license | <?php
//Class
class sRating{
////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Defined by rConfig.php
public $dbHost, $dbName, $dbUser, $dbPass;
public $ratingElements, $rateStyle;
//Variables
public $dbConnection;
public $voteCheck;
publi... | true |
9805d1fdbf3258575396b69dda54aa473bca462f | PHP | zidni722/url-shortener | /app/Http/Controllers/Linkshortener/LinkShortenerController.php | UTF-8 | 5,408 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* User: zidni
* Date: 2019-10-18
* Time: 17:22
*/
namespace App\Http\Controllers\Linkshortener;
use App\Http\Controllers\Controller;
use App\Repositories\Linkshortener\LinkshortenerRepository;
use App\Repositories\StatusCode;
use App\Transformer\Linkshortener\LinkShortenerTransformer;
use Illuminate\Ht... | true |
e6691fa6b653d1e4be482c095e31a99c3911741f | PHP | marjan88/zend-tutorial | /module/Blog/src/Blog/Model/PostInterface.php | UTF-8 | 191 | 2.609375 | 3 | [] | no_license | <?php
namespace Blog\Model;
interface PostInterface
{
public function fetchAll();
public function getPost();
public function savePost();
public function deletePost();
}
| true |
b9b70c4a48fc315fb5009b17236064e0a9c1ffc5 | PHP | thedevisl/sociodox-AdityaKarale-1 | /php/donationform.php | UTF-8 | 2,259 | 2.578125 | 3 | [] | no_license | <?php
//donation form By Aditya
if($_SERVER["REQUEST_METHOD"] == "POST"){
require_once("database.php");
$first_name = $_POST["first-name"];
$last_name = $_POST["last-name"];
$email = $_POST["email"];
$mobile = $_POST["mobile"];
$pan = $_POST["pan"];
$coun... | true |
f76fd59d916503096fa4fe689e032dd2cf5fec7c | PHP | KonstantinFilin/helpers | /src/Kfilin/Helpers/Calendar/Month/FormatterShort.php | UTF-8 | 821 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace Kfilin\Helpers\Calendar\Month;
use Kfilin\Helpers\Calendar\Month;
/**
* Month data formatter
* @author Konstantin S. Filin
*/
class FormatterShort extends Formatter
{
/**
* {@inheritDoc}
*/
public function getWeekdayNames(): array
{
return [
1 => "Mo",
... | true |
a4a464b15a3e25dcab993cad4d715ccbb87202f6 | PHP | pmh1/myemma-php | /src/Resources/Resource.php | UTF-8 | 453 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Emma\Resources;
use Emma\Http\Client;
/**
* Base class for Resources
* @license MIT
* @copyright 2017 Philip Harvey
* @author Philip Harvey <philip at bartndrs dot com>
* @package Resources
*/
class Resource
{
/**
* @var Http\Client
*/
protected $client;
/**
* Constructor
* @p... | true |
83e45feef7cef28cce535d1bd4179db387dffa80 | PHP | casisdead2772/diplom | /backend/app/Entities/QuizAttempt.php | UTF-8 | 1,962 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entities;
use App\Traits\TimestampBehavior;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name="quiz_attempt")
*/
class QuizAttempt
{
use TimestampBehavior;
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="bigint")
*/
private int $... | true |
4c18910cfb02fcab3da0ccc6023d8a878553c505 | PHP | andyhast81/Projects | /edit-users.php | UTF-8 | 10,421 | 2.78125 | 3 | [] | no_license | <?php
require_once('inc/class.user.php');
require_once('functions/functions.php');
if(session_id() == '') {
session_start();
}
$user = new USER();
$user_id = $_SESSION['user_session'];
if(!$user->is_admin($user_id) || !$user->is_loggedin()){
$user->redirect('index.php');
}
if($user->is_admin($user_id)){
... | true |
940899aa1120eeaa436a3a52280dffdbf0a420ec | PHP | vlaaaa/1 | /app/models/user.php | UTF-8 | 4,140 | 2.703125 | 3 | [] | no_license | <?php
namespace vl\app\models;
class user
{
// Селект инфы по логину
public static function selectByLogin($login, $db)
{
// Текст запроса к БД
$sql = 'SELECT id, login, email, money, color, last_ip FROM users WHERE login = :login';
// Получение результатов. Исп... | true |
2fd8e267375e8cc9b901d3e71ac4ef7c59bd2e99 | PHP | dominx99/ledsystem-landpage-api | /src/Media/Domain/Type/OriginalImageType.php | UTF-8 | 629 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace App\Media\Domain\Type;
use App\Media\ValueObject\ImageCropPosition;
final class OriginalImageType implements ImageTypeInterface
{
const TYPE = 'original';
private ImageCropPosition $cropPosition;
public function __construct ()
{
$this->cropPositio... | true |
71bb457bc21d8b583994cb8da89083b5e2491391 | PHP | roihunter/roi-hunter-easy-presta-plugin | /classes/requests/ROIHunterRequestsManager.php | UTF-8 | 2,066 | 2.578125 | 3 | [] | no_license | <?php
/**
* Make requests to ROI Hunter API
*
* LICENSE: The buyer can free use/edit/modify this software in anyway
* The buyer is NOT allowed to redistribute this module in anyway or resell it
* or redistribute it to third party
*
* @author ROI Hunter Easy
* @copyright 2019 ROI Hunter
* @license EULA
* ... | true |