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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
f8d276b13ea825e4f0bff78799118b75e907c94f | PHP | liorchamla/mod-sf-04 | /02-dispatcher/index.php | UTF-8 | 1,322 | 2.734375 | 3 | [] | no_license | <?php
use App\Controller\ShopController;
use App\Dispatcher\EventDispatcher;
use App\Event\SaleEvent;
require_once __DIR__ . '/vendor/autoload.php';
$dispatcher = new EventDispatcher;
class StockEmail
{
public static function getSubscribedEvents()
{
return [
'sale' => 'sendEmailToStock',... | true |
81848c6950220b1f06b50d248ecd48b444d06be1 | PHP | myke91/HassLogistics | /app/User.php | UTF-8 | 1,458 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace HASSLOGISTICS;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'usern... | true |
16ab19b5c78d914d010017567527bf297ae10cb8 | PHP | ismahhaziq/barber | /admin/personal-admin.php | UTF-8 | 4,233 | 2.609375 | 3 | [] | no_license | <?php include('partials/menuadmin.php'); ?>
<div class="admin-content">
<h2 class="page-title">Personal Information</h2>
<?php
if(isset($_SESSION['update'])) {
echo $_SESSION['update'];
unset($_SESSION['update']);
... | true |
12d933bbb50ca260151918b7c948adc853206597 | PHP | brnocesar/test-CrossKnowledge | /request.php | UTF-8 | 1,994 | 2.640625 | 3 | [] | no_license | <?php
class SimpleJsonRequest
{
private static function makeCache(string $url, array $opts)
{
$redis = (new Name\Space\Redis())->connect($_ENV('REDIS_HOSTNAME'), $_ENV('REDIS_PORT'));
$key = "{$opts['http']['method']}_$url";
if ( $redis->exists($key) ) {
return $redis->get... | true |
a2ee5675a27ff78a47a7c194c7bf9a0fc83e85cb | PHP | LACountyAssessorITD/homeowners | /ainlookup.php | UTF-8 | 1,745 | 2.703125 | 3 | [] | no_license | <?php
include('LDAP/constants.php');
$serverName = SERVERNAME;
$uid = UID;
$pwd = PWD;
$databaseName = HOX_DATABASE;
$connectionInfo = array("UID"=>$uid,
"PWD"=>$pwd,
"Database"=>$databaseName);
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if($conn === false) {
echo "Could not connect.\n";
di... | true |
cc8d8852e6e7f55e043759e3fa0ab82278c07bc2 | PHP | dopeh/mantis-to-gitlab | /classes/GitlabProject.class.php | UTF-8 | 834 | 2.84375 | 3 | [] | no_license | <?php
class GitlabProject extends GitlabBaseClass
{
public $id;
public function __construct()
{
$this -> query = "SELECT * FROM `projects` WHERE `id` = :Id LIMIT 1";
$this -> where = array(':Id' => $this -> id);
}
public function getProject()
{
return GitlabProject::g... | true |
533b4ebb0b941b8103e7a0763e54f7d25a25749b | PHP | Kazuki-Maehara/web-database | /edit_data.php | UTF-8 | 2,852 | 2.890625 | 3 | [] | no_license | <?php
require_once("db_head.php");
?>
<head>
<title>Edit page</title>
</head>
<body>
<h1>Data checking/revising</h1>
<?php
// getting target-table name out from key of POST data array
foreach($_POST as $p_key => $p_array) {
if($p_key != "mode") {
$table_name = $p_key;
}
}
// gettign id of target data
$ta... | true |
81d9bd567c5f8c4c2fe8dfa6e221ac0cff4d4107 | PHP | sdlyhu/laravelio | /src/CommandBus/DefaultCommandBus.php | UTF-8 | 598 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php namespace Lio\CommandBus;
use Illuminate\Container\Container;
class DefaultCommandBus implements CommandBus
{
private $container;
private $inflector;
public function __construct(Container $container, CommandNameInflector $inflector)
{
$this->container = $container;
$this->inflec... | true |
b528148f0e9fe2bf4c6fc177d2d21b78a6c21e0b | PHP | anaasins/juegotronos | /basedatos.php | UTF-8 | 1,059 | 3.296875 | 3 | [] | no_license | <?php
/**
*Clase para conexion y consultas a la base de datos de juego de tronos.Ana Asins.
*/
class JuegoTronos
{
private $mysqli;
private $error=false;
//conexion y comprobacion de errores.
function __construct()
{
$this->mysqli= new mysqli("localhost", "root", "", "gameofthrones");
if ($this->mys... | true |
a570926a31c5a070d67e36c22b33e467c51f3898 | PHP | Stolz/php-stubs | /res/php/cairo/functions/cairo-matrix-rotate.php | UTF-8 | 213 | 2.734375 | 3 | [
"Apache-2.0",
"CC-BY-3.0"
] | permissive | <?php
/**
* Description
*
* @phpstub
*
* @param CairoMatrix $matrix
* @param float $radians
*
* @return void What is returned on success and failure
*/
function cairo_matrix_rotate($matrix, $radians)
{
} | true |
08e8d194c916098246ce4b51cf1cfc2e4bd6038b | PHP | ferdiprastio81/logistikkpn | /ujian2/login.php | UTF-8 | 3,000 | 2.796875 | 3 | [] | no_license | <?php
session_start();
require 'funtion1.php';
// cek cookie
if(isset($_COOKIE['id']) && isset($_COOKIE['key']) ){
$id = $_COOKIE;
$key = $_COOKIE;
// ambil nama berdasarkan id
$cekUser = mysqli_query($konek1, "SELECT * FROM tb_user WHERE id = '$id' ");
$row = mysqli_fetch_assoc($cekUser);
// cek... | true |
a38781efaa26ce23ea39647a4278de90295a0512 | PHP | Apron63/main-site | /common/widgets/ThemedField.php | UTF-8 | 2,044 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Apron63
* Date: 11.05.2017
* Time: 8:58
*/
/*https://packagist.org/packages/ramosisw/yii2-material-dashboard*/
namespace common\widgets;
use Yii;
class ThemedField
{
public static function renderField($model, $field)
{
var_dump($model->hasErrors());
... | true |
f261a5d9fd0e69f1afe77d5f2ece4830e4b4389e | PHP | 17600085673/PMPDailyTes | /rk0522/sf.php | UTF-8 | 247 | 3.34375 | 3 | [] | no_license | <?php
class sf{
public function ReverseSentence($str){
$arr=explode(' ',$str);
$arrs=array_reverse($arr);
$strs=implode(' ',$arrs);
return $strs;
}
}
$obj=new sf();
print_r($obj->ReverseSentence('student. a am I')); | true |
6fe78b1d8fb2e5d301c26df6f2c5c119476cf1ce | PHP | aadarshbabu/project | /questionAnswer/Backend/RESTAPI/create.php | UTF-8 | 874 | 2.53125 | 3 | [] | no_license | <?php
require_once ".././db/config.php";
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
header("Access-Control-Allow-Methods: POST");
header("Access-Control-Max-Age: 3600");
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorizatio... | true |
fc0170b6a6afd6ab87079a99c9e826ae3c4f94c1 | PHP | RyWhal/blackholeoftheinternet | /functions/score_update.php | UTF-8 | 710 | 2.53125 | 3 | [] | no_license | <?php
include '../vars.php';
include '../secrets.php';
include 'spam_func.php';
//establish connection
$mysqli = new mysqli($host, $username, $password, $db_name);
if ($mysqli->connect_error) {
die('Connect Error (' . $mysqli->connect_errno . ') '. $mysqli->connect_error);
}
$query="SELECT id,... | true |
e435d0f8226adcf67e7c4f5229e8c185d26726b0 | PHP | tekoraik/pedidos | /protected/models/Producto.php | UTF-8 | 9,750 | 2.875 | 3 | [] | no_license | <?php
/**
* This is the model class for table "producto".
*
* The followings are the available columns in table 'producto':
* @property integer $id
* @property string $nombre
* @property string $slug
* @property string $descripcion_corta
* @property string $descripcion_larga
* @property string $precio
* @pro... | true |
db72b77e3bc140c7912cdc207d5b47ca384b19a3 | PHP | creed30/PHP_MySQL_DrRecords | /backuplastgood20_36/CommunicatesWith.php | UTF-8 | 1,223 | 2.703125 | 3 | [] | no_license | <?php
//begin code for submitting the form for the doctors communicating with each other
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
//starts the session if the request to a page is a POST
session_start();
//Connection string to database
$con = mysqli_connect("academic-mysql.cc.gatech.edu","cs4400_Group_20","UwBac... | true |
092949147a783c8f99a07fcc7de2f238ec01a16b | PHP | karanpatel3/Course-Management-Website | /Release Candidate/Backend/GetStudAnswers.php | UTF-8 | 662 | 2.515625 | 3 | [] | no_license | <?php
// create connection
//this is for viewing questions out of the question bank, it works completely fine, no need to edit
include ('DBconnect.php');
$query = 'SELECT `StudentAnswer`, `Points`, `FunctionName`, `Constraint`, `TestCase1`, `TestCase1OP`, `TestCase2`, `TestCase2OP`, `TestCase3`, `TestCase3OP`, `Test... | true |
f4152262e8b96507b22f96dbc9cb7b9cb09e4f41 | PHP | MiguelAngelMP10/Ejercicio-micro-frameworksYii2 | /prospectos/models/Prospectos.php | UTF-8 | 1,577 | 2.625 | 3 | [] | no_license | <?php
namespace micro\models;
use Yii;
/**
* This is the model class for table "prospectos".
*
* @property int $idProspecto
* @property string|null $nombres
* @property string|null $apellidos
*
* @property ProspectosDirecciones[] $prospectosDirecciones
* @property ProspectosTelefonos[] $prospectosTelefonos
... | true |
a053246943d46ce6b0a7aa4a471c01b02722be8b | PHP | smitexpert/dml-com-do | /corporate/login.php | UTF-8 | 2,673 | 2.625 | 3 | [] | no_license | <?php
include("lib/Database.php");
include("lib/Session.php");
function agent_login($table_id, $password, $client_id){
Session::checkLogin();
$password = md5($password);
$db = new Database();
$sql = "SELECT * FROM agent_clients WHERE id='$table_id' AND password='$password' AND status='1'";
... | true |
84d039585d6ce45fbdbef5c0ed2366c55fac27e9 | PHP | wandura/PGApi | /interfaces/facebook/facebooklogin.php | UTF-8 | 6,872 | 2.59375 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
/*
* ProGade API
* http://api.progade.de/
*
* Copyright 2012, Hans-Peter Wandura (ProGade)
* You can find the Licenses, Terms and Conditions under: http://api.progade.de/api_terms.php
*
* Last changes of this file: Aug 16 2012
*/
/*
@start class
@param extends classPG_ClassBasics
*/
class classPG_Fa... | true |
ae852c1f24c56111e387b8e1d1bdbfa16d34495a | PHP | unsane1047/WHRWEB | /whrweb/src/AppBundle/Models/Model_Login.php | UTF-8 | 2,018 | 2.5625 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace AppBundle\Models;
use AppBundle\Models\Model,
AppBundle\Models\Model_User,
AppBundle\Libraries\StringLib;
class Model_Login extends Model{
static $conn_id = 'default';
protected function normalize_username( $value ){
return mb_strtolower(
StringLib::trim(
StringLib::singleLineInputSpaces... | true |
305c8ee6060f3e3e20b751b03211b843c3bf2929 | PHP | isahlabbo/machine_learning | /Public/Model Management/persistency.php | UTF-8 | 673 | 2.984375 | 3 | [] | no_license | <?php
/*
Persistency
You can save trained models for future use.
Persistency across requests achieved by saving and restoring serialized estimators into files.
Example
*/
use Phpml\Classification\KNearestNeighbors;
use Phpml\ModelManager;
$samples = [[1, 3], [1, 4], [2, 4], [3, 1], [4, 1], [4, 2]];
$labels = ['a... | true |
ddb38db84583aac45e12f0a43e26c8746e6f7145 | PHP | TangBoHao/cmbbs | /profile/view_profile.php | UTF-8 | 1,479 | 2.59375 | 3 | [] | no_license | <?php
/*查看用户资料*/
require('../config/config.inc.php');
header("Content-type:text/html;charset=utf-8");
$username=$_SESSION['username'];
//取得用户信息
$sql="SELECT * FROM goblin_user WHERE username='$username'";
$result=mysql_query($sql);
$rows=mysql_fetch_array($result);
if (!$rows) {
ExitMessage("用户记录不存在!");
}
//用户发帖正文数... | true |
6a7b863e5c037da8068186d46e41f928a52523e0 | PHP | ilyabrilev/myLittleFramework | /core/Responses/View.php | UTF-8 | 728 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Ilya
* Date: 27.10.2018
* Time: 20:28
*/
namespace Core\Responses;
class View extends Response {
private $viewFile = '';
private $pars = [];
/**
* View constructor.
* @param string $viewFile
* @param array $pars
* @param int $statuscode
... | true |
76c3740e70182cc5845d4eb86df7d84ca9791328 | PHP | wangshikun2010/hello-php | /php-mysql-programming/9 - string and regex/9-17.php | UTF-8 | 467 | 3.75 | 4 | [] | no_license | <?php
//count_chars()
$string = 'wang shi kun';
echo $string.'<p>';
foreach (count_chars($string, 1) as $key => $value) {
echo chr($key).'出现了'.$value.'次<br>';
}
echo count_chars($string, 3);
echo '<p>';
//str_word_count()
$str = 'which antiword uses to format tables in its plain text output';
echo $st... | true |
e06ec96005741d15974158545483bcc220dfb729 | PHP | ashwinikul/SoftwareProjectManagement | /hw8/Src Code/db_conn.php | UTF-8 | 872 | 2.859375 | 3 | [] | no_license | <?php
function connect_to_db()
{
define("USER", "ashkulkarni");
define("PASS", "");
define("DB", "Practice");
// connect to database
$connection = new mysqli('localhost', USER, PASS, DB);
if ($connection->connect_error) {
die('Connect Error (... | true |
d9400c2a7bef0b0b82e63e9dda76ce7b7b03197d | PHP | jmarcosg/barcode | /control/AbmArticulo.php | UTF-8 | 2,611 | 3.046875 | 3 | [] | no_license | <?php
class AbmArticulo
{
public function cargarObjeto($parametro)
{
$articulo = null;
// print_r($parametro);
if (array_key_exists('nombre', $parametro) && array_key_exists('codigo', $parametro)) {
$articulo = new articulo();
$articulo->setear(
... | true |
b02c4703c384cbc76cba2796f3b73f92584d33da | PHP | alexz202/screenwordsapi | /lib/base/CStruct.class.php | UTF-8 | 8,666 | 3.046875 | 3 | [] | no_license | <?php
//**********************************************************
// File name: CStruct.class.php
// Class name: StructBase
// Create date: 2011/02/18
// Update date: 2011/02/18
// Author: parkerzhu
// Description: C结构体类型基类
// Example:
//**********************************************************
require('C... | true |
5a97dc5ccb9349e647160f5631cfdcabba5aeee0 | PHP | stagerightlabs/stagerightlabs.com | /app/Actions/Tags/TagUpdatingAction.php | UTF-8 | 1,039 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Actions\Tags;
use App\Tag;
use App\Utilities\Arr;
use StageRightLabs\Actions\Action;
class TagUpdatingAction extends Action
{
/**
* @var Tag
*/
public $tag;
/**
* Update a tag.
*
* @param Action|array $input
* @return self
*/
public function han... | true |
2faad7b34df880a80da894e519fc190bf2e9a841 | PHP | stepanoff/vitrinaburg | /www/protected/modules/VForum/helpers/VForumHtmlHelper.php | UTF-8 | 926 | 2.5625 | 3 | [] | no_license | <?php
class VForumHtmlHelper
{
public function pager ($totalItems = 1, $itemsPerPage = 10, $urlArr, $currentPage = false, $max = 3, $title = false)
{
$totalPages = ceil($totalItems / $itemsPerPage);
if ($totalPages <=1)
return '';
$res = '';
$res .= '<div class="pages">';
... | true |
3cf75c091d5803813cd0c1ea50e26101d6d4890a | PHP | fgsl/groupware | /src/Groupbase/Expressive/Middleware/FastRoute.php | UTF-8 | 5,478 | 2.65625 | 3 | [] | no_license | <?php
/**
* Tine 2.0
*
* @package Tinebase
* @subpackage Expressive
* @license http://www.gnu.org/licenses/agpl.html AGPL Version 3
* @copyright Copyright (c) 2017 Metaways Infosystems GmbH (http://www.metaways.de)
* @author Paul Mehrer <p.mehrer@metaways.de>
*/
use \Interop\Http\Server\Request... | true |
39c3ea498f703f8bc04915f54ae17e98037e2a53 | PHP | ednakaha/school | /model/role-model.php | UTF-8 | 574 | 2.75 | 3 | [] | no_license | <?php
require_once 'model.php';
class RoleModel implements IModel {
private $role_id;
private $role_name;
function __construct($arr) {
if (!empty($arr['role_id']))
$this->role_id = $arr['role_id'];
$this->role_name = $arr['role_name'];
... | true |
204c75a287940cc92affd84f798679cc3ba01d92 | PHP | abuenosvinos/courses | /src/Api/Application/FindCourses/FindCoursesQueryHandler.php | UTF-8 | 525 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Api\Application\FindCourses;
use App\Shared\Application\Paginator;
use App\Shared\Domain\Bus\Query\QueryHandler;
final class FindCoursesQueryHandler implements QueryHandler
{
private FindCourses $findCourses;
public function __construct(FindCourses $findCourses)... | true |
974d4f761c77f9667bbb7e0c899f85ebb8f83202 | PHP | jameslk/portfolio | /projects_without_a_home/TeamGrounds/private/libs/database/singleton.php | UTF-8 | 848 | 2.984375 | 3 | [] | no_license | <?php
Libs('database', 'singleton');
class DB_Singleton extends Database implements Singleton {
static protected $instance = false;
public function __construct($dbname, $username, $password, $server = 'localhost') {
if(self::$instance)
MakeError('Second instance of singleton class "'.self.'" n... | true |
cf01c87b7dbafe73206fb33d17425fa44fbe817c | PHP | de314/GaTechCompBioSpring12 | /web/POC/scripts/public_api.php | UTF-8 | 2,677 | 2.5625 | 3 | [] | no_license | <?php
include "utils.php";
$field_name = "uploaded_file";
if (isset($_GET["upload"])) {
$target_path = "../uploads/";
$filename = basename( $_FILES[$field_name]['name']);
$target_path = $target_path . $filename;
if(move_uploaded_file($_FILES[$field_name]['tmp_name'], $target_path)) {
$rna = parse_ct_file($targe... | true |
d5f865b5ab8975d36b304388a83661bb8b56da91 | PHP | ismail1432/BgFromScratch | /Validator/Validator.php | UTF-8 | 2,464 | 3.125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ismail
* Date: 23/04/2017
* Time: 19:30
*/
namespace BgFromScratch\Validator;
/**
* Class Validator
* @package BgFromScratch\Validator
*/
class Validator
{
public $errorTabs = [];
function __construct(Array $datas)
{
$this->isEmpty($datas['a... | true |
c5bcb87d2b3eba20a4cd045094455648c14713bd | PHP | GuillermoMafla2010/PHP | /Leer_imagen_BDD_Cap87.php | UTF-8 | 1,508 | 2.84375 | 3 | [] | no_license | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
</head>
<body>
<?php
$ID=""... | true |
df256961d43307e82e39eb8cc87e61816fa619c5 | PHP | kloderorg/kloder | /app/Plugin/Languages/Controller/Component/LanguageInitiatorComponent.php | UTF-8 | 1,304 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
App::uses('Component', 'Controller');
class LanguageInitiatorComponent extends Component {
public function initialize(Controller $controller) {
if (AuthComponent::user('id') == null) {
$this->setFromBrowser();
} else {
if (AuthComponent::user('language_id') != '') {
... | true |
b8f791bad21d1ac2bc3b4dc0bad3ff59bf314165 | PHP | openpsa/org-routamc-positioning | /lib/org/routamc/positioning/exec/test-userlocation.php | UTF-8 | 949 | 2.65625 | 3 | [] | no_license | <?php
midcom::get()->auth->require_valid_user();
// Read location from session or user's location log
$user_location = org_routamc_positioning_user::get_location();
if (is_null($user_location)) {
// No location found, try to geocode based on user IP
$geocoder = org_routamc_positioning_geocoder::create('geoplug... | true |
9525140abc6bfadda60a52909ce68dd03a469a3c | PHP | VladSmorodsky/phplab-tasks-2021 | /tests/BuildUrlTest.php | UTF-8 | 2,501 | 2.8125 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
class BuildUrlTest extends TestCase
{
protected function setUp(): void {}
/**
* @dataProvider urlDataProvider
* @param string $paramKey
* @param string $value
* @param string $existedQueryString
* @param string $expectedResult
* @param int|n... | true |
711b0f23ef6ad72d7bed67c2c19ad40502f502ef | PHP | quadrowin/icengine | /Class/Data/Transport/Manager.php | UTF-8 | 2,972 | 2.640625 | 3 | [] | no_license | <?php
/**
* Менеджер транспортов данных
*
* @author goorus, morph
* @Service("dataTransportManager")
*/
class Data_Transport_Manager extends Manager_Abstract
{
/**
* @inheritdoc
*/
protected $config = array(
/**
* Транспорты
*
* @var array
*/
'tra... | true |
7267a2cf28d33e79493c43252ece942e549e9c4a | PHP | cyberagent-2222hackathon-teamA/reiwa-api-v1 | /app/Entities/UserEntity_sm.php | UTF-8 | 556 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entities;
class UserEntity_sm extends BaseEntity
{
/**
* @var integer
*/
public $id;
/**
* @var string
*/
public $name;
/**
* @var string
*/
public $profile_image_url;
/**
* classを配列に変換
* @return array
*/
public funct... | true |
481c39c9d5092f68ee4bb679a924802d0ee6d5d7 | PHP | devenbansod/runkit7 | /runkit-api.php | UTF-8 | 12,825 | 2.796875 | 3 | [
"Zend-2.0"
] | permissive | <?php
// The runkit7 fork has a slightly different API from what is documented at https://secure.php.net/runkit
//
// - Return types were added for php7.0
// - Some functions are unsupported
// These constants depend on the php version, and may change.
const RUNKIT_ACC_RETURN_REFERENCE = 0x4000000;
const RUNKIT_ACC_PU... | true |
d0e26562644b15a300b899325caa449e40f04bb6 | PHP | su-mi-lab/mound | /src/AbstractProvider.php | UTF-8 | 4,392 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace Mound;
/**
* Class AbstractProvider
* @package Mound
*
*/
abstract class AbstractProvider implements ProviderInterface
{
/**
* @var null
*/
protected $target = null;
/**
* @var array
*/
protected $rules = [];
/**
* @var null
*/
protected $g... | true |
88b7c92116c0673287c551c8444f24c30616f6c3 | PHP | ovidiuj/Nginx-log-parser | /Application/Tests/Request/HttpRequestTest.php | UTF-8 | 884 | 2.765625 | 3 | [] | no_license | <?php
namespace Application\Tests\Request;
use Application\Request\HttpRequest;
class HttpRequestTest extends \PHPUnit_Framework_TestCase
{
private $request;
public function setUp()
{
parent::setUp();
$server = [
'REQUEST_URI' => '/random-generator/300/EOT',
'REQU... | true |
1e321c35cc82b8250d9f74c2caf3faab5f70392b | PHP | archer102125220/god_code_backend | /database/migrations/2014_10_12_000000_create_users_table.php | UTF-8 | 1,559 | 2.671875 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('users', function ... | true |
ff3c4be962c07c7a2605d6a0a7981eda7178041d | PHP | zl0314/ci-with-module | /application/libraries/Mylog.php | UTF-8 | 1,782 | 2.875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* 日志记录
* @author Aaron Z1hang
* @email nice5good@126.com
* usage : Log::error('this is a test error log');
*/
class Mylog
{
/**
* 调试记录
*
* @param $str
*/
public static function debug($str)
{
self::checkPath('debug', $str);
}
/**
... | true |
c125cf4f8016013f55874aee784405cf5ca3b0f2 | PHP | yaroslavkozak/website | /manageportfolios.php | UTF-8 | 3,326 | 2.65625 | 3 | [] | no_license | <?php
// ini_set('display_errors', 1);
// error_reporting(E_ALL);
include('header.php');
include('dbfunctions.php');
/*
if ($_SESSION["is_admin"] != 'Y') { ?>
<meta http-equiv="refresh" content="0; url=index.php" />
<?php }
*/
?>
<main role="main" style="margin: 50px;">
<div class="row">
<div class="col-sm-... | true |
60650735bdd6ea896f9be961b1cfed6dc6f5ab0f | PHP | kaveencharuka/OnlineShopManagementSystem | /database/migrations/2021_05_18_142146_create_addsales_table.php | UTF-8 | 948 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAddsalesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('addsales', fun... | true |
9db32eac10ac23093a4439e75c5a2e3fe324b77d | PHP | SachinGanesh/laracrud | /src/lara-crud/Helpers/ViewAbleMethodHelper.php | UTF-8 | 4,042 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace LaraCrud\Helpers;
use Illuminate\Support\Str;
use LaraCrud\Builder\Controller\ControllerMethod;
use LaraCrud\Contracts\Controller\ViewAbleMethod;
trait ViewAbleMethodHelper
{
/**
* blade file path for view method.
*
* @var string|null
*/
protected $viewFilePath = null;
... | true |
e6c80113ceb2be445f3f6319b793f9391317ad53 | PHP | EngAbdullahHanif/raha_charity | /vertical-rtl/child_relative.php | UTF-8 | 29,629 | 2.53125 | 3 | [] | no_license | <?php
require_once('includes/child.php');
$child = new Child();
$connection = $child->get_conn();
//Every pages
session_start();
if (!isset($_SESSION['loggedin']) || $_SESSION['loggedin'] !== true) {
header('Location:login.php');
exit();
}
//Variables are decilared to null
$fname = $lname = $father_name = ... | true |
93520bf66c3f0d22f40b3a97acbe1036d1ed4fab | PHP | timohund/tssearch | /src/Ts/SearchBundle/Domain/IncomingLinkTextCollection.php | UTF-8 | 890 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Ts\SearchBundle\Domain;
class IncomingLinkTextCollection extends AbstractCollection {
/**
* @param IncomingLinkText $linkText
*/
public function set(IncomingLinkText $linkText) {
$this->storage->offsetSet($linkText->getLinkText(),$linkText);
}
/**
* @param stri... | true |
06ae636a7c5cd1692f6f708ba48f95d5f7bdd5a3 | PHP | rubyspiderman/ebooksite_emberjs | /src/JSONHelper.php | UTF-8 | 972 | 2.6875 | 3 | [] | no_license | <?php
abstract class JSONHelper {
public static function decode($data) {
$data = json_decode($data, TRUE);
switch (json_last_error()) {
case JSON_ERROR_NONE:
return $data;
case JSON_ERROR_DEPTH:
throw new Exception('error.json.depth', 400);
case JSON_ERROR_STATE_MISMATCH... | true |
9ca2cbaffe15fb20751b1baa94195c8beb7d635e | PHP | halfvector/bugvote.com | /app/helpers/core/ImageProvider.php | UTF-8 | 8,444 | 2.875 | 3 | [] | no_license | <?php
# ========================================================================#
#
# Author: Jarrod Oberto
# Version: 1.0
# Date: 17-Jan-10
# Purpose: Resizes and saves image
# Requires : Requires PHP5, GD library.
# Usage Example:
# include("classes/resize_class.php");
... | true |
6438cf6a4eb321bdd42612fd523eaa4f756e8d15 | PHP | kalnynsh/dshop_demo | /shop/readModels/Content/PageReadRepository.php | UTF-8 | 721 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace shop\readModels\Content;
use shop\entities\Content\queries\PageQuery;
use shop\entities\Content\Page;
class PageReadRepository
{
public function find($id): ?Page
{
return $this->query()
->andWhere(['id' => $id])
->andWhere(['>', 'depth', 0])
->one()... | true |
16321cc57d3e848bc66c91a5c6d387f27e010930 | PHP | bpel/blog | /src/Model/User.php | UTF-8 | 6,736 | 2.96875 | 3 | [] | no_license | <?php
namespace src\Model;
use src\Manager\UserManager;
class User
{
private $_id;
private $_lastname;
private $_firstname;
private $_mail;
private $_password;
private $_confirm_password;
private $_last_login;
private $_grant;
public function __construct(array $data)
{
... | true |
49b469f4c5fbfcd29d618b5074c363e9a3addca9 | PHP | poyu007/heisoo_env | /script/inc/basic.inc | UTF-8 | 2,288 | 2.828125 | 3 | [] | no_license | <?php
define('_WHICH','not |no ');
define('HS_LIB','/usr/local/heisoo');
function e($p,$code ='green'){
$color = array(
'green' => "\033[1;32m",
'white' => "\033[0;37m",
'red' => "\033[0;31m",
'yellow' => "\033[0;33m",
);
if($code == 'red'){
echo $color[$code].'Err... | true |
303bfb7f3b53fc4b8e6430fa698a5ce6ca9f3dcb | PHP | janellelewis/AstonEvents | /register.php | UTF-8 | 4,184 | 2.640625 | 3 | [] | no_license | <<?php session_start(); ?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include('./templates/header.php');?>
<title>Registration Page </title>
<link rel="stylesheet" type="text/css" href="style.css">
<style>
body{
background-color: #E8E8E8;
}
input{
width:40%;
}
</style>
</head>
<body>
<?php include('./template... | true |
59505307889d83761fbe6dc975e246fd6b96e955 | PHP | grosaict/margille-1st-version | /model/ProductOrder.php | UTF-8 | 369 | 2.828125 | 3 | [] | no_license | <?php
class ProductOrder {
public $product;
public $qtd_product;
public $product_amount;
function __construct($product, $qtd_product, $product_amount){
$this->product = $product;
$this->qtd_product = $qtd_product;
$this->produ... | true |
592ad003cddac4d3e4250f72202dbbd41483f47d | PHP | Syednazirhussain/Rental-system | /app/Models/CompanyModule.php | UTF-8 | 1,817 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model as Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class CompanyModule
* @package App\Models
* @version April 12, 2018, 8:12 am UTC
*
* @property \App\Models\Company company
* @property \App\Models\Module module
* @property \Illumin... | true |
2b719be590f648db8ec2efd3ae23f3331f5b305b | PHP | SanaullaParvez/blog-php | /app/classes/BlogInfo.php | UTF-8 | 5,071 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: sanaulla
* Date: 1/18/18
* Time: 1:59 PM
*/
namespace App\classes;
use App\classes\DbConfig;
class BlogInfo
{
private $blog;
private $allBlog;
private $dbConfig;
public function __construct()
{
$this->dbConfig = DbConfig::getConnection();
... | true |
d5d5bfbccc7b8ae4c810a11ba153c1987f340c8d | PHP | redxdev/hvzsite-old | /src/AppBundle/Controller/Web/GameController.php | UTF-8 | 7,178 | 2.546875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace AppBundle\Controller\Web;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class GameContr... | true |
2e1ed8f9334820cdbebe58cfd5e1445fc61539f5 | PHP | simplysaif/angularCrud | /api/TableRows.php | UTF-8 | 149 | 2.609375 | 3 | [] | no_license | <?php
class TableRows extends RecursiveIteratorIterator{
function __construct($iterator){
parent::__construct($iterator,SELF::LEAVES_ONLY);
}
} | true |
11ce7a7a850a0a954d52fdb4ae1b1f7ecffbc995 | PHP | Kevin-Moreau65/CUBE2 | /php/joueur.php | UTF-8 | 897 | 2.671875 | 3 | [] | no_license | <?php
if (isset($_POST['team'])) {
require_once('connexion.php');
$team = $_POST['team'];
$r = "SELECT * FROM joueurs WHERE Equipe = $team";
$query = mysqli_query($conn, $r);
$equipe = array();
$gardien = array();
$defenseur = array();
$milieu = array();
$attaquant = array();
whi... | true |
3cb3f337284f730a3f2ebb85b09d2b7c6afbfbc7 | PHP | square/square-php-sdk | /src/Models/Builders/FulfillmentPickupDetailsCurbsidePickupDetailsBuilder.php | UTF-8 | 1,837 | 2.828125 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace Square\Models\Builders;
use Core\Utils\CoreHelper;
use Square\Models\FulfillmentPickupDetailsCurbsidePickupDetails;
/**
* Builder for model FulfillmentPickupDetailsCurbsidePickupDetails
*
* @see FulfillmentPickupDetailsCurbsidePickupDetails
*/
class FulfillmentPickupDeta... | true |
df60475dd9b3919c731aed1986e3ae1774ef67a6 | PHP | diegosposito/alcec | /apps/alumnos/modules/planesestudios/templates/obtenerllamadosexamenesSuccess.php | UTF-8 | 194 | 2.609375 | 3 | [] | no_license | <?php
if (count($llamados) > 0){
//el bucle para cargar las opciones
foreach ($llamados as $llamado){
echo "<option value=".$llamado->idllamado.">".$llamado->descripcion."</option>";
}
}
?> | true |
5d531c196a62b1dc5c469c8514dad0ece027f428 | PHP | all-you-inc/all-you-inc-project | /common/models/userreferral/UserReferral.php | UTF-8 | 2,627 | 2.65625 | 3 | [] | no_license | <?php
namespace common\models\userreferral;
use shop\entities\User\User;
use Yii;
/**
* This is the model class for table "user_referral".
*
* @property integer $id
* @property integer $user_id
* @property integer $referral_user_id
* @property string $referral_code
* @property integer $tier
* @property string... | true |
10e8c0cd7a2cc76fe38d42cd24c84798f67519d9 | PHP | pxgamer/arionum-php | /src/Helpers/EllipticCurve.php | UTF-8 | 1,096 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace pxgamer\Arionum\Helpers;
use Exception;
use StephenHill\Base58;
final class EllipticCurve
{
/**
* @param string $data
* @param string $key
*
* @return string
*
* @throws Exception
*/
public static function sign(string $data, string $key): string
{
... | true |
17b2a65699509caaa58495a3428ae59e31308436 | PHP | zheuswalker/ecomsympies | /app/r_product_info.php | UTF-8 | 1,829 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $PROD_ID
* @property int $PRODT_ID
* @property int $AFF_ID
* @property string $PROD_DESC
* @property string $PROD_NOTE
* @property string $PROD_IMG
* @property string $PROD_CODE
* @property string $PROD_NAME
* @property int $PR... | true |
6ade609be13be833def31dd1d9425eabdc4273c3 | PHP | Jacopx/BusManaging_Web | /3f3669/deleteReservation.php | UTF-8 | 1,682 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
include 'base.php';
if(isset($_SERVER['HTTPS'])) {
if ($_SERVER['HTTPS'] == "on") {
$secure_connection = true;
} else {
echo "Connection NOT SECURE!!";
die();
}
}
if(isset($_POST['field1']) && $secure_connection) {
deleteReserva... | true |
82c820cda789e71b02aa2e89f5b20120c31dbc00 | PHP | Jugacu/DAW2 | /Servidor/Sql random/mvc/routes/RouteManager.php | UTF-8 | 940 | 2.890625 | 3 | [] | no_license | <?php
//Include script
foreach (glob(__DIR__ . '/../controllers/*.php') as $filename) {
try {
require_once $filename;
} catch (Exception $e) {
throw $e;
}
}
class RouteManager
{
public static $routes = [
'' => 'HomeController@index',
'ej1' => 'EjController@ej1'
];
... | true |
f6b1c173d675526f89d81691f5191acbf4219306 | PHP | cristianpreciado/pruebabackentest | /src/model/Usuario.php | UTF-8 | 2,095 | 2.8125 | 3 | [] | no_license | <?php
namespace zinobe\model;
use Doctrine\ORM\Mapping\Column;
use Doctrine\ORM\Mapping\Entity;
use Doctrine\ORM\Mapping\Id;
use Doctrine\ORM\Mapping\Table;
use Doctrine\ORM\Mapping\GeneratedValue;
/**
* @Entity
* @Table(name="usuarios")
**/
class Usuario {
/**
* @Id
* @GeneratedValue
* @Column(type="... | true |
df1601f1bde40813b90b5c21c597ad900d3fa25c | PHP | dermawans/cad-solusindo | /application/controllers/login.php | UTF-8 | 2,213 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Login extends CI_Controller {
function __construct(){
parent::__construct();
$this->load->model('model_user');
}
public function index()
{
$this->load->view('frontend/login');
}
function cek_login() {
... | true |
f82d8ba88a4fc0a2426e59c953a0218cce705205 | PHP | Insa976/authentification | /deconnexion.php | UTF-8 | 640 | 2.578125 | 3 | [] | no_license | <?php
require_once "server.php";
//On détermine le statut de la session courante. Si la session n'est pas démarrée, on lance la session
if(session_status() === PHP_SESSION_NONE) session_start();
//Si la session ID n'existe pas, on ets rédirigé automatiquement vers la page de connexion.
if(!isset($_SESSION['idus... | true |
d7f25c517740dc6eee2b6dfa895b26c8f0404315 | PHP | ikoncoders/ikonizercore | /src/FormBuilder/FormBuilderBlueprintInterface.php | UTF-8 | 3,219 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace IkonizerCore\FormBuilder;
interface FormBuilderBlueprintInterface
{
/**
* Undocumented function
*
* @param string $name
* @param array $class
* @param mixed $value
* @param string|null $placeholder
* @return array
*/
public func... | true |
132a1c46ff701d23f49f403bb873ec9dbeb1561b | PHP | avatec/framework | /src/core/postcodes.php | UTF-8 | 776 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php namespace Core;
class Postcodes
{
public static function getCity( $postcode )
{
if( strlen( $postcode ) == 6 ) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://kodpocztowy.intami.pl/api/' . $postcode);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
... | true |
6ceface9658d9d0ff48bf22c2820dc79237b1297 | PHP | mabr3/SIBD | /Proj/P3/insert_new_consult.php | UTF-8 | 3,455 | 2.75 | 3 | [] | no_license | <html>
<body>
<?php
require("pdo_connection.php");
$client_VAT = $_REQUEST['client_VAT'];
$aname = $_REQUEST['animal_name'];
$owner_VAT =$_REQUEST['owner_VAT'];
$s = $_REQUEST['s'];
$o = $_REQUEST['o'];
$a = $_REQUEST['a'];
$p = $_REQUEST['p'];
$vet_VAT = $_REQUEST['vet_VAT'];
... | true |
db20e39ce574ab7c0aab12e1df36ca7ad2e0c89e | PHP | CatherineCbl/WF3 | /PHP/exercice-PHP.php | UTF-8 | 2,270 | 2.734375 | 3 | [] | no_license | <?php
// EXERICE
// ---------------------------
// 1. Evaluation / Exercice 1-1. FORMULAIRE POST
// Cr�er un formulaire en affichant les saisies r�cup�r�es sur la m�me page.
// Champ � pr�voir (contexte : produit) : titre, couleur, taille, poids, prix, description, stock, fournisseur.
// ---------------------------
// ... | true |
83cd7a73a998b709e8b2ae7640546948dfc39755 | PHP | Acksop/MVC---Encapsuled | /application/includes/fonctions.php | UTF-8 | 2,950 | 3.140625 | 3 | [] | no_license | <?php
function link_rewrite($page, $params = array())
{
//Solution élégante
//return (('home' == $page) ? 'index.html' : $page . '.html');
//Solution Professionnelle
// -- Mauvaise version
$stringParams = '';
foreach($params as $key => $values){
$stringParams .= "/" . $key ."/" . $values;
}
return (('home... | true |
66a0c14dd16cdb3b217ca8ddb12d3f9d0565d8ba | PHP | zarasyversen/PHP-Project | /view/session/message.php | UTF-8 | 1,011 | 2.546875 | 3 | [] | no_license | <?php
$sessionMessage = Helper\Session::showMessage();
if ($sessionMessage) :
foreach ($sessionMessage as $notification) :
$messageType = $notification['type'];
$message = $notification['msg'];
?>
<div class="session-message <?php echo $messageType;?>">
<?php if($messageType === 'success'):?>
... | true |
e481cc69480054d83b843021dd3d5222dd48e479 | PHP | digit-soft/re-action-promise | /src/FulfilledPromise.php | UTF-8 | 2,712 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Reaction\Promise;
use React\Promise\CancellablePromiseInterface;
use React\Promise\PromiseInterface;
/**
* Class FulfilledPromise
* @package Reaction\Promise
*/
class FulfilledPromise implements CancellablePromiseInterface, PromiseWithSharedDataInterface
{
/** @var mixed resolved value */
... | true |
4b055105e52257d14490f63134d7d5415995f82b | PHP | trogne/wmslabels | /inc/quicklabels.php | UTF-8 | 17,702 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
require_once(__DIR__ . '/../vendor/autoload.php');
use GuzzleHttp\Client;
use GuzzleHttp\Exception\RequestException;
/* Fetch labels using OCLC Auth and Guzzle
*
* Put into a function, added author information, and made
* pocket label printing optional, UNM University Libraries,
* Jul 14, 2014
*/
/**
... | true |
09c9a040b03a4571ef07891f75f1960144a9bcaa | PHP | dasarada/Resource_Management_System_PHP | /register.php | UTF-8 | 2,523 | 2.671875 | 3 | [] | no_license | <html>
<head>
<link rel="stylesheet" type="text/css" href="css/register_css.css">
<center>
<h1 style="font-family:goudy old style;font-size:300%;color:#ff4d4d;">Register</h1>
<body>
<?php
$name=$name_err=$pswd=$pswd_err=$uname_msg=$uname_err=$str_link="";
$flag=0;
$conn=mysqli_connect("localhost"... | true |
577abcfe4acde6ff000d9518fc9bea22f148b4cc | PHP | MrSuborbian88/wsd-final-project | /scripts/cluster_users.php | UTF-8 | 3,199 | 3 | 3 | [] | no_license | <?php
//Function to find the center of the largest cluster
function find_center($distances, $threshold)
{
$center = -1;
$center_points = -1;
foreach ($distances as $user1 => $user1_distances)
{
$points = 0;
foreach ($user1_distances as $user2_distance)
{
if($user2_distance < $threshold && $user2_di... | true |
b493599709554d7d3f24ce2ba98b4b635858446e | PHP | volovodenko/php_homework_7 | /php/setFlash.php | UTF-8 | 277 | 2.6875 | 3 | [] | no_license | <?php
/**
* @param $message
* @param $status
* Установка флэш-сообщения
*/
function setFlash($message, $status) {
$_COOKIE["flash"] = $message;
$_COOKIE["status"] = $status; //true - сообщение Ok, false - сообщение Warning
} | true |
99caba0217018ab93f52dbc184c01596ec0deb9e | PHP | anabeto93/TicketBeast | /tests/Unit/OrderNumberGeneratorTest.php | UTF-8 | 2,087 | 2.84375 | 3 | [] | no_license | <?php
namespace Tests\Unit;
use App\Repositories\Order\OrderConfirmationNumberGeneratorRepository as OrderConfirmationNumberGenerator;
use Tests\TestCase;
use Illuminate\Foundation\Testing\RefreshDatabase;
class OrderNumberGeneratorTest extends TestCase
{
//RULES:
/*
* Can only contain uppercase letter... | true |
bac1ead1c0f3ad53d0ae586c9652481749d82bc3 | PHP | weimanxu/public | /controller/CustomBaseController.php | UTF-8 | 7,230 | 2.5625 | 3 | [] | no_license | <?php
/**
* APP自定义Controller基类
*
*/
class CustomBaseController extends BaseController{
/**
* 判断是否登陆
*
* @return boolean
* @author Ymj Created at 2017年6月27日
*/
public function checkLogin () {
$uSession = Session::_getInstance('uSession')->getSession();
if (isset($... | true |
fa66eb24caadbe1283bd4bbcba25c9126411c994 | PHP | andreicotaga/discount-app | /src/Service/CategoryService.php | UTF-8 | 608 | 2.609375 | 3 | [] | no_license | <?php
namespace Order\DiscountMicroservice\Service;
class CategoryService
{
/**
* Get products category
*
* @param array $products
* @return mixed
*/
public function getProductsCategory(array $products)
{
$productsData = json_decode(file_get_contents('../var/data/products.... | true |
16508f5d051799679832054fb76c4889a634af49 | PHP | DinanathThakur/myedulogy | /Modules/Home/Entities/User.php | UTF-8 | 2,128 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\Home\Entities;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class User extends Model
{
private static $_instance = null;
protected $table = 'users';
protected $fillable = ['firstName', 'lastName', 'email', 'password', 'role', 'userName', 'profilePic'... | true |
37164525e08ab087bc634270e92e7e6652380732 | PHP | qonde-v/KWAPRO | /application/libraries/Language_translate.php | UTF-8 | 4,711 | 2.65625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | <?php
if(!defined('BASEPATH')) exit('No direct script access allowed');
class Language_translate
{
function __construct()
{
}
//check language type of input string
//return corresponding language code
function check($word)
{
try
{
//$url = "http://ajax.googleapi... | true |
b79cffe5e32fb4f40a67b6f251623da69ee35240 | PHP | fitdev-pro/middleware | /src/Resolver.php | UTF-8 | 331 | 2.578125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace FitdevPro\FitMiddleware;
use ReflectionClass;
class Resolver implements IResolver
{
public function resolve($entry)
{
if(is_string($entry)){
$reflectionClass = new ReflectionClass($entry);
return $reflectionClass->newInstance();
}
return $entr... | true |
7465278fc9e26be7ef112e6c19892af6e0585d18 | PHP | better-serializer/better-serializer | /src/BetterSerializer/Reflection/UseStatement/CodeReader.php | UTF-8 | 1,035 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* @author Martin Fris <rasta@lj.sk>
*/
namespace BetterSerializer\Reflection\UseStatement;
use BetterSerializer\Flysystem\Plugin\FirstXLines;
use League\Flysystem\FilesystemInterface;
use ReflectionClass;
/**
*
*/
final class CodeReader implements CodeReaderInterface
{
/**... | true |
b7d88a5ded4e2907281f08c2b3d10a7d3f1fb5fe | PHP | Ashley-AnnEllison/info2180-lab5 | /world.php | UTF-8 | 1,054 | 2.890625 | 3 | [] | no_license | <?php
$host = 'localhost';
$username = 'lab5_user';
$password = 'password123';
$dbname = 'world';
//$country = null;
$conn = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8mb4", $username, $password);
//$stmt = $conn->query("SELECT * FROM countries WHERE name LIKE '%$country%'");
$stmt = $conn->query("SELECT * F... | true |
05409991bb048307a3c11be0c243aff5fdd05e54 | PHP | tobirick/cmsmvc | /database/migrations/20180329085654_config.php | UTF-8 | 1,638 | 2.703125 | 3 | [] | no_license | <?php
use Phinx\Migration\AbstractMigration;
class Config extends AbstractMigration
{
/**
* Change Method.
*
* Write your reversible migrations using this method.
*
* More information on writing migrations is available here:
* http://docs.phinx.org/en/latest/migrations.html#the-abst... | true |
7863767abe110b60ae18c0504c0ee5c4eca62a79 | PHP | bricev/beatriceetbrice.com | /src/backend/Application/Http/Controller/PostRsvpController.php | UTF-8 | 2,911 | 2.5625 | 3 | [] | no_license | <?php
namespace Wedding\Application\Http\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
use Wedding\Domain\Guestlist;
use Wedding\Domain\Note... | true |
ae163ca2a704599834eca28588875f321a85b5ce | PHP | nahakiole/cloudrexx | /modules/Shop/Controller/Product.class.php | UTF-8 | 53,026 | 2.546875 | 3 | [] | no_license | <?php
/**
* Shop Product class
* @version 3.0.0
* @package contrexx
* @subpackage module_shop
* @copyright CONTREXX CMS - COMVATION AG
* @author Reto Kohli <reto.kohli@comvation.com>
*/
namespace Cx\Modules\Shop\Controller;
/**
* Product as available in the Shop.
*
* Includes access methods... | true |
2f73fb8a9a83e1f11b270a75513167baf49b2cf4 | PHP | Paleksa95/PHP-Simple-App | /adminlogin.php | UTF-8 | 1,214 | 2.75 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Welcome Administrator</title>
<link rel="stylesheet" href="css/style.css" type="text/css">
</head>
<?php
require_once('class/User.php');
$user = new User();
$user->logIn('username' , 'password')
?>
<body>
<div id="main">
<head... | true |
0ebf79af4e56ee0d6845c72efc91f9d7353b78a4 | PHP | gabrielcombalia/php-pdo | /lista-alunos.php | UTF-8 | 488 | 2.796875 | 3 | [] | no_license | <?php
use Alura\Pdo\Domain\Model\Student;
require_once 'vendor/autoload.php';
$pdo = new PDO('mysql:host=localhost;dbname=phppdo', 'admin', '222555eee' );
$tabela = $pdo->query('SELECT * FROM students;');
$listagem = $tabela->fetchAll(PDO::FETCH_ASSOC);
$listagemObjeto = [];
foreach ($listagem as $dados) {
$li... | true |
fbeead1ee6a6e42eb0aa72d402a61377828d75ac | PHP | mithunmo/phpsample | /classes/mofilm/user/source/permissions.class.php | UTF-8 | 15,245 | 2.78125 | 3 | [] | no_license | <?php
/**
* mofilmUserSourcePermissions
*
* Stored in mofilmUserSourcePermissions.class.php
*
* @author Mithun Mohan
* @copyright Mofilm (c) 2009-2010
* @package mofilm
* @subpackage mofilmUserSourcePermissions
* @category mofilmUserSourcePermissions
* @version $Rev: 840 $
*/
/**
* mofilmUserSourcePermiss... | true |