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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
bc97d6ab6032af0cced3f1e7634280b41f9cb46f | PHP | JunIkeda-AIM/nishiHP | /need_pass_to_enter/database/insert_option.php | UTF-8 | 3,866 | 2.546875 | 3 | [] | no_license | <?php
$gobackURL = "../data/record_pass.php";
$dsn = 'mysql:dbname=nishi_swimming_club;charset=utf8;host=localhost';
$user = 'nishi';
$password = 'Onepiece2015';
?>
<!DOCTYPE html>
<html>
<!-- ページ情報 -->
<header>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<... | true |
d3a9f7a265afe99afb91eb70ddf3fae71f4d7b1a | PHP | NadsonOliveira/portifolio | /email.php | UTF-8 | 554 | 2.640625 | 3 | [] | no_license | <?php
if(isset($_POST(['email']) && !empty($_POST['email'])){
$nome=addslashes($_POST['name']))
$email=addslashes($_POST['email']))
$mensagem=addslashes($_POST['message']))
$to ="nsoliveira_13@hotmail.com";
$subject ="nsoliveira_13@hotmail.com ";
$body = "Nome:" .$nome. "\r\n".
"email:" .$email. "\r\n".
... | true |
49a8e0bc79aac8b54864b899be3871b8eda09ad3 | PHP | mindstorm8191/settlerswarlords | /server/routes/log.php | UTF-8 | 1,849 | 2.59375 | 3 | [] | no_license | <?php
/* log.php
Manages saving logging content from the client, storing it in the database. Note that this is kind of risky, as it will
require a lot of throughput into the database, without any user-specific safeguards
*/
require_once("../config.php");
require_once("../libs/common.ph... | true |
9286c585c49c6d4243f9661655ba59ed22743878 | PHP | ActiveWafl/Extensions | /Multimedia/VideoProviderFactory.php | UTF-8 | 728 | 2.921875 | 3 | [] | no_license | <?php
namespace Wafl\Extensions\Multimedia;
/**
* A factory for getting a video provider based on the specified URL or applet code snippet.
* This factory currently supports: youtube.com and vimeo.com.
*
* @TODO: The implementations for YouTube and Vimeo no longer live here.
*/
class VideoProviderFactory
{
... | true |
2413da1b3a3198e4164cd55b2efc863d79fed0c7 | PHP | phantomphp/falcon | /src/Falcon/ServiceManager.php | UTF-8 | 1,411 | 2.640625 | 3 | [] | no_license | <?php
namespace Falcon;
use Falcon\Repository\DbRepository;
use Falcon\Repository\RepositoryAwareInterface;
use Falcon\Product\ProductRepo;
use Falcon\Product\ProductRepoAwareInterface;
use Falcon\Product\Attribute\AttributeRepo;
use Falcon\Product\Attribute\AttributeRepoAwareInterface;
use Zend\Db\Adapter\Adapter;
... | true |
c7257577a077aec163994b5629f9808e90ad54cb | PHP | nadia74/MVC | /controllers/ControllerUsers.php | UTF-8 | 1,154 | 2.671875 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);
require_once('views/View.php');
require_once('controllers/Controller.php');
require_once('models/Users.php');
class ControllerUsers
{
private $_userManager;
private $_view;
private $_loader;
private... | true |
3e4edfeabe5be978294519e04349af0f226f5215 | PHP | ammarfaizi2/GoogleSearch | /src/GoogleSearch.php | UTF-8 | 4,721 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace GoogleSearch;
/**
* @author Ammar Faizi <ammarfaizi2@gmail.com>
* @license MIT
* @version 0.0.1
*/
final class GoogleSearch
{
/**
* @var array
*/
private $out = [];
/**
* @var string
*/
private $query;
/**
* @var string
*/
private $hash;
/**
* @var string
*/
private $da... | true |
663d67af3cf2478f73d48f45ad8cae94877e5d32 | PHP | Vladimir21451/Task24 | /answer3.php | UTF-8 | 965 | 2.796875 | 3 | [
"MIT"
] | permissive | <html>
<head>
<title> Childr result</title>
</head>
<body>
<h1>Заполнение экземпляра Family</h1>
<h2>Результаты заполнения экземпляра Family</h2>
<?php
include_once "child.php";
$fam = new Family;
$fam->name = $_POST['name'];
$fam->peaplecount = $_POST['peaplecount'];
$fam->yearcreation = $_POST['yearcreation'];
$fa... | true |
8f4f6cd2a9877ecdf7df239d85418da0d91a3fa3 | PHP | cedaro/satispress | /src/VersionParser.php | UTF-8 | 734 | 2.9375 | 3 | [] | no_license | <?php
/**
* VersionParser interface
*
* @package SatisPress
* @license GPL-2.0-or-later
* @since 0.3.0
*/
declare ( strict_types = 1 );
namespace SatisPress;
/**
* Version parser interface.
*
* @package SatisPress
* @since 0.3.0
*/
interface VersionParser {
/**
* Normalizes a version string to be able ... | true |
21f94f5cb1bcacd955825bfdb6f1dd194390c57f | PHP | pcartagena74/heroku-git | /app/Models/EventDiscount.php | UTF-8 | 862 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
//use Spatie\Activitylog\Traits\LogsActivity;
class EventDiscount extends Model
{
use SoftDeletes;
//use LogsActivity;
// The table
protected $table = 'event-discounts';
protected $... | true |
270eb51181a5b1b7ac4c2d89a580aee8d72e1fd4 | PHP | ibisdavi012/jdtstore-backend | /src/models/ProductModel.php | UTF-8 | 1,178 | 2.953125 | 3 | [] | no_license | <?php
namespace App\Models;
/**
* ProductModel - All product models extends this Model.
*
* @author David Márquez <ibisdavi012@gmail.com>
* @license MIT
*
*/
abstract class ProductModel extends BaseModel
{
/**
* __construct
*
* @return void
*/
public function __construct()
... | true |
0cdd4b3abcdcbced2e555197365f7830f88ae6c7 | PHP | raikouraza/TubesPWL | /db_function/FilmDao.php | UTF-8 | 4,132 | 2.953125 | 3 | [] | no_license | <?php
class FilmDao{
function getAllFilm()
{
$link = DBHelper::createMySQLConnection();
$query = "SELECT * FROM tbfilm";
$result = $link->query($query);
$result->setFetchMode(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, "Film");
return $result;
}
function add... | true |
a05fcd56e319c14bd8a3f6723a7e625b6c72f2c3 | PHP | ajeets1971/Wordpress_Demo | /wp-content/plugins/Contact_Demo/Contact_Demo.php | UTF-8 | 5,151 | 2.5625 | 3 | [] | no_license | <?php
/*
Plugin Name: Contact Demo
Plugin URI: https://localhost/wordpress
Description: Contact Demo
Author: Dipti
Version: 1.0
Author URI: https://localhost/wordpress
*/
register_activation_hook( __FILE__, 'my_plugin_create_db' );
function my_plugin_create_db() {
global $wpdb;
$charset_co... | true |
2f6870a954ddb8fcf0a676518aa435e2e119d782 | PHP | Oscar22110/RephoneCom | /Registro.php | UTF-8 | 2,589 | 2.546875 | 3 | [] | no_license | <?php
/*
* El siguiente código Registra un Usuario
* OGR Noviembre/2020
*/
$response = array();
$Cn = mysqli_connect("localhost","root","","rephonecom")or die ("server no encontrado");
mysqli_set_charset($Cn,"utf8");
if ($_SERVER['REQUEST_METHOD'] == 'POST'){
$objArray = json_decode(file_get_contents("php... | true |
c50cf1b5ba15a1b0a4cd038ceab7707acde45c3b | PHP | hattafaiq/absensi_node_RFID | /insertDB.php | UTF-8 | 778 | 2.671875 | 3 | [] | no_license | <?php
require 'database.php';
if ( !empty($_POST)) {
// keep track post values
$nama = $_POST['nama']; //variabel nama
$id = $_POST['id']; // variabel id RFID
$nomor = $_POST['nomor']; // variabel nomor absen
$gender = $_POST['gender']; //variabel gender
$kelas = $_PO... | true |
91311b66183b5ed74d7644ab3a09331939dfee66 | PHP | Trismegiste/Yuurei | /src/Persistence/CollectionIterator.php | UTF-8 | 1,137 | 2.875 | 3 | [] | no_license | <?php
/*
* Yuurei
*/
namespace Trismegiste\Yuurei\Persistence;
/**
* CollectionIterator is an iterator against a MongoDb Repository
*/
class CollectionIterator implements \Iterator
{
protected $cursor;
protected $factory;
public function __construct(\MongoCursor $cursor, RepositoryInterface $factor... | true |
81985836e231a383e73def9ffd4ba1c80c38ba1e | PHP | tanarurkerem/hello | /tests/HelloTestCase.php | UTF-8 | 257 | 2.625 | 3 | [] | no_license | <?php
namespace Tests;
use PHPUnit\Framework\TestCase;
use Tanarurkerem\Register\Hello;
class HelloTestCase extends TestCase
{
public function testSay()
{
$hello = new Hello();
$this->assertEquals($hello->say(), 'Hello!');
}
}
| true |
503a03529b75ac052f3b2ed6360d07dca7dcf530 | PHP | aiden3434/looksql | /index.php | UTF-8 | 2,796 | 2.828125 | 3 | [] | no_license | <?php
$start = 0;
$urlq = $_SERVER['SERVER_PORT'] == 443 ? "https://" : "http://";
$urlh = ($_SERVER['SERVER_PORT'] == 80) || ($_SERVER['SERVER_PORT'] == 443) ? "":":".$_SERVER['SERVER_PORT'];
echo $urlh;
switch ($_REQUEST["who"])
{
case "no1":
$db = new mysqli("127.0.0.1","no1","no1","no1");
if(mysqli_connect_err... | true |
4de2d954fcf0602a51c979eb8d3ca37bdec85888 | PHP | redskydrag-dhagz/PROJECTS | /application/models/selectconsign.php | UTF-8 | 2,367 | 2.703125 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
* Class Name: Selectconsign
* Description: to manipulate the data of table select_consign
* Content: select tag,
*/
class Selectconsign extends CI_Model{
function __construct(){
parent::__construct();
}
public function get_al... | true |
cddf86ae278431622fe6321afe5f228571ff7e01 | PHP | gustawdaniel/da_automation | /src/Entity/UserContact.php | UTF-8 | 1,713 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\UserContactRepository")
*/
class UserContact
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string")
... | true |
4fff786c202e29cb99fa7b64182844f88910d858 | PHP | rdbarrios20/Biblioteca_Virtual | /php/testingBrain.php | UTF-8 | 941 | 2.84375 | 3 | [] | no_license | //Collections
$person = [
'nombre' => 'paco',
'apellido' => 'sin fortuna',
'casas' => [
'casa1' => '450 anos',
'casa2' => 'populandoia'
],
'familiares' => [
'tios' => [
'1' => 'Carlos',
'2' => 'Carlos',
'3' => 'Carlos',
'4' =... | true |
d153eef32b608a28baac8f54a3ba0a34c529cc7c | PHP | ShreshtaR/PHP | /register.php | UTF-8 | 1,670 | 2.84375 | 3 | [] | no_license | <?php
session_start();
$db=mysqli_connect("localhost","root","","authentication");
if(isset($_POST['register_btn'])){
session_start();
$username=mysql_real_escape_string($_POST['username']);
$email=mysql_real_escape_string($_POST['email']);
$password=mysql_real_escape_string($_POST['password']);
$password2=mysql_real_... | true |
7a9304bc53e412b52f5468190d575ed185e0033b | PHP | TeisD/bMOOC | /app/Http/Controllers/VisController.php | UTF-8 | 3,649 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Artefact;
class VisController extends Controller {
static public function getTree(Artefact $a){
$a->load('children');
foreach($a->children as $child){
self::getTree($child);
}
return $a;
}
static public functi... | true |
a57cd5a61d151af428f17667b142576f696958ec | PHP | svilkov87/povar | /change_pass.php | UTF-8 | 8,750 | 2.625 | 3 | [] | no_license | <?php
include("functions/functions.php");
include("include/connection.php");
## проверка ошибок
//error_reporting(E_ALL | E_STRICT);
//ini_set('display_errors', TRUE);
//ini_set('display_startup_errors', TRUE);
if (!empty($_GET)) {
$id = intval($_GET['id']);
// если зло вручную поставит другой id... | true |
edb0e4f12cb2e3441bbc0bcab95a5d8681e99b09 | PHP | mrstexx/FHT_Amusement_Park | /app/model/Invoice.php | UTF-8 | 3,081 | 2.765625 | 3 | [] | no_license | <?php
include "../manager/DatabaseManager.php";
class Invoice extends DatabaseManager
{
private function getGuestNames($invoiceID)
{
$connection = $this->connect();
if ($connection) {
$ret = "";
$stmt = oci_parse($connection, 'BEGIN sp_invoice_guest_list(:iID, :ret); E... | true |
072659fd4b82ef69c71c9bda552d3bada2397443 | PHP | lysa-thorn/Basic_connect_Database | /index.php | UTF-8 | 1,750 | 2.5625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.3.1/css/bootstr... | true |
18034e5ac5f51e47dacb52bad37310ee2703df69 | PHP | marcvifi10/Curso-PHP-y-MySQL | /16 - BDD MySQL/37 - Obteniendo registros de la BBDD.php | UTF-8 | 1,543 | 3.1875 | 3 | [] | no_license | <html>
<head>
<title>BBDD MySql</title>
</head>
<body>
<?php
//Guardamos el nombre del host en una variable
$db_host="localhost";
//Guardamos el nombre de la base de datos en una variable
$db_name="pruebas";
//Guardamos el nombre del usuario de la base de datos en una variable
$db_usuar... | true |
211f46d4f5bc7fb74d3893bd97f39d948ff62628 | PHP | szepbalazs06/naplo | /Tanar.php | UTF-8 | 577 | 3.0625 | 3 | [] | no_license | <?php
require_once 'Ember.php';
class Tanar extends Ember
{
private $csaladi_allapot;
public function __construct($nev, $nem, $szuletesi_ev, $csaladi_allapot)
{
parent::__construct($nev, $nem, $szuletesi_ev);
$this->csaladi_allapot = $csaladi_allapot;
}
public function __toStrin... | true |
4e1300fbc871c88a5af6c840dabc91eb0d67ca8e | PHP | cmq/nfl-loser-pool | /src/root/protected/models/Pick.php | UTF-8 | 3,641 | 2.59375 | 3 | [] | no_license | <?php
class Pick extends DeepActiveRecord
{
/**
* Returns the static model of the specified AR class.
* @param string $className active record class name.
* @return Event the static model class
*/
public static function model($className=__CLASS__)
{
return parent::model($cla... | true |
8b773031e520dde4e0b94a2b00db92051d82bbb6 | PHP | MoonbowDew/killingfloordntu | /for_functions.php | UTF-8 | 468 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
$mysqli = false;
function connectDB(){
global $mysqli;
$mysqli = new mysqli("localhost", "root", "", "kfdb-local");
$mysqli->query("SET NAMES 'utf8'");
}
function closeDB(){
global $mysqli;
$mysqli->close();
}
function addUser($email, $password){
global $mysqli;
connectDB();... | true |
04ba3d64c8cbcc6e706d5f47631641d0fdd2a822 | PHP | HCC-Coder-Bootcamp/php106 | /sy/tasks/task3.php | UTF-8 | 607 | 3.265625 | 3 | [] | no_license | <?php
//input any value in array, remove duplicate item
$items = [];
do {
$input = readline('Enter item :(x to exit.)');
if ($input !=='x') {
$items[] = $input;
}
}while ($input !== 'x');
if ($items == $items) {
echo $items[];
}
print_r($items);
echo '--------------------' . PHP_EOL;
foreach ($items a... | true |
19a21df5281e597aeaf2114b30ba0b3e8677e9ae | PHP | Wulff-1996/music-web-app | /src/repositories/CustomerRepo.php | UTF-8 | 4,681 | 3.015625 | 3 | [] | no_license | <?php
namespace Wulff\repositories;
use PDO;
use PDOException;
use Wulff\config\Database;
class CustomerRepo
{
private Database $db;
function __construct($db)
{
$this->db = $db;
}
public function closeConnection()
{
$this->db->close();
}
public function find($id)
... | true |
d33769501b62d8fe18074f001ee70451a67dc34d | PHP | ricardo87ms/especializati-vuejs | /12-vue-http/webservice-laravel-5-5/app/Models/Product.php | UTF-8 | 1,121 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
class Product extends Model
{
protected $fillable = ['name', 'description'];
/**
* Filter Products
*
* @param Array $data
* @param int $totalPage
*
* @return \Illuminate\Http\Res... | true |
826ab91958939abfe22e1a1c5f0950cb356cdac0 | PHP | wendycollado/Proy_reserva | /Plantilla/MODELO/estadistica.model.php | UTF-8 | 6,871 | 2.859375 | 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.
*/
/**
* Description of AlumnoModel
*
* @author Tefy
*/
class EstadisticaModel {
private $pdo;
function __construct(... | true |
557888ee1b5651a3a8d5ed24b26722717fd76271 | PHP | simonevitale/easyrest-php | /src/api/DatabaseHandler.php | UTF-8 | 9,417 | 2.59375 | 3 | [] | no_license | <?
////////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2016 Simone Vitale
//
// 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 restri... | true |
9cacb5e50fff22611223f18a641d5302b47f138b | PHP | nialke/shop | /src/Model/ViewToModel/ProductDataToModel.php | UTF-8 | 651 | 2.9375 | 3 | [] | no_license | <?php
namespace src\Model\ViewToModel;
use src\Model\Entities\Product;
class ProductDataToModel
{
public function productDataMapper(array $productData): Product
{
$product = new Product();
$product->setBrand($productData['brand']);
$product->setModel($productData['model'... | true |
0ff8f14d8956308d63efba3c08a4d9b2790b7784 | PHP | raynardlucky/adminkursusera | /backend/models/CourseDetail.php | UTF-8 | 1,874 | 2.671875 | 3 | [] | no_license | <?php
namespace backend\models;
use Yii;
/**
* This is the model class for table "course_detail".
*
* @property int $id
* @property string $title
* @property string $description
* @property int $course_id
* @property int $instructor_id
* @property string $link_video
*
* @property Course $course
* @propert... | true |
98bc669461c82abc84ac761f08ed6a5ed2d1c8fa | PHP | FWLA/atsnet2 | /src/Atemschutz/NachweisBundle/Tauglichkeit/NachweisartNachweisPair.php | UTF-8 | 720 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Atemschutz\NachweisBundle\Tauglichkeit;
use Atemschutz\NachweisBundle\Entity\Nachweis;
use Atemschutz\NachweisBundle\Entity\Nachweisart;
/**
* @author Benjamin Ihrig
*/
class NachweisartNachweisPair {
private $nachweisart;
private $nachweis;
/**
* @param Nachweisart $nachweis... | true |
699fa5952d5ae4e178192b12f015bf5d4a8bf6bc | PHP | iamyeasin/prevealer | /php/script.php | UTF-8 | 1,145 | 2.8125 | 3 | [] | no_license | <pre>
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "turtseo";
$product_names = "";$page_link="";$product_link="";
if(isset($_POST['product_name'] , $_POST['page_link'] , $_POST['product_link'] )){
$product_names = $_POST['product_name'];
$page_link = $_... | true |
883fd520e47560ed6c1324b9bd2656b04c160bee | PHP | borjaeu/phpdebug | /src/DebugHelper/Gui/Resource.php | UTF-8 | 701 | 2.75 | 3 | [] | no_license | <?php
namespace DebugHelper\Gui;
class Resource
{
protected $file;
/**
* Sets the value of file.
*
* @param string $file the file
* @return self
* @throws \Exception
*/
public function setFile($file)
{
$this->file = __DIR__ . '/../../../res/' . $file;
if ... | true |
02007323dce248b31d879c8b28b78a65c069c173 | PHP | truereza/latihanPHP | /tambah-proses.php | UTF-8 | 912 | 2.5625 | 3 | [] | no_license | <?php
//cek jika tombol tambah di klik
if(isset($_POST['tambah'])){
include('koneksi.php');
//jika data benar maka akan dilanjutkan proses
$nis = $_POST['nis'];
$nama = $_POST['nama'];
$kelas = $_POST['kelas'];
$jurusan = $_POST['jurusan'];
... | true |
bcf084fab6e7398f5656093c3f9ea735c4456fe1 | PHP | stenalpjolly/HIM | /hybrid/register.php | UTF-8 | 1,052 | 2.546875 | 3 | [] | no_license | <?php
include("localdb.php");
// return json response
$json = array();
//$user = array();
$username = $_GET["name"];
$phone = $_GET["phone"];
$emailId = $_GET["email"];
$regID = $_GET["regId"]; // Registration ID for Gcm or Provided by Layer.com
// Send this message to device
$message = "Registration Success";
/... | true |
ccc2544c9e3f50ecd8700a18e57ac2da74a9bc5b | PHP | Rafin-Neloy/Project-webtech- | /controllers/Addprofile-action.php | UTF-8 | 2,807 | 2.8125 | 3 | [] | no_license | <?php
$gender= $religion =$present = $permanent = $tel =$email=$dob="";
$doberror=$gendererror=$emailerror=$religionerror=$presenterror=$permanenterror=$telerror="";
$flag=false;
if($_SERVER['REQUEST_METHOD'] === "POST") {
$gender=$_POST['gender'];
$dob = $_POST['dob'];
$email = $_POST['e... | true |
34f82c1910b423b082f49984a47140239f08ccd2 | PHP | BBlooms/OvationVintage | /test v1.php | UTF-8 | 1,889 | 2.984375 | 3 | [] | no_license | <?php
//open Jewelry directory
$dir = opendir("img/jewelry");
$allowed_types=array('jpg','jpeg','gif','png');
$file_parts=array();
$i=0;
$items=array();
$srcs = array();
while (($file = readdir($dir)) !== false)
{
if($file=='.' || $file=='..') continue; //skip links to the current and parent directories
... | true |
ff881544ff7c1125ab6373c1f44bb6d85e58891c | PHP | n1exceptme/energia | /php/esporta.php | UTF-8 | 1,307 | 2.5625 | 3 | [] | no_license | <h1>Test Driving MySqlExcelBuilder</h1>
<?php
//include la configurazione per la connessione al DBMS
include("connetti.php");
require_once('MySqlExcelBuilder.php');
echo $_SESSION['selezione'];
$database = 'pod';
$user='root';
$pwd='zinedine21';
$mysql_xls = new MySqlExcelBuilder($database,$user,$pwd);
$q... | true |
087074346bc91dc1bde9d987839f7ecb7c118a31 | PHP | Lumecent/social-network-api | /app/Services/Service/Admin/Published/UpdatePublishedService.php | UTF-8 | 640 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Service\Admin\Published;
use App\Helpers\StringClean;
use App\Http\Requests\Admin\Published\UpdatePublishedRequest;
use App\Repositories\Repository;
use App\Services\BaseService;
class UpdatePublishedService extends BaseService
{
/**
* Update type published
*
* @param ... | true |
d03e6b3c16d4b4cd90b6624a65ff3c9b72ab08e3 | PHP | jean-davidson-colas/runtrack5 | /jour1/Job01/controllers/Utilisateurs.php | UTF-8 | 569 | 2.53125 | 3 | [] | no_license | <?php
class Utilisateurs
{
//getUsers() : Récupère les données à l’aide du modèle et les transmet à la vue afin d’afficher la liste des utilisateurs.
//addUser() : Utilise la méthode poste POST pour déterminer si un
nouvel utilisateur doit être ajouté. Si c’est le cas, elle vérifie l'intégrité
des donnée... | true |
65c50e02bc10316f2d47362b48a771306203e9ac | PHP | manjurulcis/AJCRM | /vendor/laravel/framework/src/Illuminate/Foundation/Auth/Access/AuthorizesResources.php | UTF-8 | 1,464 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Illuminate\Foundation\Auth\Access;
use Illuminate\Routing\ControllerMiddlewareOptions;
trait AuthorizesResources
{
/**
* Authorize a resource action based on the incoming request.
*
* @param string $model
* @param string|null $name
* @param array $options
* @pa... | true |
be4a807f8290bb2d3631efc297b08c9441fc0a54 | PHP | sandersyao/graphql-swoole | /apps/Validators/Validator.php | UTF-8 | 2,173 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Validators;
use App\Traits\Singleton;
/**
* 验证器
*/
class Validator
{
use Singleton;
const RULE_SEPARATER = '|';
const RULE_BOUNDARY = ':';
const PARAM_SEPARATER = ',';
public static function assertArray(array $mapRules, array $mapValues)
{
foreach ($m... | true |
845b5939077f807adf53aed49c8cca33ea8b40d2 | PHP | Athlon1600/php-curl-client | /src/Client.php | UTF-8 | 2,362 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace Curl;
class Client
{
// Default HTTP headers
protected $headers = array();
// Default cURL options
protected $options = array();
public function __construct()
{
// do nothing
}
protected function buildUrl($uri, $params = array())
{
if ($params) {
... | true |
e3399bc1bd3a485dec9260ef9576d0ac9f23f6e3 | PHP | ZeroConfig/CLI | /tests/Csv/FormatConfiguratorTraitTest.php | UTF-8 | 1,833 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright MediaCT. All rights reserved.
* https://www.mediact.nl
*/
namespace ZeroConfig\Cli\Tests\Csv;
use PHPUnit\Framework\TestCase;
use ZeroConfig\Cli\Csv\FormatConfiguratorTrait;
/**
* @coversDefaultClass \ZeroConfig\Cli\Csv\FormatConfiguratorTrait
*/
class FormatConfiguratorTraitTest extends Te... | true |
dcfe06917efa73ffe926e501cf2f2766d570ad7e | PHP | albarcia/TuFoto | /clases/descarga.php | UTF-8 | 3,224 | 3.15625 | 3 | [] | no_license | <?php
// descarga.php
class Descarga{
private $idDescarga;
private $idFoto;
private $idUsuario;
private $fecha;
// Constructor.
function Descarga($idDescarga=0, $idFoto=0, $idUsuario=0, $fecha=0){
$this->idFoto = $idFoto;
$this->idUsuario = $idUsuario;
$this->fecha = $fecha;
}
//Getters
function getId... | true |
6bcec6aac5e626a911fe2102b8e47826f5680139 | PHP | pkmichalak/php-speck32-base32-id-encrypt | /base32.php | UTF-8 | 1,233 | 3.65625 | 4 | [] | no_license | <?php
class Base32 {
private static $alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
private static $chars = null;
private static $values = null;
public static function init() {
Base32::$chars = str_split(Base32::$alphabet);
Base32::$values = array_fill(0, 256, 0);
$i = 0;
foreach(Base32::$ch... | true |
f96ec72e87b4bb4af382140a6eb59c6d250c7f1f | PHP | max-baranikov/Portfolio | /Numeric methods/methods.php | UTF-8 | 14,488 | 3.453125 | 3 | [] | no_license | <?php
// the list of error in json file
// $errorList = file_get_contents('error_list.json');
// $errorList = json_decode($errorList);
// класс метода
class Method
{
public $name;
public $x;
public $y;
public $iterations;
public $workTime;
public $comment = "Success";
private $startTime;
pri... | true |
7f5b1dd959756344b31995817fea404619db811b | PHP | lefevbre-organization/eShopOnContainers | /src/Web/POC/test-nextcloud/nextcloud/lib/private/Security/Hasher.php | UTF-8 | 6,863 | 2.828125 | 3 | [
"MIT",
"AGPL-3.0-only"
] | permissive | <?php
declare(strict_types=1);
/**
* @copyright Copyright (c) 2016, ownCloud, Inc.
*
* @author Arthur Schiwon <blizzz@arthur-schiwon.de>
* @author Christoph Wurst <christoph@winzerhof-wurst.at>
* @author Lukas Reschke <lukas@statuscode.ch>
* @author MichaIng <micha@dietpi.com>
* @author Morris Jobke <hey@morri... | true |
88699b8bc39db25265d53c70123d50e56cc35344 | PHP | RTippin/messenger | /src/Actions/Threads/RemoveParticipant.php | UTF-8 | 2,794 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace RTippin\Messenger\Actions\Threads;
use Exception;
use Illuminate\Contracts\Events\Dispatcher;
use RTippin\Messenger\Actions\BaseMessengerAction;
use RTippin\Messenger\Broadcasting\ThreadLeftBroadcast;
use RTippin\Messenger\Contracts\BroadcastDriver;
use RTippin\Messenger\Events\RemovedFromThreadEvent;... | true |
3cb5bd87751f4925d4b73f651e6a44f7d7621199 | PHP | FrancoLiptak/ProyectoDeSoftware2017 | /controllers/PerfilPatientController.php | UTF-8 | 4,984 | 2.546875 | 3 | [] | no_license | <?php
include_once "TwigController.php";
include_once "model/PatientRepository.php";
include_once "validator.php";
include_once "IndexController.php";
include_once "ListPatientController.php";
include_once "model/RoleRepository.php";
Class PerfilPatientController{
private static $instance;
private static $idPa... | true |
5dfb1bc7d63f26b50e4380e638595b18679cdd5a | PHP | callowaysutton/Random-Websites | /edit stuff/file.php | UTF-8 | 1,030 | 2.875 | 3 | [
"Unlicense"
] | permissive | class File {
private $filename;
private $dir = 'files/';
public function __construct() {
$action = isset($_POST['action']) ? $_POST['action'] : false;
$this->filename = isset($_POST['filename']) ? $_POST['filename'] : false;
if ((!$action) || (!$this->filename)) return;
swit... | true |
ac16a3310e62fc80e1be1dfe1a687ef51fb07c73 | PHP | bill-chiu/PID-Assignment | /login.php | UTF-8 | 5,100 | 2.6875 | 3 | [] | no_license | <?php
//啟用session
session_start();
//如果沒有驗證碼
function randowverif()
{
$_SESSION['verification1 '] = rand(0, 9);
$_SESSION['verification2 '] = rand(0, 9);
$_SESSION['verification3 '] = rand(0, 9);
$_SESSION['verification4 '] = rand(0, 9);
}
if (!isset($_POST["Verif"])) {
randowverif();
}
$_SESSION['verific... | true |
9b1b9ee758613c8a81084031d09aa6d9afee5aa0 | PHP | HieuPham2000/Web-Technology-Lab | /Lab05/5.3.4/search_result.php | UTF-8 | 1,727 | 2.984375 | 3 | [] | no_license | <html>
<head><title>Search Results</title></head>
<body>
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "mydatabase";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_e... | true |
729d07d9943207ff7dd830d8fbc817b5096a91f7 | PHP | krst15/projekt | /app/view/users/view.tpl.php | UTF-8 | 3,772 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
$status = null;
if ($user->getProperties()['active'] == null) {
$faclass = "fa fa-user";
$class = "user-inactive";
$status = "inaktiv";
}
else {
$faclass = "fa fa-user";
$class = "user-active";
$status = "aktiv";
}
$question = get_object_vars($user->count_user_questions($use... | true |
5d266aedf7c62542aa6b1dccd3e2b25c94c5d6b8 | PHP | eventuallyc0nsistent/kodelearn | /modules/dynamicmenu/tests/DynamicMenu_MenuTest.php | UTF-8 | 3,817 | 2.71875 | 3 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | <?php defined('SYSPATH') or die('No direct access allowed!');
class DynamicMenu_MenuTest extends Kohana_UnitTest_TestCase {
public function test_init() {
$menu = new DynamicMenu_Menu('sidebar');
$this->assertInstanceOf('DynamicMenu_Menu', $menu);
// test that links is an empty array initia... | true |
b8986b7de43eec309ea42ce531e8c11f8b85814c | PHP | spprichard/DesignPatterns | /src/CarServiceExample/CarService.php | UTF-8 | 1,295 | 3.140625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: stevenprichard
* Date: 2017-06-12
* Time: 7:56 AM
*/
interface CarService
{
public function getCost();
public function getDescription();
}
class BasicInspection implements CarService
{
//Core Service
public function getCost()
{
return 20;
... | true |
5acc210c341d60ca4ec20eec7582b61186469d8b | PHP | digicademy/sturm-php-app | /src/Classes/Processor/FolioProcessor.php | UTF-8 | 388 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Sturm\App\Processor;
class FolioProcessor
{
/**
* @param array $value
*
* @return array
*/
public function process($value)
{
$processedValue = array();
foreach ($value as $facsimile) {
$processedValue[(string)$facsimile['n']] = (string)$facs... | true |
f73d4d7ddabdcd2cc73de6f8ca2e2d43c1c316d5 | PHP | p3tom/Forum | /Back-End/questionAPIs/edit_questionAPI.php | UTF-8 | 2,193 | 2.75 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin: *");
session_start();
//if(isset($_POST['editquestion'])) {
$ques_id = $message = $ques_title = '';
$inputArray = [$ques_id, $message, $ques_title];
$blank_fields = [];
$is_filled = true;
$ques_id = $_POST['ques_id'];
//$user_id = $_SESSION['email']... | true |
bf0bbb1b17305ecd1657af5a297213f3bbd2427c | PHP | ion2s-gmbh/oloid-laravel-patternlib | /src/Models/Pattern.php | UTF-8 | 942 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Oloid\Models;
use Illuminate\Database\Eloquent\Model;
class Pattern extends Model
{
protected $fillable = [
'name',
'template',
'html',
'sass',
'markdown',
'preview',
'metadata',
'templateFile',
'sassFile',
'rootSassF... | true |
86dbd431f848794a5430e9b63f319fc8e21ac67a | PHP | JackHarley/SportsMatchAdministrator | /app/controllers/acp/User.php | UTF-8 | 2,726 | 2.515625 | 3 | [] | no_license | <?php
/**
* Sports Match Administrator
*
* Copyright © 2014-2015, Jack P. Harley, jackpharley.com
* All Rights Reserved
*/
namespace sma\controllers\acp;
use sma\Controller;
use sma\exceptions\EmailAddressAlreadyRegisteredException;
use sma\models\Alert;
use sma\models\Organization;
use sma\models\User as UserMod... | true |
4343eb03786541a09bcdb03a4989000050e07ca8 | PHP | gebrkn/stdphp | /src/globals/iter.php | UTF-8 | 4,641 | 3.703125 | 4 | [
"MIT"
] | permissive | <?php
/**
* Convert the argument to Iterator.
*
* @param $xs
* @return Iterator
*
* @test
*
* $z = "";
* foreach(STD\iter(array(1,2,3)) as $x) $z.="($x)";
* $z; /// '(1)(2)(3)'
*
* $z = "";
* foreach(STD\iter(array(8=>1,7=>2,6=>3)) as $x) $z.="($x)";
* $z; /// '(1)(2)(3)'
*
* $z = "";
* foreach(STD\it... | true |
9e6b34d4aed6534536ca3deb48fdf68c6880b895 | PHP | webino/WebinoDraw | /test/WebinoDraw/Dom/ElementTest.php | UTF-8 | 2,888 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Webino (http://webino.sk)
*
* @link https://github.com/webino/WebinoDraw for the canonical source repository
* @copyright Copyright (c) 2012-2014 Webino, s. r. o. (http://webino.sk)
* @author Peter Bačinský <peter@bacinsky.sk>
* @license BSD-3-Clause
*/
namespace WebinoDraw\Dom;
/... | true |
71f3c532586e542a02d5a0c48c5d6bfc95c391e1 | PHP | hafedtalek/tech-challenges | /backend/src/Client/API/V1/SurveyController.php | UTF-8 | 2,526 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Backend\src\Client\API\V1;
use Backend\src\Client\Resources\SurveyCollection;
use Backend\src\Client\Repository\SurveyRepository;
use Backend\src\Client\Resources\Survey as SurveyResource;
/**
* @Resource("Surveys")
* @Controller(prefix="v1")
*/
class SurveyController
{
protected $Survey;
... | true |
00309bd9c088f9786acb5b59a149c782e2df672f | PHP | DMXRoid/Skeet | /skeet/lib/skeet/components/generator/crud_manage_template.inc.php | UTF-8 | 6,838 | 2.5625 | 3 | [
"BSD-2-Clause"
] | permissive | <?
$excludeFields = array("creation_datetime","last_modified_date",$classSetupArray["primary_key"]["field_name"]);
$classObject = variablizeTableName($tableName);
?><?= '<?' ?>
$<?= $classObject ?> = $this->getPage()->getSpecificObject();
?>
<?= '<?=' ?>$this->getPage()->getPageLink()->getLinkAsForm() ?>
<input ... | true |
8b948c1221e58dbd0cc0edc09f5ce19d793ee516 | PHP | starweb/ongoing | /src/Ongoing/UpdateOrderResult.php | UTF-8 | 1,337 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Ongoing;
class UpdateOrderResult
{
/**
* @var boolean $Success
*/
protected $Success = null;
/**
* @var string $Message
*/
protected $Message = null;
/**
* @var int $OrderId
*/
protected $OrderId = null;
/**
* @param boolean $Success
... | true |
0573c318ed210b5dbaccb97399c5c1ba2fc07e9d | PHP | archer051/Programing_Study | /PHP/BOOK_gilbut/chap04/4-4/var_reference_not.php | UTF-8 | 217 | 3.390625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>변수값 전달</title>
</head>
<body>
<?php
function oneUp($var){
$var += 1;
}
// 실행한다
$num = 5;
oneUp($num);
echo $num;
?>
</body>
</html>
| true |
4786d5c7b0281e2bb2fb3903d3215fb93757b5c7 | PHP | zaifastafa/platform | /src/Core/System/Country/Aggregate/CountryState/CountryStateCollection.php | UTF-8 | 1,438 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-generic-cla"
] | permissive | <?php declare(strict_types=1);
namespace Shopware\Core\System\Country\Aggregate\CountryState;
use Shopware\Core\Framework\DataAbstractionLayer\EntityCollection;
/**
* @extends EntityCollection<CountryStateEntity>
*
* @package system-settings
*/
class CountryStateCollection extends EntityCollection
{
public f... | true |
c9dc0c8582692015ccdf3e0f56d1e575c16c4a33 | PHP | ShintaMauliantika/TugasKelima | /TugasKelima/7.tipedataphp/array.php | UTF-8 | 276 | 3.375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<body>
<?php
$cars = array("Volvo","BMW","Toyota"); //membuat variabel yang berisi array menyimpan beberapa nilai dalam 1 variabel
var_dump($cars); //fungsi var_dump untuk melihat hasil proses yang terjadi di dalam php
?>
</body>
</html> | true |
0e66e803943e301ba1351aef1dc9c1ac5e77bbb7 | PHP | kokkoko1/IESOintern | /mission_2-3.php | UTF-8 | 322 | 2.625 | 3 | [] | no_license | <html>
<head>
<meta charset="UTF-8">
<title>misssion_2-3</title>
</head>
<body>
<?php
$file_r= fopen("kadai2-2.txt", "r");//
while ($line = fgets($file_r))
{
list($num, $nam, $com, $tim) = explode("<>", $line);
echo $num.":".$nam."「".$com."」[".$tim."]";
print "<br>";
}
fclose($file_r);
?>
</body>
</html> | true |
08d9af4cda168d17416636c60742160011a7b430 | PHP | danmooney/slackleaderboard | /app/Console/Commands/CommandAbstract.php | UTF-8 | 407 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
abstract class CommandAbstract extends Command
{
public function getSignature($remove_arguments = true)
{
if ($remove_arguments) {
$signature = preg_replace('#^(\w+:\w+).*$#', '$1', $this->signature);
} else {
... | true |
6a54a05eaf6dd6c7d66aeb64333b12fa3ba8c9ae | PHP | anchorhuy/viewpointbot | /Types/Document.php | UTF-8 | 500 | 2.890625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Pavel
* Date: 10.10.2016
* Time: 3:15
*/
namespace Types;
class Document
{
public $file_id;
public $thumb;
public $file_name;
public $mime_type;
public $file_size;
public function __construct($document)
{
foreach ($document as $k => $v)... | true |
5a4030cc243a7d88fe8a4c0198963891b0784b89 | PHP | unisexx/tasty-food | /app/Helpers/HtmlHelpers.php | UTF-8 | 2,525 | 2.671875 | 3 | [] | no_license | <?php
if (!function_exists('get_first_paragraph')) {
function get_first_paragraph($text)
{
$p = substr($text, strpos($text, "<p"), strpos($text, "</p>") + 4);
return $p;
}
}
if (!function_exists('order_status')) {
function order_status($status)
{
$statusArray = ['รอการแจ้งโ... | true |
5879168064a329600cab9192a35c4a21cd99104b | PHP | ivorobioff/thesinglequote | /src/Core/Agent/Payloads/AgentPayload.php | UTF-8 | 1,154 | 2.65625 | 3 | [] | no_license | <?php
namespace ImmediateSolutions\Core\Agent\Payloads;
use ImmediateSolutions\Support\Core\Validation\ClearableAwareTrait;
use ImmediateSolutions\Support\Validation\Source\ClearableAwareInterface;
/**
* @author Igor Vorobiov<igor.vorobioff@gmail.com>
*/
class AgentPayload implements ClearableAwareInterface
{
u... | true |
4db3b3679c7d3029179995ef0fa71c0fea3bccf8 | PHP | ekyna/Colissimo | /examples/get_product_inter.php | UTF-8 | 1,149 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
require __DIR__ . '/../vendor/autoload.php';
use Ekyna\Component\Colissimo\Api;
use Ekyna\Component\Colissimo\Postage;
/* ---------------- API ---------------- */
require __DIR__ . '/config.php';
$api = new Api([
'login' => $contractNumber,
'password' => $password,
'cache' => $cache,
'... | true |
40a3d0e0030165dcae5af9fe5410ca01cad54581 | PHP | php-school/php-workshop | /test/res/database/user-solution-alter-db.php | UTF-8 | 201 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
$db = new \PDO($argv[1]);
$stmt = $db->prepare('INSERT into users (name, age, gender) VALUES (:name, :age, :gender)');
$stmt->execute([':name' => 'Kurt Cobain', ':age' => 27, ':gender' => 'Male']);
| true |
794ddff3e640330f05a79e4a7d59ae23cc27ba30 | PHP | Juvenneto/AutoLamp-ju- | /AutoLamp/Dao/CrudDisciplina.php | UTF-8 | 11,466 | 2.703125 | 3 | [] | no_license | <?php
require_once'./Class/conecta.php';
class CrudDisciplina {
public function queryInsert($id,$nome,$carga_horaria,$professor_id) {
try {
$con = new conecta();
$query = $con->conectar()->prepare("SELECT * FROM disciplina WHERE nome=:nome and"
... | true |
c1a7d2250076914402abfdf89c003a01fffd81be | PHP | johnkrovitch/unRaMaLaK | /src/Krovitch/UnramalakBundle/Form/UserType.php | UTF-8 | 819 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Krovitch\UnramalakBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Form\FormBuilderInterface;
class UserType extends AbstractType
{
/**
* @Assert\MinLength(
* limit=3,
... | true |
ff529727f6e20ad0857134c6c54d9d857004c7d2 | PHP | MeuGarfo/blog17set2018 | /view/categorias.php | UTF-8 | 630 | 3.03125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="pt" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<?php
$count=count($categorias);
if($count>0){
print '<h1>';
if($count>1){
print 'Categorias';
}else{
print 'Categoria';
}
print '</h1>';
... | true |
f58c38369ee0bf0687279254a4da5516a0d47268 | PHP | jukbot/emmaline | /html/app/animal/upload.php | UTF-8 | 5,450 | 2.890625 | 3 | [] | no_license | <?php
require_once ('/var/www/html/app/model/connect.php');
function addanimal(){
if (isset($_POST)) {
$id = $_POST['aniid'];
$name = $_POST['name'];
$height = $_POST['height'];
$weight = $_POST['weight'];
$sex = $_POST['sex'];
$health= $_POST['health'];
$birth= $_POST['birth'];
// ... | true |
5de2f47e999fc530d3f188c79804e5077f8bb99f | PHP | MarkZuev/business | /admin/classes/pagesClass.php | UTF-8 | 6,672 | 3.28125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Класс pageClass
* предназначен для работы с таблицей страниц (pages)
*
* @author Зуев М. С.
*/
class pagesClass {
/**
* соединение с БД
*
* @var classPDO
*/
private $pdo;
/**
* Наименование таблицы в БД
*
* @var string
*/
private $table = 'page';
/**
* Конструкт... | true |
7c919989f006bad58055452c82f7f1edbaf5b15f | PHP | dmitry-suffi/simple-script | /src/Components/Logger/GraylogLogger.php | UTF-8 | 3,533 | 2.84375 | 3 | [] | no_license | <?php
namespace suffi\Simple\Components\Logger;
use Gelf\Message;
use Gelf\Publisher;
use Gelf\Transport\TcpTransport;
use Gelf\Transport\UdpTransport;
use suffi\Simple\Core\Logger;
use suffi\Simple\Core\Simple;
/**
* Class GraylogLogger
*
* Класс для логирования в Graylog
*
* <pre>
* 'Logger' => [
* 'cla... | true |
e2f49fa0841545eb296e089d1a12a93c6735c3da | PHP | Light-creator/Mvc | /Controllers/Controller.php | UTF-8 | 279 | 2.65625 | 3 | [] | no_license | <?php
namespace Controllers;
use Services\View;
class Controller {
public function view($name, $query=null) {
return View::view($name, $query);
}
public function redirect($name, $query=null) {
return View::redirect($name, $query);
}
} | true |
b02340dab0a1c5d504e492f70786ac3fc0072137 | PHP | kkeundotnet/kkblog | /_src/rss.php | UTF-8 | 2,136 | 2.796875 | 3 | [
"Unlicense"
] | permissive | <?php
declare(strict_types=1);
namespace rss;
/* Remove <script> from html
CAUTION: This is a bad solution. Read,
http://stackoverflow.com/questions/7130867/remove-script-tag-from-html-content */
/* NOTE: http://php.net/manual/en/pcre.pattern.php */
function remove_non_rss(string $html): string
{
$html =... | true |
645eeaf0c762c190a197f6cb3cd1a7791ac9258c | PHP | pixelsnob/pet | /library/Pet/Model/Abstract.php | UTF-8 | 3,257 | 3.375 | 3 | [] | no_license | <?php
/**
* @package Pet_Model_Abstract
*
*
*/
abstract class Pet_Model_Abstract {
/**
* @var array An array representation of a model
*
*
*/
protected $_data = array();
/**
* @param mixed $data An array or object containing data to set
* @return void
*
... | true |
bbef271102b77209bb0113bd1bb0f72b880c2a43 | PHP | SigmaHyperon/biscuit | /src/php/fro_Zuordnung_geraete_komponenten.php | UTF-8 | 3,994 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
//prüfen, ob formular abgeschickt wurde
if($iGeraete_id = \utility\forms\get("selektiert", false));
{
// prüfen ob daten übertragen wurden
if(isset($_POST["ac_selected"]))
{
// unnecessary check
if ($s_Selected = $_POST["ac_selected"])
{
// json decodierung der daten
$a_... | true |
31ab515dc3c98883438830515d15ff06c0d338cc | PHP | RoadSigns/PHP3-Course | /qrcode.php | UTF-8 | 447 | 2.703125 | 3 | [] | no_license | <?php
include './classes/QRCode.php';
$qr = new QRCode();
$qrcode = $qr->generateQRCode();
echo "<img src='$qrcode' />";
echo "<pre>";
var_dump($qr);
echo "</pre>";
echo '<hr>';
$qr = new QRCode();
$qr->setSize(400);
$qr->setContent('Chris Maggs');
$qrcode = $qr-... | true |
6553bb40a5984de57a0669dcdff787e4b4b67d72 | PHP | alielmaksoud/alielmaksoud-healthiness-and-wellness-backend | /app/Repositories/CategoryRepository.php | UTF-8 | 1,164 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Category;
class CategoryRepository implements CategoryRepositoryInterface
{
public function display()
{
return $categories = Category::all();
}
public function view($id)
{
return Category::where('id', $id)->first();
}
public fu... | true |
c82e8984bee328e435bf6b12c1818a06004e6cba | PHP | emmelaineglz/orchextra-client-generation | /src/Channel.php | UTF-8 | 792 | 2.59375 | 3 | [] | no_license | <?php
namespace Gigigo\Orchextra\Generation;
class Channel extends BaseCRUD
{
use Modeleable;
/**
* @var array
*/
protected $models = [
'client' => 'one',
'campaign' => 'one'
];
/**
* @var string
*/
protected $entity = 'channels';
/**
* Campaign ... | true |
d25c1bf3bbf0c498219d61c35e7a0256da04f420 | PHP | realreggie/UndergradWork | /Scarlet Gifts (Group)/add-to-cart.php | UTF-8 | 463 | 2.703125 | 3 | [] | no_license | <?php
session_start();//Starts the session on this page
if (empty($_SESSION['cart'])) {//checks to see if there is an existing session variable called cart before making a new one, so we don't overwrite the cart
$_SESSION['cart'] = array();
}
array_push($_SESSION['cart'], $_GET['id']);//adds the "id" from th... | true |
e8b7a8b0d064d34e01e327db2e52de59d10d02e3 | PHP | ducdam/libraryManager | /library_student/books/list.php | UTF-8 | 1,674 | 2.828125 | 3 | [] | no_license | <?php
include_once 'Book.php';
include_once 'DBBook.php';
$bookDB = new DBBook();
$books = $bookDB->getAll();
?>
<!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... | true |
c5a42b81d37ee2b6ad53d44a022c0796316e22de | PHP | spotfinder/spotfinder | /app/models/User.php | UTF-8 | 2,402 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Auth\UserInterface;
use Illuminate\Auth\Reminders\RemindableInterface;
class User extends Eloquent implements UserInterface, RemindableInterface {
// Establish constants for user roles keep in the user table as role_id
const ROLE_ADMIN = 1;
const ROLE_STAND = 2;
public static $ROLES = array(
... | true |
a3f6f4a167c80435aa9bc16db9c7f1601d3c8f9b | PHP | reagne/Converter | /src/dataTypes/JsonDataType.php | UTF-8 | 843 | 2.953125 | 3 | [] | no_license | <?php
require_once(dirname(__FILE__) . "/../connection.php");
class JsonDataType implements DataTypesInterface
{
/**
* @param string $code
* @param boolean $headers
* @return array
*/
static public function GetInternalData($code, $headers)
{
$table = json_decode($code);
... | true |
3e3ea04235240414f20090f33d9af4623b3e1506 | PHP | jonlord/Symfony2-tut | /src/Random/HelloBundle/Entity/Menu.php | UTF-8 | 1,444 | 2.59375 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: jonlord
* Date: 01/10/14
* Time: 00:45
*/
namespace Random\HelloBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Class Menu
* @package Random\HelloBundle\Entity
*
* @ORM\Entity
* @ORM\Table(name="menu")
*
*/
class Menu {
/**
* @ORM\Column(type="inte... | true |