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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
f6ff94d1e9ca0cd74eba2618909fe4ba5e133eb1 | PHP | erkineren/webservice-skeleton | /src/Database/Adapter/IAdapter.php | UTF-8 | 440 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Database\Adapter;
interface IAdapter
{
public function getTable(): string;
public function find($columns = ['*'], IFilter $filter = null): array;
public function findAll($columns = ['*'], IFilter $filter = null): array;
public function delete(IFilter $filter = null): bool;
... | true |
2ea6dd4ef8838171ccf53f2b6c8d7cae86aba105 | PHP | sayghteight/Caranille | /administration/items/deleteItemEnd.php | UTF-8 | 2,791 | 2.859375 | 3 | [
"CC-BY-4.0",
"CC-BY-3.0"
] | permissive | <?php
require_once("../html/header.php");
//S'il n'y a aucune session c'est que le joueur n'est pas connecté alors on le redirige vers l'accueil
if (empty($_SESSION)) { exit(header("Location: ../../index.php")); }
//Si le joueur n'a pas les droits administrateurs (Accès 2) on le redirige vers l'accueil
if ($accountAc... | true |
8a413cb9a4006ee77b321f3abdd08a8278ced25e | PHP | dev0x13/roxifi | /protected/controllers/EventsController.php | UTF-8 | 8,516 | 2.515625 | 3 | [] | no_license | <?php
class EventsController extends Controller {
public $defaultAction = 'EventsList';
public function filters()
{
return array(
'accessControl', // perform access control for CRUD operations
'postOnly + delete', // we only allow deletion via P... | true |
5ea09836479792f6d7996b0dee7650fd22e23097 | PHP | juanRabaa/rb-wp-framework | /modules/fields/inc/RB_Form_Field_Controller-Deprecated.php | UTF-8 | 25,425 | 2.90625 | 3 | [] | no_license | <?php
// =============================================================================
// SINGLE
// =============================================================================
class RB_Single_Field{
public $id;
public $settings = array();
public $type = 'RB_Input_Control';
public $value = '';
pub... | true |
1eaf99164cbec65c66c26cd70bfab79ae2b3251e | PHP | willsantos/PHP-symfony-Alura | /src/Helper/EntityFactoryInterface.php | UTF-8 | 114 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Helper;
interface EntityFactoryInterface
{
public function makeEntity(string $json);
} | true |
059e7e07e66a996069c16c27fdc8027d3ee2513b | PHP | adachigit/BlueFrog-Cocos2dx | /bin_luajit/lib/quick/ScriptsCompiler.php | UTF-8 | 14,937 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
require_once(__DIR__ . '/init.php');
require_once(__DIR__ . '/xxtea.php');
class ScriptsCompiler
{
const COMPILE_ZIP = 'zip';
const COMPILE_FILES = 'files';
const COMPILE_C = 'c';
const ENCRYPT_XXTEA_ZIP = 'xxtea_zip';
const ENCRYPT_XXTEA_CHUNK = 'xxtea_chunk';
const ENCRYPT_XXTEA_DEFAUL... | true |
d823e48e08905ed34376920ae13b3d40e58a0cb8 | PHP | unckleg/ForceCMS | /lib/ForceCMS/Exception/PermissionException.php | UTF-8 | 181 | 2.515625 | 3 | [] | no_license | <?php
namespace ForceCMS\Exception;
class PermissionException extends \Exception
{
public static function denied()
{
return new self('Permission denied.');
}
} | true |
03b4215a54c67acce42f47caefe818fc1b138de2 | PHP | turistik75rus/projects | /leadermac/app/Http/Controllers/Frontend/CustomerController.php | UTF-8 | 3,812 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Frontend;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Customer;
use App\Models\Product;
class CustomerController extends Controller {
public function getIndex(Request $request) {
if (\Request::url() != 'http://www.zavodko... | true |
7cf8e71e10a0641e0bfa4c1b8b99fa15772e1dc8 | PHP | tewalds/homelessmanual | /www/pages/account.php | UTF-8 | 3,625 | 2.609375 | 3 | [] | no_license | <?
function login($data, $user){
$user = createsession($data['email'], $data['password'], ($data['longsession'] ? 86400*30 : 86400));
if($user->userid){
if($data['ref'])
redirect($data['ref']);
else
redirect("/");
}
if($data['email'])
echo "Login failed, try again";
$ref = $data['ref'];
$email =... | true |
087711bbf124d80988ff58428d5e48b13f045174 | PHP | leonarita/PHP | /10-Exercícios/1-Classe_Pessoa.php | UTF-8 | 620 | 3.78125 | 4 | [] | no_license | <?php
class Pessoa {
private $nome;
private $idade;
private $sexo;
public final function fazerAniversario () {
$this->idade ++;
}
function __construct ($n, $i, $s) {
$this->nome = $n;
$this->idade = $i;
$this->sexo = $s;
}
public function getNome () {
return $this->nome;
}
pub... | true |
6121a670680a281b391effea05962f6772a07067 | PHP | taeNero/ADAp | /final/src/search/user.php | UTF-8 | 3,533 | 2.578125 | 3 | [] | no_license | <?php
require_once __DIR__ . '/../../inc/account.php';
require_once __DIR__ . '/../../inc/database.php';
require_once __DIR__ . '/../../inc/user.php';
$pdo = Database::getInstance();
if (isset($_REQUEST['account'])) {
if (User::getType() == User::TYPE_ADMIN)
$sql = "select * from users where username like ?";
... | true |
4ba02822f63118c9f789b64b40ddc5ab8091ec78 | PHP | Afqamitech/p101 | /app/Models/Store.php | UTF-8 | 644 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Store extends Model
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'link','offer_line','image','status'
];
public function storeCatego... | true |
a31e385a71a3f896735f6d7386c4ab545e8e4131 | PHP | Cheer-313/Hackerrank | /CountApplesAndOranges.php | UTF-8 | 658 | 3.609375 | 4 | [] | no_license | <?php
function countApplesAndOranges($s, $t, $a, $b, $apples, $oranges) {
// Write your code here
// Write your code here
$result = [];
$count = 0;
foreach ($apples as $_apple) {
# code...
$position = $a + $_apple;
if(($position >= $s) && ($position <= $t)){
... | true |
169d39c4f9bc08974c0e2897502055745cd68e63 | PHP | lmponceb/aform | /module/Formulario/src/Formulario/Model/Pais.php | UTF-8 | 321 | 2.640625 | 3 | [] | no_license | <?php
namespace Formulario\Model;
class Pais
{
public $pai_id;
public $pai_nombre;
public function exchangeArray($data)
{
$this->pai_id = (isset($data['pai_id'])) ? $data['pai_id'] : null;
$this->pai_nombre = (isset($data['pai_nombre'])) ? $data['pai_nombre'] : null;
}
... | true |
f27dcb177b9637c94d9fec7735b9006584477a96 | PHP | IgorXsky/myblog | /src/BlogBundle/Controller/UserController.php | UTF-8 | 1,190 | 2.546875 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace BlogBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Session\Session;
class UserController extends Controller
{
public function loginAction(Request $request)
{
if ($request->ge... | true |
366e15a429a035d2ead3904226b6e2f34bff3b6c | PHP | Jony-dev/Group22--Del-8-Handed-In-Version | /Repository/Team.php | UTF-8 | 9,775 | 2.71875 | 3 | [] | no_license | <?php
require_once "./Department.php";
require_once "./Notification.php";
function getAllTeams($user){
$db = db::getConnection();
$query = "SELECT * FROM team";
$result = $db->query($query);
$teams = [];
while( $record = $result->fetch_object())
{
if($record->deleted == false)
... | true |
47f2ca8c2d20a93ac365f8c1137f242e2a4846fa | PHP | alignalghii/SVG-binarizer-JS-per-bash | /Router.php | UTF-8 | 552 | 3.03125 | 3 | [] | no_license | <?php
require_once 'Controller.php';
class Router
{
public function __construct(string $method, array $queryData, string $postBody, Controller $controller)
{
$this->controller = $controller;
$this->method = $method;
$this->queryData = $queryData;
$this->postBody = $postBody;
}
public function run(... | true |
64e1bbb47afb45e71398f64b3a8936b5f4eef06c | PHP | idrisoracleng/paysmosmophp | /application/views/layouts/product/product_rating.php | UTF-8 | 583 | 2.546875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
$avg_rating = $this->db->where('product_id', $product_id)->select('AVG(rate) as avg_rating')->from('product_rating')->get()->row()->avg_rating;
?>
<div class="rating">
<div class="rating-box">
<?php $i = 0; while($i < 5){ ?>
<?php if ($avg_rating > $i) { ?>
<span ... | true |
212d92d93dd48c5489d5936eb17a4a21dca5d270 | PHP | LeoBessa403/atacadaobessa | /library/Helpers/FormAssistente.class.php | UTF-8 | 6,302 | 2.71875 | 3 | [] | no_license | <?php
/**
* FormAssistente.class [ HELPER ]
* Classe responável por gerar formulários Assistentes!
*
* @copyright (c) 2014, Leo Bessa
*/
class FormAssistente extends Form
{
public function CriaInpunt()
{
// VALIDA CAMPOS OCUILTOS
if (self::$type != "hidden"):
// VERIFICA SE TEM... | true |
123cea3e1d8ebe6425513ceca628968c47d3050d | PHP | codeages/biz-item-bank | /src/Answer/Service/AnswerService.php | UTF-8 | 1,650 | 2.53125 | 3 | [] | no_license | <?php
namespace Codeages\Biz\ItemBank\Answer\Service;
interface AnswerService
{
const ANSWER_RECORD_STATUS_DOING = 'doing';
const ANSWER_RECORD_STATUS_PAUSED = 'paused';
const ANSWER_RECORD_STATUS_REVIEWING = 'reviewing';
const ANSWER_RECORD_STATUS_FINISHED = 'finished';
/**
* 开始答题
... | true |
fbfcbc737d83f1f58d8390d50a4f511ee6c5a4d4 | PHP | halay08/elite-wp | /wp-content/themes/ecademy/inc/template-functions.php | UTF-8 | 34,248 | 2.53125 | 3 | [] | no_license | <?php
/**
* Functions which enhance the theme by hooking into WordPress
* @package eCademy
*/
/**
* Adds custom classes to the array of body classes.
*/
if ( ! function_exists( 'ecademy_body_classes' ) ) {
function ecademy_body_classes( $classes ) {
// Adds a class of hfeed to non-singular pages.
if ( ! is_s... | true |
6dce3e449b89af644cdfd1348c8663e042b8b6cb | PHP | mouhamed-gaye/projet | /Exercice4/index.php | UTF-8 | 2,242 | 2.78125 | 3 | [] | no_license | <?php
require_once"fonction.php";
$phrase="";
$texte="";
if(isset($_POST['resultat'])){
if(is_empty($_POST['textarea'])){
$error="Veuillez saisir un texte svp !!!";
}else{
$texte=$_POST['textarea'];
$phrase=decoupe_texte($texte);
}
}
#var... | true |
e90a7714121e46bc31efddf6c7f52fc67687ac10 | PHP | wangjulong/qlc | /models/Kjh.php | UTF-8 | 3,868 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Snoopy\Snoopy;
use Yii;
use yii\db\ActiveRecord;
/**
* This is the model class for table "kjh".
*
* @property integer $qh
* @property integer $n1
* @property integer $n2
* @property integer $n3
* @property integer $n4
* @property integer $n5
* @property integer $n6
* @proper... | true |
64fd44a8b1f0a954870a49602a4f874c53c0a592 | PHP | itsjeffro/deploy | /src/Deployment/Processes.php | UTF-8 | 3,004 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Deploy\Deployment;
use Deploy\Models\Project;
use Deploy\Models\Deployment;
use Deploy\Models\Process;
class Processes
{
/**
* @var array
*/
public $actions;
/**
* @var \Deploy\Models\Deployment
*/
public $deployment;
/**
* @var \Deploy\Models\Project
... | true |
32908d70e4e76cdd973fcc14563444f89f4cc6c9 | PHP | jcooke22/DataAggregator | /src/Repository/AggregateInterface.php | UTF-8 | 515 | 2.734375 | 3 | [] | no_license | <?php
namespace DataAggregator\Repository;
use DataAggregator\Entity\Aggregate as AggregateEntity;
interface AggregateInterface
{
/**
* @param int $unitId
* @param int $hour
* @param string $metric
*
* @return AggregateEntity
*/
public function findByUnitIdHourMetric(int $unitI... | true |
d4b698154ebba47b29330c8f13461467e87a3e0f | PHP | ocna/sts-database | /application/src/STS/Domain/Survey/Response/SingleResponse.php | UTF-8 | 358 | 2.65625 | 3 | [] | no_license | <?php
namespace STS\Domain\Survey\Response;
use STS\Domain\Survey\AbstractResponse;
class SingleResponse extends AbstractResponse
{
protected $responseValue;
public function __construct($responseValue)
{
$this->responseValue = $responseValue;
}
public function getResponse()
{
... | true |
db44b736fec231f09363d7b3be988b3c9023b397 | PHP | DesafioDoCodigo/desafio-do-codigo | /public/mautic_get_token.php | UTF-8 | 3,987 | 2.640625 | 3 | [] | no_license | <?php
// When opened, this file will redirect you to mautic auth, and then back to your
// $callback URL with state and code values.
// Copy params on URL and post on that .php file again to see the access_token
// and other things
// Must be set
$settings = require __DIR__.'/../app/settings.php';
$callback = $setti... | true |
9ea61a06aed8a72090d46e8535bc7c2974fd4d7f | PHP | JuliuszUrbanski/VideoRentalManagement | /search.php | UTF-8 | 568 | 2.53125 | 3 | [] | no_license | <?php
$dbHost = 'localhost';
$dbUsername = 'user';
$dbPassword = 'password';
$dbName = 'database';
//connect with the database
$db = new mysqli($dbHost,$dbUsername,$dbPassword,$dbName);
//get search term
$searchTerm = $_GET['term'];
//get matched data from skills table
$query = mysqli_query($db, "SELECT * FROM users WH... | true |
bfe2aff2d6d8a3a13f29750499b99e80c1d0e702 | PHP | leandroph/Aplicacao-Cordis-Web | /php/negocio/class/NotificacaoSms.php | UTF-8 | 677 | 2.71875 | 3 | [] | no_license | <?php
class NotificacaoSms
{
/**Declaração de propriedade */
private $id_notificacao;
private $api_key;
/**
* Get the value of api_key
*/
public function getApi_Key()
{
return $this->api_key;
}
/**
* Set the value of api_key
*
* @return self
*/
public function setApi_Key($api_key)
{
$this... | true |
1a4504717a04155417f8e7c4efbd476cbae225a0 | PHP | DeprecatedCode/xcoin | /index.php | UTF-8 | 13,423 | 2.8125 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<title>xCoin.us — a safe and effective virtual currency</title>
<style>
body, input {
font-family: Tahoma, "Lucida Grande", Ubuntu, Sans, sans-serif;
font-size: 14px;
color: #333;
}
p {
margin: 0.5em 0;
... | true |
abfbd48b69c427bee38bce54f9f0838ebd713f93 | PHP | dehao/tw_ly_cassandra_db | /doc-gen/dynamic/AutoComplete/AutoComplete/GetCountAutoComplete.php | UTF-8 | 3,566 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
//////////
/// # MEMO
/// 算有多少個.<br />
/// <br />
///
///
/// [MORE] <ul><li>[中文(傳統)] GetCount</li></ul>
///
/// # Params
/// @param [(0)!in] &$params <ul><li>type: hash</li><li>[中文(傳統)] 其他額外的 params, 如果沒有的話. 要傳 ... | true |
2b68feb0bc47dcf481fc25155666c64e8d17c5bc | PHP | Bckyferris/Omeka_Twitter_Plugin | /Twitter/models/TwitterImport/RowIterator.php | UTF-8 | 7,408 | 3.1875 | 3 | [] | no_license | <?php
/**
* TwitterImport_RowIterator class
*
*/
class TwitterImport_RowIterator implements SeekableIterator
{
private $_filePath;
private $_handle;
private $_currentRow;
private $_currentRowNumber;
private $_valid = true;
private $_skipInvalidRows = true;
private $_skippedRowCount... | true |
81349e8278d4654e2c72d50aa07a5131b130be48 | PHP | JanisLocmans/crudtest | /app/Libraries/CRUDPostClass.php | UTF-8 | 1,659 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Libraries;
use App\Post;
use App\User;
class CRUDPostClass {
private $post;
private $user;
function __construct(Post $post, User $user) {
$this->post = $post;
$this->user = $user;
}
public function create($data) {
//return $data;
... | true |
b09bc62bd07d0021657efb47c78e9957d19b82b8 | PHP | wmhfly/Micro-web | /Micro/lib/HttpSession.php | UTF-8 | 1,143 | 3.125 | 3 | [] | no_license | <?php
/**
* http session类
* Micro.lib.HttpSession
* ~~~~~~~~~~~~~~~~~~~~~~
* @author Wu Miao Hui <363539981@qq.com>
* @link http://www.wmhfly.com/
* @version 1.0
*/
class HttpSession {
/**
* 构造函数
*/
public function __construct(){
@session_start();
}
/**
* 释放和销毁 session
*/
public function destr... | true |
ffb979d71852fb5c0a4c7aafa34e1dff22b89008 | PHP | DanielLiberato/menew-teste1 | /app_agenda/privado/conexao.php | UTF-8 | 529 | 2.96875 | 3 | [] | no_license | <?php
class Conexao{
private $host = 'localhost';
private $dbname = 'db_agenda';
private $usuario = 'root';
private $pass='';
public function conectar(){
try{
$conexao = new PDO(
'mysql:host='.$this->host.';dbname='.$this->dbname.'',
... | true |
2db6be047ad2be2131e8c35a5a878b7ea287647c | PHP | haoshuncheng/scripts | /init_projects/yaf_pj/application/library/SmtConst.php | UTF-8 | 369 | 2.5625 | 3 | [] | no_license | <?php
/**
*
* 常量定义
*
* @author Smart Lee <ismtlee@gmail.com>
* @version $Revision 2.0 2012-11-2 下午4:15:55
*/
class SmtConst {
/** 权限 */
public static $role = array('admin' => 1, 'reader' => 2, 'company' => 3);
/** 错误类别 - 返回客户端 */
const CODE_FAILURE = 0;
const CODE_ERROR_OFFLINE = -1;
const... | true |
bc3567cc0a53621249052d7c4edb3218fda12063 | PHP | Kuboooo/DuskiPlsCheck | /Student.php | UTF-8 | 897 | 3.5625 | 4 | [] | no_license | <?php
namespace homework;
include("Person.php");
class Student extends Person
{
private $currentStudyYear;
/**
* Student constructor.
* @param $currentStudyYear
* @param $firstName
* @param $lastName
*/
public function __construct($currentStudyYear, $firstName, $lastName)
{
... | true |
71c20de2c8673bc404b4296547cae2cc21847a19 | PHP | YosephHailu/award | /app/Models/User.php | UTF-8 | 1,978 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Relations\HasOne;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
... | true |
6a3cbf9337b5fc1ce3131cc0bf5168dcbdb9172c | PHP | tarushjreddy/Tourism-Website-PHP | /main.php | UTF-8 | 5,464 | 2.578125 | 3 | [] | no_license | <?php
$insert = false;
if (isset($_POST['name'])) {
// Set connection variables
$server = "localhost";
$username = "root";
$password = "";
// Create a database connection
$con = mysqli_connect($server, $username, $password);
// Check for connection success
if (!$con) {
die("con... | true |
278d2839f0ac9bae1caef3240eda86241b407d31 | PHP | CHN-MuXin/hyperf-api | /app/Process/TimedTaskProcess.php | UTF-8 | 2,688 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Process;
use App\Model\Setting\TimedTask;
use App\Model\Setting\TimedTaskLog;
use Hyperf\Process\AbstractProcess;
use Hyperf\Process\Annotation\Process;
/**
* 监听Ws的链接情况
* Class TimedTaskProcess
* @Process(name="timed_task")
* @package App\Process
* @Author YiYuan-Lin... | true |
d39148ab7c6aece6b9a7f9a6a7993886e04f0648 | PHP | solvire/php-hypermedia-api | /src/API/JSONSchema/Auth.php | UTF-8 | 483 | 2.734375 | 3 | [] | no_license | <?php
namespace Solvire\API\JSONSchema;
/**
* Represents the list of Auth types that can be presented by this schema.
*
* The Auth itself should have the scopes or their reference
*
* @author solvire <info@scotttactical.com>
* @package JSONSchema
* @namespace Solvire\API\JSONSchema
*/
class Auth
{
protect... | true |
4598c702f5c10f529b3eb86036d0ae38413ccd5c | PHP | rhe89/adte1700 | /Obliger/Oblig2/php/sqlHandling.php | UTF-8 | 8,947 | 2.8125 | 3 | [] | no_license | <?php
/*
* Denne php-filen tar seg av all interaksjon med databasen.
*/
function getDBConnection() {
$servername = "localhost";
$username = "root";
$password = "root";
$dbName = "SkiWorldCup";
$conn = new mysqli($servername, $username, $password, $dbName) or die();
if ($conn->connect_error) {
error... | true |
801d060faddcc2c3f79bd769f7aa2adddc130e25 | PHP | CanellesBorrell/projecte_act | /application/controllers/Login.php | UTF-8 | 2,146 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Login extends CI_Controller {
function __construct() {
parent::__construct();
$this->load->database(); // Carreguem la base de dades
$this->load->helper('url');
$this->load->model('Modelo_usuarios');
... | true |
bb9ace424b9047f2b6af5d89d27e385a10258175 | PHP | sa-well-ev/learnyii | /models/Category.php | UTF-8 | 562 | 2.703125 | 3 | [] | no_license | <?php
namespace app\models;
use yii\db\ActiveRecord;
class Category extends ActiveRecord
{
public static function tableName()
{
return 'Categories';
}
/** Создаём связь один ко многим с таблицей products
* имя метода - это наименование поля которое добавляется в модель Category для об... | true |
32ecbe6c58355004649c7a59c2d261575dfea297 | PHP | LynneKirsch/phpmud | /application/core/controller.php | UTF-8 | 733 | 2.84375 | 3 | [] | no_license | <?php
class Controller
{
public $db = null;
public $model = null;
function __construct($model = null)
{
$this->openDatabaseConnection();
$this->loadModel($model);
}
private function openDatabaseConnection()
{
$options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FE... | true |
1afd3067ca9406ec4870c38050dd090fede8f94d | PHP | mitchellmdoundle/lunch | /order.php | UTF-8 | 1,559 | 2.65625 | 3 | [] | no_license | <?php
session_start();
if ($_SESSION['Role']!=0)
{
header("Location:Login.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Order Food</title>
</head>
<body>
<br>
<form action="addtoorder.php" method="post">
Sandwich:
<select name = "sandwich">
<?php
include_once('connection.php');
$stmt = $conn->prepare("SELECT * f... | true |
0db22ddc90d60943e1c235331586019df0da1c32 | PHP | phpscr/phpsrc | /liuyanban/liuyanban/s_message.php | UTF-8 | 3,982 | 2.515625 | 3 | [] | no_license | <?php
/**
* Author: Cathy
*/
//定义常量ACCESS,用来对本页面授权访问include文件夹下的文件
define('ACCESS',true);
//定义一个常量来指定本页的脚本名称
define('SCRIPT', 'a_friend');
//定义常量IS_CONN,用来确定是否连接数据库
define('IS_CONN', true);
//引入公共的包含文件
require dirname(__FILE__).'/include/common.inc.php';
//判断是否登录了
if (!_is_login()) {
_alert_close('请先登录!');
}
//写留... | true |
bad377eabef9b057cf2f4ca9aa551a9c7db7c963 | PHP | rzamarripa/masegresos | /protected/models/UnidadOrganizacional.php | UTF-8 | 2,896 | 2.609375 | 3 | [] | no_license | <?php class UnidadOrganizacional extends CActiveRecord
{
/**
* Returns the static model of the specified AR class.
* @return UnidadOrganizacional the static model class
*/
public static function model($className=__CLASS__)
{
return parent::model($className);
}
/**
* @return string the associated databa... | true |
daa2ea68d7e88935e0e9594b602426437745b845 | PHP | Diego-on-c/Code_talent_ | /tests/Unit/SoloLearnScrapingTest.php | UTF-8 | 1,918 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Unit;
use App\Candidate;
use App\Course;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
use App\SoloLearnScraping;
class SoloLearnScrapingTest extends TestCase
{
use RefreshDatabase;
private $scrappedCourses;
private $scrapy;
public function setUp() :v... | true |
912d3d518f4265086f2797a3c7080a0e833a94f0 | PHP | symfony/symfony | /src/Symfony/Component/Semaphore/SemaphoreFactory.php | UTF-8 | 1,740 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\Semaphore;
use Psr\Log\LoggerAwareInterface;
use Psr\... | true |
b1ec2e2ba94d74353904ee749e84b16f22337d22 | PHP | ecegeek/hotcrp | /src/settings/s_topics.php | UTF-8 | 6,099 | 2.5625 | 3 | [
"BSD-3-Clause",
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | <?php
// src/settings/s_topics.php -- HotCRP settings > submission form page
// Copyright (c) 2006-2018 Eddie Kohler; see LICENSE.
class Topics_SettingRenderer {
static function render(SettingValues $sv) {
// Topics
// load topic interests
$result = $sv->conf->q_raw("select topicId, if(inte... | true |
3ae7ea7b7ee949bca1d0830ab1052604256f1ccc | PHP | Akramion/Parking | /app/Http/Controllers/carController.php | UTF-8 | 1,980 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\User;
use App\Place;
use Auth;
use Illuminate\Http\Request;
class carController extends Controller
{
public function leaveCar(Request $request) {
date_default_timezone_set('Asia/Yekaterinburg');
$date = new \DateTime();
$hours = $request->input... | true |
48e6bccc6cb9c3df6fff6a865526e75cbbfdae89 | PHP | gustavomontiel/cademis | /api/app/Http/Controllers/TasaPorDiaController.php | UTF-8 | 3,460 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\TasaPorDia;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
class TasaPorDiaController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
... | true |
48c986fcffe18be84e779dc12346b9f207d95bab | PHP | concrete5-community/maxmind_geolocator | /src/Concrete/Exception/InvalidProductIdException.php | UTF-8 | 857 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Concrete\Package\MaxmindGeolocator\Exception;
defined('C5_EXECUTE') or die('Access Denied.');
class InvalidProductIdException extends Exception
{
/**
* The invalid product ID.
*
* @var string|mixed
*/
protected $productId;
/**
* Initialize the instance.
*
... | true |
81e3c36005f93575379d2a39f6a7781640e05fb4 | PHP | AJHacker/wofm | /printUsers.php | UTF-8 | 842 | 2.921875 | 3 | [] | no_license | <center><h1>Users:</h1><center>
<?php
# This function reads your DATABASE_URL config var and returns a connection
# string suitable for pg_connect. Put this in your app.
function pg_connection_string_from_database_url() {
extract(parse_url($_ENV["DATABASE_URL"]));
return "user=$user password=$pass host=$host dbnam... | true |
c7662ac40528d93db5720f72ce205f8a6f8cb085 | PHP | BlackHawk94/syscrack | /src/Syscrack/Game/Softwares/Text.php | UTF-8 | 1,616 | 2.859375 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] | permissive | <?php
namespace Framework\Syscrack\Game\Softwares;
/**
* Lewis Lancaster 2017
*
* Class Text
*
* @package Framework\Syscrack\Game\Softwares
*/
use Framework\Syscrack\Game\BaseClasses\Software as BaseClass;
use Framework\Syscrack\Game\Structures\Software as Structure;
class Text extends BaseClass implements... | true |
b2463da571b41c44d7f8997a14aca767d60a64d8 | PHP | nkgrewal/nkgrewal.github.io | /sites/asd/charts/11-02 APSY Salary Map/comps/usMap/Temp/xmlMaker.php | UTF-8 | 1,982 | 3.015625 | 3 | [] | no_license | <?php
include '../../includes/asd_defaults.php';
header("Content-type: text/xml");
$arr = array( 0 );
// tripped allows us to have a smart opening + closing of <school> tags
$tripped = false;
$linkID = mysql_connect($host, $user, $pass) or die("Could not connect to host.");
mysql_select_db($database, $linkID) ... | true |
07b9f1ebfb498bfb3985af5cf5929c3fa2287fe7 | PHP | zhxjmdc/zhxjmdc2 | /1/Admin/Home/Model/WUserModel.class.php | UTF-8 | 2,854 | 2.6875 | 3 | [] | no_license | <?php
namespace Home\Model;
use Think\Model;
class WUserModel extends Model{
/**---------------------------------------------------------------------
* 用户是否存在
* @param string $openid 用户openid
* @return int 0不存在,-1查询出错,1存在
*
*/
public function is_exist_user($openid){
$user = ... | true |
6d01a9034ea9d45d5c5fabf887bc59791cc67740 | PHP | fanxiaohui/CookBook | /PHP/WebSite_Account_Activator_Email/notify-user.php | UTF-8 | 920 | 2.609375 | 3 | [] | no_license | <?php
//Connect
$db = new PDO('sqlite:users.db');
$email = 'david';
//Generate Validate Strong
$verify_string = '';
for($i = 0; $i < 16; $i++){
$verify_string .= chr(mt_rand(36,126));
}
//insert user into db
//!!! Uses SQLite specific Date/Time !!!
$sth = $db->prepare("INSERT INTO users " .... | true |
69c9ecdb36cdb65163d28f61abea9bba52a3f152 | PHP | leochenftw/goproperty | /mainsite/code/APIs/CreditcardAPI.php | UTF-8 | 2,428 | 2.59375 | 3 | [] | no_license | <?php
use Ntb\RestAPI\BaseRestController as BaseRestController;
use SaltedHerring\Debugger as Debugger;
/**
* @file SiteAppController.php
*
* Controller to present the data from forms.
* */
class CreditcardAPI extends BaseRestController {
private static $allowed_actions = array (
'post' => "->isAuthe... | true |
602085a473822067097ed51ada0b2804a672377f | PHP | zaprog/antlantic | /app/Http/Controllers/PropertyController.php | UTF-8 | 6,020 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Property;
use App\Callery;
use Illuminate\Support\Facades\Input;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Redirect;
use Validator;
use Mail;
use Storage;
class PropertyController extends Controller
{
/**
* Display a listing of the resource.
... | true |
d4109d5e6b5c4acea92fb52aade314c3471a21a1 | PHP | uBizzy/koseven-debug-toolbar | /classes/Kohana/DebugToolbar.php | UTF-8 | 8,702 | 2.84375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Koseven Debug Toolbar
*
* @author Aaron Forsander <http://grimhappy.com/>
* @author Ivan Brotkin (BIakaVeron) <BIakaVeron@gmail.com>
* @author Sergei Gladkovskiy <smgladkovskiy@gmail.com>
* @copyright since 2019 Koseven Team
*/
class Kohana_DebugToolbar {
/**
* Queries container
* @var array
... | true |
2168fc7c72d4c7c504584336f8b55ae0a2f13d72 | PHP | marcqualie/mongominify | /src/MongoMinify/Cursor.php | UTF-8 | 2,954 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace MongoMinify;
class Cursor implements \Iterator
{
public static $timeout = 20000;
public $collection;
public $native;
public $native_query = array();
public function __construct(Collection $collection, array $query = array(), array $fields = array())
{
$this->collect... | true |
84aba990b6f77881e369a942099a98f2b6090d4f | PHP | Xavier-Corbier/site-de-vente | /controller/ControllerPanier.php | UTF-8 | 2,093 | 2.546875 | 3 | [] | no_license | <?php
require_once File::build_path(array("model", "ModelCodePromo.php"));
require_once File::build_path(array("model", "ModelPanier.php"));
class ControllerPanier{
protected static $object = 'panier';
public static function add(){
ModelPanier::add();
header('Location: ./index.php?controller=Pan... | true |
e60cf162d0a005a710ac433c8a4b94c2490fd1bd | PHP | Irhia/proyectos_php-poo- | /Chollo/CHOLLO/web/listar_anuncio.php | UTF-8 | 2,702 | 2.734375 | 3 | [] | no_license | <?php
include_once '../app/Conexion.inc.php';
include_once '../app/Anuncio.inc.php';
include_once '../app/RepositorioAnuncio.inc.php';
include_once '../app/ValidadorAnuncio.inc.php';
Conexion :: abrir_conexion();
$anuncio = new Anuncio ();
$anuncio_insertados = RepositorioAnuncio :: obtener_todos_desc(Conexion :: o... | true |
8e594d4794a27634a58f72c3444137af7a2dfd61 | PHP | jdurham85/spiritlyft-v2 | /core/session_cookie_managerment.php | UTF-8 | 1,902 | 2.796875 | 3 | [] | no_license | <?php
namespace core;
/**
* .
* User: Jermaine Durham
* Date: 7/2/18
* Time: 9:18 AM
*/
class session_cookie_managerment
{
const LOGINED_IN = true;
const NOT_LOGINED = false;
public static function getMemberID()
{
return (config::$MEMID == "" ? $_SESSION['SessionMemberID'] : config::$MEMID);
//return ($_... | true |
2c91727610c549cabf0a5cd43039b9b69cd498ee | PHP | vsychov/paper-scissor-rock | /src/Tournament/PaperScissorRockTournament.php | UTF-8 | 2,213 | 3.15625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Tournament;
use App\Game\PaperScissorRockGame;
use App\Model\PaperScissorRockGameParticipate;
use App\Model\PaperScissorRockTournamentParticipate;
use App\Model\PaperScissorRockTournamentResult;
class PaperScissorRockTournament
{
/**
* @var PaperScissorRockGame
... | true |
9542ed6921a5c1926fa0c999b1426baf2a70ea6f | PHP | ThangPham44/PHP18 | /PHP18/EX09_MVC/models/Model.php | UTF-8 | 1,603 | 2.84375 | 3 | [] | no_license | <?php
include_once('Connection.php');
class Model{
var $conn;
var $table='';
var $primary_key='id';
function __construct(){
$connection_object = new Connection();
$this->conn=$connection_object->conn;
}
public function getAll(){
$query= "SELECT * FROM ".$this->table;
$result = $this->conn->query($... | true |
5f7c1f21de490e747391adff4c2f1ac3429929b7 | PHP | predis/predis | /src/Response/Iterator/MultiBulkTuple.php | UTF-8 | 2,298 | 2.96875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/*
* This file is part of the Predis package.
*
* (c) 2009-2020 Daniele Alessandri
* (c) 2021-2023 Till Krüss
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Predis\Response\Iterator;
use InvalidArgumentExceptio... | true |
94c537ebd2705be9b8b619a798a4c191636e7380 | PHP | Ar2s/booming_games_task | /PHP_solution/send.php | UTF-8 | 870 | 2.59375 | 3 | [] | no_license | <?php
require_once __DIR__ . '/vendor/autoload.php';
use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Message\AMQPMessage;
$connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest');
$channel = $connection->channel();
$channel->queue_declare('queue', fals... | true |
1ea1a4a5c568c99617aa868b4522eae353eac6ab | PHP | bono-cms/Slider | /Storage/MySQL/AttributeGroupMapper.php | UTF-8 | 1,715 | 2.53125 | 3 | [
"CC-BY-3.0"
] | permissive | <?php
/**
* This file is part of the Bono CMS
*
* Copyright (c) No Global State Lab
*
* For the full copyright and license information, please view
* the license file that was distributed with this source code.
*/
namespace Slider\Storage\MySQL;
use Cms\Storage\MySQL\AbstractMapper;
use Slider\Storage\Attri... | true |
09e5eab6bdf3391dc6a5c8843df0c6cacab59f1f | PHP | schritchfield/my_portfolio | /raindrop/cart.php | UTF-8 | 4,021 | 2.78125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<!-- this file is the container page for the cart code. -->
<head>
<title>Raindrop Pop - Cart - Ben Schritchfield</title>
<meta charset="utf-8">
<meta name="description" content="Store">
<link rel="stylesheet" type="text/css" href="styles.css">
<... | true |
c07942e951ee83e305627d0335a8154fe2233eca | PHP | CodingatTiffanys/HairSalonManagementTool | /login.php | UTF-8 | 1,025 | 2.765625 | 3 | [] | no_license | <?php
session_start(); // Starting Session
// Define $username and $password
$username=$_POST['username'];
$password=$_POST['password'];
// Establishing Connection with Server by passing server_name, user_id and password as a parameter
$dbconnect = mysqli_connect("localhost", "course_user", "0mROyfiLwC6CaGII");
// To ... | true |
2dbe3a86fadac40b7e6b5f5b385321ad85876589 | PHP | Rogonrodrigues3942/PHP_FUNCTION_CLASS | /GH_exp6_1.php | UTF-8 | 624 | 3.640625 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Create function</title>
</head>
<body>
<?php
function soma_valores($valor1, $valor2, $v... | true |
fe62ebea10eb04b80bfbd589b5b1cbec9c9915d9 | PHP | s4831823/gym | /CD104G3/connect_forum.php | UTF-8 | 303 | 2.546875 | 3 | [] | no_license |
<?php
$host = 'localhost';
$user = 'cd104g3';
$password = 'cd104g3';
$dbname = 'cd104g3';
$dsn = 'mysql:host='. $host . ';dbname='. $dbname .';charset=utf8';
$options = array(PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION, PDO::ATTR_CASE=>PDO::CASE_NATURAL);
$pdo = new PDO($dsn, $user, $password);
?>
| true |
c3b6a126b063de04b2a4ec8217395e2dff67a82f | PHP | skitzoo/panel | /src/Entity/Card.php | UTF-8 | 3,034 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ORM\Entity(repositoryClass="App\Repository\CardRepository")
*/
class Card
{
/**
* @ORM\Id()
... | true |
efccdd5d6694b3eb3e5ee92c3ac44611eaba2288 | PHP | apcloic/YetiForceCRM | /app/Zip.php | UTF-8 | 6,729 | 3 | 3 | [
"MIT"
] | permissive | <?php
/**
* A file archive, compressed with Zip.
*
* @copyright YetiForce Sp. z o.o
* @license YetiForce Public License 3.0 (licenses/LicenseEN.txt or yetiforce.com)
* @author Mariusz Krzaczkowski <m.krzaczkowski@yetiforce.com>
*/
namespace App;
/**
* Zip class.
*/
class Zip extends \ZipArchive
{
/**
... | true |
9b38a06cfdcea2995f95c9f36d1d3290451f7804 | PHP | venkatesh-creyate/All-Code | /resizeTo610.php | UTF-8 | 827 | 2.65625 | 3 | [] | no_license | <?php
$workingHandle= getcwd();
define('PRT', DIRECTORY_SEPARATOR);
$arrCurrPrev= array('.', '..', 'Thumbs.db');
function getArray($handle)
{
global $arrCurrPrev;
$arrHandle= array_diff(scandir($handle), $arrCurrPrev);
if(!isset($arrHandle))
{
$print= ' Cannot get array '."\n";
$print.= ' '.$ha... | true |
938a8281e0d0f23dd9a4b84f3fa4998686a88af9 | PHP | joesoftmwai/symfony-twig-symfapp | /src/Controller/ArticleController.php | UTF-8 | 2,800 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\Article;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\Extension\Cor... | true |
06151356ce6aeaade0b6ff3af48c932a5f1c9b05 | PHP | kadanin/fs | /FS.php | UTF-8 | 1,412 | 2.671875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Kadanin Artyom
* Date: 21.09.17
* Time: 13:24
*/
namespace kadanin\fs;
use Yii;
class FS
{
/**
* @param string $message Error message
* @param \kadanin\fs\OperationsOptions $operationsOptions
* @param array ... | true |
8c0bb10fe7ac5446d1f946e33d33b2f1752a6088 | PHP | ogsmelvin05/flare-php | /system/Flare/Helper/text.php | UTF-8 | 1,116 | 3.109375 | 3 | [] | no_license | <?php
if (!function_exists('one_space')) {
/**
*
* @param string $text
* @return string
*/
function one_space($text)
{
return preg_replace('/\s+/', ' ', $text);
}
}
if (!function_exists('title_case')) {
/**
*
* @author anthony
* @param string $string
... | true |
16c29bb6d9848a85ab7a839d310fd3d34a2ade43 | PHP | donmachadafarm/Daila-Capstone | /includes/Connect.php | UTF-8 | 621 | 2.546875 | 3 | [] | no_license | <?php
// $mysql_host = "localhost";
// $mysql_database = "burzillian";
// $mysql_user = "root";
// $mysql_password = "";
//
// $con = mysql_connect("$mysql_host","$mysqli_database","$mysql_user","$mysql_password");
// $status = 0;
//
// mysql_select_db("$mysql_database", $con);
//
// if (!$con)
// {
//
// die('Coul... | true |
9f4b9444362916a89a4bc04291ea8c87bcd10d27 | PHP | hendaryie/test | /laravel-skeleton/app/Console/Commands/RepositoryInterfaceCommand.php | UTF-8 | 865 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
class RepositoryInterfaceCommand extends BaseRepositoryCommand
{
/**
* The console command name.
*
* @var string
*/
protected $name = 'repo:repository-interface';
/**
* The name and signature of the console command.
*
* @var strin... | true |
d620e5f3efae5fe412e9e255d767bd506f85c6c5 | PHP | RanaFouad/project_zend | /ZendSFS/application/forms/Editprofile.php | UTF-8 | 3,557 | 2.5625 | 3 | [] | no_license | <?php
class Application_Form_Editprofile extends Zend_Form
{
public function init()
{
/* Form Elements & Other Definitions Here ... */
$userId = new Zend_Form_Element_Hidden('user_id');
// //-----------------------change user name ------------------------------------------------------... | true |
d0d8e919890ee781e7f76e71b3bb163bd2acc9a6 | PHP | madsushi/twilio-apps-php | /runcommand.php | UTF-8 | 769 | 2.59375 | 3 | [] | no_license | <?php
header("content-type: text/xml");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
$smsbody = $_POST['Body'];
$smsfrom = $_POST['From'];
//make sure the call is from me
if ($smsfrom == "+1805********"){
if ($smsbody == "test" || $smsbody == "Test"){
echo "<Response><Sms>Test completed.</Sms></Respon... | true |
1719fa64945df245585cf11e698f0a3e6d8a6ac4 | PHP | PocketBungee/PocketBungee | /src/pocketbungee/BungeePlayer.php | UTF-8 | 1,337 | 3.265625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace pocketbungee;
class BungeePlayer {
const DEFAULT_SERVER = "__DEFAULT__";
/** @var Bungee */
public $bungee;
/** @var string */
public $server;
/** @var int */
public $ip;
/** @var int */
public $port;
/** @var string */
public $username;
/**
* BungeePlayer con... | true |
91f7d5f50625f23d88a64ddbc446baf0b913f49c | PHP | papepapes/TodoApp_laravel_REST | /application/controllers/todo.php | UTF-8 | 3,000 | 2.953125 | 3 | [
"MIT",
"LicenseRef-scancode-dco-1.1"
] | permissive | <?php
/*
* Class Todo_Controller provide a basic todo CRUDing REST service
*
*/
class Todo_Controller extends Base_Controller {
/*
* set TRUE to define a REST controller
*/
public $restful = TRUE;
/**
* GET all todo resources
*/
public function get_index() {
$ext = 'json';
$header = 'application/j... | true |
701aa81c3f8ad97f14fcb0d0222621b000e6a72d | PHP | andreyAKor/otus_arch_project | /website/common/helpers/coin/CoinType.php | UTF-8 | 1,210 | 3.328125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace common\helpers\coin;
/**
* Class CoinType
* @package common\helpers\coin
*/
final class CoinType
{
/**
* Эфир
* @var integer
*/
public const ETH = 1;
/**
* Битки
* @var integer
*/
public const BTC = 2;
... | true |
e9c9ac84745d6c4129d86e082bb398f7e7d06275 | PHP | DiegoTBC/Estudos-PHP | /PHP Doctrine/src/Repository/AlunoRepository.php | UTF-8 | 814 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Alura\Doctrine\Repository;
use Doctrine\ORM\EntityRepository;
class AlunoRepository extends EntityRepository
{
public function buscaCursosPorAluno(bool $exibeCursos)
{
/*$em = $this->getEntityManager();
$dql = "SELECT a, t, c FROM Alura\\Doctrine\\Entity\\Aluno a JOIN a.tele... | true |
c0691c25609e6f85f896546b313812cdd58771a2 | PHP | btybug/frontend-test | /vendor/btybug/uploads/src/Models/StyleItems.php | UTF-8 | 4,083 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright (c) 2017.
* *
* * Created by PhpStorm.
* * User: Edo
* * Date: 10/3/2016
* * Time: 10:44 PM
*
*/
namespace Btybug\Uploads\Models;
use Illuminate\Database\Eloquent\Model;
use Btybug\btybug\Helpers\helpers;
/**
* Class StyleItems
* @package Btybug\Resources\Models
*/
class StyleIte... | true |
3f5c926e44fb119cee5cc2066a8e279813a2582f | PHP | AdamKyle/flare | /app/Game/Shop/Services/ShopService.php | UTF-8 | 3,660 | 2.734375 | 3 | [
"MIT",
"LicenseRef-scancode-free-unknown"
] | permissive | <?php
namespace App\Game\Shop\Services;
use App\Flare\Jobs\CharacterAttackTypesCacheBuilder;
use App\Flare\Models\Character;
use App\Flare\Models\Inventory;
use App\Flare\Models\InventorySlot;
use App\Flare\Models\Item;
use App\Game\Core\Services\EquipItemService;
use App\Game\Shop\Events\BuyItemEvent;
use App\Game\S... | true |
d6f18b72e2c46056dc801941214d6c05c94888f9 | PHP | winglechen/kyphp | /core/classes/ui/Com.php | UTF-8 | 1,145 | 2.546875 | 3 | [] | no_license | <?php
namespace Ky\Core\Ui;
use Ky\Core\Exception;
class Com
{
protected $id = '';
protected $loadEvent = 'alone'; // alone | suite
protected $loadType = 'sync'; // async | sync
protected $resources = array();
protected $config = array();
protected $tmpUrl ... | true |
33c36166c819a82d410b8fd989eeeda7613f099b | PHP | federosky/hsi-boards | /detail.php | UTF-8 | 3,688 | 2.5625 | 3 | [] | no_license | <?php
/**
*
*/
require_once(dirname(__FILE__).'/inc/config.inc.php');
/**
* DB Connection
*/
$db_connected = false;
if( $dbh = mysql_connect($db_data['host'],$db_data['username'],$db_data['password']) ){
$db_connected = true;
}
else{
$db_connected = false;
$error_str = 'Mysql error: Unable to connect. Verify da... | true |
00f6646302cd908e9a56aa141d7158d6e55407e5 | PHP | wongm/rail-history-cms | /plugins/rail-history-cms/listRaillineRegion.php | UTF-8 | 1,247 | 2.53125 | 3 | [] | no_license | <?php
$pageTitle = 'Region to Lineguide Mappings';
include_once("common/dbConnection.php");
include_once("common/header.php");
$sql = "SELECT * FROM railline_region, articles, raillines
WHERE railline_region.line_id = raillines.line_id AND railline_region.article_id = articles.article_id
ORDER BY articles.title, ... | true |
b6b402f1df5156e3ccc1f79377ef59508036ca11 | PHP | kn9ts/PrittyNote | /docs/canvastopng-prev.php | UTF-8 | 901 | 2.578125 | 3 | [] | no_license | <?php //RECEIVES THE CANVAS DATA SENT TO IT
set_time_limit(0);
session_start();
ini_set('memory_limit', '200M');
require('../need/config.php');
$images = glob("../dump/*.*");
$c = count($images);
//USER ID FROM COOKIE
$id = "jheneknights";
//RANDOM IMAGE NAMING
$rand = $c; //rand(1000,9999); //*****... | true |
debc47b7b8bf7183ac1819c7e27e8cb1969cdb22 | PHP | hulkofsky/minbizeed | /assets/themes/minbizeed/includes/mm-forms/mm-login.php | UTF-8 | 5,045 | 2.65625 | 3 | [] | no_license | <?php
/*
Plugin Name: MM Custom Login
Version: 2.0
Author: Maroun Melhem
Author URI: http://maroun.me
*/
// user login form
function mm_login_form()
{
if (!is_user_logged_in()) {
$output = mm_login_form_fields();
} else {
$output = __('You are already logged in');
}
return $ou... | true |
f1516369f3b2370989530776fff26bc2bcffd8b1 | PHP | crowoy/Network | /contact.php | UTF-8 | 2,746 | 2.6875 | 3 | [] | no_license | <?php
include 'core/init.php';
include 'includes/head.php'; ?>
<body>
<div class="body">
<?php
//Checking if all fields have been filled
if (empty($_POST) === false) {
//Check Email Exists
if (user_exists($_POST['recovery_email']) === false) {
$errors[] = 'This Email Address has not been registered. ... | true |
55ca99a10d62f88cad17e9265b8525d705a20c04 | PHP | algolia/algoliasearch-magento-2 | /Api/Data/LandingPageInterface.php | UTF-8 | 5,182 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Algolia\AlgoliaSearch\Api\Data;
/**
* Landing Page Data Interface
*
* @api
*/
interface LandingPageInterface
{
public const TABLE_NAME = 'algoliasearch_landing_page';
/**#@+
* Constants for keys of data array. Identical to the name of the getter in snake case
*/
public const... | true |
f58f3d7c57c24a5d9d18f89b674a203cd5515a60 | PHP | xuz0917/yaf_demo | /application/library/Session/Db.php | UTF-8 | 3,774 | 2.765625 | 3 | [] | no_license | <?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2014 http://thinkphp.cn All rights reserved.
// +---------------------------------------------... | true |
ac5ef7eb31eb13a72ecd27712dffbdf012d75484 | PHP | nikvs84/site-local | /www/calculator.php | UTF-8 | 2,053 | 3.484375 | 3 | [] | no_license | <?php
if (isset($_POST['calc'])) {
require_once 'lib/functions.php';
$n1 = $_POST['n1'];
$n2 = $_POST['n2'];
$operation = $_POST['operation'];
switch ($operation) {
case 'add':
$result = "$n1 + $n2 = ".add($n1, $n2);
break;
case 'sub':
$result = "$n1 - $n2 = ".sub($n1, $n2);
break;
... | true |