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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e34ae33070684c5332dd26ca713a23fdd0274e96 | PHP | AGPFVEN/Backend-repository | /AGPFVEN/BarCode/new_BIN_inventory.php | UTF-8 | 3,890 | 2.5625 | 3 | [] | no_license | <?php
include("database/db.php");
include("includes/header.php");
function exists($does_exists)
{
if(isset($_SESSION[$does_exists]))
{
?> value= <?php echo ($_SESSION[$does_exists]);
}
}
?>
<form method="POST" action="Create_routine/Intro_data_into_db.php" cla... | true |
7c62da30d26beccf022d638621c4e23846376200 | PHP | Devrid/Laravel-Sample | /Laravel Eloquent/Model.php | UTF-8 | 2,388 | 2.765625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Table_A extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'my_flights';
protected $primaryKey = 'my_id';
protected $incrementing = false; // False if primar... | true |
754b58cb692c0c412720785148a3991547177a9b | PHP | denislrx/filrouge | /POO/Model/Evenement.php | UTF-8 | 3,624 | 2.9375 | 3 | [] | no_license | <?php
class Evenement
{
private $idEvent;
private $date;
private $heure;
private $nom;
private $Lieu;
private $description;
private $image;
private $urlLien;
private $idOrga;
private $datePubli;
/**
* Get the value of idEvent
*/
public fu... | true |
a43ac7a640907deea6c495eb75a277bfe9924d72 | PHP | AlirezaSedghi/Useful-PHP-Snippets | /convert-characters.php | UTF-8 | 982 | 3.515625 | 4 | [] | no_license | <?php
// Convert Arabic Characters To Farsi ( Persian )
function arabic_to_farsi( $string = '' ) {
$arabic_characters = array( 'ة', 'ك', 'دِ', 'بِ', 'زِ', 'ذِ', 'شِ', 'سِ', 'ى', 'ي', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩', '٠' );
$farsi_characters = array( 'ه', 'ک', 'د', 'ب', 'ز', 'ذ', 'ش', 'س', 'ی', 'ی', '۱... | true |
ee0ca59759f346c6dce7c00583c897fba1e44a0a | PHP | makinwab/php_cnv_framework | /core/Template.php | UTF-8 | 6,593 | 3.421875 | 3 | [] | no_license | <?php
/**
* A templating engine
*
* PHP version 5
*
* LICENSE: This source file is subject to the MIT License, available at
* http://www.opensource.org/licenses/mit-license.html
*
* @author Pat Herlihy <pat841@bu.edu>
* @copyright 2010 Boston University
* @license http://www.opensource.org/... | true |
1829ab6a4a620025e7788380d070ff4726a2b540 | PHP | indiaaditya/phpProject1 | /PhpProject1/testext.php | UTF-8 | 463 | 2.703125 | 3 | [] | no_license | <?php
//print "Calling DoubleUp begin";
$value = $_REQUEST['q'];
$value = intval($value);//Convert String to Integer
$value2 = $_REQUEST['r'];
$value2 = intval($value2);//Convert String to Integer
$result = DoubleUp($value);
print "Calling DoubleUp($value) returned $result";
$result = AddUp();
print "Ad... | true |
5b07818d9d73258af44144555cdb8f1e99fd594d | PHP | philburnett/affordability-checker | /src/Property/Address.php | UTF-8 | 735 | 3.25 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace AffordabilityChecker\Property;
class Address
{
/**
* @var string
*/
private $firstLine;
/**
* @var string
*/
private $postcode;
/**
* Address constructor.
*
* @param string $firstLine
* @param string $postcode
... | true |
d7f27ec34fcd693b4b4b16f24557411644ce6d01 | PHP | iBeiKeDevelopers/saltedfish | /app/Http/Controllers/ChatController.php | UTF-8 | 2,484 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Auth;
use App\User;
use App\Models\History;
use App\Events\Chat\MessageSendingEvent as Event;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Cache;
class ChatController extends Controller
{
private $room_key;
//using... | true |
f8b98a20c5b0ef6034fa2a5cc5dc50e73dc223aa | PHP | thomas-che/www | /projectPerso/exam_2018/models/model.php | UTF-8 | 1,076 | 2.828125 | 3 | [] | no_license | <?php
require_once('connect.php');
function getConnect() {
$connexion=new PDO('mysql:host='.SERVEUR.';dbname='.BDD,USER,PASSWORD);
$connexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$connexion->query('SET NAMES UTF8');
return $connexion;
}
function getArticle(){
$connexion=getConnect();
... | true |
813ff2996dfd91854648bfe1d87dea26a2b7b328 | PHP | VladislavParfenov/diplom | /site/includes/class/Admin/Courses.php | UTF-8 | 854 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: user
* Date: 09.04.2017
* Time: 15:50
*/
namespace Admin;
class Courses
{
public function getContent(){
$header = $this->getHeader(\Main::$AdminPages->getHeaderData());
$body = $this->getBody(\Main::$AdminPages->getBodyData());
return $header... | true |
f26c5ef9c683c85ccf44d39992faa0eaf08306a7 | PHP | LamboDWJ/P4 | /view/frontend/postView.php | UTF-8 | 3,652 | 2.578125 | 3 | [] | no_license | <?php $title = 'Lecture'; ?>
<?php ob_start(); ?>
<!-- Menu de navigation et pagination -->
<div class="navbox">
<img id="book" src="public/img/book.jpg">
<div class="navigation">
<a href="index.php">Retour à l'accueil</a>
<a href="index.php?action=firstChap">Premier chapitre... | true |
1a9cf37d55777caeb8ef5ef6b5d4378ce1f63c92 | PHP | miskatjisan/onlineShop | /admin/editcat.php | UTF-8 | 1,705 | 2.578125 | 3 | [] | no_license | <?php include 'inc/head.php'; ?>
<?php include 'inc/leftside.php';?>
<?php include '../classes/Category.php'; ?>
<?php
if (!isset($_GET['editcatid']) || $_GET['editcatid'] == NULL ){
echo "<script> window.location = 'listCat.php'; </script>";
//header(Location:listCat.php);
} else... | true |
193d2f2a3a11e315f01c23cdb382928a80d5a4ca | PHP | glhd/laravel-prismoquent | /src/Results.php | UTF-8 | 908 | 2.703125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | <?php
namespace Galahad\Prismoquent;
use Illuminate\Pagination\LengthAwarePaginator;
use Illuminate\Support\Collection;
use Prismic\Document;
use Prismic\Response;
/**
* @method \Galahad\Prismoquent\Model|null first(callable $callback = null, $default = null)
* @method \Galahad\Prismoquent\Model[] all()
*/
class ... | true |
f68a7e3f35543e10cee7e14a680ead21b8cce5f4 | PHP | zeebinz/ccs-kohana | /modules/tasks/classes/Console.php | UTF-8 | 2,927 | 3.21875 | 3 | [] | no_license | <?php namespace app;
/**
* @package ccs
* @category Task
* @author srcspider
* @version 1.0
*/
class Console
{
protected static $screenwidth = 80;
/**
* @since 1.0
* @return int
*/
public static function screenwidth()
{
return static::$screenwidth;
}
/**
* Command line message.
*... | true |
58933d32fdb91a7687c3d8e22cb4145f1ce07627 | PHP | anthonylopezv/zoofisi | /controladores/Autoload.php | UTF-8 | 509 | 2.765625 | 3 | [] | no_license | <?php
class Autoload {
public function __construct() {
spl_autoload_register(function ($class_name){
$models_path = './modelos/' . $class_name . '.php';
$controllers_path = './controladores/' . $class_name . '.php';
if(file_exists($models_path)) require_once($models... | true |
76860a8ba9f84b330b8679e1d48daa9e8468598a | PHP | viveklaata/Guest-House-Management-System- | /guest_house_management_system-master/admin_action.php | UTF-8 | 747 | 2.515625 | 3 | [] | no_license | <?php
session_start();
include "admin_class.php";
//include "Guest_user.php";
?>
<html>
<body>
<script>
function myFunction() {
alert("Invalid Credentials Please Login Again");
}
</script>
<?php
$type_array=$_POST["type"];
$num_of_rooms_array=$_POST["num_of_rooms"];
?>
<?php
$user=new admin_class;
$response=... | true |
4349455441d9a417ef838ea09e74a6026ee0639f | PHP | kiublack/google-common-api | /app/Libs/GoogleClassRoom.php | UTF-8 | 3,797 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace app\Libs;
use App\Libs\HttpRequestAPI;
use Google_Service_Classroom;
use Google_Service_Classroom_Course;
class GoogleClassRoom
{
function __construct($adminEmail)
{
$this->rq = new HttpRequestAPI($adminEmail);
$this->api = new Google_Service_Classroom($this->rq->getGoogleClient());
}
funct... | true |
ffaf9cbb8f3554f34485b4c1bff4e8aee963a6da | PHP | RussellJamesBello/tio-rene-academy | /teacher-registration.php | UTF-8 | 1,793 | 2.671875 | 3 | [] | no_license | <?php
require 'header.php';
checkCredentials(false);
if(isset($_POST['username']) && isset($_POST['user_password']) && isset($_POST['teacher_name']))
{
$teacher_name = $_POST['teacher_name'];
$username = $_POST['username'];
$password = $_POST['user_password'];
$conn = getDBconnection();
$sql = "insert i... | true |
b331da046efe1e439cf3b06bbbade3ca6ef56bea | PHP | jorgefprietol/reservasy | /lib/Application/Authentication/PasswordEncryption.php | UTF-8 | 1,933 | 2.59375 | 3 | [] | no_license | <?php
/**
Copyright 2020 Prieto Linares, Jorge Fidel
This file is part of Agenda Capacitaciones Yanbal is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any late... | true |
f82b05884d3b8d8af4fb2aac5810bfdeeb83438d | PHP | zepi/turbo-base | /Zepi/Web/UserInterface/src/Renderer/Pagination.php | UTF-8 | 4,785 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 zepi
*
* 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 without limitation the rights
* to use, c... | true |
183b88ae785e6589feda8eb810b6a5386fc0fdd4 | PHP | lotostoi/php2-second | /model/Repository.php | UTF-8 | 4,379 | 2.59375 | 3 | [] | no_license | <?php
namespace app\model;
use app\interfaces\IModel;
use app\engine\App;
abstract class Repository implements IModel
{
public function getOne($id)
{
$tableName = $this->getTableName();
$sql = "SELECT * FROM {$tableName} WHERE id = :id";
return App::call()->Db->queryOne($sql, ['id'... | true |
ec2b36b129c25cb3e68189b20cf83a1c450c26c3 | PHP | Gimcrack/laravel-listen-notes | /src/Exceptions/InvalidPodcastException.php | UTF-8 | 442 | 2.515625 | 3 | [] | no_license | <?php
namespace Ingenious\LaravelListenNotes\Exceptions;
class InvalidPodcastException extends \Exception
{
public function __construct($podcast_id)
{
$this->podcast_id = $podcast_id;
}
public function response()
{
return response()->json([
'errors' => true,
... | true |
6059a17aefac50ab0bce4f9dc512338378627887 | PHP | LakshanKariyawasam/STOCK_MANAGEMENT_SYSTEM | /stock/php_action/getrmrReport.php | UTF-8 | 1,962 | 2.546875 | 3 | [] | no_license | <?php
require_once 'core.php';
$zonedate = new DateTime("now", new DateTimeZone('Asia/Colombo') );
if($_POST)
{
$startDate = $_POST['startDate'];
$date = DateTime::createFromFormat('m/d/Y',$startDate);
$start_date = $date->format("Y-m-d");
$endDate = $_POST['endDate'];
$format = DateTime::createFromFormat('m/... | true |
82b0be0466bb96903e36ba8ba0275615d50a8df6 | PHP | haterecoil/zerowing | /src/AppBundle/Utils/Reporter/Reporter.php | UTF-8 | 1,367 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
/**
* File Reporter.php
*
* PHP Version 5.6
*
* @category Class
* @package Zerowing
* @author mrgn <xyz@example.com>
* @copyright 2016 mrgn
* @license MIT http://choosealicense.com/licenses/mit/
* @link http://lorem.ovh
*/
namespace AppBundle\Utils\Reporter;
/**
* Class Reporter
* @cat... | true |
009252dff8ebfcece435d6d2594306e3a0da4077 | PHP | JordanCarlson7/mycs313-php | /web/Team07/team07_try_signup.php | UTF-8 | 2,218 | 3.03125 | 3 | [] | no_license | <?php
require 'accessDB.php';
const CODE_SUCCESS = 1;
const CODE_NO_ENTRY = 2;
const CODE_INV_PWD = 3;
const CODE_INV_USR = 4;
const MSG_SUCCESS = "Success!";
const MSG_NO_ENTRY = "No username or password entered! Please enter a username and password!";
const MSG_INV_PWD = "Invalid password";
const MSG_INV_USR ... | true |
671e83c64e9102198c176af5aa36d5ba1db2f4d7 | PHP | Ridwansyah-glitch/toko-online-with-php | /lihat_pembayaran.php | UTF-8 | 2,086 | 2.59375 | 3 | [] | no_license | <?php
session_start();
include("koneksi.php");
$id_pembelian = $_GET['id'];
$ambil = $koneksi->query("SELECT * FROM pembayaran
LEFT JOIN pembelian ON pembayaran.id_pembelian=pembelian.id_pembelian
WHERE pembelian.id_pembelian='$id_pembelian'");
$data = $ambil->fetch_assoc();
// e... | true |
483d9c6efae9cb951c65df1ece4bd1598ecb930c | PHP | histoiredelart/histoiredelart-old | /src/DATA/ImageBundle/Service/view.php | UTF-8 | 7,416 | 2.796875 | 3 | [] | no_license | <?php
namespace DATA\ImageBundle\Service;
use DATA\DataBundle\Service\entity;
use DATA\ImageBundle\Service\image;
use Doctrine\ORM\EntityManager;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Security\Core\SecurityContext;
/*
* Service dont l'objectif est d'appliquer des méthodes globales... | true |
2f515e2264ae6688ce265e945c8afd4144f9289c | PHP | bamper/CodeEval | /easy_level/clean_up_the_words/clean_up_the_words.php | UTF-8 | 714 | 3.25 | 3 | [] | no_license | <?php
$fh = fopen( $argv[1], "r" );
while ( !feof( $fh ) ) {
$stringLine = trim( fgets( $fh ) );
$mess = str_split( $stringLine );
$clean = array();
$spaceIndicator = false;
foreach ( $mess as $character )
{
if ( ctype_alpha( $character ) ... | true |
e73dbd72806f07cba8b45fa0b82a6d785ecd549d | PHP | MarcosArena/PHP-MYSQL | /figuras.php | UTF-8 | 835 | 3.578125 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8"/>
<style>
@font-face { font-family: monospace; font-stretch: ultra-expanded;}
</style>
<body>
<?php
$n = 10;
echo("<h2>Cuadrado</h2>");
for ($i=0; $i<$n; $i++) {
for ($j=0; $j<$n; $j++) {
... | true |
6a08241c65d1b68c6f05c7dbea0a783a95d2bba9 | PHP | AlexanderKupriyanov/test-yii | /www/protected/models/TblPost.php | UTF-8 | 3,417 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* This is the model class for table "tbl_post".
*
* The followings are the available columns in table 'tbl_post':
* @property integer $id
* @property string $title
* @property string $content
* @property string $create_time
* @property integer $author_id
*/
class TblPost extends CActiveRecord
{
... | true |
b3fa35715d9a33a85170da6ea0061b46a48923f9 | PHP | erickleandro/Q-Blog | /backend/app/Http/Requests/Admin/CategoryRequest.php | UTF-8 | 2,335 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests\Admin;
use Illuminate\Foundation\Http\FormRequest;
use App\Repositories\User\AuthRepositoryInterface as AuthUserRepo;
use App\Repositories\Category\RepositoryInterface as CategoryRepo;
class CategoryRequest extends FormRequest
{
private $authUserRepo;
private $categoryRepo;
... | true |
cf88ca33f4a839a87e364af3c184c470d331c65d | PHP | GNURub/daw2 | /app/core/application.php | UTF-8 | 2,556 | 3.109375 | 3 | [] | no_license | <?php
class Application
{
/** @var null The controller */
private $url_controller = null;
/** @var null The method (of the above controller), often also named "action" */
private $url_action = null;
/** @var array URL parameters */
private $url_params = array();
/**
* "Start" the applic... | true |
6ce63551a13a425d3a9fe7c2d8740c2502f60173 | PHP | princek459/Uni-Website | /index.php | UTF-8 | 5,818 | 3.015625 | 3 | [] | no_license | <?php
function my_session_start()
{
if (ini_get('session.use_cookies') && isset($_COOKIE['PHPSESSID'])) {
$sessid = $_COOKIE['PHPSESSID'];
} elseif (!ini_get('session.use_only_cookies') && isset($_GET['PHPSESSID'])) {
$sessid = $_GET['PHPSESS... | true |
a2313a064ef43af5128d8b428d9cf5d0696ae8f2 | PHP | Abug0/aabug.github.io | /interface/IUserManage.interface.php | UTF-8 | 421 | 2.921875 | 3 | [] | no_license | <?php
/**
* 定义IUserManage接口
*
* 创建日期:2017.11.29
* 修改日期:2017.11.29
*/
/**
* User对象与数据库间的通信
*/
interface IUserManage
{
static function addUser(IUserObject $user);
static function deleteUser(IUserObject $user);
static function validateUser(IUserObject $user);
static function updateUser(IUserObject $u... | true |
6287cb19dd0b5f2b2770ef8c55db8f671495fced | PHP | powerrrg/testhealthkeep | /public_html/act/ges/emailAll.php | UTF-8 | 838 | 2.53125 | 3 | [] | no_license | <?php
require_once('../../../engine/starter/config.php');
onlyLogged();
if(USER_TYPE!=9){
go404();
}
if(!isset($_POST["from"]) || !isset($_POST["subject"]) || !isset($_POST["message"]) || !isset($_POST["name"]) || !isset($_POST["email"])){
go404();
}
$fromEmail=$_POST["from"];
$name=$_POST["name"];
$email=$_POS... | true |
6b4c87893fcff8778c132d78967f419e6e865466 | PHP | zipmycode/frm | /application/controller/blog.php | UTF-8 | 3,529 | 2.703125 | 3 | [] | no_license | <?php
namespace app\controller;
use frm\ControllerTemplate;
use frm\View;
use frm\Model;
use qqUploader;
class Controller_Blog extends ControllerTemplate {
public function action_list()
{
$model = Model::factory('blog');
$items = $model->find_all();
if($_SERV... | true |
923769e682dda670420f87162caceb420120ca3e | PHP | JensDeNijs/php-doctrine | /src/Entity/Teacher.php | UTF-8 | 2,183 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\TeacherRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Doctrine\ORM\Mapping\Embedded;
use App\Entity\Address;
/**
* @ORM\Entity(repositoryClass=TeacherRepository::class)
*/
class Teacher
{
/**
* @ORM\Id
*... | true |
23501d0f62050f7b3201ad4520ac48adf8b8db8e | PHP | crazicus/Emory-Course-Evaluation | /student.php | UTF-8 | 6,384 | 2.796875 | 3 | [] | no_license | <?php
require_once 'config.php';
session_start();
if(!isset($_SESSION['studentID']) || empty($_SESSION['studentID'])) {
header("location: index.html");
}
if(isset($_SESSION['completed'])) {
echo "<script>
alert(\"Course Evaluation for Course Number " . $_SESSION['completed'] ." completed.\");
</s... | true |
c8e7328d7926f3ffd1d863581e2384e1d2e76b63 | PHP | SteiNNx/sakila_php | /model/DAO_Actor.php | UTF-8 | 614 | 2.90625 | 3 | [] | no_license | <?php
require_once '../db/database_conexion.php';
class DAO_Actor {
//SELECT * FROM film WHERE length BETWEEN 90 AND 120;
private $conexion;
public function DAO_Actor() {
try {
$this->conexion = new CL_Conexion();
} catch (Exception $ex) {
echo $ex->getTraceAsStri... | true |
cac45ec856ac38db1186fd6ff725cc7e43c1ff5a | PHP | square/square-php-sdk | /src/Models/Builders/CancelInvoiceRequestBuilder.php | UTF-8 | 835 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace Square\Models\Builders;
use Core\Utils\CoreHelper;
use Square\Models\CancelInvoiceRequest;
/**
* Builder for model CancelInvoiceRequest
*
* @see CancelInvoiceRequest
*/
class CancelInvoiceRequestBuilder
{
/**
* @var CancelInvoiceRequest
*/
private $inst... | true |
af03fdab59ef6be528946bfa1c3e3ef035d85f13 | PHP | Bittarman/DeveloperTest | /tests/DateCalculatorTest.php | UTF-8 | 3,404 | 3.0625 | 3 | [] | no_license | <?php
use App\DateCalculator;
use PHPUnit\Framework\TestCase;
class DateCalculatorTest extends TestCase
{
/**
* Exercises the basic function of the DateCalculator::getBonusDateForMonth method
* @dataProvider bonusDateProvider
*/
public function testGetBonusDateBasic($month, $year, $expected, $... | true |
8ec9da3c502e77e99c042d60c94a5e3360ea9768 | PHP | mudimbamoonde/AndroidAIM | /myAAIMS/studentRegister.php | UTF-8 | 2,201 | 2.625 | 3 | [] | no_license | <?php
include '../include/config.php';
if($_SERVER['REQUEST_METHOD']=='POST'){
$fname = $_POST["firstname"];
$lname = $_POST["lastname"];
$othername = $_POST["othername"];
$dateofbirth = $_POST["dateofbirth"];
$gender= $_POST["gender"];
$nrc = $_POST["nrc"];
$programStudy = 'BSICTSE';
$a... | true |
851b953ea775f45ede454d49a54b1e948e98cd1c | PHP | Shubhamjpg/exam | /test.php | UTF-8 | 52 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
$a = 3;
$b = 100;
$c = $a + $b;
echo $c;
?>
| true |
7f0d8cd96fde190e487f3b19c0f49eee7a024099 | PHP | gremlinblue/waterford | /application/views/members_edit.php | UTF-8 | 1,854 | 2.640625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<title>Person Edit</title>
</head>
<body>
<div id="container">
<?
$id = null;
$firstname = null;
$lastname = null;
$address = null;
$telephone_number = null;
$email = null;
$is_active = null;
$role = null;
if(isset($person)){
$id = $person->id;
$firs... | true |
97833888f42ca90c5d983566d3602a039fefb1d0 | PHP | peterbillett/FeduniProject | /website/php/sendEmail.php | UTF-8 | 3,738 | 2.515625 | 3 | [] | no_license | <?php
ini_set('max_execution_time', 0); //Make sure there is enought time to send all emails
include("config.php");
session_start();
//The select and delete statements must be executed at the same time to prevent possible duplication
$db->beginTransaction();
//Get all emails to send then remove them from the dat... | true |
7be4099c9d406dc97fdb81377d42f70b4a67cd66 | PHP | CedricSterckx/Web-MobileAugustus | /apiwebandmobile/src/Model/PDOMessageModel.php | UTF-8 | 7,256 | 2.953125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: cedri
* Date: 19-08-19
* Time: 20:38
*/
namespace App\Model;
class PDOMessageModel implements MessageModelInterface
{
private $connection;
public function __construct(Connection $connection)
{
$this->connection = $connection;
}
public functio... | true |
d564a9b8ec5b060bbe62ffab821dcbd5537e26f9 | PHP | beetanz/CIS-PHP | /lab3_2.php | UTF-8 | 1,456 | 3.609375 | 4 | [] | no_license | <?php
$x = rand(0, 99); //random number 0 - 99
echo '$x = ' . $x . "<br>";
echo (($x >= 90) ? "True" : "False") . "<br>";
echo (($x >= 80) ? "True" : "False") . "<br>";
echo (($x >= 70) ? "True" : "False") . "<br>";
echo (($x >= 60) ? "True" : "False") . "<br>";
$a = rand(0, 9); // random number 0-9
$b = rand(0, ... | true |
00632947537c47c81b9a51ca31c17b183d70d4c2 | PHP | kirillwebdeveloper/Check-List | /src/Model/Request/Api/Checklist/ChecklistRequest.php | UTF-8 | 1,221 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Model\Request\Api\Checklist;
use JMS\Serializer\Annotation as Serializer;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Class ChecklistRequest
* @package App\Model\Request\Api\Checklist
*/
class ChecklistRequest
{
/**
* @var string
*
* @Assert\NotBlank
*
... | true |
8aabba6701060635aa73e9c074fc4b0f12135f04 | PHP | moshedfl/php-site | /includes/class.user.php | UTF-8 | 1,610 | 2.984375 | 3 | [] | no_license | <?php
class User{
public $UserId;
public $UserName;
public $UserEmail;
public $Password;
public $TimeAdded;
function __construct($username){
$sql = new Database;
$stmt = $sql->connection->prepare("SELECT * FROM users WHERE username = ?");
$stmt-> bind... | true |
fe93b53aa475df664fff04bd06402778a6e9030b | PHP | kroseneg/php-lock | /src/Lock/OLD.php | UTF-8 | 6,976 | 2.6875 | 3 | [] | no_license | <?php
/*
* PHP class for interfacing with the OpenLock daemon 'old'
*
* This PHP class is based on the Python library distributed with the
* 'old' package and therefore is to be considered as derivated work.
* Like the Python library in original project this class is licensed under
* the Open Software License ve... | true |
5a5d58b0e0684a0ec7c8ab62be0526d1489c9644 | PHP | epk-technologies/realpad-connector | /tests/CMS/Project/BuildingTest.php | UTF-8 | 2,787 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace RealPadConnectorTests\CMS\Project;
use RealPadConnector\CMS\Project\Building;
class BuildingTest extends \PHPUnit_Framework_TestCase {
/**
* @covers Building::createFromXML
*/
function test_createFromXML()
{
$xml_source = '
<building id="48383" name="F" gps="... | true |
ab5ef40f51d913d3ac7fc7833b0c39fd9ec12cec | PHP | wouterdialogic/larkomapi | /old/kom.php | UTF-8 | 3,821 | 2.734375 | 3 | [] | no_license | <?php
require(__DIR__ . '/bootstrap.php');
use \Httpful\Request;
$_TOKEN = 'aec070645fe53ee3b3763059376134f058cc337247c978add178b6ccdfb0019f';
$_TOKEN = 'eff98a5ec05fd241ad36718f216572cdadf4339c';
// Get event details for a public event
$uri = "https://test.kiesopmaat.nl/api/public/?access_token=".$_TOKEN."&format=... | true |
8c4dced0c595e689c3eb509d61cbcb3504d2d082 | PHP | smalot/framework | /src/Application/Exception/ConfigException.php | UTF-8 | 1,074 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Igni\Application\Exception;
use Igni\Application\Config;
class ConfigException extends ApplicationException
{
public static function forInvalidValue($key, $expectedType, $givenType): ConfigException
{
return new self("Invalid configuration at $key, expected $e... | true |
40d9a2d4e8d1f7952c0d16505d38891dd7dc0b60 | PHP | itwrite/php-Jasmine | /src/library/View.php | UTF-8 | 1,653 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: itwri
* Date: 2019/12/21
* Time: 0:09
*/
namespace Jasmine\library;
use Jasmine\App;
use Jasmine\helper\Config;
use Jasmine\library\view\Template;
class View
{
/**
* @var array
*/
protected static $views = [];
/**
* @param $name
* @para... | true |
b10da4610ed2db432e23bd854d91eb4be75aaf47 | PHP | nathaliekhn/MoWeSS17KuhnSeggelkeWerner | /Projekt/functions.php | UTF-8 | 2,056 | 2.671875 | 3 | [] | no_license | <?PHP
$path = "";
$path2 = "";
// Einzelne Gallerie laden
function loadSingelGallery($id)
{
$name="";
$html='<div class="row">';
$script='<script type="text/javascript"> var bilder=new Array();';
$sql="select * from gallerien where id = " .$id;
$result=mysqli_query($_SESSION["connection"], $sql) or die("... | true |
660dca38861d946b3d19e35766c891c1cdd33317 | PHP | kylo-ben11/goshineon | /wp-content/plugins/wc-dynamic-pricing-and-discounts/includes/classes/condition-fields/rp-wcdpd-condition-field-select-timeframe.class.php | UTF-8 | 7,980 | 2.609375 | 3 | [] | no_license | <?php
// Exit if accessed directly
if (!defined('ABSPATH')) {
exit;
}
// Load dependencies
if (!class_exists('RP_WCDPD_Condition_Field_Select')) {
include_once('rp-wcdpd-condition-field-select.class.php');
}
/**
* Condition Field Group: Select - Timeframe
*
* @class RP_WCDPD_Condition_Field_Select_Timefra... | true |
b0180aa90ac5f6690bb6ee1f70b5a335f167b384 | PHP | stof/manager | /src/Api/Php/ReturnValue.php | UTF-8 | 2,096 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the puli/manager package.
*
* (c) Bernhard Schussek <bschussek@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Puli\Manager\Api\Php;
use Webmozart\Assert\Assert;
/**
* The r... | true |
ba4f403cb674421d0baa80ec8a58bbd8102c1787 | PHP | chopins/tklib | /path/src/Csv.php | UTF-8 | 1,400 | 3.09375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Toknot (http://toknot.com)
*
* @copyright Copyright (c) 2011 - 2019 Toknot.com
* @license http://toknot.com/LICENSE.txt New BSD License
* @link https://github.com/chopins/toknot
*/
namespace Toknot\Path;
/**
* Csv
*
* @author chopin
*/
class Csv
{
public static int $lineLength = ... | true |
2684b68937b8d6e6f3c6865848ab22370a758b06 | PHP | oka884/mokuNarabe | /model/entity/Board.php | UTF-8 | 2,092 | 3.609375 | 4 | [] | no_license | <?php
/**
* 盤面のクラス
*
*
*/
class Board{
private $board;
/**
* コンストラクタ
*
* GameSettingオブジェクトを引数に取る
* @param $gameSetting
*/
public function __construct( $gameSetting )
{
$this->board = array();
for( $i = 0 ; $i < $gameSetting->getSquareNumber() ; $i++ ){
... | true |
0cf7186858decf88dc1411c3932ac98fd88fb248 | PHP | quyle92/AdminLTE | /app/Http/Controllers/API/PostController.php | UTF-8 | 3,797 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use App\Post;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Str;
class PostController extends Controller
{
public function __construct()
{
... | true |
f47690bd1ceccb10ebcbd73291257523824e789a | PHP | almaz2014/laravel_netinfo | /app/Http/Controllers/LocationController.php | UTF-8 | 3,038 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Location;
use Illuminate\Http\Request;
class LocationController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function __construct()
{
$this->middleware('auth');
}... | true |
3442efe9dabc2112434ed9091aeeb2e47f563f60 | PHP | cod3venom/Synthetic-Intelligence | /Panel/Kernel/Security/FileSystem.php | UTF-8 | 253 | 2.78125 | 3 | [] | no_license | <?php
namespace Kernel\Security;
class FileSystem
{
public function readFile($path)
{
if(file_exists($path)){
return file_get_contents($path);
}else{
echo $path;
}
return false;
}
} | true |
6311c2ac326a79c57a430417817a11f59fc46cf4 | PHP | jenalgit/MasteringLaravelCode_by_Christopher_John | /LaravelDoc.php | UTF-8 | 5,284 | 2.65625 | 3 | [] | no_license | <?php
class LaravelDoc
{
public function RequestLifeCycle(){
/*
*1. index.php file loads the Composer generated autoloader definition, and then retrieves an
* instance of the Laravel application from bootstrap/app.php script.
*
*2. HTTP kernel, which is located in app... | true |
e86e3906dd1e76c21c0a218923356792654e571b | PHP | bitcoin42/bitcoin42.github.io | /exchange-software/app/Http/Resources/UserProfileResource.php | UTF-8 | 900 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Resources;
use App\Models\UserProfile;
use Illuminate\Http\Resources\Json\JsonResource;
/**
* @mixin UserProfile
*/
class UserProfileResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request $request
* @return ar... | true |
fb06b8b41bfeef6e370207e5f3df9129ad465715 | PHP | chengjf/leetcode | /php/507.php | UTF-8 | 877 | 3.84375 | 4 | [
"MIT"
] | permissive | <?php
class Solution
{
public function checkPerfectNumber($num)
{
if ($num <= 0) {
return false;
}
$a = $this->getAllDivisors($num);
$sum = array_sum($a);
return $sum == $num;
}
private function getAllDivisors($num)
{
$result = array();
... | true |
bd37a45a58d75498d4015942ba94635baf830aae | PHP | BrandonMuise/MovieReview | /Muise_Brandon_MovieReview/admin/phpscripts/connect.php | UTF-8 | 454 | 2.546875 | 3 | [] | no_license | <?php
//Set up connection creds
$user = "root";
$password = "";
$url = "localhost";
$db = "db_bluray";
//Everything below does not need to change
$link = mysqli_connect($url, $user, $password, $db); //PC VERSION
//$link = mysqli_connect($url, $user, $password, $db, "8889"); //MAC VERSION
//... | true |
c448fc14b9308d7bd4876bc79a98fec6ba8e9158 | PHP | narkane/awkward-styles | /ext/ai-controller-frontend/controller/frontend/src/Controller/Frontend/Stock/Iface.php | UTF-8 | 2,117 | 2.671875 | 3 | [
"LGPL-3.0-only",
"MIT"
] | permissive | <?php
/**
* @license LGPLv3, http://opensource.org/licenses/LGPL-3.0
* @copyright Aimeos (aimeos.org), 2017-2018
* @package Controller
* @subpackage Frontend
*/
namespace Aimeos\Controller\Frontend\Stock;
/**
* Interface for stock frontend controllers
*
* @package Controller
* @subpackage Frontend
*/
int... | true |
358b58447c60b26214eceedefcd00750040bd257 | PHP | sevcsik/tests | /arkon/src/Sevdev/ArkonTestBundle/Entity/Study.php | UTF-8 | 3,459 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Sevdev\ArkonTestBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Sevdev\ArkonTestBundle\Entity\Study
*
* @ORM\Table()
* @ORM\Entity
*/
class Study
{
/**
* @var integer $id
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO"... | true |
0b3c322afbd4f8d62bab254b5f77a2741017da1a | PHP | hiscaler/easy-sms | /src/Gateways/WebchineseGateway.php | UTF-8 | 2,950 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the overtrue/easy-sms.
*
* (c) overtrue <i@overtrue.me>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Overtrue\EasySms\Gateways;
use Overtrue\EasySms\Contracts\MessageInterface;
use Overtrue\EasySms\... | true |
9efcf0991f7c3af1f21485738d23d1d74163b50f | PHP | npcarlos/mdlv_test | /database/migrations/2019_01_05_031718_create_people_table.php | UTF-8 | 1,379 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePeopleTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('people', function (Blueprint $table) {
$ta... | true |
54b037cc9ad75bea29360ae9bae15d7b0dd2b71c | PHP | kumamidori/BEAR.Sunday | /src/BEAR/Sunday/Inject/Logger/Adapter.php | UTF-8 | 1,829 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* This file is part of the BEAR.Sunday package
*
* @license http://opensource.org/licenses/bsd-license.php BSD
*/
namespace BEAR\Sunday\Inject\Logger;
use BEAR\Sunday\Inject\LogInject;
use Ray\Aop\Bind;
use Ray\Di\LoggerInterface;
/**
* Log adapter
*/
class Adapter implements LoggerInterface
{
use... | true |
16dceadbf006f2d8a87d5666c8f08999ded29302 | PHP | pavleenkaur/Upgradation-Module | /checklogin.php | UTF-8 | 1,577 | 2.625 | 3 | [] | no_license | <?php
session_start();
$email = mysql_real_escape_string($_POST['email']);
$password = mysql_real_escape_string($_POST['password']);
mysql_connect("localhost", "root","") or die(mysql_error()); //Connect to server
mysql_select_db("upgradation") or die("Cannot connect to database"); //Connect to database
$q... | true |
75b3380f3c59ae2e68482c52ccc9409577a4f192 | PHP | anisur3036/AdventOfCode2016 | /spec/Advent/Day2/ExecutiveKeypadSpec.php | UTF-8 | 2,477 | 2.953125 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace spec\Advent\Day2;
use Advent\Day2\ExecutiveKeypad;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
class ExecutiveKeypadSpec extends ObjectBehavior
{
function let()
{
$this->beConstructedWith(
[' 1 ',
' 234 ',
'5... | true |
387f75862e6b11974b8bd558d47e9ff3cdea2967 | PHP | lpbw/HerramientasAG | /SimpleImage.php | UTF-8 | 4,401 | 3.3125 | 3 | [] | no_license | <?php
class SimpleImage
{
var $image;
var $image_type;
//cargar imagen.
//recibe el nombre de la imagen.
function load($filename)
{
$image_info = getimagesize($filename);
$this->image_type = $image_info[2];
//crea la imagen JPE... | true |
b1416fa31cd3da8ec2753e69f5cc9e44cd3b57c8 | PHP | Helium-MVC/Examples | /app/services/storage/FileStorageService.php | UTF-8 | 963 | 2.828125 | 3 | [] | no_license | <?php
namespace app\services\storage;
use app\services\storage\StorageInterface;
use Aws\S3\S3Client;
use Aws\Common\Credentials\Credentials;
use Aws\S3\MultipartUploader;
use Aws\Exception\MultipartUploadException;
/**
* FileStorageService
*
* The service responsible for storing a file locally.
*/
class FileSt... | true |
be63d6483f5bf61bc125c9672f83921689a43e17 | PHP | najmisania/yayasan | /application/controllers/Labtab.php | UTF-8 | 4,233 | 2.578125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class laptab extends CI_Controller {
public function pilih_siswa()
{
$query = $this->db
->order_by('tingkat','ASC')
->order_by('nama','ASC')
->get('siswa');
//$data['data_siswa'] = $query;
// $this->load->view('laptab/pi... | true |
a2cddbabee7d4e4815f7f58e7beb92fdb140a15f | PHP | varavan/backend-test | /application/src/Caravelo/Modules/Survey/Domain/Model/Tag.php | UTF-8 | 1,203 | 3.109375 | 3 | [] | no_license | <?php
namespace Caravelo\Modules\Survey\Domain\Model;
use Caravelo\Component\Slugify;
class Tag
{
/** @var string $name */
private $name;
/** @var string $slug */
private $slug;
/** @var string $description */
private $description;
/** @var \DateTime $createdAt */
private $cr... | true |
5c91b3058f22ca3c9850146598de6df24fbdd782 | PHP | craftsmancoding/moxycart | /controllers/ProductassetController.php | UTF-8 | 2,987 | 2.53125 | 3 | [] | no_license | <?php
/**
* Sends JSON responses.
* These methods are requested via Ajax requests from pages generated by the PageController.
* See the IndexManagerController class (index.class.php) for routing info.
*
* @package moxycart
*/
namespace Moxycart;
class ProductassetController extends APIController {
public $m... | true |
557abda197ed5f3389a6840136e3257142438a58 | PHP | nhatchima/NguyenTienDat_BaiCuoiKi | /getspmoinhat.php | UTF-8 | 770 | 2.640625 | 3 | [] | no_license | <?php
include "connect.php";
$mangspmoinhat = array();
$query = "SELECT * FROM sanpham ORDER BY ID DESC LIMIT 10";
$data = mysqli_query($conn,$query);
while($row = mysqli_fetch_assoc($data)){
array_push($mangspmoinhat,new Sanphammoi(
$row['id'],
$row['tensanpham'],
$row['giasanpham'],
$row[... | true |
33990786451cf2b52aab74dc8b8901ad7718fdd6 | PHP | aleksandr8385/yii-trainee-1 | /common/models/Categories.php | UTF-8 | 1,707 | 2.671875 | 3 | [] | permissive | <?php
namespace common\models;
use yii\behaviors\TimestampBehavior;
use yii\db\Expression;
use yii\db\ActiveRecord;
use Yii;
/**
* This is the model class for table "categories".
*
* @property int $id
* @property string $name
* @property int $created_at
* @property int $updated_at
*
* @property Element[] $el... | true |
38d11c13f59984a2a285e5cad9e86ad3a3ba205b | PHP | postolka/dev-utils | /utils/dpi.php | UTF-8 | 3,622 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
$pgeName = 'DPI calculator';
define('CM_INCH', 2.54);
$paperSizes = array(
0 => array(84.1, 118.9),
1 => array(59.4, 84.1),
2 => array(42.0, 59.4),
3 => array(29.7, 42.0),
4 => array(21.0, 29.7),
5 => array(14.8, 21.0),
6 => array(10.5, 14.8));
$dpi = empty($_POST['dpi']) ? NULL : (int)$_POST['dpi'];
$szx... | true |
7e33536b004cba73564c6d5e2e42e738c2dd7e78 | PHP | Thomas-X/windesheim-periode1-boardgamesapp-oop | /src/lib/Database.php | UTF-8 | 6,685 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace Qui\lib;
use Illuminate\Database\Capsule\Manager as Capsule;
/*
* A wrapper around the PDO class, pulls DB data from .env for a connection.
* Also exposes an eloquent query builder instance, which is the adapter the DB facade uses
* */
/**
* Class Database
* @package Qui\core
*/
// TODO add CR... | true |
a0e99afdcb14828cbf5ad8ab6e3721d08fe00954 | PHP | akshayingle32/MyProject | /2main.php | UTF-8 | 796 | 2.828125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div id="container">
<a href="2main.php?page=1">1.php</a><br>
<a href="2main.php?page=akshay_abstractbuilder">akshay_abstractbuilder.php</a><br>
<a href="2main.php?page=akshay_abstractfactory">akshay_abstractfactory.php</a><br>
</div>
<div id="demo... | true |
505d4d0e364bd579e5832a71277c7a7cd823e23e | PHP | MyoMyatHan/Blog | /models/Blog_Entry_Table.class.php | UTF-8 | 2,452 | 3.03125 | 3 | [] | no_license | <?php
include_once "models/Table.class.php";
class Blog_Entry_Table extends Table {
public function updateEntry ( $id, $title, $entry ){
$sql = "UPDATE blog_entry
SET title = ?,
entry_text = ?
WHERE entry_id = ?";
... | true |
4ea92293ea49568c308b6974e9109b12c1fde565 | PHP | evanaustin/foodfromfriends | /ajax/order/add-to-cart.php | UTF-8 | 4,810 | 2.515625 | 3 | [] | no_license | <?php
$config = 'config.php';
while (!file_exists($config)) $config = '../' . $config;
require $config;
$json['error'] = null;
$json['success'] = true;
$json['set-exchange'] = false;
if (!$LOGGED_IN) quit('You are not logged in');
$_POST = $Gump->sanitize($_POST);
$Gump->validation_rules([
's... | true |
d10cde47ad83e4ba6d86eb1946cbc44367a67469 | PHP | dvmada/humhub-modules-album | /components/AlbumUrlRule.php | UTF-8 | 4,266 | 2.65625 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
class AlbumUrlRule extends CBaseUrlRule
{
public $connectionId = 'db';
/**
* Store already looked up usernames
*
* @var Array
*/
private static $loadedUserNamesByGuid = array();
public function createUrl($manager, $route, $params, $ampersand)
{
$format... | true |
2d137506d985f6aa80897ee0ed8fb8a8c3ca5d54 | PHP | guyt101z/seadparcel | /model/billingModel.php | UTF-8 | 7,817 | 3.265625 | 3 | [] | no_license | <?php
class Billing {
public $billingID;
public $shipmentID;
public $freightCharge;
public $addOnCharge;
public $cratingCharge;
public $osaCharge;
public $valuationCharge;
public $totalCharge;
/** Setters **/
function setBillingID($bil... | true |
03cbc0f5905bfa8d9d3243add0d3acdb8fa552ff | PHP | fuloskop/news | /app/Http/Controllers/HomePage/SubCategoryController.php | UTF-8 | 1,537 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\HomePage;
use App\Business\HomePage\SubCategoryBusiness;
use App\Http\Controllers\Controller;
use App\Logger\Contact\LoggerInterface;
use Illuminate\Http\Request;
class SubCategoryController extends Controller
{
private $subCategoryBusiness;
private $logger;
public f... | true |
b92907996500d7517ce9fb69fd650d1e40ee06c8 | PHP | Afizullah/Stage_1A | /vue/admin/choixexportFormation.php | UTF-8 | 2,765 | 2.640625 | 3 | [] | no_license | <?php
//Control sur le droit d'accès à cette & sur l'accès à travers un lien direct
if (defined("SESS_ADMIN_CONTROLER")) {
if (file_exists(SESS_ADMIN_CONTROLER)) {
require_once(SESS_ADMIN_CONTROLER);
} else {
header("Location:../");
die("<div style=\"text-align: center;\"><b>ERROR</b>::A... | true |
57e82f89233e5aed43e54ca45fbdae7a49931a73 | PHP | chxck8/TestPHP | /classes/user.class.php | UTF-8 | 3,770 | 2.953125 | 3 | [] | no_license | <?php
require_once "connection/connection.php";
require_once 'classes/connection/connection.php';
class user {
protected $userId = "";
protected $user = "";
protected $pass = "";
protected $username = "";
protected $password = "";
protected $lastAccess = "0000-00-00 00:00:00";
protecte... | true |
284b0761d0d1bcefcd9a964ec71b874c871454d6 | PHP | mverarey/DeSeRP | /core/jsonapi.php | UTF-8 | 3,721 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
//error_reporting(E_ERROR | E_WARNING | E_PARSE);
//ini_set('display_errors', 1);
/*
* This file is part of DeSeRP.
*
* @author Mauricio Vera <m.vera@depotserver.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use Slim\{... | true |
f88d8edf6ef93bce2dccb927de1b7c8432f03068 | PHP | eees/requests | /src/Server.php | UTF-8 | 1,797 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
*
* @fileName Server.php
* @category PHP
* @package void
* @author Kee Guo <chinboy2012@gmail.com>
* @since 05/03/2018
* @version Server.php 2018.03.05
* */
namespace Eees\Requests;
class Server {
protected static $_instance = null;
protected $_server = array();
protected $_header = array(... | true |
94b208b5a0bb9be6aff1fa5ab76b1f1151283256 | PHP | AbnerErnaniADSFatec/PHP_Codes | /Variaveis_de_Referencia.php | UTF-8 | 594 | 3.046875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang = "pt-br">
<head>
<meta charset = "UTF-8">
<title>Variaveis</title>
<link rel = 'stylesheet' type = 'text/css' href = '_css/estilo.css'/>
</head>
<body>
<div id = 'titulo' >
<h1>Testanto PHP</h1>
</div>
<div id = 'code' >
<h2>
Código Saída:</br>
</h2>
<div id = 'cmd'>
<h3>
>>>
<?php
echo ... | true |
5dd55fb8a22627885783fa8b20da136a422c2b5f | PHP | gallowag/cs313-php | /web/project01/dramas.php | UTF-8 | 1,476 | 3.015625 | 3 | [] | no_license | <?php
//connect to database
require("dbConnect.php");
$db = get_db();
if (!isset($db)) {
die("DB Connection was not set");
}
$query = "SELECT id, title, img FROM drama";
$statement = $db->prepare($query);
// Bind any variables I need, here...
$statement->execute();
$dramas = $statement->fetchAll(PDO::FETCH_ASSOC);... | true |
a37dad826ab29551b0f7c55cdbb499d14ed0a8c7 | PHP | samkeen/gather | /receiver/Lib/bootstrap.php | UTF-8 | 1,504 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
*
* - Define directory context (where are we on the file system)
* - Start a Logger
* - define fine the ENV namespace
*/
//session_start();
/*
* set up base context paths
*/
$PATH_APP_ROOT = dirname(dirname(__FILE__));
$PATH_RECEIVER_DIR = "{$PATH_APP_ROOT}/receiver";
$PATH_UTIL_DIR = "{$PATH_APP_ROO... | true |
996ee6f0620942d7f32a964be09cb09dadeddfca | PHP | OrganizationOfAngryBadgers/4711Lab9-B | /tests/TaskTest.php | UTF-8 | 2,071 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
use PHPUnit\Framework\TestCase;
/**
* Contains the unit tests for all properties that have validation rules
* to follow.
*/
class TaskTest extends TestCase {
private $CI;
protected function setUp()
{
$this->CI = &get_instance();
$this->CI->load->model('task');
}
/**
... | true |
7efd503066187a2afd23914f067cc61487b3bb44 | PHP | mrnxxii/siaukm | /input_user_proses.php | UTF-8 | 2,192 | 2.796875 | 3 | [] | no_license | <?php
//mulai proses tambah data
//cek dahulu, jika tombol submitdi klik
if(isset($_POST['submit'])){
//inlcude atau memasukkan file koneksi ke database
include('koneksi.php');
$carikode = mysqli_query($koneksi, "SELECT id FROM user") or die (mysqli_error());
// menjadikannya array
$datakode = mysq... | true |
d7091a50458a9757dee4df6ba040c220f2e45ed5 | PHP | enkee/mvc20a | /src/administrativo/controllers/usuariosController.php | UTF-8 | 6,875 | 2.5625 | 3 | [] | no_license | <?php
class usuariosController extends Controller
{
private $_usuarios;
//inicializa las variables de la aplicación
public function __construct()
{
parent::__construct();
$this->_usuarios = $this->loadModel('usuarios');
}
// INDEX
//Muestra la vista index de usuario
... | true |
deb9eeacb4e3a10a14368109496a0e428b93e0a8 | PHP | Loctarogar/Symfony4-shop | /src/Repository/CartRepository.php | UTF-8 | 2,382 | 2.59375 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace App\Repository;
use App\Entity\Cart;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Symfony\Bridge\Doctrine\RegistryInterface;
/**
* @method Cart|null find($id, $lockMode = null, $lockVersion = null)
* @method Cart|null findOneBy(array $criteria,... | true |
7a291f30939bd8ce709dee076e18b54259f0f316 | PHP | denidiasjr/design-patterns-php | /src/AbstractFactory/main.php | UTF-8 | 724 | 3.09375 | 3 | [] | no_license | <?php
namespace AbstractFactory;
require_once __DIR__.'/../../vendor/autoload.php';
use AbstractFactory\CountryFactory;
main($argc, $argv);
function main ($argc, $argv)
{
// Check args
if (!isset($argv[1])) {
echo 'Enter a valid continent';
return;
}
if (!isset($argv[2])) {
... | true |