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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
088f27fea03933e5c17293938e328d008376d56e | PHP | kentbogestam/dastjar | /apply-discount-on-subscription.php | UTF-8 | 4,268 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?
// include_once("cumbari.php");
require('config/dbConfig.php');
require('classes/db.php');
require('config/config.php');
// require('classes/billing.php');
require_once('/var/www/html/vendor/autoload.php');
// require_once('vendor/autoload.php');
$db = new db();
$conn = $db->makeConnection();
if($conn)
{
// Get a... | true |
b62258502516b5edf5d5347cb286d0e60eb79b53 | PHP | Aspectus-PHP/terminal | /examples/multiple-listeners.php | UTF-8 | 1,632 | 3.328125 | 3 | [
"MIT"
] | permissive | <?php
use Aspectus\Terminal\Event\InputEvent;
use Aspectus\Terminal\TerminalDevice;
use Revolt\EventLoop;
require \dirname(__DIR__) . '/vendor/autoload.php';
class MathProblem
{
private string $inputSoFar = '';
private bool $foundAnswer = false;
public function __construct(private TerminalDevice $devic... | true |
3c0755e7bb0295c75032c3e7ac517b1207d12e96 | PHP | BlackEagle00/Programaci-nWeb | /ProgramWeb1/validar.php | UTF-8 | 432 | 2.515625 | 3 | [] | no_license | <?php
$anionacimiento = $_POST ["año"];
$mesnacimiento = $_POST ["mes"];
$dianacimiento = $_POST ["dia"];
$anio_actual=getdate()["year"];
$mes_actual=getdate()["mon"];
$dia_actual=getdate()["mday"];
$edadano=$anio_actual-$anionacimiento;
$edadmes=$mes_actual-$mesnacimiento;
... | true |
55715ec0bcb0f186a3babdd9823058f278c04147 | PHP | Thanhkudo/PHP0320E_ThanhKudo | /Lab16/Bai5.php | UTF-8 | 596 | 2.875 | 3 | [] | no_license | <!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Bài 5</title>
</head>
<body>
<?php
$a = [
... | true |
b2455c386637ad71184f43ced6083e5c2158d1c8 | PHP | stormwild/php-dev-test | /round.php | UTF-8 | 271 | 3.34375 | 3 | [
"Unlicense"
] | permissive | <?php
/*
1.65 --> 1.7
1.65 --> 1.6
-1.54 --> -1.5
*/
echo '1.65' . ' --> ' . round(1.65, 1) . nl2br(PHP_EOL);
echo '1.65' . ' --> ' . round(1.65, 1, PHP_ROUND_HALF_DOWN) . nl2br(PHP_EOL);
echo '-1.54' . ' --> ' . round(-1.54, 1, PHP_ROUND_HALF_DOWN) . nl2br(PHP_EOL);
| true |
10ab9baa92d276c582e5054b5525eaa20193aad2 | PHP | ungdev/election-bde | /app/Http/Middleware/Admin.php | UTF-8 | 796 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
class Admin
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if(!$request->session()->ha... | true |
6ef3e7b3d2c98cdfe3088cf5fb2f658d075fd85f | PHP | bewooten21/blueTeamDaycare | /models/job.php | UTF-8 | 1,671 | 3.25 | 3 | [] | no_license | <?php
class job {
private $Id, $companyId, $jobName, $jobDescription, $jobRequirements, $applicationSlots, $status;
function __construct($Id,$companyId, $jobName, $jobDescription, $jobRequirements, $applicationSlots, $status) {
$this->Id = $Id;
$this->companyId=$companyId;
$this... | true |
ad091e0a0ed46a872d24adbfa1735d227a79ef50 | PHP | JayParmar271/PHP-OOPS-Concepts | /abstract.php | UTF-8 | 955 | 3.65625 | 4 | [] | no_license | <?php
abstract class BaseEmployee{
protected $firstname;
protected $lastname;
public function getFullName(){
return $this->firstname . " " . $this->lastname;
}
public abstract function getMonthlySalary();
public function __construct($f, $l){
$this->firstname = $f;
$this->lastname = $l;
... | true |
e2f7122d546ea702588ab265a2fba48d3a2591ce | PHP | ehbc221/codification-esp | /app/Position.php | UTF-8 | 2,939 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Position extends Model
{
protected $fillable = [
'number', 'room_id'
];
public function room()
{
return $this->belongsTo('App\Room');
}
public function codifications()
{
return $this->hasMany('App... | true |
6000aaf9453f6bb39a1bba59b09270ed34fa3fa2 | PHP | rftriazislam/advanced_it | /app/Models/Exam.php | UTF-8 | 642 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Exam extends Model
{
use HasFactory;
protected $fillable = [
'section_id',
'teacher_id',
'exam_name',
'subject',
'pass_mark',
'tota... | true |
d80926f5be7b13f2afb0bd429671851fc723a44d | PHP | Jyrno42/LanMan | /libs/TournamentStages/stage.GroupStage.php | UTF-8 | 10,703 | 3.0625 | 3 | [] | no_license | <?php
/*
* A class which manages groupstage logic.
*/
class GroupStage extends BaseStage
{
/**
* The name of this stage.
*
* @var string
*/
const Name = "Cup";
/**
* The description of this tournament stage.
*/
const Description = "Teams are arranged into <b class=\"Highlight\">gro... | true |
6674a70862e30dbe6af19ae805e3be159af00092 | PHP | ennaque/meds | /core/anomaly/addons-module/src/Addon/Command/GetOutdatedAddons.php | UTF-8 | 1,308 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-proprietary-license"
] | permissive | <?php namespace Anomaly\AddonsModule\Addon\Command;
use Anomaly\AddonsModule\Addon\AddonReader;
use Illuminate\Contracts\Cache\Repository;
use Illuminate\Foundation\Bus\DispatchesJobs;
/**
* Class GetOutdatedAddons
*
* @link http://pyrocms.com/
* @author PyroCMS, Inc. <support@pyrocms.com>
* @author Ryan Thomp... | true |
852fc0e4be3fc806e8398bb9b1d8e08e644dfaf5 | PHP | c315902734/live_shop | /common/service/Record.php | UTF-8 | 520 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\service;
use yii;
class Record
{
public static function record_data($data, $string=''){
$logFile = yii::$app->basePath."/runtime/logs/" . date('Ymd') . ".log";
$log = "\n\n"."<===begin===".date('H:i:s')."===>". "\n";
$log .= "param: ".$string."\n";
if(is_array($data)){
$log .= "cont... | true |
044e4c65864eac46819a9e24b6087fe55b93afe5 | PHP | dragonsan19/Test | /Admin/startseite.php | UTF-8 | 6,526 | 2.84375 | 3 | [] | no_license | <?php
//Startet Session
session_start();
echo "<section class='center'>";
//Mitarbeiter Knöpfe Liste
if(isset($_POST['liste'])){
header('Location: mitarbeiter_liste.php');
}
//Abfrage ob admin_id vorhanden ist
if(isset($_SESSION['admin_id'])){
//Speichern Knopf
if(isset($_POST['speichern']))... | true |
d64a2018d679f1f212a249af9a52ad32a29fd607 | PHP | KatrinaPPn/works | /PracticeWorks/校园兼职信息发布系统/part_time_job/loginsql.php | UTF-8 | 1,904 | 2.625 | 3 | [] | no_license | <?php
include_once "./conn/conn.php";
@session_start();
$_SESSION['login_user'] = null;
$username = $_POST['username'];
$password = $_POST['password'];
//判断不能为空
if(empty($username)){
ok_info('./login.php','用户名不能为空哦');
}
if(empty($password)){
ok_info('./login.php','密码不能为空哦');
}
// 验证用户名跟密码输入是否符合要求的函数
func... | true |
9799594127c860ca32718f24185bd5cb24ca7513 | PHP | Blubberboy333/PvPArena | /src/Blubberboy333/PvPArena/Main.php | UTF-8 | 15,375 | 2.53125 | 3 | [] | no_license | <?php
namespace Blubberboy333\PvPArena;
use pocketmine\math\Vector3;
use pocketmine\event\Listener;
use pocketmine\Player;
use pocketmine\Level;
use pocketmine\level\Position;
use pocketmine\event\entity\EntityDeathEvent;
use pocketmine\event\entity\EntityMotionEvent;
use pocketmine\event\player\PlayerQuitEvent;
use ... | true |
4bb895edfc1547ed499e7e9deab96a163eb448ae | PHP | pregusia/pregusiaFW | /lib-i18n/classes/classI18NApplicationComponent.php | UTF-8 | 4,615 | 2.5625 | 3 | [] | no_license | <?php
/**
* This file is part of PREGUSIA-PHP-FRAMEWORK.
* PREGUSIA-PHP-FRAMEWORK is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any l... | true |
cf9708099804d53cd97ed72a02e73535df48252a | PHP | laurabcn/githubReader | /src/Infrastructure/FilesTreeReader/GitFilesReader/GithubFilesTreeReader.php | UTF-8 | 799 | 2.875 | 3 | [] | no_license | <?php
namespace App\Infrastructure\FilesTreeReader\GitFilesReader;
use App\Domain\FilesTreeReader\File;
use App\Domain\FilesTreeReader\FilesTreeReader;
class GithubFilesTreeReader implements FilesTreeReader
{
/** @var GetFilesFromGit $filesFromGit */
private $getFilesFromGit;
public function __construc... | true |
6735ef41e39267ed81e0e89b7bfe368822ed3cb1 | PHP | zee777/MEMORIESMADE_MinorProject_ASD | /public/categories/food_cat.php | UTF-8 | 1,318 | 2.734375 | 3 | [] | no_license | <html>
<?php
include("..\database.php");
$query = "SELECT * FROM createevent WHERE location = 'IC Lab 2'";
$result = mysqli_query($connection, $query);
if(!$result){
die("Database query failed!");
}else{
$num_rows = mysqli_num_rows($result);
if($num_rows>0){
?>
<div class="table-responsive">
<... | true |
bbaf2994a9fda0a6f9a2dd849157444db2a00e05 | PHP | kongpingfan/easy-tips | /patterns/decorator/PulisherDerector.php | UTF-8 | 383 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace decorator;
/**
* Created by PhpStorm.
* User: zhudong
* Date: 2017/7/14
* Time: 下午7:36
*/
class PulisherDerector implements PulisherInterface {
protected $pulisher = null;
function derect(PulisherInterface $pulisher) {
$this->pulisher = $pulisher;
}
public function pul... | true |
3a31e822f4900d24446d2566fd06eaf86e3c592b | PHP | uoregon-libraries/library-bookshelves | /Classes/Loggers/SQL_Logger.php | UTF-8 | 2,293 | 3.046875 | 3 | [] | no_license | <?php
/**
* Class SQL_Logger Logs messages and data to MySQL database
* TODO: Replace with PSR-3 compliant logging
*/
class SQL_Logger {
/** @var PDO $db */
private $db;
private $bid;
private $table;
private $levels = array(
'error' => 'ERROR',
'info' => 'INFO',
'warning' => 'WARNING',
's... | true |
4771ac067eaf16b980e02e29086247e31b1d19d6 | PHP | MiftahulAchyar/LrvlE-Learning | /app/Event.php | UTF-8 | 1,018 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Event extends Model
{
protected $fillable = [
'name', 'time','type','group_id'
];
protected $public = false;
public function group()
{
return $this->belongsTo('App\Group');
}
public function courses... | true |
3ae1f99ae5b8e7426e5d14fc7ed736fbc8ebb767 | PHP | feofs/MyScripts | /cicles.php | UTF-8 | 109 | 2.578125 | 3 | [] | no_license | i=1
while i<=3:
print ('Outer chicle is:', i)
i+=1
j=1
while j<=3:
print ('Inner cicle is',j)
j+=1
| true |
6f6b56592ae534396339f5acf411f16c044b4643 | PHP | pratikpanchal22/iotMessagingFramework | /phpMessagingService.php | UTF-8 | 1,445 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
// Credentials
$dbhost ="localhost";
$username ="dummyUser";
$password ="dummyPassword";
$database ="messagingAppDb";
// Try and connect to the database
$connection = mysqli_connect($dbhost, $username, $password, $database);
//Test if connection took place
if(mysqli_connect_errno()) {
die("Database connec... | true |
7032a7cab54d2bb334a97f23cec977245834f3ee | PHP | mmqrama/Tarade-Barter-System | /TR1/dbConnect/reset_request.php | UTF-8 | 2,766 | 2.734375 | 3 | [] | no_license | <?php
if (isset($_POST["reset-pass-submit"])) {
//variable for generation of random bytes and convert it to hexadecimal for tokens
$selector = bin2hex(random_bytes(8));
//variable that responsible for authentication of the user
$token = random_bytes(32);
//creation of token in url
... | true |
c493cdcc58a8029a425cdaa005e4a6d34893b97d | PHP | guywithnose/release-notes | /src/Type/Type.php | UTF-8 | 2,762 | 3.46875 | 3 | [
"MIT"
] | permissive | <?php
namespace Guywithnose\ReleaseNotes\Type;
final class Type
{
/**
* @type string name or short description of type
*/
private $_name;
/**
* @type string single letter code for selecting in a menu
*/
private $_code;
/**
* @type string description of type
*/
pr... | true |
861c4bc3975e5b0cbc65c09596e09acbba05b336 | PHP | gam6itko/php-cbrf-api | /src/Model/F134DATAOLAP/FoAType.php | UTF-8 | 874 | 2.953125 | 3 | [] | no_license | <?php
namespace Gam6itko\Cbrf\Model\F134DATAOLAP;
/**
* Class representing FoAType.
*/
class FoAType
{
/**
* @var \DateTime
*/
protected $dt;
/**
* @var float
*/
protected $v1;
/**
* Gets as dt.
*
* @return \DateTime
*/
public function getDT()
{
... | true |
f057f22e666db0820afe5833f5857cd2f4095b82 | PHP | archanaramakrishnan/eecs-448-lab5 | /exercise6/ViewUserPosts.php | UTF-8 | 703 | 2.75 | 3 | [] | no_license | <link rel="stylesheet" type="text/css" href="../../eecs448-lab4/exercise3/style.css">
<?php
function userPosts()
{
$name = $_POST["selectUser"];
$mysqli = new mysqli("mysql.eecs.ku.edu", "archanaramakri", "oohaiP3t", "archanaramakri");
$posts = "SELECT content
FROM Posts
WHERE author_i... | true |
c358754cefa18aa77f948160244a2a9f0bc048f9 | PHP | gravitystorm/MapCraft | /lib/db/sessions.php | UTF-8 | 2,377 | 2.84375 | 3 | [] | no_license | <?php
// Session + Pie infos for this user
class Channel {
public $sesid;
public $pieid;
function _load_from_session() {
session_id($this->sesid);
@session_start();
// nick
if( isset($_SESSION['osm_user']) ) {
$this->_nick = $_SESSION['osm_user'];
} els... | true |
192f550acc33f8aec4d35a8c40ad4aaca4f1bd2e | PHP | Design-Studio-Team-4/FinalGame | /DeckcendantFinal/Assets/Scripts/board.php | UTF-8 | 924 | 3.046875 | 3 | [] | no_license | <?php
$servername = "ugrad.bitdegree.ca";
$username = "christopherwclar";
$password = "JrbvsW6J3x";
$dbname = "christopherwclar";
//$numberOfRowsToRead;
//$currentRow;
$name = $_POST["name"];
$score = $_POST["score"];
$conn = new mysqli($servername,$username,$password,$dbname);
if ($conn->connect_error){
die("Co... | true |
792e71daae9f70d3814030563b367a00a942a89c | PHP | got26days/pdffile | /123/pdfCode/PdfGenerator/PdfCreator.php | UTF-8 | 1,944 | 2.875 | 3 | [] | no_license | <?php
namespace PdfGenerator;
require_once __DIR__ . '../../vendor/autoload.php';
use Dompdf\Dompdf;
use Dompdf\Options;
use Dompdf\FontMetrics;
use Twig\Loader\FilesystemLoader;
use Twig\Environment;
class PdfCreator
{
protected $data;
protected $type;
protected $lang;
protected $page;
protected $folder;
p... | true |
2ee2cd09105710973f6f2a81d7925974abb4a1f2 | PHP | vladmit31/Video-Games-Society-Webpage | /LabProject/VGS/public/games/delete.php | UTF-8 | 1,459 | 2.5625 | 3 | [] | no_license | <?php require_once('../../private/initialize.php'); ?>
<?php include(SHARED_PATH . '/header.php'); ?>
<!--Deletes a specific game
It takes a game ID and deletes that game
-->
<hr/>
<?php
$id = $_GET['id'] ?? '';
if ($id == '') redirect_to(url_for('./games/index.php'));
if (is_post_request()) {
... | true |
7ec1f7bf31277732a299a2accceb3b8ba12d42a2 | PHP | bookboon/api-php | /src/Client/ClientTrait.php | UTF-8 | 2,063 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Bookboon\Api\Client;
use Psr\SimpleCache\CacheInterface;
trait ClientTrait
{
/** @var string */
protected $apiId;
/** @var string */
protected $apiSecret;
/** @var Headers */
protected $headers;
/** @var CacheInterface|null */
protected $cache;
abstract protect... | true |
bd6c81d0a0ad8ce5b3bcc62c84684d2dccff8b53 | PHP | my-it-education-us/myitedu | /teams/warriors/april/monday6.php | UTF-8 | 827 | 3.640625 | 4 | [] | no_license | <?php
//What is a variable?
/*
* Variables are data values that can change when the user is
* asked a question, for example, their age. ...
* The memory location is used to hold data.
* The key difference when comparing a constant to a variable
* is that the value associated with a variable name may change
* duri... | true |
81bd284081cbc313d8476039c310bb07a157fc14 | PHP | rafaelht/cms | /admin/includes/add_entrada.php | UTF-8 | 4,337 | 2.59375 | 3 | [] | no_license | <?php
if(isset($_POST["crear_entrada"])){
$id_categoria_entrada=$_POST["entrada_categoria"];
$entrada_titulo=$_POST["entrada_titulo"];
$entrada_imagen=$_FILES["entrada_imagen"]["name"];
$entrada_imagen_temp=$_FILES["entrada_imag... | true |
cf52180206622afc5a28425093adb197aaf480ef | PHP | VIPnytt/SitemapParser | /examples/preDownloaded.php | UTF-8 | 1,006 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
require_once(dirname(__FILE__) . "/../vendor/autoload.php");
use vipnytt\SitemapParser;
use vipnytt\SitemapParser\Exceptions\SitemapParserException;
/**
* Pre-downloaded sitemap example
* No need to re-download if you already have it
*/
$body = <<<XML
<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmln... | true |
3a99302eaa507b857e204e1927fe912e7199dc8d | PHP | nab0310/SocialMediaTest | /Lab5/CheckLogin.php | UTF-8 | 505 | 2.84375 | 3 | [] | no_license | <?php
//var_dump($_REQUEST);
session_start();
$foundUsername = 0;
$myfile = fopen("users.txt", "r") or die("Unable to open file!");
while(!feof($myfile)) {
$line = fgets($myfile) . "<br>";
$array = explode ( ":" , $line);
if(strcmp($array[0],$_REQUEST["username"])==0){
if(strpos($array[1],$_REQUEST... | true |
2e9e473c83ebf5fd883fdecbdfbd4e7bd4bc96bd | PHP | alessandrocalu/CALU | /componentes/validacao/validaFormulario.php | ISO-8859-1 | 3,007 | 3.25 | 3 | [] | no_license | <?php
/**
* @desc Sistema: CALU at link unlimited
* @desc Classe para validao de formulrios
* @author Alessandro Calu <alessandrocalu@yahoo.com.br>
* @copyright Alessandro Calu
* @version 1.0
* @since Criado: 22/03/2007 Atualizado: 22/03/2007
*/
class validaFormulario {
var $valor;
var $tipo;
va... | true |
857c5fecb352c64d26bcc861462a38fb21727c40 | PHP | dmatocinos/incorporation | /app/services/SummaryGraphService.php | UTF-8 | 2,286 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class SummaryGraphService extends IncorporationEngine {
protected function init()
{
$rendererName = PHPExcel_Settings::CHART_RENDERER_JPGRAPH;
$rendererLibraryPath = app_path() . '/../libraries/jpgraph/';
if ( ! PHPExcel_Settings::setChartRenderer(
$rendererName,
$rendererLibraryPath
)) {
di... | true |
e2d5ac9b6caf5b83b435bcc314f6299ff5785daa | PHP | Opus1no2/Ifbyphone-API-Client | /src/Ifbyphone/Api/Sms.php | UTF-8 | 4,196 | 2.953125 | 3 | [] | no_license | <?php
/**
*
* SMS class
*/
namespace Ifbyphone\Api;
class Sms extends Base
{
/**
*
* Class contstructor
*
* @param object $opt
*
* @return void
*/
public function __construct($arg)
{
parent::__construct($arg);
}
/**
*
* Send an outbound... | true |
25e81459df059097b796d098c388c55410a9e73d | PHP | proem/proem | /lib/Proem/Service/AssetManager.php | UTF-8 | 13,310 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* The MIT License
*
* Copyright (c) 2010 - 2014 Tony R Quilkey <trq@proemframework.org>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including with... | true |
ba562c5f33286f7d86cbca06c513660f952d8a1d | PHP | Hikansh/Vulnerable-Website-SEC | /index.php | UTF-8 | 1,589 | 2.625 | 3 | [] | no_license | <?php
// session_start();
// if (isset($_SESSION['bought']) && $_SESSION['bought'] == true) {
// $p = $_SESSION['price'];
// echo "<div class='alert alert-success>Successfully bought this product for $ $p</div>";
// }
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="view... | true |
31381d42abf1a91a0c5b4d0327ffd0dbf96c870f | PHP | Alessandr0sousa/capgemini_backend | /database/migrations/2021_06_04_040956_create_conta.php | UTF-8 | 947 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateConta extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('conta', function (Blue... | true |
043565e3dda28e50abdef1b290f89453be9900cb | PHP | agleevtimur/php42 | /exercise/spring2020/10/Exceptions/ExceptionFour.php | UTF-8 | 147 | 2.8125 | 3 | [] | no_license | <?php
namespace Exceptions;
class ExceptionFour extends \Exception {
function __construct() {
parent::__construct('ExceptionFour');
}
};
?> | true |
c2e9d623c34738c51d197b8e902860b19c12998e | PHP | s-mahir-islam/knox | /Knox/config.php | UTF-8 | 529 | 2.671875 | 3 | [] | no_license | <?php
define('DBServer', 'localhost');
define('DBUserName', 'root');
define('DBPassword', '');
define('Database', 'websitedb');
$conn = mysqli_connect(DBServer,DBUserName,DBPassword,Database);
/* check connection */
if (!$conn) {
die("Connect failed: %s\n".mysqli_connect_error());
}
/* return na... | true |
8f4b96828e3db792712afab6b8cf295e5a361d7f | PHP | BennaceurHichem/TranslateWebPlatform | /formulaireValidation.php | UTF-8 | 5,709 | 2.671875 | 3 | [] | no_license | <html>
<head>
<style>
.error {color: #FF0000;}
</style>
</head>
<body>
<?php
// define variables and set to empty values
$name = $prenom= $email = $numTel = $adresse = $lang_origine =$lang_src=$lang_origine= $file=$typeTrad=$comments=$assermentee="";
... | true |
f0ec54b08bb89ba539ae9fc4d1074a14aa5cbc4c | PHP | gatusmart/phoenix | /app/Models/Core/Design/Widget.php | UTF-8 | 980 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models\Core\Design;
use Illuminate\Database\Eloquent\Model;
use App\Models\Core\Settings\HasSettings;
class Widget extends Model
{
use HasSettings;
protected $table = "widgets";
protected $fillable = ['id'];
protected $casts = [
'filter_data' => 'array',
];
pr... | true |
2aa773cfe49a01a0d61d8e1429726913be55293b | PHP | niden/cardoe | /src/Factory/AbstractFactory.php | UTF-8 | 1,280 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Phalcon Framework.
*
* (c) Phalcon Team <team@phalcon.io>
*
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Phalcon\Factory;
use function array_merge;
/... | true |
7be050afa109b010f11b0d7550321ca9e4c54ed1 | PHP | thienkimlove/viemgan2 | /app/Http/Controllers/VideosController.php | UTF-8 | 2,873 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Controllers;
use App\Http\Requests;
use App\Http\Requests\VideoRequest;
use App\Video;
use Intervention\Image\Facades\Image;
class VideosController extends Controller {
public function __construct()
{
$this->middleware('admin');
}
protected function saveImage($request... | true |
7511424cb6e74cd9cbbdf1c9666baf34cd8ab541 | PHP | dhara68patel/gym.fitness5 | /app/User.php | UTF-8 | 1,092 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
protected $table = 'users';
protected $primaryKey = 'userid';
/**
* The attrib... | true |
0ac851a45b8fe323952048ed87bad1e3ea9ac58e | PHP | harshitchaudhary/test_darwinBox | /basic/controllers/UserScreeningController.php | UTF-8 | 7,356 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\controllers;
use Yii;
use app\models\UserScreening;
use app\models\UserScreeningSearch;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use yii\web\UploadedFile;
use yii\helpers\Json;
use yii\base\ErrorException;
use yii\helpers\Url;
/**
* UserScreeningContr... | true |
f8f78ef74c8df6b1ba8b9c4e21e9257cb2781aef | PHP | KevinLovgren/hestochpony | /app/Helpers/DuelHelper.php | UTF-8 | 3,945 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
use App\Deck;
use App\User;
use App\Duel;
function getDuel($firstID, $secondId)
{
$duel = Duel::where('first_deck_id', $firstID)->where('second_deck_id', $secondId)->first();
if($duel == null)
{
$duel = Duel::where('first_deck_id', $secondId)->where('second_deck_id', $firstID)->first();
... | true |
72a3257c03ff99e3899b31aee8e7cef3dd1ad1ec | PHP | xp-framework/xp-framework | /core/src/main/php/scriptlet/rpc/AbstractRpcRouter.class.php | WINDOWS-1252 | 6,204 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/* This class is part of the XP framework
*
* $Id$
*/
uses(
'scriptlet.HttpScriptlet',
'util.ServiceException',
'scriptlet.rpc.RpcFault',
'util.log.Traceable',
'util.log.Logger',
'xml.Node'
);
/**
* Abstract RPC router
*
* @purpose Provide RPC services
*/
abstrac... | true |
22be5fed29f50ecfc78cc59c9ad4a5b22f20c44d | PHP | dmekhov/restapi-image-generator | /tests/Unit/WidgetTest.php | UTF-8 | 1,287 | 2.828125 | 3 | [] | no_license | <?php
namespace Tests\Unit;
use Tests\TestCase;
use App\Services\Widget;
use App\DTO\WidgetParams;
use Illuminate\Http\Request;
class WidgetTest extends TestCase
{
/**
* Проверка создания изображения с заданными размерами.
*/
public function test_make_image()
{
$width = 110;
$h... | true |
d25ad062701843851b118d75af8f96cd4ce1fc77 | PHP | sasiflo/hubzilla-addons | /fuzzloc/fuzzloc.php | UTF-8 | 4,911 | 2.703125 | 3 | [] | no_license | <?php
/**
* Name: Fuzzy Location
* Description: If you have browser location enabled for your posts, provide a bit of fuzziness to your actual location
* Version: 1.0
* Author: Mike Macgirvin
* Maintainer: none
*/
function fuzzloc_load() {
/**
*
* Our plugin will attach in three places.
* The first is ... | true |
b478a4f70d3fa0642df8e9ddcbb793a46b2ddbdd | PHP | WPPlugins/bp-group-reservations | /extension.php | UTF-8 | 7,017 | 2.5625 | 3 | [] | no_license | <?php
// Load localization files if present
if ( file_exists( dirname( __FILE__ ) . '/' . get_locale() . '.mo' ) )
load_textdomain( 'bp-group-reservation', dirname( __FILE__ ) . '/languages/' . get_locale() . '.mo' );
// Don't initialize the extension if the Groups component is not enabled
if( ! class_exists(... | true |
7bfeff6cd5e09c3f402b5dc02b362c5daa548c64 | PHP | LuukEsselbrugge/ProjectP4 | /Backend/views/getShelfs.php | UTF-8 | 901 | 2.921875 | 3 | [] | no_license | <?php
function dbConnect(){
$dbHost = "localhost";
$dbName = "librarysearch";
$dbUser = "root";
$dbPass = "";
if(!($conn=mysqli_connect($dbHost, $dbUser, $dbPass))){
echo "Error on connect.";
}else{
if(!(mysqli_select_db($conn, $dbName))){
echo mysqli_error();
echo "error on database connecti... | true |
1cd7a18b02c89f774a224356c0e3544f1fb2e803 | PHP | ptland/dana.online | /models/Category.php | UTF-8 | 752 | 3.03125 | 3 | [] | no_license | <?php
namespace App\Model;
class Category{
private $category_id;
private $name;
private $parent_id;
function __construct($category_id=0, $name=null, $parent_id=0) {
$this->category_id = $category_id;
$this->name = $name;
$this->parent_id = $parent_id;
}
function ge... | true |
a938a09efd22dfe3eb9afae883495a75f1187210 | PHP | 778758944/php | /review/yunfei3.php | UTF-8 | 628 | 2.65625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Examples</title>
<meta name="description" content="">
<meta name="keywords" content="">
<link href="" rel="stylesheet">
</head>
<body>
<table border="0" cellpadding="3">
<tr>
... | true |
8a329361702ace88e66552e0ab2c2e40804c9f7e | PHP | king-fang/flaravel-generator | /src/Makes/MakeController.php | UTF-8 | 2,001 | 2.625 | 3 | [] | no_license | <?php
namespace Flaravel\Generator\Makes;
use Flaravel\Generator\Commands\FlaravelGenerator;
use Flaravel\Generator\MakerTrait;
use Illuminate\Filesystem\Filesystem;
class MakeController
{
use MakerTrait;
protected $flaravelCommandObj;
public function __construct(FlaravelGenerator $command, Filesyste... | true |
c273995d4dbdbfa5bb3c4323501c9f9e4fde07c4 | PHP | rrs-oacis/rrs-oacis | /apps/rrs_oacis/competition/update_runid_forRerun.php | UTF-8 | 639 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
if ($argc != 2) { return; }
$paramId = ''.$argv[1];
$runId = '';
$paramSetJson = file_get_contents('http://localhost:3000/parameter_sets/'.$paramId.'.json');
$paramSet = json_decode($paramSetJson, true);
foreach ($paramSet['runs'] as $run)
{
$runId = $run['id'];
}
//$db = \rrsoacis\manager\DatabaseManager::... | true |
bd933acd4ce4a0b41ea1dbb5478c6cacd6249e0d | PHP | jasonlund/nexus | /app/Services/ImagesService.php | UTF-8 | 847 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Services;
class ImagesService
{
/**
* Get the request validation rules given an optional action.
*
* @param string|null $action
*
* @return array
*/
public static function validationRules($action = null)
{
$rules = collect([
'file' ... | true |
c5a57236e2fcd94364c4fa41752a170786360d4e | PHP | teberZhang/laravel5.8 | /app/Http/Controllers/Stage/PodcastController.php | UTF-8 | 1,183 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Stage;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Jobs\ProcessPodcastJob;
use App\Models\Order;
/***
* 进阶系列 —— Laravel 队列系统实现及使用教程 —— 分发任务
* Class PodcastController
* @package App\Http\Controllers\Stage
*/
class PodcastController extends Control... | true |
8b5cc0851cf8351cf7d23064fd0878841fb10bdc | PHP | jdrzj/sheetsu-php | /example.php | UTF-8 | 1,299 | 3.109375 | 3 | [] | no_license | <?php
/**
* Example of usage for the Sheetsu PHP Library
* @Author: Emiliano Zublena - https://github.com/emilianozublena
* @Package: Sheetsu PHP Library - https://github.com/emilianozublena/sheetsu-php
*/
ini_set('display_error', 1);
error_reporting(E_ALL);
require('vendor/autoload.php');
use Sheetsu\Sheetsu;
use... | true |
40302a5a1bd0f65c94eb82481c2e73c2f7f08ac5 | PHP | kolelan/doctrine | /App/Modules/Accounting/Documents/RecognizedItem.php | UTF-8 | 1,844 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Modules\Accounting\Documents;
use App\Modules\Accounting\Documents\Country;
use App\Modules\Accounting\Documents\Measure;
use App\Modules\Accounting\Documents\Price;
use App\Modules\Accounting\Documents\IRecognizedItem;
use App\Modules\Accounting\Documents\ISum;
class RecognizedItem extends Ite... | true |
4ba21b192163fd09244b7cc97dd7897eabec6ab6 | PHP | the-maya-hiker/php | /chapter02/02-26.php | UTF-8 | 328 | 3.40625 | 3 | [] | no_license | <?php
// 添字配列から値を取り出して表示する
$php = array("PHP3", "PHP4", "PHP5");
echo "{$php[0]}\n";
// 連想配列から値を取り出して表示する
$maximum_version = array("PHP3" => "3.0.18",
"PHP4" => "4.4.8",
"PHP5" => "5.2.6");
echo $maximum_version["PHP5"];
| true |
6b0c80ab42a9a92301fc9d9e9959e403ec7e5e37 | PHP | CreOmission/BasicosXAMPP | /interaccion1.php | UTF-8 | 443 | 3.921875 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Interacción con el usuario</title>
<meta charset="utf-8">
</head>
<body>
<?php
$n1=$_GET["num1"];
$n2=$_GET["num2"];
echo "<h1>Hola mundo</h1>";
echo "El número 1 es: $n1";
echo "<br><br>";
echo "El número 2 es: $n2";
echo "<br><br>";
//opero con los datos
$s... | true |
f6f96e35c91c6b2e709c442ea4f003fc3f4f5d6f | PHP | sookee/katina | /webkatti/wk/c/Player.php | UTF-8 | 3,572 | 2.515625 | 3 | [] | no_license | <?php
namespace wk\c;
use M;
use Storage;
class Player
{
static function get($guid)
{
$c = new Layout();
$c->setTemplate(__METHOD__);
$c->name = M::user()->getNameByGuid($guid, $c->registered);
$c->players = M::player()->db()
->key($guid, 'guid')
-... | true |
5b059c0d4237259c8ba9aa2a98bf7ac80abcb5fc | PHP | WPPlugins/indypress | /indypress/classes/publication_admin.class.php | UTF-8 | 1,388 | 2.578125 | 3 | [] | no_license | <?php
class indypress_publication_admin {
function indypress_publication_admin() {
add_action( 'wp_ajax_tag-autocomplete', array( $this, 'complete' ) );
add_action( 'wp_ajax_nopriv_tag-autocomplete', array( $this, 'complete' ) );
add_action('manage_posts_custom_column', array( &$this, 'anon_user_column' ), 10... | true |
de7a72f06a9f208adfa78ab65e30708d3f9cbf7d | PHP | redpandacute/Matura_Android_Studio_Project | /home_php.php | UTF-8 | 2,365 | 2.625 | 3 | [] | no_license | <?php
//Connection
$db_serverhost = "sql530.your-server.de";
$db_username = "efxinf_7";
$db_password = "LxkLYb23hC7nKp4X";
$db_name = "efxinf_db7";
$conn = mysqli_connect($db_serverhost, $db_username, $db_password, $db_name);
$user_id = $_POST["user_id"];
$user_password = $_POST["user_password"]... | true |
4ce76655eef34a6a3d54ce119cc5fec64ed84772 | PHP | aique/Qframe | /qframe/i18n/money/MoneyHelper.php | UTF-8 | 670 | 2.875 | 3 | [] | no_license | <?php
class Library_Qframe_I18n_Money_MoneyHelper
{
const EURO = "euro";
const DOLLAR = "dollar";
public static function getCurrencyByLocation($location)
{
$currency = false;
if(Library_Qframe_I18n_LocaleHelper::hasEnglishUSLocation($location))
{
$currency = self::DOLLAR;
}
elseif(Library_Qframe_... | true |
a4ee8237fc0c1660a1deee34322a5fe57ca0a408 | PHP | carbontwelve/tools | /tests/PathClassTest.php | UTF-8 | 3,007 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
use Carbontwelve\Tools\Formatters\Path\InvalidPathException;
use Carbontwelve\Tools\Formatters\Path;
use Icecave\Temptation\Temptation;
class PathClassTest extends PHPUnit_Framework_TestCase {
/** @var \Carbontwelve\Tools\Formatters\Path */
private $pathClass;
/**
* @return void
*/
p... | true |
29d5286f6fd32fe94de82d8e8a4a9538032db3b7 | PHP | ipunkt/rancherize | /app/RancherAccess/Exceptions/UrlConversionFailedException.php | UTF-8 | 553 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php namespace Rancherize\RancherAccess;
use Rancherize\Exceptions\Exception;
/**
* Class UrlConversionFailedException
* @package Rancherize\RancherAccess
*/
class UrlConversionFailedException extends Exception {
/**
* UrlConversionFailedException constructor.
* @param string $url
* @param string $version
... | true |
6cd5e874e172c58b7a5c353574c044b7ca9c0547 | PHP | sslab-gatech/autofz | /docker/benchmark/seeds/fuzzer-test-suite/php-fuzz-parser/bug26696.phpt | UTF-8 | 216 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
$str = 'asdd/?';
$len = strlen($str);
for ($i = 0; $i < $len; $i++) {
switch ($str[$i]) {
case '?':
echo "?+\n";
break;
default:
echo $str[$i].'-';
break;
}
}
?> | true |
f7247211788d1a41661cc8ee55a78fa1bbc2f99d | PHP | guyanyouyou/PHPstudy | /oop/22.php | UTF-8 | 2,379 | 3.328125 | 3 | [] | no_license | <?php
/**
* @Author: 孤雁幽幽
* @Date: 2016-03-26 18:39:51
* @Last Modified by: 孤雁幽幽
* @Last Modified time: 2016-03-26 19:09:26
*/
/**
* 构造方法的继承
* 答:构造方法也是可以继承的
* 而且继承的原则和普通方法一样
*
* 进而,如果子类也声明构造函数,则父类的构造函数,呗覆盖了。
* 如果父类构造函数被覆盖了,自然,只执行子类中新的构造函数
*
* 引发一个问题:
* 如果是一个数据库操作类,或者model类
* 我们肯定要继承过去再使用,不能直接操作model... | true |
f6d6f4c1378e7f29d228c98d5df5fc7c2a2e083a | PHP | hexogen/kdtree | /src/NearestSearch.php | UTF-8 | 13,395 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
namespace Hexogen\KDTree;
use Hexogen\KDTree\Exception\ValidationException;
use Hexogen\KDTree\Interfaces\ItemInterface;
use Hexogen\KDTree\Interfaces\NodeInterface;
use Hexogen\KDTree\Interfaces\PointInterface;
use Hexogen\KDTree\Interfaces\SearchAbstract;
use SplPriorityQueue;
class NearestSearch extends Sea... | true |
e4eb8a981852ea0d2f1af3fc8fd65cb5135f93fd | PHP | yf393136248/feiPhp | /feiphp/Core.php | UTF-8 | 5,374 | 2.671875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: yefei
* Date: 17-1-21
* Time: 上午11:32
*/
class Core {
public function run(){
spl_autoload_register(array($this, 'loadClass'));
$this->setReporting();
$this->unRegisterGlobals();
$this->removeMagicQuotes();
$this->checkRequestMet... | true |
3f99dcc4d8ba3c92c78600095fa9d0ae24d0f59b | PHP | SplashSync/Dolibarr | /splash/src/Widgets/Demo.php | UTF-8 | 7,011 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of SplashSync Project.
*
* Copyright (C) Splash Sync <www.splashsync.com>
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* For the ... | true |
e3cf46af26e6273f013f3758354e0f0c25e74e7d | PHP | seant23/red | /application/services/Employee.php | UTF-8 | 519 | 2.984375 | 3 | [] | no_license | <?php
class Employee {
/**
* Login Attempt
*
* @param $username String Username, Email, or Contact ID used for login
* @param $password String Password for login
*
* @return array An Array containing the results of the login attempt
*/
public function login($username, $password) {
$success = LP_... | true |
2ae3d96e2e3cde52248777189458561180bb4e99 | PHP | phplet/origin | /zmte/app/models/cron/report/general_html_model.php | UTF-8 | 89,899 | 2.59375 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit();
/**
*
* 测评报告 --生成报告模板->html
* @author tcg
* @final 2015-02-03
*/
class General_html_model extends CI_Model
{
private static $_db;
private static $_uid; //学生id
private static $_stu_id; //学生id
private static $_schcls_id; //班级id
private static $_ct_id; //教... | true |
1c38c3bc71684094ab2320474e96579c0ce45d6a | PHP | ClevertonHoffmann/dw2---CalculoPiramide | /app/Http/Controllers/MeuController.php | UTF-8 | 1,658 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class MeuController extends Controller
{
public function pinturaPiramide($h, $ab, $tipoTinta){
$a1 = sqrt(($h*$h)+($ab*$ab)); //a1
$Af = 4*$ab*$ab; //área do fundo (Área da base)
$Al = (2*$ab*$a1)/2; //área lateral (Área ... | true |
aca29523142982aeaff8658e617730f4f3d8cb79 | PHP | lokalkoenig/lk-modules | /src/LK/Kampagne/Tests/GIFExtractorTest.php | UTF-8 | 1,156 | 2.765625 | 3 | [] | no_license | <?php
/*
* 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.
*/
namespace LK\Kampagne\Tests;
use LK\Tests\TestCase;
use LK\Kampagne\GIFExtractor;
/**
* Description of GIFExtractorTest
*
*... | true |
a0397d19a3436eaf3c5a14c434727e3c3b20b013 | PHP | mekras/atompub | /src/Document/Document.php | UTF-8 | 1,195 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Atom Publishing Protocol support
*
* @author Михаил Красильников <m.krasilnikov@yandex.ru>
* @license MIT
*/
namespace Mekras\AtomPub\Document;
use Mekras\Atom\Atom;
use Mekras\Atom\Document\Document as AtomDocument;
use Mekras\Atom\Extensions;
use Mekras\AtomPub\AtomPub;
/**
* AtomPub Document.
*... | true |
8c9e207de40b88b09ac5e1559deccbe5e6cb12b2 | PHP | andrewhawk1ns/order-sheets | /tests/Unit/Models/Sheet/PlaceProductsTest.php | UTF-8 | 1,621 | 2.765625 | 3 | [] | no_license | <?php
namespace Tests\Unit;
use App\Models\Sheet;
use Tests\TestCase;
class PlaceProductsTest extends TestCase
{
public function setUp(): void
{
parent::setUp();
$this->printSheetInstance = new Sheet;
$this->item = new class
{};
}
/** @test */
public function pro... | true |
fafb3abda5fe63e5117ee4bf67502d82788c72b6 | PHP | Dedroy/SMP_Lab3 | /prodList.php | UTF-8 | 578 | 2.859375 | 3 | [] | no_license | <?php echo '<form action="addItem.php" method="post">
<table>
<tr>
<th>
Item
</th>
<th>
Amount
</th>
<th>
Price
</th>
</tr>'; ?>
<?php $prod = array("crisps" => 10, "Beer" => 15, "cookies" => 7, "cola" => 9);
?>
<?php foreach ($prod as $key => $value) :?>
<tr>
<td><?php echo($key) ?></td>
<td>
<input style="width: 40... | true |
ebbc6226f66d95c8e9dca0016aba3d1d9aaf022e | PHP | reborncms/reborn | /heart/reborn/src/Reborn/MVC/Controller/Controller.php | UTF-8 | 9,348 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Reborn\MVC\Controller;
use Reborn\Cores\Application;
use Reborn\Http\Response;
use Reborn\Exception\HttpNotFoundException;
use Reborn\MVC\Controller\Exception\NotAuthException;
use Reborn\MVC\Controller\Exception\NotAdminAccessException;
use Symfony\Component\HttpFoundation\Response as SymfonyResponse... | true |
1f812ba54e1c582db9198eecbade61642e16ecc9 | PHP | aniliso/theme-module | /Events/Slider/SliderWasUpdated.php | UTF-8 | 736 | 2.609375 | 3 | [] | no_license | <?php
namespace Modules\Theme\Events\Slider;
use Modules\Theme\Entities\Slider;
use Modules\Media\Contracts\StoringMedia;
class SliderWasUpdated implements StoringMedia
{
/**
* @var array
*/
public $data;
/**
* @var Slider
*/
public $slider;
public function __construct(Slider... | true |
b0b24330f676674b3dbd2e89944095a1c8f19323 | PHP | VoidZoneInteractive/wojciech-talarczyk | /Moduly/BazaDanych.php | UTF-8 | 11,166 | 2.671875 | 3 | [] | no_license | <?php
namespace Moduly;
class BazaDanych
{
private static $polaczenie = false;
public function __construct()
{
$konfiguracja = (new \Konfiguracja(__CLASS__))->zwrocDaneKonfiguracyjne();
$host = $konfiguracja['host'] ?? ini_get('mysql.default_host');
$uzytkownik = $konfiguracja['u... | true |
a5c2d005a25075168c85421da628247258f2665b | PHP | katariin/2-tund-II-r-hm- | /hello_world.php | UTF-8 | 663 | 3.34375 | 3 | [] | no_license | <?php
$first_name = "Katrin";
$last_name = "Voroshilova"
echo $first_name." ".$last_name
?>
<br>
<?php
$age = 5;
// kui on väiksem kui 18, siis alaealine
// kui on suurem siis täisealine
if($age < 18) {
//tõeline
echo "alaealine";
} else {
//... | true |
ac47c1710ce7c4ae31e5be461b580914d25f1e28 | PHP | zhoubowen-sky/hubuedu | /Hubu/Teacher/Controller/DaController.class.php | UTF-8 | 3,997 | 2.734375 | 3 | [] | no_license | <?php
// 数据分析的控制器
namespace Teacher\Controller;
use Think\Controller;
class DaController extends Controller
{
/**
* 展示我所有的课程
*/
function showMyCourse()
{
header("Content-Type:text/html; charset=utf-8"); // 不乱码
$wheres = 'course_name_adder_id = ' . session('adminuser_id');
... | true |
5b49f6a5ae91b1f0461b86ead73a99d69685006e | PHP | eugeny-70/argilla | /protected/extensions/cackle/components/CackleCommentManager.php | UTF-8 | 1,879 | 2.609375 | 3 | [] | no_license | <?php
/**
* @author Alexey Tatarinov <tatarinov@shogo.ru>
* @link https://github.com/shogodev/argilla/
* @copyright Copyright © 2003-2014 Shogo
* @license http://argilla.ru/LICENSE
* @package
*/
class CackleCommentManager extends CackleAbstractManager implements CackleManagerInterface
{
/**
... | true |
c248f873c7d2fc92cb19b9e70ae38a989a0339e2 | PHP | IamYth/UL_News | /console/migrations/m170112_121130_create_feed_table.php | UTF-8 | 1,320 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Handles the creation of table `feed`.
* Has foreign keys to the tables:
*
* - `source`
*/
class m170112_121130_create_feed_table extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->createTable('feed', [
'id' => $this->... | true |
b5f96b15cb3d306394668b5ea84529d745cec28b | PHP | Coder-Mehedi/PHP-Login-Register | /login.php | UTF-8 | 3,375 | 3 | 3 | [] | no_license | <?php
session_start();
include('config/db_connect.php');
// write query for all users
$sql = 'SELECT email, password, id FROM account_info ORDER BY created_at';
// getting result
$result = mysqli_query($conn, $sql);
// fetch the resulting rows
$users = mysqli_fetch_all($result, MYSQLI_ASSOC);
... | true |
411d21ec4a21708e7572b65e932bbda3ba257ca7 | PHP | DynamicDesignz/BlackNET | /BlackNET Panel/classes/Settings.php | UTF-8 | 1,064 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
class Settings extends Database
{
public function getSettings($id)
{
$pdo = $this->Connect();
$sql = "SELECT * FROM settings WHERE id = :id";
$stmt = $pdo->prepare($sql);
$stmt->bindParam(":id", $id);
$stmt->execute();
$data = $stmt->fetch();
return ... | true |
0b416238c5adc549acbca85f5c6364ae430b354b | PHP | hasiholandd/siadel | /models/TrPengeluaran.php | UTF-8 | 1,600 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "tr_pengeluaran".
*
* @property integer $id
* @property integer $id_pengeluaran
* @property string $jumlah_pengeluaran
* @property string $tanggal_pengeluaran
* @property string $keterangan_pengeluaran
* @property string $url_bukti_... | true |
c83c32f5afd0e19795e6855104e34b6410ae801a | PHP | HugoFara/lwt | /do_test_test.php | UTF-8 | 29,112 | 2.734375 | 3 | [
"Unlicense"
] | permissive | <?php
/**
* \file
* \brief Show test frame
*
* Call: do_test_test.php?type=[testtype]&lang=[langid]
* Call: do_test_test.php?type=[testtype]&text=[textid]
* Call: do_test_test.php?type=[testtype]&selection=1
* (SQL via $_SESSION['testsql'])
*
* @package Lwt
* @author LWT Project <lwt-project@ho... | true |
49da97d5b1cd4d671198299d8a949c9613b90e15 | PHP | Xrevs/LibraryMVC | /View/Widget.php | UTF-8 | 967 | 3.1875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Xavier
* Date: 2/27/2017
* Time: 12:03 AM
*
* @ChangeLog:
* Instead of having an array of N widgets, only one instance
*/
class Widget
{
private $template;
private $dictionary;
function __construct($dictionary, $fileName)
{
$this->template =... | true |
82debd011d72bf9b75c9543bf640950da8ee8455 | PHP | emeraldhycient/msboujeelashes-ecommerce-store | /models/products.php | UTF-8 | 10,266 | 2.59375 | 3 | [] | no_license | <?php
require_once '../config/connection.php';
class Products extends Connection {
public static function addProduct($name,$price,$qty,$category,$imgI,$imgII,$imgIII,$description){
$data = [];
$userid = $_SESSION["loggedin"];
$name = self::filter($name);
$price = self::filter($price)... | true |
6ead1f4e9b5406c8d2b65d68f601b7daff460bda | PHP | karajanchang/twdd.packages | /src/GoogleMap/LatLon.php | UTF-8 | 485 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: david
* Date: 2019-05-02
* Time: 00:11
*/
namespace Twdd\GoogleMap;
class LatLon extends GoogleMapAbstract implements GoogleMapInterface
{
public function __construct($lat, $lon)
{
$this->lat = $lat;
$this->lon = $lon;
}
public function ... | true |
109d2f41bc056d4841dba2ef5cd357e9ba5dcad3 | PHP | JoaoV1t0r/estudo_php | /praticando_part2.php | UTF-8 | 459 | 3.46875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>
<body>
<?php
$mega_sena = array();
for ($id = 0; $id < 6;$id++) {
$num_sorteio = rand(1,60);
echo "$num_sorteio";
echo "<br>";
if (in_array($num_sorteio,$mega_sena)){
$id... | true |