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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
410d4e048a651e024ab81177ba345c864d821ae9 | PHP | herbsl/huberbikes | /vendor/fadion/maneuver/src/Fadion/Maneuver/Deploy.php | UTF-8 | 8,786 | 3.125 | 3 | [] | no_license | <?php namespace Fadion\Maneuver;
use Exception;
/**
* Class Deploy
*
* Handles FTP connection and transfers.
*
* @package Fadion\Maneuver\Deploy
* @author Fadion Dashi <jonidashi@gmail.com>
* @author Baki Goxhaj <banago@gmail.com>
* @licence MIT
* @version 1.0
*/
class Deploy
{
/**
* @var \Fadion\... | true |
53bd35b5f610b6fe2916ec0bb78b04773a59e41d | PHP | FarjadAkbar/Php | /phpOpps/set.php | UTF-8 | 977 | 3.40625 | 3 | [] | no_license | <?php
class student{
private $name;
public function hello(){
echo $this->name;
}
public function __get($property){
echo "you are trying to access private property ($property)\n";
}
public function __set($property,$value){
if(property_exists($this, $property)... | true |
41bfc9ba121765589b82bc038c0cb08e2a1e06f1 | PHP | gadarajainik/FoodDeliveryPHP | /deleteproducts.php | UTF-8 | 375 | 2.5625 | 3 | [] | no_license | <?php
//including the database connection file
include("connect.php");
//getting id of the data from url
$pid = $_GET['pid'];
//deleting the row from table
$sql = "DELETE FROM products WHERE pid=:pid";
$query = $pdo->prepare($sql);
$query->execute(array(':pid' => $pid));
//redirecting to the display page (index.p... | true |
ffbdd4df69c47c99580b2129f007e8568d3dd1f0 | PHP | wasilewski94/PracaInzynierska | /programy/php/html/webapp.php | UTF-8 | 3,021 | 3.125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<h2>Pomiar cisnienia</h2>
<?php
//plik konfiguracyjny
$fconfig = fopen("konfiguracja.txt", "r");
if($fconfig != false)
{
fscanf($fconfig, "%d", $okres);
fclose($fconfig);
}
else{
echo "Nie udalo sie otworzyc pliku konfiguracja.txt";
... | true |
57ebc5880e6368a40e374ebfab5da8b5f4c2e19d | PHP | MezzoLabs/MezzoDemo | /app/Mezzo/Generated/ModelParents/MezzoAddress.php | UTF-8 | 7,527 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Mezzo\Generated\ModelParents;
use App\Mezzo\BaseModel;
use MezzoLabs\Mezzo\Core\Annotations as Mezzo;
use MezzoLabs\Mezzo\Core\Traits\IsMezzoModel;
/**
*-------------------------------------------------------------------------------------------------------------------
*
* AUTO GENERATED - MEZZ... | true |
bbc1090fc7f1a42154264771f00af2fff36b03c8 | PHP | AlThunder/Practical_tasks | /Practical_tasks_PHP/1_Language_basics_PHP/9/HomeWork/index.php | UTF-8 | 434 | 2.984375 | 3 | [] | no_license | <?php
$age = $_POST['age'];
if ($age < 30) echo "Вам меньше 30 лет";
elseif ($age > 30) echo "Вам бoльше 30 лет";
else echo "Вам 30 лет";
?>
<form name='myform' action="<?=$_SERVER["REQUEST_URI"]?>" method="post">
<div>
Введите число: <input type="text" name="age" value = "<?$age?>"/>
</div>
<div>
<input ... | true |
8f799ded9365072e6d30d56015da7f4b0ccda0d8 | PHP | bee1194/google1tap | /src/actions/Google1tapLogin.php | UTF-8 | 2,035 | 2.515625 | 3 | [] | no_license | <?php
namespace beehamchoi\google1tap\actions;
use Exception;
use Yii;
use yii\base\Action;
use yii\base\InvalidConfigException;
use yii\helpers\Json;
use yii\httpclient\Client;
/**
* Class Google1tapLogin
*
* @package beehamchoi\google1tap\actions
*/
class Google1tapLogin extends Action{
const STATUS_RESPONSE... | true |
e82feface0a75da89593d8e3ed9c08660cc03738 | PHP | Antares84/ShaiyaCMS | /app/classes/Utils/Data.php | UTF-8 | 17,935 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace Classes\Utils;
use HTMLPurifier;
class Data
{
protected $config;
public function __construct()
{
$this->config = \HTMLPurifier_Config::createDefault();
}
public function purify(string $html): string
{
$purifier = new HTMLPurifier($this->config);
retur... | true |
f99529997c4e45d96f24bda5f298a6bee4ef8fbb | PHP | Jhudeska/test | /School/Oefenopdrachten/spa/toolsupplier/model/Verkoper.php | UTF-8 | 1,233 | 2.625 | 3 | [] | no_license | <?php
require_once 'common/database/Database.php';
require_once 'model/Klant.php';
class Verkoper extends Record {
private $customers = null;
public static function getTableName() {
return 'Verkoper';
}
public static function getFields() {
return[
'VerkNr' => 'Numme... | true |
6a5f67f693143a3aee7d82744f9ca2f301de73b2 | PHP | AntoPisano/the-real-mvp | /src/Hydrators/TeamHydrator.php | UTF-8 | 1,716 | 3.1875 | 3 | [] | no_license | <?php
namespace TheRealMVP\Hydrators;
use TheRealMVP\Entities\Team;
class TeamHydrator
{
/**
* create database connection and retrieves data and returns an array of team objects
*
* @param $pdoConnection
*
* @return array
*/
public static function getData(\PDO $pdoConnection): a... | true |
257b51c3962defd12e0a6073b6dbef1d605f66ef | PHP | Dragony/TeamspeakApi | /src/Request/ClientMoveRequest.php | UTF-8 | 617 | 2.734375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Dragony\TeamspeakApi\Request;
use Dragony\TeamspeakApi\Response\GenericResponse;
class ClientMoveRequest implements TeamspeakRequestInterface
{
public $clid; /* clientID */
public $cid; /* channelID */
public $cpw; /* channelPassword */
public function __construct... | true |
e22d1588709d8623c30b948286b84467a80d2f32 | PHP | wangfuxua/oa | /oa/Lib/Util/group.class.php | UTF-8 | 2,269 | 2.84375 | 3 | [] | no_license | <?php
/*
* qWikiOffice Desktop 0.8.1
* Copyright(c) 2007-2008, Integrated Technologies, Inc.
* licensing@qwikioffice.com
*
* http://www.qwikioffice.com/license
*/
class group {
private $os;
public function __construct($NewoaAction){
$this->os = $NewoaAction;
}
/** exits() Returns true if a record e... | true |
d00107d45fedacb19c2f05619c799c313e50ec93 | PHP | lulongwen/blog | /backend/controllers/SiteController.php | UTF-8 | 1,811 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace backend\controllers;
use Yii;
use yii\web\Controller;
use yii\filters\VerbFilter;
use yii\filters\AccessControl;
use common\models\AdminLoginForm;
/**
* Site controller
*/
class SiteController extends Controller
{
public function behaviors()
{
return [
'access' => [
'class' =>... | true |
7fa9fe73946b44543edfdf93c58dc833c3759ce5 | PHP | NguyenTranBaoKhanh/MVC | /App/Controllers/AccountController.php | UTF-8 | 2,511 | 2.609375 | 3 | [] | no_license | <?php
use App\Core\Controller;
class AccountController extends Controller
{
public $userModel;
function __construct()
{
$this->userModel = $this->model('UserModel');
}
function Index()
{
$this->view("/account/login");
}
function login()
{
$this->view(... | true |
b861ec8fe75ba822ab78f42ec3bb82f14bf00ae3 | PHP | dmt-software/webservices-dutchbusiness | /src/Request/UBOStartInvestigationRequest.php | UTF-8 | 2,102 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace DMT\WebservicesNl\DutchBusiness\Request;
use DMT\WebservicesNl\Client\Request\RequestInterface;
use JMS\Serializer\Annotation as JMS;
/**
* Class UBOStartInvestigationRequest
*
* Starts an UBO investigation for given dossierNumber and establishmentNumber
*
* @JMS\AccessType("public_method")
*/
... | true |
e23b2487452a2097f39d2817a7ff020bd473a9b7 | PHP | jbittencourt/amadis | /templates/boxes/ambviewalbum.inc.php | UTF-8 | 1,624 | 2.828125 | 3 | [] | no_license | <?php
class AMBViewAlbum extends AMListBox {
public function __construct(CMContainer $items,$title,$type=AMTCadBox::CADBOX_IMAGE) {
parent::__construct($items,$title, self::ALBUM, $type);
}
public function __toString() {
global $_language,$_CMAPP, $page;
$album = new AMAlbum;
parent::add("<table id='".$t... | true |
19838489b0a1736711436a137c2eb29520c45a78 | PHP | dougfrei/wp-util | /src/Scripts.php | UTF-8 | 7,267 | 2.890625 | 3 | [] | no_license | <?php
namespace WPUtil;
abstract class Scripts
{
static $scripts = [];
static $footer_scripts = [];
static $hooks_registered = false;
static $has_run = false;
static $footer_scripts_priority = 999;
/**
* Set the priority of the 'wp_footer' action used internally.
*
* @param integer $priority
* @return v... | true |
200fed30ac979ac300b2e913aa061222ec8a0c1c | PHP | Julien-SIMON/GobelinsLab | /plugins/cmdb/_device.class.php | UTF-8 | 8,300 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
class deviceManager {
// Builder
function deviceManager(){
}
function getId($typeName,$name) {
$q0=get_link()->prepare('SELECT ID AS ID FROM '.get_ini('BDD_PREFIX').'cmdb_devices WHERE NAME = :name AND typename = :typename AND deleted_date=0');
$q0->execute(array( 'name' => $name , 'typename' => $typ... | true |
c2cf74b6fc9f3a0f431741bf6e9110beeb94e487 | PHP | Saulius-Saulys/beer-searcher | /database.php | UTF-8 | 8,920 | 2.9375 | 3 | [] | no_license | <?php
class Database extends mysqli
{
public function __construct(){
parent::__construct("localhost", "root", "", "routesdb");
if($this->connect_error){
echo "Failed to connect to database" . $this->connect_error;
}
}
public function CreateTables($co... | true |
9d2380fb6510510e66a58634df467f8d19886f45 | PHP | Matvey021292/laravelTestTask | /app/Http/OrderStatus/OrderStatus.php | UTF-8 | 328 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Http\OrderStatus;
use App\Models\Order;
interface OrderStatus
{
/**
* @param Order $order
* @return bool
*/
public function isOrderStatus(Order $order): bool;
/**
* @param Order $order
* @return string
*/
public function getRoute(Order $order): str... | true |
3568316532ff4f6789f0e37d8ab27d7f45300688 | PHP | yh-containers/szhl | /application/common/service/wechat/Jssdk.php | UTF-8 | 5,475 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\common\service\wechat;
use http\Url;
class Jssdk
{
//获取access_token
public static function getAccessToken()
{
$cache_name = 'wechat_access_token';
$access_token = cache($cache_name);
if(!$access_token){
$result = file_get_contents('https://api.weixin... | true |
703bf6afd55d9c2b2ec37242e1290029e550253a | PHP | fnolackfote/formation | /lib/OCFram/FormBuilder.php | UTF-8 | 459 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: fnolackfote
* Date: 04/03/2016
* Time: 16:01
*/
namespace OCFram;
abstract class FormBuilder
{
protected $form;
public function __construct(Entity $entity)
{
$this->setForm(new Form($entity));
}
abstract public function build();
public ... | true |
f98d060a5570e09bab22d05d901d3a84a892598d | PHP | tjdgns11107/7team2019Laravel | /app/Member.php | UTF-8 | 307 | 2.578125 | 3 | [
"CC-BY-4.0",
"CC-BY-3.0"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Member extends Model
{
protected $fillable = [
'name', 'address', 'phone_number', 'mottoes', 'img'
];
// User와 Member는 1:1 관계
public function user() {
return $this->hasOne(User::class);
}
}
| true |
8f3ed53c721823bdca87291df2f75ca83e59ab8c | PHP | linuxserver/Heimdall-Apps | /HDHomeRun/HDHomeRun.php | UTF-8 | 1,778 | 2.625 | 3 | [
"MIT"
] | permissive | <?php namespace App\SupportedApps\HDHomeRun;
class HDHomeRun extends \App\SupportedApps implements \App\EnhancedApps
{
public $config;
//protected $login_first = true; // Uncomment if api requests need to be authed first
//protected $method = 'POST'; // Uncomment if requests to the API should be set by POST
fun... | true |
44189af0f68f720638db61be4b6cf5f2cfefbc0b | PHP | ngcoders/deeppress | /wordpress/plugin/deeppress/public/class-deeppress-public.php | UTF-8 | 3,833 | 2.5625 | 3 | [] | no_license | <?php
/**
* The public-facing functionality of the plugin.
*
* @link http://example.com
* @since 1.0.0
*
* @package DeepPress
* @subpackage DeepPress/public
*/
/**
* The public-facing functionality of the plugin.
*
* Defines the plugin name, version, and two examples hooks for how to
* enque... | true |
69277cb6f7e264b3cbc811cb99ce8887141ac7c1 | PHP | aliakbarRashidi/TimelineManager | /src/Controller/Admin/TimelinesController.php | UTF-8 | 4,517 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controller\Admin;
use App\Controller\AppController;
/**
* Timelines Controller
*
* @property \App\Model\Table\TimelinesTable $Timelines
*
* @method \App\Model\Entity\Timeline[] paginate($object = null, array $settings = [])
*/
class TimelinesController extends AppController
{
/**
*... | true |
91f2000e00259de32f82dd7f745984aa438a96b3 | PHP | leroy0211/rest-client-sdk | /src/Client/AbstractClient.php | UTF-8 | 4,670 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Mapado\RestClientSdk\Client;
use Mapado\RestClientSdk\SdkClient;
/**
* Class AbstractClient
* @author Julien Deniau <julien.deniau@mapado.com>
*/
abstract class AbstractClient
{
/**
* sdk
*
* @var RestClient
* @access protected
*/
protected $restClient;
/**
... | true |
c17fe23996e613595fa9155cb802131c695823e5 | PHP | blazuran/Trgovko | /avgMISKE.php | UTF-8 | 9,636 | 2.625 | 3 | [] | no_license | <?php
set_time_limit(6000000);
require('simple_html_dom.php');
require 'db.php';
$query = mysqli_query($conn, "SELECT ID, StoreURL FROM Stores WHERE StoreURL = 'https://www.agt.si'");
$store_id = 0;
if(mysqli_num_rows($query) == 0)
{
$query1 = mysqli_query($conn, "INSERT in... | true |
c6d87f165c2261f8181709759a5b1f4a107b4122 | PHP | rajeshwws/lumen-product-management-APIs | /app/Models/ProductType.php | UTF-8 | 476 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class ProductType extends Model
{
const SIMPLE_PRODUCT_ID = 1;
const BUNDLE_PRODUCT_ID = 2;
protected $table = 'product_type';
protected $fillable = ['name'];
protected $hidden = ['created_at', 'updated_at'];
/**
* ... | true |
4c5078aa7c6a45d55b9cd26e38791f19bffd345d | PHP | kivudesign/wepesi-NiceAdmin | /src/Core/Bundles.php | UTF-8 | 802 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Wepesi\Core;
class Bundles{
static function insertCSS(string $file){
if(is_file(ROOT."assets/css/" . $file . ".css")){
print '<link rel="stylesheet" type="text/css" href="'.WEB_ROOT.'assets/css/'.$file.'.css"/>'."\n";
}
}
static func... | true |
fb095e851603e53cc9c50e2902a8ae1392e15e59 | PHP | xzzhht/network | /api/HtmlApi.php | UTF-8 | 4,280 | 2.890625 | 3 | [] | no_license | <?php
/**
* @link https://github.com/yxdj
* @copyright Copyright (c) 2014 xuyuan All rights reserved.
* @author xuyuan <1184411413@qq.com>
*/
namespace yxdj\network\api;
use yxdj\network\Api;
class HtmlApi extends Api
{
//从给定内容中取得所有链接
static public function a($document='', $real = false) {
$match=array();
... | true |
5c06888730d2ef4589a8368565bf82853182cee8 | PHP | mtnhatdanh/ChienowaVN | /app/controllers/ExpenseController.php | UTF-8 | 3,257 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* ExpenseController Class
*/
class ExpenseController extends Controller
{
public function __construct(){
Session::put('active_menu', 'expense');
}
public function getIndex(){
return $this->getManageExpense();
}
/**
* /expense/create-expense
* @return View Expense_View.create
*/
public func... | true |
43f40748b5e344f168eb2db46b11f97619aea8d1 | PHP | NightravenJames/mpesa | /src/Services/OnlinePaymentService.php | UTF-8 | 2,145 | 2.75 | 3 | [] | no_license | <?php
namespace MPESA\Services;
use GuzzleHttp\Client;
use MPESA\Facades\Auth;
use MPESA\Traits\PayOnline;
use MPESA\Exceptions\BadRequestException;
use GuzzleHttp\Exception\ClientException;
use MPESA\Exceptions\PaymentRequiredException;
use MPESA\Exceptions\UnauthorizedException;
class OnlinePaymentServ... | true |
fb7463e13676aef0c63604de09eeb3387c125386 | PHP | 2gis/photo20_php_api_client | /Client.php | UTF-8 | 6,953 | 2.796875 | 3 | [] | no_license | <?php
namespace DG\API\Photo;
class Client
{
const API_VERSION = '2.0';
const API_URL = 'http://photo.local/2.0/';
const HTTP_POST = 'POST';
const HTTP_GET = 'GET';
const FORMAT_JSON = 'json';
const FORMAT_JSONP = 'jsonp';
const LOCALE_RU_RU = 'ru_RU';
const LOCALE_EN_GB = 'en_GB';
const LOCALE... | true |
5db60a5eb4f895d12f4f4c73ed109b872f03f337 | PHP | Pav123/skeletonYiiApp | /protected/common/modules/users/extensions/behaviors/username/LoginValidator.php | UTF-8 | 2,345 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
/**
* LoginStrategy.php file.
*
* @author Evgeniy Tkachenko <et.coder@gmail.com>
*/
class LoginValidator extends CValidator
{
public $attributeType = 'username';
public $minLength = 4;
public $maxLength = 15;
public $pattern = null; //default used '/^[-*_a-z0-9.]{4,15}$/i'
protected fu... | true |
ed01663d0402c0e9830f24c316300de94f516a9f | PHP | evan8diab/akar_site | /application/models/user_model.php | UTF-8 | 1,487 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
class User_model extends CI_Model
{
function __construct()
{
parent::__construct();
}
function create($item)
{
$data = array(
'id' => $item['id'],
'first_name' => $item['first_name'],
'last_name' => $item['last_name'],
'username' => $item['username'],
'password' => $item['password'],
... | true |
b0ef221fba5bf84d4ae00a108ca16f190f5fa525 | PHP | mbermudezv/transporte | /sql/deleteExcel.php | UTF-8 | 611 | 2.734375 | 3 | [] | no_license | <?php
/**
* Mauricio Bermudez Vargas 24/03/2018 11:38 p.m.
*/
require_once 'conexion.php';
class deleteExcel
{
private $pdo;
function __construct()
{
$pdo = new \PDO(DB_Str, DB_USER, DB_PASS);
$this->pdo = $pdo;
}
public function deleteExcel(){
$sql = 'DELETE FROM Estudiante_Ex... | true |
96a0c5be39175c44d080168f4dbe335c4de858e8 | PHP | TNortnern/getagencyreviews-api | /app/Rules/UniqueClient.php | UTF-8 | 1,064 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Rules;
use App\User;
use Illuminate\Contracts\Validation\Rule;
class UniqueClient implements Rule
{
public $value;
public $agent;
/**
* Create a new rule instance.
*
* @return void
*/
public function __construct($value, $agent)
{
$this->value = $val... | true |
bc0eace40cf8b8100c19a9bd1f2d0b508c735cc1 | PHP | borille/trb-framework | /library/Trb/View/Helper/Link.php | UTF-8 | 3,183 | 3.171875 | 3 | [] | no_license | <?php
/**
* Retorna uma tag HTML <a href> de acordo com os parametros passados
* @author TRB@2014
* @version 1.1
*/
class Trb_View_Helper_Link extends Trb_View_Helper_HtmlElement
{
protected $_html;
protected $_module;
protected $_controller;
protected $_action;
protected $_params;
/**
... | true |
3f17020644122b4500f38284ef35d8bf9f8bdee1 | PHP | guoyu07/php-yaf-library | /src/ErrorController.php | UTF-8 | 921 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Ares333\YafLib;
use Exception;
use Yaf_Controller_Abstract;
/**
*
* @author admin@phpdr.net
*
*/
class ErrorController extends Yaf_Controller_Abstract {
function errorAction(Exception $exception) {
if (Error::is404 ( $exception )) {
$this->error404Action ( true );
} else {
$this->error... | true |
169cafc68d6cf115b774baacd35ac194b9bdab53 | PHP | acepj60/fun2_webtool | /includes/EventLogger.class.php | UTF-8 | 2,971 | 2.671875 | 3 | [] | no_license | <?php
/*
#----------------------------------------------------------------------------------
# @Filename : EventLogger.class.php
# @Description :
#
#
# @Date : 2009-04-30
# @Ver : ver1.1
# @Author : yiucon
#
#
# @Modified Date:
# @Modified By :
# @Modified Desc:
#
#------------------------------------------... | true |
3083aefc8605b028f57a877cf0b18079a1a7e0ac | PHP | ArthurBA/Project | /updateProduct.php | UTF-8 | 2,738 | 2.546875 | 3 | [] | no_license | <?php
error_reporting(E_ALL ^ E_NOTICE);
session_start();
$username = $_SESSION['username'];
if(!$username)
{
echo "Section has expired";
header("Location: index.php");
exit;
}
?>
<html>
<head>
<title>Car Distribution | Update Product</title>
</head>
<body>
<table width="900" border="1" align="center" style="borde... | true |
b5c64e8a099f2b8471034654cbbe315f0873fb4d | PHP | IshtiaqueNafis/PHP-REPO | /6_PHP_ReadFromfiles/4_writtingfile.php | UTF-8 | 1,181 | 3.078125 | 3 | [] | no_license | <?php
if($fh=fopen("DATA/html/combined.html","w")){
fwrite($fh,file_get_contents("data/html/states.html"));
fwrite($fh,PHP_EOL.'<optgroup label ="US outlying Territories">');
fwrite($fh,PHP_EOL.file_get_contents("DATA/html/territories.html"));
fwrite($fh,PHP_EOL.'<optgroup label ="Armed forces territory... | true |
71ce38aa66cc374c5e5556c1073050153959ab63 | PHP | niieani/napkin | /_depracated/Commands.php | UTF-8 | 7,137 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace HypoConf;
use Tools\LogCLI;
use Tools\StringTools;
use Tools\ArrayTools;
use Tools\Tree;
use Tools\FileOperation;
//only for cores
//use Tools\System;
use HypoConf\Paths;
use HypoConf\ConfigParser;
use HypoConf\ConfigScopes;
use HypoConf\ConfigScopes\ApplicationsDB;
class Commands
{
public sta... | true |
a7a7131eaf7f56799b4973a8ea46a7b1e0bdbef1 | PHP | davist11/Reasons-Craft | /reasons/ReasonsPlugin.php | UTF-8 | 3,907 | 2.515625 | 3 | [] | no_license | <?php namespace Craft;
/**
* Reasons makes it easy to add custom fields to element index tables.
*
* @author Mats Mikkel Rummelhoff <http://mmikkel.no>
* @package Reasons
* @since Craft 2.3
* @copyright Copyright (c) 2015, Mats Mikkel Rummelhoff
* @license http://opensource.org/licenses/mit... | true |
d731e64e48a9ca69f707c8fe603b5f0cb68be444 | PHP | elpeacock/Codeup-php-exercises | /Model.php | UTF-8 | 789 | 3.328125 | 3 | [] | no_license | <?php
class Model
{
private $attributes = [];
protected static $table = 'model';
//magically put stuffs in attributes (protected)
public function __set($name, $value)
{
$this->attributes[$name] = $value;
}
//magically get stuffs from attributes (protected)
public function __get($name)
{
if (isset($th... | true |
7b4d06ad13df20efcc9be2b5527b4ea817f98fd9 | PHP | MaximusMini/khl-stat | /project_1/temp.php | UTF-8 | 438 | 2.828125 | 3 | [] | no_license | <?php
echo 'Привет';
echo '<br>'.strtotime('22.08.2017');
echo '<br>'.date('j.m.Y',strtotime('22.08.2017'))
// $day = date( 'j',$time ); # С помощью функции date() получаем число дня
// $year = date( 'Y',$time ); # Получаем год
// $hour = date( 'G',$time ); # Получаем значение часа
// $min = date( 'i',$t... | true |
c8d7683cd7fa33fe3d446d749fbbdac9ebdde7a0 | PHP | digital-ronin/oc-twitch-plugin | /components/Check.php | UTF-8 | 1,688 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php namespace DigitalRonin\Twitch\Components;
use Cms\Classes\ComponentBase;
use DigitalRonin\Twitch\Classes\TwitchAPI;
class Check extends ComponentBase
{
/**
* @var bool
*/
public $channelIsOnline;
/**
* @inheritdoc
*/
public function ComponentDetails()
{
return [
... | true |
4007c05fcc0176cf5f2e7c67fa8b2fdb586bb053 | PHP | bedezign/dchelper | /src/DCHelper/Commands/Helpers/ScriptRunner.php | UTF-8 | 5,186 | 2.75 | 3 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | <?php
namespace DCHelper\Commands\Helpers;
use DCHelper\Exceptions\HelperFailedException;
use DCHelper\Tools\External\Docker;
use DCHelper\Tools\External\Exec;
class ScriptRunner
{
private $doEnvSubst;
private $service;
private $lockFile;
private $isLocal = false;
private $container;
privat... | true |
70c194fab4026e46b36c30a87e60dbdd28505b6c | PHP | spmwilson/PHP-User-Authentication-SQLite3 | /lib/database.php | UTF-8 | 1,693 | 2.671875 | 3 | [] | no_license | <?php
class Database extends SQLite3 {
public function __construct(){
parent::__construct("a4.db");
}
function getNumberOfUsers(){
$user_num = $this->query("SELECT count(*) FROM User");
return $user_num->fetchColumn();
}
function getUsers(){
$users = $this->query('SELECT * FROM User');
return $use... | true |
6087a253543538c1e2c137d9bba7109f3b00150d | PHP | 12AbelCabreraMiranda/Project_Aeropuerto | /bd/guardar_pasajero.php | UTF-8 | 3,516 | 2.578125 | 3 | [] | no_license | <?php
$serverName = 'localhost';
$connectionInfo = array('Database'=>'avionera','UID'=>'sa','PWD'=>'dba', 'CharacterSet'=>'UTF-8');
$con = sqlsrv_connect($serverName, $connectionInfo);
$nombre = $_POST["nombre"];
$apellido = $_POST["apellido"];
$doc = "pasaporte";
$codigo = ... | true |
0a0336c3fad14ac5dc2a6871de7c3f06f18bcb77 | PHP | joel-fragoso/projeto_tdd | /src/App/Shopping/Handler/FifteenOrTwentyFivePorcentHandler.php | UTF-8 | 352 | 2.640625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Shopping\Handler;
class FifteenOrTwentyFivePorcentHandler extends CalculatorRuleAbstract
{
protected function limit()
{
return 2500;
}
protected function porcentOverLimit()
{
return 0.75;
}
protected function porcentBase()
... | true |
b09d128563c9595325426503b613dc47f0669121 | PHP | peakphp/framework | /src/Blueprint/Collection/ObjectAccess.php | UTF-8 | 515 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Peak\Blueprint\Collection;
interface ObjectAccess
{
/**
* @param string $key
* @return mixed
*/
public function &__get(string $key);
/**
* @param string $key
* @param mixed $value
*/
public function __set(string $key, $value);
... | true |
ae2b35ef0ae1e0d9923948810dff044ac104ab34 | PHP | Daryl-Boyce/Team__Homepage | /classes/MessageSubmission.php | UTF-8 | 1,895 | 2.96875 | 3 | [] | no_license | <?php
class MessageSubmission extends Formsubmit {
public $fname;
public $lname;
public $email;
public $phonenumber;
public $message;
public $dataprotection;
public function getFName()
{
return $this->fname;
}
public function getLName()
{
return $this->l... | true |
a2064118e4079d90b111098a6481f056a80e7be6 | PHP | framini/acsa | /application/models/auth/empresas.php | UTF-8 | 10,091 | 2.59375 | 3 | [] | no_license | <?php
if (!defined('BASEPATH'))
exit('No direct script access allowed');
/**
* Modelo de datos para empresas
*
*/
class Empresas extends CI_Model {
function __construct() {
parent::__construct();
$ci = &get_instance();
}
/**
* Devuelve el record de la empresa en base al ID
*
* @param int
* @param... | true |
ce6ca362e14dccf17feba8aaff8bd6d124c56ad7 | PHP | hackman1028/quintetecommerce | /seller/addbook.php | UTF-8 | 3,851 | 2.53125 | 3 | [] | no_license | <?php
include '../seller/seller.php'
?>
<div class ="container">
<div class="form-style">
<form action="" method="POST" enctype="multipart/form-data">
<h2> Add books </h2>
<ul>
<li>
<input type="text" id="PID" name="PID" placeholder="Product ID" class="field-split align-left" required>
<input type="tex... | true |
feec6bffd9f64bbe8449d17610d920bb787015bc | PHP | rubythonode/garlicbot | /src/Actions/System/SelfUpdate.php | UTF-8 | 1,854 | 2.5625 | 3 | [] | no_license | <?php
namespace ModernPUG\GarlicBot\Actions\System;
use ModernPUG\GarlicBot\Contracts\ActionInterface;
use ModernPUG\GarlicBot\Manager;
use Slack\ChannelInterface;
use Slack\RealTimeClient;
class SelfUpdate implements ActionInterface
{
/** @var \ModernPUG\GarlicBot\Manager */
protected $bot;
/** @var \Sl... | true |
6d48bca241904b9ee24580db119b657f60640ec4 | PHP | bactvk/hajimari_find_work | /hajimari/app/Job.php | UTF-8 | 3,790 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use DB;
class Job extends Model
{
protected $table = 'jobs';
public static function getFieldParent($id)
{
return DB::table('job_category')->where('parent_id',$id)->get();
}
public static function search($inputs,$page=1)
{
... | true |
b550b1b9905a2d902409c620b34c9945e9d0fc35 | PHP | ehvoluti/fluxo | /class/carimbo.class.php | UTF-8 | 1,212 | 2.53125 | 3 | [] | no_license | <?php
require_once("websac/require_file.php");
require_file("class/cadastro.class.php");
class Carimbo extends Cadastro{
function __construct($key = NULL){
parent::__construct();
$this->table = "carimbo";
$this->primarykey = "codcarimbo";
$this->setcodcarimbo($key);
if($this->fields[$this->primary... | true |
c3bcc24696a4174978b1510580595661d38a6e40 | PHP | occ2/skeleton | /app/Base/controls/FormControl/builders/FormBuilder.php | UTF-8 | 15,131 | 2.546875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
/*
* The MIT License
*
* Copyright 2018 Milan Onderka <milan_onderka@occ2.cz>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation... | true |
db2e2dffdb1f51d4a68e143a8c82bcaab36c2cf6 | PHP | zeopix/SymfonyBuilder | /Manager/ConfigManager.php | UTF-8 | 1,853 | 2.609375 | 3 | [] | no_license | <?php
namespace Iga\BuilderBundle\Manager;
use Iga\BuilderBundle\Model\BundleModel;
use Iga\BuilderBundle\Model\FileModel;
class ConfigManager {
private $rootDir;
private $cm;
public function __construct($rootDir,CommandManager $commandManager)
{
$this->cm = $commandManager;
$this->rootDir = $rootDir."/../s... | true |
e0ccd55972ed1b2a0fe5c3c86f1e86415f0837af | PHP | ToshineeBhasin/Faculty_Development_Program_web | /yearregister.php | UTF-8 | 6,195 | 2.75 | 3 | [] | no_license | <?php
session_start();
include 'connection.php';
$conn = OpenCon();
$sql = "SELECT * FROM login ";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while ($row = $result->fetch_assoc()) {
if ($_SESSION["password"] == $row['pass'] && $_SESSION["username"] == $row['... | true |
3cd21d3601553b44674aa96d681bf1e80735b270 | PHP | FredPeal/canvas-core | /src/Models/EmailTemplatesVariables.php | UTF-8 | 1,916 | 2.625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Canvas\Models;
/**
* Classs for Email Templates
* @property Users $userData
* @property Request $request
* @property Config $config
* @property Apps $app
* @property \Phalcon\DI $di
*
*/
class EmailTemplatesVariables extends AbstractModel
{
/**
*
* @var i... | true |
8a93004242eb1e515d0077c3267c21e3150e6267 | PHP | sachitsac/lumen-sample-api | /src/app/Repositories/Eloquent/Job.php | UTF-8 | 474 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Repositories\Eloquent;
use App\Job as JobModel;
use App\Repositories\ResourceRepository;
use App\Repositories\Contracts\Job as JobContract;
class Job extends ResourceRepository implements JobContract
{
public function entity()
{
return JobModel::class;
}
public function validationRu... | true |
21c9af78e5d6eca9e44bab0e90ce5df40a5e87e4 | PHP | kovey/pulsar | /src/Client/Producer.php | UTF-8 | 801 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* @description producer of pulsar
*
* @package
*
* @author kovey
*
* @time 2022-06-29 18:09:11
*
*/
namespace Kovey\Pulsar\Client;
use Kovey\Pulsar\Message\ResInterface;
use Kovey\Pulsar\Message\Result;
use Kovey\Pulsar\Exception\Disconnect;
class Producer extends Base
{
protected function init... | true |
0faa42a4ad2a746fea1b503ba6fb221cefa16938 | PHP | ivail89/UniLecs | /task_010.php | UTF-8 | 1,047 | 3.75 | 4 | [] | no_license | <?php
/**
* Данна целочисленная матрица. Если элемент равен 0, то заполняем нулями строку и столбец
*/
function zeroMatrix($arr)
{
$arrI = array();
$arrJ = array();
// Сначала необходимо узнать все нулевые позиции, потом заполнять нулями.
for ($i = 0; $i < count($arr); $i++) {
for ($j = 0; $j < count($ar... | true |
66489cfee9d45320ec14e136dd12f660d6df5d9c | PHP | pipan/log-outsourced-php-sdk | /src/Request/RequestBuilder.php | UTF-8 | 1,062 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace OutsourcedSdk\Request;
use GuzzleHttp\Psr7\Request;
use Psr\Http\Message\RequestInterface;
class RequestBuilder
{
private $method;
private $body;
private $headers;
private $url;
public function __construct()
{
$this->method = 'GET';
$this->body = '';
$... | true |
ef0767f18a2bfc43422acbe2705ed8bb54b1880b | PHP | shamssuny/simple-php-event-management | /db.php | UTF-8 | 2,270 | 2.71875 | 3 | [] | no_license | <?php
include 'config.php';
class db{
public function __construct(){
//create nessary tables in constructor to avoid collsion
//get pdo connection
$db=$this->conn();
$qr = "CREATE TABLE IF NOT EXISTS manager (username varchar(200),password varchar(200));";
$qq = "CREATE TAB... | true |
bb4c892a03ddc96da3fedefe08d8aa084ef692d6 | PHP | salmanawhy4/auditapk | /tambah.php | UTF-8 | 1,670 | 2.53125 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION["login"])) {
header("location: login.php");
exit;
}
require 'functions.php';
if ( isset($_POST["submit"]) ) {
if (tambah($_POST) > 0 ) {
echo "<script>
alert('data berhasil ditambahkan!');
document.location.href = 'index.php'
</script>";
}... | true |
4e98b126d3bf97fdd7de04305be8eb9e61fd54b7 | PHP | leksanboy/Outroo-SSR | /src/assets/api/audios/uploadFiles.php | UTF-8 | 2,558 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php include "../db.php";
// Get file information with getid3
require '/usr/share/php/getid3/getid3.php';
$ipAddress = $_SERVER['REMOTE_ADDR'];
$session = sessionId();
$fileName = generateRandomString(23);
$fileNameMp3 = $fileName.'.mp3';
$fileNameJpg = $fileName.'.jpg';
$fileTitle = htmlspecialchars($_... | true |
2315a34e6438b54a6742455a90b9b5d76aa02e49 | PHP | fracz/refactor-extractor | /results/moodle--moodle/a3d5830a0a40611934927998f9b8596f033e55fe/after/outputlib_test.php | UTF-8 | 5,078 | 2.546875 | 3 | [] | no_license | <?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle ... | true |
ed3a20504c477b3be4e5a35b0ccca85060d9642b | PHP | Sjoekoe/Equimundo | /app/Models/Advertising/Contacts/AdvertisingContactRouteBinding.php | UTF-8 | 710 | 2.625 | 3 | [] | no_license | <?php
namespace EQM\Models\Advertising\Contacts;
use EQM\Http\AbstractRouteBinding;
use EQM\Http\RouteBinding;
class AdvertisingContactRouteBinding extends AbstractRouteBinding implements RouteBinding
{
/**
* @var \EQM\Models\Advertising\Contacts\AdvertisingContactRepository
*/
private $advertisingC... | true |
687eb79372f150dac90bd803291fa833fc99032a | PHP | Lelenaic/hky17 | /database/seeds/ChargingStationsTableSeeder.php | UTF-8 | 1,512 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class ChargingStationsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//load the CSV document from a file path
$csv = \League\Csv\Reader::createFromPath(base_path() . '/data.csv... | true |
533e1242df63f4e79347b355f6dc8a6daf6c87e6 | PHP | hassanazimi/GymSystem | /public/sessions.php | UTF-8 | 3,233 | 2.703125 | 3 | [] | no_license | <?php require_once("../includes/session.php"); // MUST BE FIRST session.php is required so we have session started already ?>
<?php require_once("../includes/db_connection.php"); // connect to database ?>
<?php require_once("../includes/functions.php"); // function.php required once so we use functi... | true |
fc3d11c80f5339bc80bdfccd2ab7d55204e6896d | PHP | lnroma/gtkPHP7 | /window.php | UTF-8 | 230 | 2.96875 | 3 | [] | no_license | <?php
function alert($title) {
$gtk = new GtkPhp;
return $gtk
->setTitle($title)
->setButtonTittle("Ok")
->createWindow()
->setButton()
->render();
}
if(alert("Hellow habr")) {
alert("Hellow again");
}
| true |
e2b14e708314fa35ab8b31f57ad7379f9b95adab | PHP | Perpy2001/ProvaEsame2017 | /Sito/pagine/prenotazioniViaggio.php | UTF-8 | 2,294 | 2.828125 | 3 | [] | no_license |
<html>
<head>
<?php
$mail = $_GET['mail'];
$codV = $_GET['codV'];
$mysqli = new mysqli('localhost', 'root', '', 'prova_esame_2017');
if (isset($_POST['acetta'])) {
acetta($_POST['codR']);
$mysqli->query("UPDATE viaggio SET disponibilita = disponibilita -1 WHERE codV = $codV");
}
if (isset($_... | true |
df50d16d71e7d8d958f110fe1a9dad6c23dd13cb | PHP | nickzarzosa/CST438-336-Final | /includes/aggregateFunctionsSum.php | UTF-8 | 825 | 3.578125 | 4 | [] | no_license | <?php
require 'dbConnection.php'; //require database connection
$dbConn = getConnection(); //connects with database and tables
$sql = "SELECT COUNT(gender)FROM users WHERE gender = 'M'"; //aggregate function to count the number of males
$namedParameters = array();
$stmt = $dbConn->prepare($sql);
$stmt->execute($na... | true |
c78662ca8f754e9add334fc9a4bfe0df6ec0be48 | PHP | pierregaimard/projet07 | /src/Security/Voter/UserVoter.php | UTF-8 | 1,566 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Security\Voter;
use App\Entity\User;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
use Symfony\Component\Security\Core\Security;
final class UserVoter extends Voter
{... | true |
ecbb2df2569b16a7cf23d584712a05027c8b553d | PHP | sadikoff/SensioGeneratorBundle | /Generator/Generator.php | UTF-8 | 3,490 | 2.765625 | 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 Sensio\Bundle\GeneratorBundle\Generator;
use Symfony\Component\Console\... | true |
50273f0dde973752e7bd85b67f4f015a501c4c53 | PHP | mojtabaRKS/api-exceptions | /tests/Unit/CustomDefaultExceptionTest.php | UTF-8 | 1,598 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Mojtabarks\ApiExceptions\Tests\Unit;
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Response;
use Mockery\Exception;
use Mojtabarks\ApiExceptions\Exceptions\CustomDefaultException;
use Mojtabarks\ApiExceptions\Tests\BaseTestCase;
class CustomDefaultExceptionTest extends BaseTestCase
{
priv... | true |
dfbbbeed71c90d3083474ce4a275ab3b1280d33f | PHP | garstikaitis/transatlantic | /app/Enums/RoleEnum.php | UTF-8 | 507 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Enums;
use App\Interfaces\EnumInterface;
abstract class RoleEnum implements EnumInterface
{
const VIEWER = 'VIEWER';
const COMPANY_ADMIN = 'COMPANY_ADMIN';
const EDITOR = 'EDITOR';
const SUPERADMIN = 'SUPERADMIN';
public static function enumsToString()
{
return im... | true |
277091f0b030ba2eeaa4ab72bd2e7b84beaa4034 | PHP | Maenhalah1/laravel_cms | /app/helpers.php | UTF-8 | 445 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
function inputTextValue($key, $object = null, $attribute = null){
return request()->old($key) !== null ? request()->old($key) :
( is_object($object) ? ( $object->$key ? $object->$key : ( $attribute !== null ? ( $object->$attribute ? $object->$attribute : null ) : null )) : null);
}
function getError... | true |
2307c2d064387e5fb15a46991d84346ddc16e9be | PHP | exgamer/concepture-core | /src/domain/Domain.php | UTF-8 | 1,129 | 2.796875 | 3 | [] | no_license | <?php
namespace concepture\core\domain;
use concepture\core\base\Component;
use concepture\core\helpers\ArrayHelper;
use concepture\core\helpers\ContainerHelper;
use concepture\core\service\Service;
abstract class Domain extends Component
{
private $_services;
private function setService($name, Service $serv... | true |
4986462071be70837c5d8ff5c95160deec281fb5 | PHP | jmc076/GolgoFramework | /Private/Controllers/Http/HttpBase.php | UTF-8 | 2,023 | 3.21875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* @author Diego
* @version 1.0
*/
namespace Controllers\Http;
abstract class HttpBase {
protected $headers = array();
protected $httpVersion = '1.1';
protected $charset = 'UTF-8';
/**
* @var integer
*/
protected $statusCode = 200;
public function hasHeader($name) {
return isset ($this->hea... | true |
79e8239a5a28c86828acaef86fb13fbad8adaf8f | PHP | furusato-222/appkaihatu | /friend.php | UTF-8 | 2,214 | 2.96875 | 3 | [] | no_license | <?php
//フレンド追加
session_start();
header('charset=utf8');
$user_id = $_SESSION['user_id'];
//決定ボタンを押したとき
if (isset($_POST['sub'])) {
$friendid = htmlspecialchars($_POST['friend'], ENT_QUOTES, 'UTF-8');
if (!$conn = mysqli_connect("localhost", "root", "ecc", "appkaihatu")) {
//データベースに接続できない時のメッセージ
... | true |
f4a3be6070fdf2e8cc23ea24926d91c9b663226a | PHP | antoniosarosi/lune-framework | /src/Lune/Container/DependencyInjection.php | UTF-8 | 1,997 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Lune\Container;
use ReflectionClass;
use ReflectionFunction;
use ReflectionMethod;
use Lune\Database\Model;
use Lune\Http\Exceptions\HttpNotFoundException;
/**
* Dependency injector for controller methods or normal functions.
*/
class DependencyInjection {
/**
* Resolve parameter values.
... | true |
ee375098ee3fcbd6caaaa4a414650fab03aa8a4f | PHP | GodsDev/mycms | /dist/classes/Mail.php | UTF-8 | 3,855 | 2.84375 | 3 | [] | no_license | <?php
namespace GodsDev\mycmsprojectnamespace;
use GodsDev\MyCMS\MyCMS;
use GodsDev\MyCMS\MyCommon;
use Assert\Assertion;
//use Psr\Log\LoggerInterface;
//use Tracy\Debugger;
class Mail extends MyCommon
{
use \Nette\SmartObject;
/**
*
* @var \Psr\Log\LoggerInterface
*/
private $logger;
... | true |
9c9ad7df7e3a6f1030b03f572010a94a9c39b341 | PHP | Xiong1724838099/8.21-mvc | /node.php | UTF-8 | 1,760 | 2.828125 | 3 | [] | no_license | <?php
//mvc 架构
//model view controller
//用来记录一个口令
define("MVC",true);
//超全局变量
//应用文件夹
//魔术常量
//__DIR__能够获取当前程序运行的目录,在本地文件夹的地址
//__FILE__获取当前运行的程序文件 ,在本地文件地址
//__CLASS__ 获取当前类的名字
//__METHOD__ 获取当前函数的名字
//__LINE__ 当前程序所在行;
//DIRECTORY_SEPARATOR 在当前系统中所用下的斜杠 mac中的 / windows中的\
define("APP_NAME",__DIR... | true |
1318529b68057fc63a561a7663622629d27c142d | PHP | movor/laravel-custom-casts | /src/package/HasCustomCasts.php | UTF-8 | 3,527 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Movor\LaravelCustomCasts;
trait HasCustomCasts
{
/**
* Each field which is going to be custom casted
* will have its own custom cast instance in this array
*
* @var array
*/
protected $customCastObjects = [];
/**
* Boot trait
*/
public static functio... | true |
0ce5aa23bc90fe657979d56915e817af7d8ae693 | PHP | chad1791/alphaSMS | /application/controllers/Pages_students.php | UTF-8 | 7,719 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Pages_students extends CI_Controller{
public function __construct(){
parent::__construct();
$this->load->model('Student_model');
}
public function page($page='login'){
if(!file_exists(APPPATH.'views/student/'.$page.'.php')){
show_404();
}
if($this->session->userdata('studen... | true |
870cccc4f74b71d258210419eb49522a7bc4adf4 | PHP | infynity/infy_mvc_smarty | /app/models/user_model.php | UTF-8 | 1,637 | 2.625 | 3 | [] | no_license | <?php
class UserModel extends CommonModel
{
function create($post)
{
$username = trim($post['username']);
$password = md5(trim($post['password']));
$token = md5($username . $password . time() . rand(0, 9999));
$this->db->query("insert into user (`name`, `password`,`token`) value... | true |
7157b5c5b4488c238fbb96cf10d6e0f27e9675d4 | PHP | ForceCry/iem | /htdocs/sites/xday_hilo.php | UTF-8 | 3,562 | 2.640625 | 3 | [] | no_license | <?php
/* Make a nice simple plot of 7 day temperatures */
include('../../config/settings.inc.php');
include("$rootpath/include/database.inc.php");
include("setup.php");
$days = isset($_GET["days"]) ? intval($_GET["days"]) : 21;
$st->load_station( $st->table[$station]["climate_site"]);
$cities = $st->table;
$climat... | true |
e116f9b876f4cd369156137c90f70f03a2e0cd21 | PHP | JayHo1/Piscine-42-PHP-2014- | /D02/ex00/another_world.php | UTF-8 | 141 | 2.765625 | 3 | [] | no_license | #!/usr/bin/php
<?php
if ($argc > 1)
{
$array = preg_replace("/[ \t]+/", " ", $argv[1]);
$array = trim($array);
echo "$array\n";
}
?> | true |
96a37c3e7af8844418b98a3c73ce0cdee482d73b | PHP | jwhulette/Filevuer | /src/controllers/FileController.php | UTF-8 | 2,279 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Jwhulette\Filevuer\Controllers;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Jwhulette\Filevuer\Traits\SessionDriverTrait;
use Jwhulette\Filevuer\Services\FileServiceInterface;
/**
* FileController Class
*/
class FileController extends Controller
{
... | true |
25bf1f123796338701f2f4df3dd62bcb55569feb | PHP | octobroid/oc-boilerplate | /modules/system/twig/SecurityPolicy.php | UTF-8 | 5,486 | 2.515625 | 3 | [] | no_license | <?php namespace System\Twig;
use Twig\Markup;
use Twig\Template;
use Twig\Sandbox\SecurityPolicyInterface;
use Twig\Sandbox\SecurityNotAllowedMethodError;
use Twig\Sandbox\SecurityNotAllowedPropertyError;
/**
* SecurityPolicy is a security policy using an allow-list
*
* @package october\system
* @author Alexey Bo... | true |
9815c69fc0e39293d9e094a14fe1319452026ee7 | PHP | Sayali121/oop | /traits.php | UTF-8 | 473 | 3.671875 | 4 | [] | no_license | <?php
//OOPs Concept in PHP Traits
class abs
{
public function Test()
{
echo"Hello, I am function of abs class";
}
}
trait t1
{
function Test1()
{
echo"I am function of traits t1";
}
}
trait t2
{
function Test2()
{
echo"I am function of traits t2";
}
}
class o... | true |
a323cb79c7d9d4e28547c541e46219b2243f6f4b | PHP | swongwc3/test | /templates/statsumtemplate.php | UTF-8 | 1,284 | 2.625 | 3 | [] | no_license | <div class="row">
<div class="col-sm-5">
<p><strong><?php echo $setsum['Title']; ?></strong></p>
<?php
if ($setsum['PA'] || isset($setsum['MA']) || isset($setsum['PD']) || isset($setsum['MD']))
{
echo '<div class="row"><div class="col-xs-6">';
echo 'PA: ' . $... | true |
44502785bfdb1a9e058d2145ffd73e1fb1407605 | PHP | jlchafardet/virtualhost-creator | /src/JLChafardet/Command/CreateCommand.php | UTF-8 | 6,316 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace JLChafardet\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Helper\TableCell;
use Symfony\Component\Console\Helper\TableSeparator;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\In... | true |
1f73b553ece7bde5fe94d440114aec92ed5f07a1 | PHP | lexstephen/Code-Cuts | /php/1230-03-02.php | UTF-8 | 1,288 | 3.0625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Back, back, forth & forth</title>
</head>
<style>
body {background-color: #ff0;
color: navy;
text-align: center;
font-family: verdana;
font-size: 14pt;}
#pretty {margin: auto;
margin-top: 30px;
border: 20px navy solid;
height: 100px;
wid... | true |
bdefa252062f531f045a59d8b2e71b4241a4ce2e | PHP | nvd1991/Spotify-Music | /includes/handlers/login-handler.php | UTF-8 | 1,068 | 2.671875 | 3 | [] | no_license | <!--login-handler.php-->
<?php
//****************************************************define functions *************************************************
/**
* Setup login data
*
* @return mixed Register data
*/
function setup_login_data(){
$loginData['loginUsersname'] = sanitize_input($_POST['loginUsersname']);... | true |