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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
39e5b4f00e36f520f162de58fcc4f963eb5f152d | PHP | Jozeh-github/MyFramework | /base/MySQL.php | UTF-8 | 4,160 | 2.84375 | 3 | [] | no_license | <?php
class MySQL {
private $host = '';
private $user = '';
private $password = '';
private $schema = '';
private $type = '';
private $connection = NULL;
private $debug = false;
function __construct() {
$this->host = DB_HOST;
$this->schema = DB_SCHEMA;
$this->user = DB_USER;
$this->password = DB_PASSWO... | true |
e460068079c65cb35f678f8e5dcdbd1447b70b1d | PHP | ogustavo21/Tablero-Contable | /modulos/ejercicio/cls_ejercicio.php | UTF-8 | 2,386 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
*
* @author Beyda Mariana Trejo Román <1130032@unav.edu.mx>
* @copyright 2017-2018 Área de Desarrollo UNAV
* @version 1.0
*/
class ejercicio
{
public $ejercicio;
public $nombre;
function __construct($ejercicio, $nombre)
{
$this->ejercicio = $ejercicio;
$this->no... | true |
89e7fc1f03a6f688d8f04e95f31d5eb8114495d7 | PHP | krcowles/ktesa | /admin/updteBks.php | UTF-8 | 1,591 | 2.546875 | 3 | [] | no_license | <?php
/**
* This script inserts a new book entered on the form "addBook.php" into
* the BOOKS table in MySQL.
* PHP Version 7.4
*
* @package Ktesa
* @author Tom Sandberg <tjsandberg@yahoo.com>
* @author Ken Cowles <krcowles29@gmail.com>
* @license No license to date
*/
session_start();
require_once "../php/... | true |
83596f43b18107ab12cd9358171bb3e0a559b42d | PHP | forkcms/forkcms | /src/Backend/Core/Js/ckfinder/core/connector/php/CKSource/CKFinder/Event/CreateFolderEvent.php | UTF-8 | 1,919 | 2.671875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/*
* CKFinder
* ========
* http://cksource.com/ckfinder
* Copyright (C) 2007-2016, CKSource - Frederico Knabben. All rights reserved.
*
* The software, this file and its contents are subject to the CKFinder
* License. Please read the license.txt file before using, installing, copying,
* modifying or dist... | true |
eae3944441122786e02cdbe5341c4f7010268b1b | PHP | crackayus09/csv-Importer | /Controllers/ExportController.php | UTF-8 | 1,802 | 2.640625 | 3 | [] | no_license | <?php
/**
* Class ExportController
*/
class ExportController extends AppController
{
public function __construct()
{
parent::__construct();
$post_data = $this->postData();
$this->expOption = $this->arrExtract($post_data, "exp_option");
$this->filters = $this->arrExtract($pos... | true |
d426cf9362554b7539101f28fbdf536ff572b21a | PHP | wesleycsilva/simposio_cefet | /area_user/classes/Inscricao.php | UTF-8 | 10,436 | 2.6875 | 3 | [] | no_license | <?php
class Inscricao
{
public $id;
public $idEvento;
public $idSimposista;
public $situacao;
public $urlQrCode;
public function __construct($id = false)
{
if ($id) {
$this->id = $id;
$this->carregar();
}
}
public function carregar()
{
... | true |
b541fe260a2fd9ceb0d478db2e7696c50e7c5996 | PHP | MorganLedieu/ligue1 | /src/controleur/inscription.php | UTF-8 | 1,396 | 2.671875 | 3 | [] | no_license | <?php
/* page: inscription.php */
//connexion à la base de données:
$BDD = array();
$BDD['host'] = "localhost";
$BDD['user'] = "login4158";
$BDD['pass'] = "NcaPeMOaPkuZPAP";
$BDD['db'] = "dblogin4158";
$mysqli = mysqli_connect($BDD['host'], $BDD['user'], $BDD['pass'], $BDD['db']);
if(isset($_POST['pseudo... | true |
4c7bd077d6dfa9ff25a45d8e6d4d7006a96518c2 | PHP | MagicSen/source_read | /live-camera-master/start.php | UTF-8 | 1,379 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* run with command
* php start.php start
*/
// 入口
ini_set('display_errors', 'on');
// 声明命名空间
use Workerman\Worker;
// pcntl扩展是PHP在Linux环境下进程控制的重要扩展
// 检查扩展
if(!extension_loaded('pcntl'))
{
exit("Please install pcntl extension. See http://doc3.workerman.net/install/install.html\n");
}
// posix扩展使得PHP... | true |
1f48bba46a1df5bdc6b87c17850256bbda23a0e0 | PHP | nbdd0121/MW-DeltaDB | /includes/Hooks.php | UTF-8 | 1,386 | 2.703125 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
use MediaWiki\Storage;
class DeltaDBHooks {
public static function onRevisionRecordInserted( Storage\RevisionRecord $rev) {
$parentId = $rev->getParentId();
if ( !$parentId ) return;
$revisionStore = MediaWiki\MediaWikiServices::getInstance()->getRevisionStore();
$parentRev = $revisionStore->getRevisi... | true |
557549d444d67d08f367c44c277d7f2c075b6b9c | PHP | ga503306/project_nfc_php | /www/api/outregister.php | UTF-8 | 584 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php session_start(); ?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php
if(empty($_SESSION['userid']))
{
echo '<meta http-equiv=REFRESH CONTENT=0;url=../index.html>';
?>
<script language="JavaScript">
window.alert('登入時發生錯誤!');
echo '<meta http-equiv=REFRESH CONTENT=0;url=..... | true |
efa792a411087964206f50da7bc73f28e6fec355 | PHP | Natan1223/sistema_avaliacao_tcc | /sistema_avaliacao_tcc/model/avaliacao_desempenho.php | UTF-8 | 582 | 2.8125 | 3 | [] | no_license |
<?php
/*
* Class avaliacao_desempenho
*/
class avaliacao_desempenho
{
/* Atributes */
var $cod_avaliacao;
var $descricao_avaliacao;
/* Methods (set/get) */
function setcod_avaliacao( $cod_avaliacao )
{
$this->cod_avaliacao = $cod_avaliacao;
}
function getcod_avaliacao()
{
... | true |
988065a60423bc3fa1603c5cfd793589b20a09c0 | PHP | foxrock/tekafiles | /inc/File_Report_Table.php | UTF-8 | 3,190 | 2.640625 | 3 | [] | no_license | <?php
class File_Report_table extends WP_List_Table {
function __construct () {
parent::__construct();
}
function get_columns () {
return array(
'cb' => "<input type='checkbox' />",
'user' => 'Usuario',
'locked' => 'Bloqueado');
}
function get_sortable_columns () {
return array(
'user' => 'us... | true |
f121adc5d5ac4ab7f763d14787e7e38946726be4 | PHP | ckrack/hydrometer-public-server | /src/Entity/Token.php | UTF-8 | 2,758 | 2.6875 | 3 | [
"BSD-3-Clause",
"Artistic-1.0",
"MIT",
"Artistic-1.0-Perl"
] | permissive | <?php
/*
* This file is part of the hydrometer public server project.
*
* @author Clemens Krack <info@clemenskrack.com>
*/
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Knp\DoctrineBehaviors\Contract\Entity\TimestampableInterface;
use Knp\DoctrineBehaviors\Model\Timestampable\TimestampableTrait;
/*... | true |
984215b9b61c07542c64c2ee6b41ddd3c4414ee1 | PHP | schrecka/hello_generator | /hello_generator.php | UTF-8 | 3,813 | 2.71875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<!-- CSS file -->
<link rel="stylesheet" type="text/css" href="style.css">
<!-- Bootstrap -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7... | true |
afa96b82f464c105e8a705357788e22c545ac38c | PHP | BuenoSoft/BuenoSoftMVC | /Model/TipoProductoModel.php | UTF-8 | 2,682 | 2.6875 | 3 | [] | no_license | <?php
namespace Model;
use \App\Session;
use \Clases\TipoProducto;
class TipoProductoModel extends AppModel
{
public function __construct() {
parent::__construct();
}
public function findByX($x) {
return $this->findByCondition($this->getCheckQuery(), [$x]);
}
/*--------------... | true |
9b4a5c6624dcc77c8ce52242506ec60145dbc8a5 | PHP | gudangcoding/cmsku2 | /library/.config.php | UTF-8 | 852 | 2.78125 | 3 | [] | no_license | <?php
//Membuat variable untuk koneksi, ubah sesuai dengan nama host dan database sesuai hosting
$host = "";
$user = "";
$pass = "";
$db = "";
//Menggunakan object mysqli untuk membuat koneksi dan menyimpannya dalam variable $mysqli
$mysqli = new mysqli($host, $user, $pass, $db);
//Menentukan default timezone... | true |
1052ead7401da1513229a5244065ae0ad09fb23d | PHP | kaaterskil/traveloti | /module/Base/src/Base/Form/FriendFinderForm.php | UTF-8 | 1,690 | 2.765625 | 3 | [] | no_license | <?php
/**
* Traveloti Library
*
* @package Traveloti_Base
* @copyright Copyright (c) 2009-2012 Kaaterskil Management, LLC
* @version $Id: $
*/
namespace Base\Form;
use Config\Model\Profile;
use Zend\Form\Form;
use Zend\Form\Element;
/**
* FriendFinderForm Class
*
* @author Blair
*/
class FriendFinderForm... | true |
1bdc8b94c48eb2f72d23d568c7435a5458d21d94 | PHP | rolwi/koala | /extensions/content/wave/classes/model/WaveTheme.class.php | UTF-8 | 6,718 | 2.859375 | 3 | [] | no_license | <?php
namespace Wave\Model;
/**
* Wheel model object for a wave side. It's a object with following attributes:
* OBJ_TYPE: "container_wavetheme"
* WAVETHEME_TYPE: "<type name string>"
* @author Dominik Niehus <nicke@uni-paderborn.de>
*
*/
abstract class WaveTheme extends WaveObject{
private $myEngine;
private $... | true |
e2049f96ab6718d098f5a3ff12c1d56be8335b91 | PHP | KyeBuff/todo-api | /app/Http/Controllers/Tasks.php | UTF-8 | 1,303 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Task;
use App\Http\Requests\TaskRequest;
class Tasks extends Controller
{
public function create(TaskRequest $request)
{
// get post request data for title and article
$data = $request->only(["task", "priority"]);
// create article with data and store... | true |
316586d05562d51817c657e9196266417c552f77 | PHP | sanathkumarls/Pharmacy_MVC | /application/models/Customer.php | UTF-8 | 1,222 | 3 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: sanathls
* Date: 29/09/19
* Time: 4:09 PM
*/
require_once __DIR__.'/../utilities/Database.php';
class Customer
{
public function addCustomer($name,$email,$phone,$address)
{
$db=new Database();
$con=$db->open_connection();
$query="insert int... | true |
b4d905005907ead661169f249627e02b0f6b2180 | PHP | rahilwazir/toddler-story | /src/RW/Modules/Child.php | UTF-8 | 4,848 | 2.703125 | 3 | [] | no_license | <?php
namespace RW\Modules;
use RW\PostTypes\Children;
use RW\PostTypes\ChildBlog;
/**
* Toddler Child Module
*
* @package
*
* @author rahilwazir
* @copyright 2014
* @version 1.0
* @access public
*/
class Child extends ParentModule
{
public static $post_id = 0;
/**
* @var int
*/
pu... | true |
a78b15d86b3e6b974c367a9930ac2a7e3b48e0b7 | PHP | davin-bao/statistics | /src/DavinBao/Statistics/StatisticsStatistic.php | UTF-8 | 2,779 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: davin.bao
* Date: 14-5-12
* Time: 上午11:36
*/
namespace DavinBao\Statistics;
use LaravelBook\Ardent\Ardent;
use Config;
class StatisticsStatistic extends Ardent
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'statistic... | true |
acc3ec74560ace92fcb69072da903437f38e80ae | PHP | AkshatKSinghal/framework | /Utility/FieldValidator.php | UTF-8 | 1,702 | 2.859375 | 3 | [] | no_license | <?php
namespace Utility;
/**
* Class for Validating mandatory and optional fields against an array
*/
class FieldValidator
{
public static function checkFields($requestData, $fields, $subArrayName = 'main', $cntr = 0)
{
$checkedData = [];
$arrayTrace = $subArrayName;
foreach ($fields a... | true |
2a51298b4bb77c54dfdfae6d4c14f6d00721dd72 | PHP | peslopes/computer-science-full-graduation | /Semestre 03/INF05005 - Linguagens Formais e Autômatos/Trabalho Final Formais/Parte02/TrabFormais2010-02_Parte02.php | UTF-8 | 21,303 | 2.796875 | 3 | [] | no_license | <?php
error_reporting(E_ALL ^ E_WARNING ^ E_NOTICE);
/*
b) Tradução de AFNe para AFN;
Entrega dia: 14/10/2010
*/
/* Variáveis globais */
//Inicializados na função leDefinicaoDoAutomato
$lAlfabeto = NULL; //alfabeto
$lEstados = NULL; //estados do autômato
$lEstadosFinais = NULL; //estados finais
$estadoInicial = NU... | true |
49797bd812e47deb982b7832279a65a791286303 | PHP | gzqsts/core | /src/validate/helper.php | UTF-8 | 1,211 | 2.734375 | 3 | [] | no_license | <?php
declare (strict_types = 1);
use Gzqsts\Core\validate\Validate;
if (!function_exists('validate')) {
/**
* 生成验证对象
* @param string|array $validate 验证器类名或者验证规则数组
* @param array $message 错误提示信息
* @param bool $batch 是否批量验证
* @param bool $failExcep... | true |
07b5f24a30f58d9400c2117170880acce6a736c1 | PHP | nsdevaraj/adamstudio | /Web/Adamstudio/bin-debug/phpscripts/getCategories.php | UTF-8 | 495 | 2.671875 | 3 | [] | no_license | <?php
include 'config.php';
include 'connect.php';
echo "<?xml version='1.0' ?>\n";
echo "<categories>"."\n";
$query = "SELECT code, label FROM categories ORDER BY code";
$result = mysql_query($query);
echo " <category code='*' label='All Categories' />\n";
while( $row=mysql_fetch_array($result, MYSQ... | true |
557c906f28c2e3d9e811168ab3989f2271f413b6 | PHP | fsiatama/CCI | /app/controllers/SectorController.php | UTF-8 | 2,550 | 2.546875 | 3 | [] | no_license | <?php
require PATH_APP.'min_agricultura/Repositories/SectorRepo.php';
require PATH_APP.'min_agricultura/Repositories/UserRepo.php';
class SectorController {
private $sectorRepo;
private $userRepo;
public function __construct()
{
$this->sectorRepo = new SectorRepo;
$this->userRepo = new UserRepo;
}
pu... | true |
cc35bf1d9bddc155b4aecbc336bf76c3ebaa17a2 | PHP | ZeraTheMant/mvsantiago-wellness | /php/backend/get_individual_provider_services_beta2.php | UTF-8 | 2,626 | 2.5625 | 3 | [] | no_license | <?php
require '../dbconfig.php';
//$inipath = php_ini_loaded_file();
$query = "
SELECT
provider_services.ps_id,
services.service_id,
services.service_name,
services.category_id,
services.appears_on_first_time,
providers_beta.provider_id,
providers_beta.provider_level,
providers_beta.... | true |
ff8156f34937eb2332ab52c90a0641e8ecc6c0ee | PHP | brookinsconsulting/ezcommunity2 | /eztodo/classes/ezpriority.php | UTF-8 | 4,875 | 2.6875 | 3 | [] | no_license | <?php
//
// $Id: ezpriority.php 7992 2001-10-22 09:22:31Z $
//
// Definition of eZPriority class
//
// Created on: <04-Sep-2000 16:53:15 ce>
//
// This source file is part of eZ publish, publishing software.
//
// Copyright (C) 1999-2001 eZ Systems. All rights reserved.
//
// This program is free software... | true |
d8cdb3884259d376ad2cf0764931b7b6213aa0eb | PHP | tuananh97/php | /phpfiles/if-else.php | UTF-8 | 562 | 4.09375 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>PHP If & Else</title>
</head>
<body>
<?php
//first example
$value1 = 123;
$value2 = 1235;
if($value1==$value2){
echo " The condition is true<br/>";
}
else{
echo " The condition is not true<br/>";
}
//second example
$city = "London";
if(
$city=="Syedney"){
echo $city . " Is i... | true |
47eb779d79f6ece829d7af1d41721eb75f1fb387 | PHP | luomingchu/jx | /enterprise/app/controllers/CaptchaController.php | UTF-8 | 2,958 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
/**
* 验证码控制器
*
* @author Latrell Chan
*/
class CaptchaController extends BaseController
{
/**
* 获取短信验证码
*
* @param string $mobile
*/
public function getSmsVcode()
{
// 验证输入。
$validator = Validator::make(Input::all(), array(
'mobile' => array(
... | true |
dac140e325f34c56ca303fe2a8c0cce85e54aa10 | PHP | SergeySG/sms_edge_test | /console/migrations/m190423_084108_create_users_table.php | UTF-8 | 636 | 2.515625 | 3 | [] | no_license | <?php
use yii\db\Migration;
/**
* Handles the creation of table `{{%users}}`.
*/
class m190423_084108_create_users_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('{{%users}}', [
'usr_id' => $this->primaryKey(),
'us... | true |
e4bb1b9c46c9421095eb7e94bfc4591245bd6c30 | PHP | RahimAJ/usep-svrs | /search.php | UTF-8 | 2,326 | 2.53125 | 3 | [] | no_license | <?php include('templates/header.php') ?>
<?php include('templates/navbar.php') ?>
<?php
include('includes/dbh-inc.php');
if (isset($_GET['searchType'], $_GET['searchInput'])) {
$searchType = $_GET['searchType'];
$searchInput = $_GET['searchInput'];
if (empty($searchType) || ($searchInput == "")) {
... | true |
2482f1125a01ff8d0babb4a163e223bdbcb115f9 | PHP | bearsunday/BEAR.Package | /src/Provide/Error/Status.php | UTF-8 | 849 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace BEAR\Package\Provide\Error;
use BEAR\Resource\Exception\BadRequestException;
use Koriym\HttpConstants\StatusCode;
use RuntimeException;
use Throwable;
final class Status
{
/** @var int */
public $code;
/** @var string */
public $text;
public function __... | true |
72b3041966c61e5497db6c280dbeeea5f5275aff | PHP | SwedbankPay/swedbank-pay-sdk-php | /src/SwedbankPay/Api/Service/Invoice/Resource/Request/Invoice.php | UTF-8 | 651 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace SwedbankPay\Api\Service\Invoice\Resource\Request;
use SwedbankPay\Api\Service\Invoice\Resource\Request\Data\InvoiceInterface;
use SwedbankPay\Api\Service\Resource\Request as RequestResource;
/**
* Invoice data object
*/
class Invoice extends RequestResource implements InvoiceInterface
{
/**
... | true |
7bfee6bd3d70004e4f7a4ecfe353d961a4b88d6d | PHP | LikikCZ/cviceni-4ep-sk1-mvc-opakovani | /src/controllers/uzivatele_controller.php | UTF-8 | 4,392 | 2.625 | 3 | [] | no_license | <?php
class Uzivatele
{
private function prihlasovaci_udaje_jsou_kompletni()
{
if(!isset($_POST["jmeno"]))
return false;
if(!isset($_POST["heslo"]))
return false;
return true;
}
private function registracni_udaje_jsou_kompletni()
{
if(!isse... | true |
f4a7a0b22a7ebad8fa3ab5bea3a34acaa9734d44 | PHP | fr3d3rico/fuzen-pri | /engine/persistence/CategoriaPS.php | UTF-8 | 2,686 | 2.921875 | 3 | [] | no_license | <?php
require("Persistence.php");
class CategoriaPS extends Persistence {
function __construct() {
parent::__construct();
}
function __destruct() {
parent::__destruct();
}
function cadastrar($categoria) {
$isCadastrado = true;
$labels = "";
$values = "";
//Valores
if( strlen($categoria->tit... | true |
1ea00d1c3edeeb0e6068181aa0e76076987330df | PHP | emaphp/eMapper | /lib/eMapper/Reflection/ClassProperty.php | UTF-8 | 2,676 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace eMapper\Reflection;
use Omocha\AnnotationBag;
/**
* The ClassProperty class provides access to a property metadata.
* @author emaphp
*/
class ClassProperty {
/**
* Property name
* @var string
*/
protected $name;
/**
* Reflection property instance
* @var \ReflectionProperty
*/
prot... | true |
711674ab1db16de255fc2503e69d3671f5d81c7d | PHP | matthisstenius/php-projekt | /src/post/model/PostDAL.php | UTF-8 | 2,943 | 2.953125 | 3 | [] | no_license | <?php
namespace post\model;
require_once("src/common/model/DALBase.php");
require_once("src/post/model/Post.php");
class PostDAL extends \common\model\DALBase {
/**
* @param project\model\Project $project
* @return array
*/
public function getPosts(\project\model\Project $project) {
$result = array();
$... | true |
d5dacefc601e62b5bebe3398c8ff114701ab401b | PHP | simmstein/csv | /src/Deblan/Csv/CsvParser.php | UTF-8 | 3,957 | 3.171875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace Deblan\Csv;
/**
* class Csv.
*
* @author Simon Vieille <simon@deblan.fr>
*/
class CsvParser
{
/**
* @var string
*/
protected $delimiter = ';';
/**
* @var string
*/
protected $enclosure = '"';
/**
* @var string
*/
protected $endOfLine = "\n";
... | true |
17ee4cfa0f7a7888cd5e66a9b215cca1dddbbdd5 | PHP | kartikkchauhan/codeTrek_app | /user/submit_Question.php | UTF-8 | 670 | 2.671875 | 3 | [] | no_license | <?php
session_start();
include_once("../config.php");
if($_SERVER['REQUEST_METHOD'] == 'POST')
{
$title = $_POST["title"];
$description = $_POST["description"];
$tags = $_POST["tags"];
#getting date
$yrdata= strtotime(date("Y/m/d"));
$date= date('M d, Y', $yrdata);
$userId = $_SESSION['us... | true |
59ff379a8b5dba8393f336e8a81adcc80eae93e1 | PHP | veakulin/i7 | /classes/VRClient.php | UTF-8 | 1,318 | 2.640625 | 3 | [] | no_license | <?php
class VRClient extends VRClientBase {
public function __construct(string $apiUrl, Credentials $credentials) {
parent::__construct($apiUrl, $credentials);
}
public function countryEnum(array $query = null) {
$result = $this->enum("countryEnum", $query);
return $re... | true |
f21de76e174e58e1475b28ff3852874bd750fa50 | PHP | ChristianStulen/Backend2021 | /Inlamning-03-VG/App.php | UTF-8 | 2,528 | 3.21875 | 3 | [] | no_license | <?php
class App{
//Endpoint and a standard value of the amount of products to be shown.
public static $endpoint ="http://localhost/Inlamning-03-VG/Api/index.php";
public static $nrShow = 10;
//Main, if wrong input is entered the page gets redirected to error screen.
public static function ma... | true |
9df6b3b7b91ccd70c097ca27c01e92bccca49e48 | PHP | drake1004/search_keyword | /index.php | UTF-8 | 796 | 2.609375 | 3 | [] | no_license | <?php
/**
* execute class
*/
use library\curl;
require_once 'library\curl.php';
if(isset($_GET['keyword'])){
$keyword = explode(" ",$_GET['keyword']);
$keyword = str_replace(array("'",'"'),"",$keyword[0]);
$url = "http://xlab.pl/feed/";
$curl = new curl($url);
$data = $curl->retur... | true |
c57974ebc03afb89c9628b3da86a69a91989cb5c | PHP | cshopb/email_spam | /database/migrations/2015_10_16_053713_create_emails_table.php | UTF-8 | 1,066 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateEmailsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('emails', function (Blueprint $table) {
$tab... | true |
021bc39b7c63822ad3fcc12d25beaf097e0610d6 | PHP | manualweb/manual-php | /tipos-datos/forzar-tipo-integer.php | UTF-8 | 258 | 3.359375 | 3 | [] | no_license | <?php
$valor_booleano = true;
$valor_float = 8.9;
echo 'Valor booleano '.(int)$valor_booleano.'<br>';
echo 'Valor float '.(int)$valor_float.'<br>';
echo 'Valor booleano '.intval($valor_booleano).'<br>';
echo 'Valor float '.intval($valor_float).'<br>';
?> | true |
51a100cfee91057ee14777052e2022a631aaf563 | PHP | Ryzki/bkp_serviceon | /application/models/orders/Cart_model.php | UTF-8 | 18,874 | 2.734375 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CI_Model API for cart management .
*
* <p>
* We are using this model to assign, unassign, change and get delivery status of orders.
* </p>
* @package Orders
* @subpackage orders-model
* @author pradeep singh
* @category... | true |
8bcd8c7dd3dfffbe939bef188bf843bbce647f27 | PHP | octalmage/wib | /php-7.3.0/Zend/tests/int_underflow_64bit.phpt | UTF-8 | 570 | 3.09375 | 3 | [
"Zend-2.0",
"BSD-4-Clause-UC",
"BSD-3-Clause",
"LicenseRef-scancode-other-permissive",
"TCL",
"ISC",
"Zlib",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"blessing",
"MIT"
] | permissive | --TEST--
testing integer underflow (64bit)
--SKIPIF--
<?php if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platform only"); ?>
--FILE--
<?php
$doubles = array(
-9223372036854775808,
-9223372036854775809,
-9223372036854775818,
-9223372036854775908,
-9223372036854776808,
... | true |
9bde44eaa90e83571ea79cd3f63c7c436d4548d1 | PHP | SvenAlHamad/Subench | /app/Lib/View.php | UTF-8 | 548 | 2.609375 | 3 | [] | no_license | <?php
namespace Subench\Lib;
use Webiny\Component\TemplateEngine\TemplateEngineTrait;
class View
{
use TemplateEngineTrait;
static public function showView($view, $data = [], $hasHeader = false, $master = true)
{
$data = array_merge($data, [
'_viewTpl' => $view,
... | true |
e9412b6c91eb26f58c53f7c9eadf7d797bf6d651 | PHP | Miuss/mqtt-cms | /core/class/Title.php | UTF-8 | 991 | 2.65625 | 3 | [] | no_license | <?php
class Title {
public $title = NULL;
public $page = NULL;
public function __construct() {
global $DB;
$result = $DB->query("SELECT * FROM `setting`");
$data = $result->fetch_object();
$this->title = $data->title;
}
public function getTitle($get) {
... | true |
bc3016b0e6fa7f207cdec9ffbf4e9ec57717f5dc | PHP | bileto/criticalsection | /tests/CriticalSectionTests/RedisCriticalSectionTest.phpt | UTF-8 | 4,891 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace BiletoTests\CriticalSectionTests;
require_once(__DIR__ . '/bootstrap.php');
use Mockery;
use Mockery\LegacyMockInterface;
use Mockery\MockInterface;
use Redis;
use Bileto\CriticalSection\CriticalSection;
use Bileto\CriticalSection\Driver\IDriver;
use Tester\TestCase;
use Tes... | true |
f123fbe61d26c9dd974a83a1a3c70e8683ddef78 | PHP | family2099/Homework_annotation | /050_Loop/testFor.php | UTF-8 | 456 | 3.5625 | 4 | [] | no_license | <?php
//for為你的程式碼需要重覆多次執行的時候使用,當符合條件時,
//for 迴圈就會一直執行到不符合條件為止
//for( 設定初始值 ; 比對運算式 ; 初始值執行動作 )
//本案例為雙層迴圈,如果i+j整除4的話跳過第二層迴圈
for ($i = 1; $i <= 3; $i++) {
for ($j = 1; $j <= 4; $j++) {
echo "$i , $j <br>";
if (($i + $j) % 4 == 0)
break;//跳過出迴圈
}
echo "-----<br>";
}
?> | true |
b2fa7bbbfc6106b33c5fc2c38fe97506615f7721 | PHP | jamessw-byui/cs313-php | /web/week07/sign_up.php | UTF-8 | 3,209 | 3.078125 | 3 | [] | no_license | <?php
// Start the session
session_start();
$dbUrl = getenv('DATABASE_URL');
if (empty($dbUrl)) {
// example localhost configuration URL with postgres username and a database called cs313db
// adding a comment
$dbUrl = "";
}
$dbopts = parse_url($dbUrl);
$dbHost = $dbopts["host"];
$dbPort = $dbopts["port"];
$dbUs... | true |
a14451c003397b52a0607f994a06832acf1f6fbb | PHP | JoshDoug/ci6230-airline-cw | /src/admin/index.php | UTF-8 | 1,361 | 2.609375 | 3 | [] | no_license | <?php
require_once '../../private/initialise.php';
require_once(INCLUDE_ROOT . '/adminAuthRequired.php');
if (isset($_POST['registerAdmin'])) {
$expected = ['firstName', 'lastName', 'email', 'password', 'confirm'];
// Assign $_POST variables to simple variables and check all fields have values
foreach ($_POST ... | true |
cd28d08913afc0e19bfff4ce84c4faac24aba83b | PHP | ali/dds2 | /server/views/assign-slide.php | UTF-8 | 1,022 | 2.625 | 3 | [] | no_license | <!--
Each selected machine from the dropdown & the uuid of our slide is posted to
do-assign-slide.php which then does the (actual) assignment.
-->
<?php include 'header.php'?>
<?php
global $url;
$deck_uuid=$url[1];
?>
<div class='container'>
<div class='span5'>
<h1>Assign slides Yo</h1>
<p>Choose a... | true |
3093cb340f37ff17cf04b38b09fbcf6c35a9deeb | PHP | CedrickOka/wsse-authentication-bundle | /src/Command/UserCommand.php | UTF-8 | 1,386 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Oka\WSSEAuthenticationBundle\Command;
use Oka\WSSEAuthenticationBundle\Model\WSSEUserManipulatorInterface;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInt... | true |
a8dd4cdd9587172feaf309ca2d9a00b90fefa6ac | PHP | blueberryln/savile-row-society | /app/Model/Model/Wishlist.php | UTF-8 | 3,458 | 2.5625 | 3 | [] | no_license | <?php
App::uses('AppModel', 'Model');
/**
* Wishlist Model
*
* @property User $User
* @property Product $Product
*/
class Wishlist extends AppModel {
/**
* Display field
*
* @var string
*/
public $displayField = 'product_id';
/**
* Validation rules
*
* @var array
... | true |
d0ce922fb6d2ba0f883c13365567bad1ba5e8375 | PHP | abdouthetif/TheLazyStreaming | /src/Entity/Liste.php | UTF-8 | 1,571 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\ListeRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=ListeRepository::class)
*/
class Liste
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type=... | true |
47399c0eaa68f75c31ad4f4525fa9a2cc2e1433f | PHP | dojoVader/ciims-modules-dashboard | /components/CiiDashboardController.php | UTF-8 | 3,324 | 2.53125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* Controller is the customized base controller class.
* All controller classes for this application should extend from this base class.
*/
class CiiDashboardController extends CiiController
{
/**
* Retrieve assetManager from anywhere without having to instatiate this code
* @return CAssetMana... | true |
e092fa6c42d0221955250191456eb59d8ac32a02 | PHP | kmaloneVillanova/CSC2053 | /lab5/crm/includes/book-utilities.inc.php | UTF-8 | 1,934 | 3.234375 | 3 | [] | no_license | <?php
function readCustomers($filename) {
// read the file into memory; if there is an error then stop processing
$arr = file($filename) or die('ERROR: Cannot find file');
// our data is semicolon-delimited
$delimiter = ';';
// loop through each line of the file
foreach ($arr as $line) {
// ... | true |
323e00debbdf5409f130d7a4838cfe660056d1ba | PHP | frapgn/php-adv-charts | /step1-method1/index.php | UTF-8 | 1,537 | 2.515625 | 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>Metodo 1</title>
</head>
<body>
<canvas id="line-chart"></canvas>
<?php // ----- JAVASCRIPT ----- ?... | true |
2091f5367aab3a3eefd0e4772a6efe2cbf81943d | PHP | kristapsmors/bitcoin-chart | /app/helpers/template.php | UTF-8 | 134 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
function currency($amount, $currency, $decimals = 2)
{
return sprintf('%s%s', $currency, number_format($amount, $decimals));
} | true |
fb10a346b78285841110bb649e9b731195300ffc | PHP | tmakij/drunken-octo-tyrion | /libs/models/aihe.php | UTF-8 | 1,294 | 3.109375 | 3 | [] | no_license | <?php
final class Aihe extends IDobject {
private $nimi;
function __construct($id, $nimi) {
$this->id = $id;
$this->nimi = $nimi;
}
public function poistaAihe($id) {
try {
tallennaTietokantaan('DELETE FROM aihe WHERE id = ?', array($id));
} catch (PDOExcep... | true |
27221d23814f45ab6be0faedb2594617be4cd510 | PHP | anconaesselmann/Composition | /src/aae/persistence/adapters/db/DataToMySQL.php | UTF-8 | 8,597 | 2.8125 | 3 | [] | no_license | <?php
// /**
// *
// */
// namespace aae\persistence\adapters\db {
// /**
// * @author Axel Ancona Esselmann
// * @package aae\persistence\adapters\db
// */
// use \aae\persistence\adapters\db\connections\DBConnectionInterface as DBConnectionInterface;
// use \aae\persistence\adapters\db\connections\MySQlDB... | true |
b9f215c7df71ae37cbf19387d516e7581603c268 | PHP | ayushi710/Hygiea | /practice.php | UTF-8 | 311 | 3.015625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: momin
* Date: 10/10/2017
* Time: 3:53 PM
*/
$real_ans = 5.5;
$test = intval($real_ans);
echo $real_ans - $test;
?>
<input type="text" value="hello">
<?php
$array = array(
'key1' =>54.1,
'65' =>10
);
echo array_sum($array);
?>
| true |
03487c1800843e4750c473b2cdd927519a4a4309 | PHP | crazypig1/htdocs | /admin/data/07_product_detail.php | UTF-8 | 598 | 2.546875 | 3 | [] | no_license | <?php
//1:加载init.php 9:28--9:33
require("00_init.php");
//2:获取参数lid(id数字)
$lid = $_REQUEST["lid"];
//3:创建SQL语句并且发送SQL
$sql = " SELECT lid,title,price,spec";
$sql .= " category,name,cpu,disk FROM";
$sql .= " xz_laptop WHERE lid = $lid";
@$result = mysqli_query($conn,$sql);
@$row = mysqli_fetch_assoc($result);
if... | true |
58939ea2adabd8ec447ad0df94063fba594b241d | PHP | sedamiqaelyan/ACA | /Daily/day16/index.php | UTF-8 | 481 | 3.46875 | 3 | [] | no_license | <!Doctype html>
<html>
<head>
</head>
<body>
<?php
/* $myAssocArray=[
"name"=>"seda",
"lastname"=>"miqaelyan",
"age"=>"26",
];
$arrayKeys=array_keys($myAssocArray);
var_dump($arrayKeys);*/
/* function polyndrom($string) {
if(strrev($string)==$string){
... | true |
a6c559165ce17e9bbadac846e3d8febae1dec193 | PHP | viethoangCIT/vietkids | /group3/view/test_dev/add_answer_dev.php | UTF-8 | 4,754 | 2.59375 | 3 | [] | no_license | <?php
//*****************************************
//FUNCTION HEADER
//*****************************************
$function_title = "Nhập Câu Hỏi";
//tạo liên kết nhập tin
echo $this->Template->load_function_header($function_title);
//*****************************************
//END FUNCTION HEADER
//******... | true |
818ca52723f73ab388d6e60b97415807f097929b | PHP | arajcany/ApplicationStub | /src/Utility/Install/VersionControl.php | UTF-8 | 8,106 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Utility\Install;
use arajcany\ToolBox\Utility\TextFormatter;
use Cake\Core\Configure\Engine\IniConfig;
use Cake\ORM\TableRegistry;
use Cake\Utility\Hash;
use Cake\Utility\Security;
use Cake\Utility\Text;
/**
* Class Version
*
* @property \App\Model\Table\SettingsTable $Settings
* @property \A... | true |
8819ff8c682fc905cdad741ac6d7be2a70d43ad6 | PHP | antlr/antlr-php-runtime | /src/Tree/SyntaxTree.php | UTF-8 | 1,158 | 2.859375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
declare(strict_types=1);
namespace Antlr\Antlr4\Runtime\Tree;
use Antlr\Antlr4\Runtime\Interval;
/**
* A tree that knows about an interval in a token stream
* is some kind of syntax tree. Subinterfaces distinguish
* between parse trees and other kinds of syntax trees we might want to create.
*/
interface ... | true |
fa94dfc3740b4d4bf134d9479fd31c8cf741cf5e | PHP | OmarMohamed95/lacommerce | /app/Repositories/CustomFieldRepository.php | UTF-8 | 906 | 2.875 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Model\CustomField;
use App\Repositories\Contracts\CustomFieldRepositoryInterface;
class CustomFieldRepository implements CustomFieldRepositoryInterface
{
/**
* Get all customFields
*
* @return Illuminate\Support\Collection
*/
public function all()... | true |
4ddf8ec3ae44fb168ec6a0ed3a2b14bab9cda7b0 | PHP | ChernyakovSI/project_vdele | /common/models/ProjectTeam.php | UTF-8 | 2,201 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "project_team".
*
* @property int $id
* @property int $id_team
* @property int $id_project
* @property int $created_at
* @property int $updated_at
*/
class ProjectTeam extends \yii\db\ActiveRecord
{
public $team;
/**
... | true |
9b3d3509c448689d73a059db2876347ff77683c6 | PHP | MohnDoe/quotrs | /model/class.artist.php | UTF-8 | 6,863 | 2.765625 | 3 | [] | no_license | <?php
require_once 'core.php';
Class Artist
{
public $id;
public $name;
public $description;
public $url_image;
public $urlFacebook;
public $urlTwitter;
public $urlSite;
public $urlOther;
public $url_rg;
public $delimiter_url_i... | true |
60fbc7083ea9148c880bf2ebfba68ce44a2b5111 | PHP | cretz/meh | /src/Meh/Compiler/Context.php | UTF-8 | 4,021 | 3.03125 | 3 | [] | no_license | <?php
namespace Meh\Compiler;
use Meh\Lua\Ast\FunctionDeclaration;
use Meh\MehException;
class Context
{
use PhpHelper;
/** @var Builder */
public $bld;
/** @var mixed[] Stack (but reversed, a "FILO" of sorts) */
public $childContexts = [];
/** @var bool */
public $debugEnabled = false;... | true |
4b6f0f50c8251ebfde8c8aeb3a5bfbbe885c7819 | PHP | ruerp76/Exo2-php-Les-conditions | /index.php | UTF-8 | 1,457 | 4.0625 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Exo 2 - PHP - Les conditions</title>
</head>
<body>
<?php
// Exercice 1
$age=17;
if ($age>=18) {
echo "Vous êtes majeur";
}
else {
echo "Vous êtes mineur </br>";
}
// Exercice 2
... | true |
26fd869b418109a7260645f1c6746657831c18c8 | PHP | AndrewSteyn/Online-store | /include/shop.php | UTF-8 | 4,983 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
session_start();
include_once 'connect.php';
include_once 'product.php';
//Check if the user is logged in, if not then redirect him to login page
if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){
header("location: login.php");
... | true |
da6c2f14ecf23f837b8bdb6e52520f4c968b90e1 | PHP | kamdjouduplex/ERP | /app/PageNotes.php | UTF-8 | 726 | 2.5625 | 3 | [] | no_license | <?php
namespace App;
/**
* @SWG\Definition(type="object", @SWG\Xml(name="User"))
*/
use Illuminate\Database\Eloquent\Model;
class PageNotes extends Model
{
/**
* @var string
* @SWG\Property(property="url",type="strng")
* @SWG\Property(property="note",type="string")
* @SWG\Property(property=... | true |
0a0f9dbb9d27789da48836fc75fd935e945b5a1a | PHP | Foodtopia/foodtopia-php | /test01.php | UTF-8 | 310 | 3 | 3 | [] | no_license | <?php
define('MY_CONST', 123); // 常數定義
echo MY_CONST;
echo '<br>';
echo __DIR__;
echo '<br>';
echo __FILE__. '<br>';
echo __LINE__. '<br>';
echo PHP_VERSION. '<br>';
$a = 55;
$b = 'aaa';
$b1 = true;
$b2 = True;
$b3 = TRUE;
$b = false;
echo '----<br>';
echo false;
echo '----<br>';
echo true;
| true |
e41078299fd1bbd905755ea04938e750bfe795d4 | PHP | hytcdinghaoyu/blast_swoft | /app/Services/PayServiceInterface.php | UTF-8 | 500 | 2.734375 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace App\Services;
use Swoft\Bean\Annotation\Bean;
/**
* @Bean(ref="rovio")
* Interface PayServiceInterface
* @package App\Services
*/
interface PayServiceInterface{
/**
* 获取余额
* @return mixed
*/
public function getBalance() : int;
/**
* 付钱
* @return mixed
... | true |
6d88682c1dc67136e5d0bfaef73447629c49fde8 | PHP | asdf0577/wufan | /module/Album/src/Album/Form/CSVUploadForm.php | UTF-8 | 930 | 2.71875 | 3 | [] | no_license | <?php
namespace Album\Form;
use Zend\Form\Form;
use Zend\Form\Element;
class CSVUploadForm extends Form
{
public function __construct($name = null)
{
parent::__construct('Upload');
$this->setAttribute('method', 'post');
$this->setAttribute('enctype', 'multipart/form-data');
$th... | true |
882d863b32a016c60dacb34077a84b9a6569990d | PHP | liweist/siegelion | /src/Siegelion/System/Exception/ApplicationException.php | UTF-8 | 905 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Siegelion\System\Exception;
class ApplicationException extends \Exception
{
public static function appNotExist($sApp)
{
return new self('App "'.$sApp.'" does not exist.');
}
public static function actionNotExist($sAction)
{
return new self('Action "'.$sAction.'" doe... | true |
38bd831a887a94cabe1d9e3f203c2b65719ed495 | PHP | acassiovilasboas/system-from-school | /app/Repositories/Eloquent/AbstractRepository.php | UTF-8 | 1,782 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Eloquent;
use Exception;
use Illuminate\Support\Facades\DB;
abstract class AbstractRepository
{
/**
* @var model
*/
protected $model;
/**
*
*/
public function __construct()
{
$this->model = $this->resolveModel();
}
public fu... | true |
6ac872220ebd3de6349afc7e9372fa34e1e946a4 | PHP | designitgmbh/monkeyTables | /src/Factory/Factory.php | UTF-8 | 542 | 2.625 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace Designitgmbh\MonkeyTables\Factory;
class Factory
{
private static $modelNamespace = "App\\Models\\";
protected static function getFullClassName($shortClassName)
{
$className = self::$modelNamespace . $shortClassName;
if (!class_exists($className)) {
$className =... | true |
d45fe9c375a7814213d80b861dc1aadec24e213d | PHP | PROGRAMADORFSABA/SOMVC | /App/Models/DAO/MarcaDAO.php | UTF-8 | 2,474 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Models\DAO;
use App\Models\Entidades\Marca;
class MarcaDAO extends BaseDAO
{
public function listar($codMarca = null)
{
if ($codMarca) {
$resultado = $this->select(
"SELECT * FROM marca WHERE marcacod = $codMarca "
);
$dado = $... | true |
a77f0782b7a9231694122be03ac17a228e4d719c | PHP | viashop/admin_cake | /app_application/src/AppVialoja/Model/ClienteConvite.php | UTF-8 | 4,430 | 2.734375 | 3 | [] | no_license | <?php
/**
* @copyright Vialoja (http://vialoja.com.br)
* @author William Duarte <williamduarteoficial@gmail.com>
* @version 1.0.1
* Date: 21/10/16 às 23:22
*/
use AppVialoja\Interfaces\Model\IClienteConvite;
class ClienteConvite extends AppModel implements IClienteConvite
{
public $name = 'ClienteConvite';
pu... | true |
a635325a0b9599a038507124785de64510d59585 | PHP | vietpn/coccoc_blog | /models/UserModel.php | UTF-8 | 772 | 2.96875 | 3 | [] | no_license | <?php
class UserModel extends DbModel
{
public $id;
public $username;
public $password;
public $date_created;
public function __construct()
{
parent::__construct();
}
/**
* @inheritdoc
*/
public static function tableName()
{
return 'user';
}
... | true |
c8629a3aa82160619df9478700bb2c850627ce92 | PHP | eddymio/rhm-accounting | /module/MyJournal/src/Service/Factory/JournalManagerFactory.php | UTF-8 | 739 | 2.6875 | 3 | [] | no_license | <?php
namespace MyJournal\Service\Factory;
use Interop\Container\ContainerInterface;
use MyJournal\Service\JournalManager;
/**
* This is the factory class for JournalManager service. The purpose of the factory
* is to instantiate the service and pass it dependencies (inject dependencies).
*/
class JournalManagerFa... | true |
3b5c1482d9c52791495ed5b5f0a7c52aa1d37f74 | PHP | CarmaSys/CarmaLinkSDK | /PHP/lib/ReportConfig.php | UTF-8 | 10,124 | 2.6875 | 3 | [] | no_license | <?php
namespace CarmaLink;
/**
* Represents a CarmaLink configuration.
*
* @class ReportConfig
*/
class ReportConfig {
const API_THRESHOLD = "threshold";
const API_ALLOWANCE = "allowance";
const API_LOCATION = "location";
const API_BUZZER = "buzzer";
const API_DELET... | true |
dabc364d99115d16f230e4a1e9873ece5b4f2e1e | PHP | superhero2007/slim_cms | /slim_cms_frontend/system/cron/followup.job.php | UTF-8 | 11,775 | 2.84375 | 3 | [] | no_license | <?php
/*
This code is executed every 10 minutes of every day as a CRON job
There are 6 options for the cron jobs:
1) Email - This emails a teplated email to the client
2) Call - Emails a notice to the account owner (if there is no account owner it emails to info@greenbizcheck.com)
3) Head Office - Emails a notice to... | true |
f3a05484bb7983218f7f4231998d89c055af0bc5 | PHP | xionghuimin/Cybersecurity-learning-materials | /代码审计/php代码审计/PHP代码审计分段讲解(很基础详细)/11 sql闭合绕过.php | UTF-8 | 769 | 2.796875 | 3 | [] | no_license | <?php
if($_POST[user] && $_POST[pass]) {
$conn = mysql_connect("*******", "****", "****");
mysql_select_db("****") or die("Could not select database");
if ($conn->connect_error) {
die("Connection failed: " . mysql_error($conn));
}
$user = $_POST[user];
$pass = md5($_POST[pass]);
//select user fr... | true |
42dc611eb0b7cd492660ae5ec5224bb009ae87ce | PHP | AleioD/EjercicioSQL0627 | /series.php | UTF-8 | 572 | 3.109375 | 3 | [] | no_license | <?php
require_once "conection.php";
$stmt = $db->prepare("SELECT title, id FROM series");
$stmt->execute();
$series = $stmt->fetchAll(PDO::FETCH_ASSOC);
?>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>Series</title>
</head>
<body>
<div class="">
<... | true |
f9dbe243552d088f8f4d4fc48928bc9aec589106 | PHP | betopinheiro1005/curso-php-85bits | /aula-19/aula-19b.php | UTF-8 | 560 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
$dll = new \SplDoublyLinkedList();
$dll->push("laranja");
$dll->push("banana");
$dll->push("limão");
$dll->push("maçã");
$dll->push("uva");
$dll->push("abacaxi");
echo "Cabeça: ". $dll->bottom(). "<br/>";
echo "Cauda: ". $dll->top(). "<br/>";
$prev = null;
$dll->rewind(); //rebobinando
while ($dll->valid()) ... | true |
e63fcdb4c2b982e671914101613b672f8d342d6c | PHP | asasouza/dalloglio-mvc-framework | /app.widgets/Element.class.php | UTF-8 | 1,188 | 3.453125 | 3 | [] | no_license | <?php
class Element{
private $name;
private $class;
private $properties;
protected $children;
public function __construct($name, $class = NULL){
$this->name = $name;
$this->class = $class;
}
public function __set($name, $value){
$this->properties[$name] = $value;
}
public function setClass($class){
... | true |
eeebf7a91b2490e28e9dad297f1bdab2444edc35 | PHP | fwbadsoden/fw_bs_on_fuel | /fuel/application/models/Pressarticles_model.php | UTF-8 | 4,440 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
require_once('abstract_module_model.php');
class PressArticles_model extends Abstract_module_model {
public $required = array('name', 'source_id', 'datum', 'category_id');
public $foreign_keys = array('source_id' => 'pressarticle_s... | true |
eedc49851b846004e51ad6040972d88969061792 | PHP | WATARAI-IF/lib | /office/PhpPresentation/Writer/PowerPoint2007/AbstractLayoutPack.php | UTF-8 | 4,639 | 2.609375 | 3 | [] | no_license | <?php
/**
* This file is part of PHPPresentation - A pure PHP library for reading and writing
* presentations documents.
*
* PHPPresentation is free software distributed under the terms of the GNU Lesser
* General Public License version 3 as published by the Free Software Foundation.
*
* For the full cop... | true |
80506081d8698e320022bfcd6de999a95afd2b83 | PHP | aloiluca/innovation | /partials/functions.php | UTF-8 | 13,753 | 3.359375 | 3 | [] | no_license | <?php
/**
* Questa funzione riceve 4 parametri di tipo stringa ed esegue la connessione al database:
*
* 1. Esegue la connessione all HostServer.
* 2. Si connette al database richiesto.
*
* - in caso di successo restituisce un oggetto di tipo mysqli.
* - in caso di fallimento restituisce false.
*
* @param str... | true |
eef0bb12ed632619e2924b393333fe10e571dba9 | PHP | ztavruz/MenOfFuture | /game/Galaxi/Albion/Albion.php | UTF-8 | 648 | 2.9375 | 3 | [] | no_license | <?php
namespace Game\Galaxi\Albion;
use Game\Galaxi\Galaxi;
class Albion extends Galaxi
{
// protected $name;
// protected $description;
// protected $position;
// protected $arraySistems = [];
// protected $arrayData = [];
public function __construct()
{
$this->name = "Альбион";
... | true |
d87b88d6e934b66949ab34c667c42c94425fa63d | PHP | phpclassic/php-shopify | /lib/CurlRequest.php | UTF-8 | 5,472 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* @author Tareq Mahmood <tareqtms@yahoo.com>
* Created at 8/17/16 2:50 PM UTC+06:00
*/
namespace PHPShopify;
use PHPShopify\Exception\CurlException;
use PHPShopify\Exception\ResourceRateLimitException;
/*
|-------------------------------------------------------------------------... | true |
aa56678c7058726cfd4e8e5c8153edf739774e14 | PHP | Selim-Reza-Swadhin/Image_Upload_PHP | /insert_image.php | UTF-8 | 766 | 2.640625 | 3 | [] | no_license | <?php
include 'inc/header.php';
include 'lib/config.php';
include 'lib/Database.php';
$db = new Database();
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$permited = array('jpg', 'jpeg', 'png', 'gif');
$file_name = $_FILES['image']['name'];
$file_size = $_FILES['image']['size'];
$file_temp = $_FILES['i... | true |
9689074aed5ca5338da5ecc4b268969c6d50edb2 | PHP | mraycheva/photo-albums-manager | /photo/sql/get-all.php | UTF-8 | 336 | 2.703125 | 3 | [] | no_license | <?php
require_once(__DIR__ . '/../../base/sql/execute-statement.php');
function getAll()
{
$id = $_GET["id"];
$sql = 'SELECT * FROM photo WHERE album_id = ' . $id . ' ORDER BY id';
$res = execute($sql);
$photos = array();
while ($row = $res->fetch_assoc()) {
$photos[] = $row;
}
re... | true |