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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
61ad47308bbf529d7ed609ffb1e653d0d835a278 | PHP | mailjobblog/laravel_ioc | /app/Providers/TestIocServiceProvider.php | UTF-8 | 931 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Providers;
use App\Services\TestIocService;
use Illuminate\Support\ServiceProvider;
class TestIocServiceProvider extends ServiceProvider
{
/**
* 将服务接口注绑定至服务容器
*
* @return void
*/
public function register()
{
// demo1 写法
$this->app->bind('App\Interfa... | true |
385b48876256c07ee1ca179b91c9d81f06ae077f | PHP | sebastienheyd/boilerplate | /src/Controllers/DatatablesController.php | UTF-8 | 931 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Sebastienheyd\Boilerplate\Controllers;
use Illuminate\Http\Request;
use ReflectionException;
class DatatablesController
{
/**
* Rendering DataTable.
*
* @param Request $request
* @param string $slug
* @return mixed
*
* @throws ReflectionException
*/
... | true |
876c5d5bb2ec49d1e8603c1eaf1e4ab8080aad3b | PHP | joel997/php_garden | /sandbox2/db.php | UTF-8 | 469 | 2.703125 | 3 | [] | no_license | <?php
$host = '127.0.0.1';
$db_name = 'travel_website';
$user = 'root';
$pass = '';
$charset = 'utf8mb4';
$db = null;
try{
$dsn = "mysql:host=$host;dbname=$db_name;charset=$charset";
$opt = [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATT... | true |
ec8c87d4d647132173589930d2298310b4198b6a | PHP | wizory/llock | /src/Console/Commands/LlockFree.php | UTF-8 | 1,362 | 2.90625 | 3 | [] | no_license | <?php
namespace Wizory\Llock\Console\Commands;
use Illuminate\Console\Command;
use Log;
use Wizory\Llock\Models\Lock;
class LlockFree extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'llock:free {name}';
/**
* The c... | true |
a4fb9f102b69766453be5a84d6924453b3e7249c | PHP | md-arif-rzp/freshers-bootcamp | /php_training/Day1/Test-4.php | UTF-8 | 1,347 | 3.1875 | 3 | [] | no_license | <?php
$json="{\"players\":[{\"name\":\"Ganguly\",\"age\":45,\"address\":{\"city\":\"Hyderabad\"}},{\"name\":\"Dravid\",\"age\":45,\"address\":{\"city\":\"Hyderabad\"}},{\"name\":\"Dhoni\",\"age\":37,\"address\":{\"city\":\"Hyderabad\"}},{\"name\":\"Virat\",\"age\":35,\"address\":{\"city\":\"Hyderabad\"}},{\"name\":\"Ja... | true |
80b87ad2a3e1645b712d6f8d391fa6bb08c4ccbd | PHP | digitalgrease/PHP-Library | /Library/Utils/Logger.php | UTF-8 | 4,517 | 3.203125 | 3 | [] | no_license | <?php
/*
* Copyright (c) 2017 Digital Grease Limited.
*
* Version 1.0 Friday 17th February 2017
*
* Tom Gray
*/
namespace DigitalGrease\Library\Utils;
/**
* General data logger.
*
* @author Tom Gray
* @version 1.0 Friday 17th February 2017
*/
class Logger
{
/**
* The default number of days... | true |
4b42c6690026a5c66f5f53108b1363808079b089 | PHP | technoexponent02/laravel_restapi_backend | /project/app/Policies/EducationPolicy.php | UTF-8 | 1,059 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Policies;
use App\User;
use App\Education;
class EducationPolicy
{
// public function before($user, $ability)
// {
// if ($user->isSuperAdmin()) {
// return true;
// }
// }
/**
* Determine if the given education can be updated by the user.
... | true |
23dee0659317b6bf03b0f59242c3915f1f602676 | PHP | ThingsMinder/web | /PHP/test_2020/test02/index.php | UTF-8 | 3,793 | 2.828125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ePhoto</title>
<script type="text/javascript">
function DeleteAlbum(album_id){
if(confirm('请确认是否删除此相册?'))
location.href = 'delAlbum.php?album_id=' + album_id;
}
</s... | true |
8b786aeb97b1dd7725de699040058c059dc027e0 | PHP | Manoj16122/Swara-Music-appp- | /register_process.php | UTF-8 | 1,397 | 2.5625 | 3 | [] | no_license | <?php
session_start();
include_once ("files/functions.php");
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$username = $_POST['username'];
$password = $_POST['password'];
//hashing the password
$password = password_hash($password, PASSWORD_DEFAULT);
... | true |
b2afd0afde762013684d388118673fb0580bdbdc | PHP | lockyluchiano/DashboardProject | /app_local/rewrite/FrontNameResolver.php | UTF-8 | 2,717 | 2.5625 | 3 | [] | no_license | <?php
/**
* Backend area front name resolver. Reads front name from configuration
*
* Copyright © 2015 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace never\Magento\Backend\App\Area;
use Magento\Backend\Setup\ConfigOptionsList;
use Magento\Framework\App\Config\ScopeConfigInterfac... | true |
13bb18c4104b2bfe63f6151ba3edef106c5db74a | PHP | jon-kizzang/kizzangapi | /www/application/helpers/ChefConfig.php | UTF-8 | 1,136 | 2.921875 | 3 | [
"Apache-2.0"
] | permissive | <?php
// Reads config from json file dropped at Chef creation
//
// Usage:
//
// From within a PHP file:
//
// include_once "../kizzang_application/helpers/ChefConfig.php";
//
class ChefConfig
{
// property declaration
private $configuration_file_path = "../chef-configs/remote-config.json" ;
publi... | true |
2f08aecabcdc525b0baccfee3722f662a490bc7c | PHP | Mark1Mat/P2018_A2_GR2_Acheen_Matisse_SF2 | /src/Blog/AdminBundle/Listener/userListener.php | UTF-8 | 779 | 2.546875 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace Blog\AdminBundle\Listener;
use Blog\AdminBundle\Entity\User;
use Doctrine\ORM\Event\LifecycleEventArgs;
class userListener
{
/**
* @param LifecycleEventArgs $args
*/
public function prePersist(LifecycleEventArgs $args)
{
$entity = $args->getEntity();
... | true |
842940e0b64f8038ae000009b00833497574849a | PHP | lourenssystems/api-wrapper | /src/Response/ResponseItem.php | UTF-8 | 3,017 | 3.140625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace LourensSystems\ApiWrapper\Response;
/**
* Class ResponseItem
* @package LourensSystems\ApiWrapper\Response
*/
class ResponseItem
{
/**
* Item's values
* @var \stdClass
*/
private $values;
/... | true |
f147127f7d322add9e7e16e321e290ed1b9cf5bd | PHP | mvachette/adventOfCode2020 | /puzzles/day4/day4.php | UTF-8 | 531 | 2.609375 | 3 | [] | no_license | <?php
require_once __DIR__ . '/../../src/passportScanner.php';
echo "\n\n" . '--- PART 1 ----' . "\n\n";
$startTime = microtime(true);
echo \MVA\AOC2020\count_valid_passports(
explode("\r\n\r\n", file_get_contents(__DIR__ . '/input'))
);
echo "\n\n" . (microtime(true) - $startTime);
echo "\n\n" . '--- PART 2 ... | true |
05f1ff7bfa464989f6e07107a4fade9bf1b50bab | PHP | tiagowebersc/PHP_ecommerce | /registration.php | UTF-8 | 4,630 | 2.984375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Book store - Registration</title>
<link rel="stylesheet" href="style/style.css">
</head>
<body>
<?p... | true |
53892bd92cf6f7628a97100c0535ca1fe8fb16f2 | PHP | Chizenbop/Glass.Gallery | /index.php | UTF-8 | 1,300 | 2.703125 | 3 | [] | no_license | <?php
// Inialize session
session_start();
// Check, if user is already logged in, then jump to secured page
if(isset($_SESSION['username'])) {
header('Location: admin/securedpage.php');
}
?>
<?php $pagetitle = "Home Page"; ?>
<?php include $sitename."header.htm"; ?>
<?php
$imagepath = $sitename."images";
?>
<div s... | true |
233a805363453a93f4b2aa5737702d52e750701d | PHP | tkobilov/dreamfactory | /app/Http/Middleware/DataCollection.php | UTF-8 | 853 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?php namespace Dreamfactory\Http\Middleware;
use Closure;
use DreamFactory\Core\Utility\Session;
use DreamFactory\Managed\Support\Managed;
class DataCollection
{
//******************************************************************************
//* Methods
//************************************************... | true |
95d618078c3fb3425208d23c9f6c6aa533386e5e | PHP | ItsJimi/42 | /Piscine-PHP/j01/ex09/ssap2.php | UTF-8 | 1,235 | 3.03125 | 3 | [] | no_license | #!/usr/bin/php
<?php
function is_alpha($str){
$str = str_split(strtolower($str));
foreach ($str as $char) {
if (ord($char) < 97 || ord($char) > 122)
return (false);
}
return (true);
}
function compare1($a, $b)
{
$a = strtolower($a);
$b = strtolower($b);
if (is_alpha($a))
$val_a = 1;
else i... | true |
e0650752a09ae415c18b72dad0e4277eeff255d6 | PHP | DDDominik/pikapika | /handle/judgeUsername.php | UTF-8 | 468 | 2.625 | 3 | [] | no_license | <?php
include "connectDB.php" ;
$name = test_input($_POST["username"]) ;
//查询用户名是否存在
$sql = "SELECT * FROM user WHERE username = '$name'" ;
$res = $dbh->prepare($sql) ;
$res->execute() ;
echo ($res->rowCount() > 0 ? "*用户名已存在" : "√用户名可用") ;
function test_input($data)
{
$data = trim($data);
$data = stripslashes(... | true |
9d4684fec88193ffcba443d6cd54184386ea5851 | PHP | developerkausik/insta-bot-awebon | /app/Database/Migrations/2020-08-07-123654_AddAmountOrdersTable.php | UTF-8 | 610 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Database\Migrations;
use CodeIgniter\Database\Migration;
class AddAmountOrdersTable extends Migration
{
public function up()
{
$this->forge->addColumn('orders', [
'order_amount' => [
'type' => 'DECIMAL',
'constraint' => '10,2',
... | true |
929e18080ade8e4af3bb12c3847b05c3eef5b481 | PHP | Arthurhall/tech-challenges | /backend/src/Model/Survey.php | UTF-8 | 3,005 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace IWD\JOBINTERVIEW\Model;
use ArrayObject;
use IWD\JOBINTERVIEW\ {
Exception\UnknownQuestionTypeException,
Model\Question\AbstractQuestion,
Model\Question\QuestionDate,
Model\Question\QuestionNumeric,
Model\Question\QuestionQcm
};
class Survey
{
/**
* @var string
*/
... | true |
38454010477b996daf29a4e7eb2abf114b18fe8b | PHP | dmvolt/persona-scool | /modules/area/controllers/DefaultController.php | UTF-8 | 3,338 | 2.546875 | 3 | [] | no_license | <?php
namespace app\modules\area\controllers;
use app\controllers\FrontendController;
use app\modules\area\models\Area;
use yii\web\NotFoundHttpException;
use yii\web\BadRequestHttpException;
use yii\base\InvalidParamException;
use yii\data\ActiveDataProvider;
use Yii;
/**
* Default controller for the `area` modu... | true |
99ca6fc9687a703d4b684eab6eab7192a32ac5bc | PHP | andreolvgomes/lojavirtual | /admin/cadCategoriasDelete.php | UTF-8 | 1,789 | 2.515625 | 3 | [] | no_license | <?php
include 'includes/head.php';
include 'includes/navigation.php';
require_once '../persistence/daoCategorias.class.php';
$dao_categorias = new DaoCategorias();
$categoria = new Categorias();
$count_parent = false;
if ($_GET) {
$categoria = $dao_categorias->select($_GET['cat_codigo'])[0];
$count_parent = $... | true |
f3ab7a43e315dfd20349b0d2523640cd4ba5b59c | PHP | cecepsuwanda/new_mdk | /helper/arraymuldim.class.inc | UTF-8 | 2,010 | 2.859375 | 3 | [] | no_license | <?php require_once('shared.php');
class arraymuldim
{
private $main_array;
private $level;
private $idx;
private $ckey;
function __construct() {
$this->init();
}
private function init()
{
$this->main_array = array();
$this->level=0;
$this->idx=array();
$this->idx[$this->level]=0;
$thi... | true |
1ba3baa3dfb2f7bca2c25e15ebe1dcb5730e25ad | PHP | zaki1993/fmi-web-technologies | /homeworks/31/81279.php | UTF-8 | 4,028 | 3.171875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title> Homework 2.0</title>
</head>
<body>
<form method="POST">
<label for="name">Name: </label>
<input type="text" name="name"/>
<label for="lectrer">Lecturer:</label>
<input type="text" name="lecturer">
<label for="description">Description: </label>
<input... | true |
81fbcddcb2892274f896e1adeb612b5d6dde5c6f | PHP | OBRIO-Team/google-api-client | /src/Client/GoogleServicesFactory.php | UTF-8 | 2,052 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the obrio-team/google-api-client library
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Obrio team: https://www.linkedin.com/company/obrio-genesis
*
* @author Alexander Zodov <alekzo1992@gmail.c... | true |
b029905b0caf19c7e107d86d529d2cca21a019ae | PHP | jcapoduri/ndorm | /src/solution.php | UTF-8 | 2,557 | 3.25 | 3 | [] | no_license | <?php
namespace nd;
class solution {
/*
* current instance of solution
*/
static protected $instance = null;
/*
* instance
*/
static public function currentSolution() { return self::$instance; }
/*
* json passed in contructor
*/
protected $raw;
... | true |
8436d7fdf772a348728e5cd6e9465f42cbf6daef | PHP | michaelmcandrew/ff | /php/CRM/Report/Form/Activity/RecentActivity.php | UTF-8 | 3,426 | 2.59375 | 3 | [] | no_license | <?php
class CRM_Report_Form_Activity_RecentActivity extends CRM_Report_Form{
var $activityTypes = array(
'48' => array(
'name' => 'Via SMS',
),
'38' => array(
'name' => 'Via email'
)
);
function __construct(){
//i need to get the activity type, the contact name and the date
... | true |
09ed0dd9f56830f4f0024d88c51d51e274b69c49 | PHP | thefoovault/book-catalog | /src/BookCatalog/Application/Criteria/Criteria.php | UTF-8 | 547 | 2.96875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace BookCatalog\Application\Criteria;
final class Criteria
{
private const DEFAULT_OFFSET = 0;
private const DEFAULT_LIMIT = 10;
public function __construct(
private ?int $offset,
private ?int $limit
){
$this->offset = $offset ?? self::DEF... | true |
c77a17875a7ac0962a89d0583a209df169014572 | PHP | IrvinSanchez14/api-jws | /api/objects/user.php | UTF-8 | 11,252 | 2.640625 | 3 | [] | no_license | <?php
class User
{
private $conn;
private $table_name = "usuarios";
public $IdUsuario;
public $Nombre;
public $Alias;
public $IdTipoUsuario;
public $Email;
public $Passwd;
public $IdPermiso;
public $Estado;
public $activacion;
public function __construct($db)
{
$this->conn = $db;
}
f... | true |
48ac9cf2832db045ceb4a32d8dced0dbd9259c6f | PHP | amttmg/rb | /application/controllers/family.php | UTF-8 | 2,370 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Family extends CI_Controller {
private $image_name='';
private $image_status='no';
public function __construct()
{
parent::__construct();
$this->load->model('m_family','family');
$this->load->library('form_validation');
}
publi... | true |
ea7994e18b2dbbcf6db7992ac848caed1d432957 | PHP | DarkSide-Dev/HTML_Begginer_Projects | /ProjetoLacoRepeticao/exercicio6.php | UTF-8 | 3,413 | 2.5625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Laços de Repetição</title>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="CSS/estilo.css">
<link rel="stylesheet" type="text/css" href="CSS/exercicio6.css">
</head>
<body>
<div class="topo">
<div class="topoint">
<div class="menu">
<ul... | true |
055909b6c71ccb035ae44957388e4f9fa6944dd3 | PHP | itemcoder/php-learning | /todo-app/update-task.php | UTF-8 | 635 | 2.59375 | 3 | [] | no_license | <?php
require_once "inc/functions.php";
if ( ! is_user_logged_in() ) {
header( "Location: login.php" );
die();
}
$task = ! empty( $_POST['task'] ) ? trim( $_POST['task'] ) : null;
$id = ! empty( $_POST['id'] ) ? trim( $_POST['id'] ) : 0;
if ( ! $task && !$id) {
header( "Location: edit-task.php?error=Enter your ta... | true |
3d242ad1c63bd902c271fec7e60829115dc42e90 | PHP | achyarnurandi/virtuallab-baremetal | /includes/api_pictures.php | UTF-8 | 6,127 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | <?php
# vim: syntax=php tabstop=4 softtabstop=0 noexpandtab laststatus=1
/**
* html/includes/api_pictures.php
*
* Pictures related functions for REST APIs.
*
* @author Andrea Dainese <andrea.dainese@gmail.com>
* @copyright 2014-2016 Andrea Dainese
* @license BSD-3-Clause https://github.com/dainok/unetlab/blob/m... | true |
a9d9b5e9536906963746856fc4f9f8bdfe7aa58a | PHP | johncms/news | /src/Section.php | UTF-8 | 6,727 | 2.78125 | 3 | [] | no_license | <?php
/**
* This file is part of JohnCMS Content Management System.
*
* @copyright JohnCMS Community
* @license https://opensource.org/licenses/GPL-3.0 GPL-3.0
* @link https://johncms.com JohnCMS Project
*/
declare(strict_types=1);
namespace Johncms\News;
use Illuminate\Database\Eloquent\ModelNotFoundE... | true |
40ad16c6a38be4303bd574c50fe01f88d231bffe | PHP | isaiascardenas/lab-dbd | /app/Modulos/Paquetes/PaqueteVueloAuto.php | UTF-8 | 1,383 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Modulos\Paquetes;
use App\OrdenCompra;
use Illuminate\Database\Eloquent\Model;
use App\Modulos\ReservaAuto\ReservaAuto;
use App\Modulos\ReservaVuelo\ReservaBoleto;
class PaqueteVueloAuto extends Model
{
protected $table = 'paquete_vuelo_autos';
protected $fillable = [
'descripci... | true |
afab52bbed890875fbc3978314b6e9ab31ca1d8f | PHP | gkemps/EduBet | /module/EduBet/src/Scrapy/Service/ScrapyService.php | UTF-8 | 1,186 | 2.84375 | 3 | [] | no_license | <?php
namespace EduBet\Scrapy\Service;
use Doctrine\ORM\EntityManagerInterface;
use EduBet\Match\Entity\Match;
use EduBet\Scrapy\Entity\Scrapy;
class ScrapyService
{
/** @var EntityManagerInterface */
protected $em;
/**
* TournamentService constructor.
* @param EntityManagerInterface $em
... | true |
33163b28044284cdcb8d6b4dd77b3340f5fcff07 | PHP | douglasakamine/prospects_server | /class/Portabilidade.php | UTF-8 | 431 | 2.90625 | 3 | [] | no_license | <?php
class Portabilidade {
private $operadora;
public function consultaOperadora($numero){
/* $url_portabilidade = "http://url_here?numero=$numero";
return $this->operadora = file_get_contents($url_portabilidade); // Consulta a portabilidade através da URL acima
if($operadora == "0")
$operadora = "FI... | true |
b49735b6ed26cdf020422cc782aa315a8f27651e | PHP | dajve/module-customer-active-sessions | /Model/CustomerActiveSession/Validator.php | UTF-8 | 5,450 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Dajve\CustomerActiveSessions\Model\CustomerActiveSession;
use Dajve\CustomerActiveSessions\Api\Data\CustomerActiveSessionInterface;
use Dajve\CustomerActiveSessions\Helper\GetterSetterHelper;
use Magento\Framework\Data\OptionSourceInterface;
use Magento\Framework\Validator\Ab... | true |
d7df128d2c60821792633a7577ec5617380440d0 | PHP | horuschild/admin-app | /function.php | UTF-8 | 1,470 | 3.0625 | 3 | [] | no_license | <?php
$host = "localhost";
$user = "root";
$pass = "";
$db = "phpdasar";
$conn = mysqli_connect($host, $user, $pass, $db);
// Fungsi Query Handling
function query($query) {
global $conn;
$result = mysqli_query($conn, $query);
$rows = [];
while($row = mysqli_fetch_assoc($result)) {
$rows[] = $row;... | true |
e08cf2432056f3407d9a73f0c53e6c8fdb787995 | PHP | butsasha/examenationWork | /engine/class/categories.php | UTF-8 | 1,402 | 2.921875 | 3 | [] | no_license | <?php
class Categories {
private $username = 'but';
private $password = '3105044';
private $host = '94.244.128.42';
private $base = 'cw';
public $db;
function __construct($db) {
$this->db = $db;
}
public function getOne($id) {
$this->db->where('id', $id);
$categories = $this->db->getOne('categ... | true |
7252e1f984b0b4edd5f664643ae1462ae09cd388 | PHP | rectorphp/rector | /rules/TypeDeclaration/TypeAnalyzer/GenericClassStringTypeNormalizer.php | UTF-8 | 4,909 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
declare (strict_types=1);
namespace Rector\TypeDeclaration\TypeAnalyzer;
use PHPStan\Reflection\ReflectionProvider;
use PHPStan\Type\ArrayType;
use PHPStan\Type\ClassStringType;
use PHPStan\Type\Constant\ConstantIntegerType;
use PHPStan\Type\Constant\ConstantStringType;
use PHPStan\Type\Generic\GenericClassStri... | true |
4a98a0291ff886e0a6bfacfce410f1c0e7316c2d | PHP | NorbertElephant/Exercice_03W | /exo_Oriente_Objet/09_-_Design_patterns/Controle_minier/Classes/Nain.php | UTF-8 | 8,468 | 2.859375 | 3 | [] | no_license | <?php
Class Nain {
/***************************************************************************************************
* ATTRIBUTS
****************************************************************************************************/
/**
* ID du Nain
*
* @var int $_... | true |
52233bee79011d24ac5d3430512245fba7598a41 | PHP | paolord/typo3_tdd_demo | /typo3/sysext/backend/Classes/Tree/Renderer/ExtJsJsonTreeRenderer.php | UTF-8 | 4,279 | 2.796875 | 3 | [
"MIT",
"GPL-2.0-only",
"CC-BY-2.5"
] | permissive | <?php
namespace TYPO3\CMS\Backend\Tree\Renderer;
/*
* This file is part of the TYPO3 CMS project.
*
* It is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, either version 2
* of the License, or any later version.
*
* For the full copyright and license... | true |
04a54a7bbfb64ce9d3f65bd121932efb849039fd | PHP | lahiruroot/Newlanka | /Admin_login.php | UTF-8 | 5,078 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
session_start();
require_once('../DBConnection.php');
function input($data) {
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
$errors = array ("User_Name"=>"", "Password"=>"", "User_Block_or_Unblock"=>"", "Invalid_User_Details"=>"", "query"=>"");
//check for submit bubm... | true |
611587fed75c7843e881aca077ba45d165c0eda9 | PHP | clay567/portafoliobyclay9 | /ArchivoDeTesteo.php | UTF-8 | 830 | 2.65625 | 3 | [] | no_license | <?php
if ($enlace=mysqli_connect('localhost','root','','editorial'))print 'conectado a editorial';
print '<br>';
$query="select ciudadID , nombre from ciudad order by nombre";
$result=mysqli_query($enlace, $query);
echo mysqli_affected_rows($enlace),'filas afectadas en la consulta','<br>';
echo mysqli_num_rows($r... | true |
8c0dd0ddd009e9f4161a2f2d7a0c45c1c327bac4 | PHP | JuniorSiilva/laravel-api-skeleton | /app/Http/Requests/CreateCard.php | UTF-8 | 432 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Enums\CardBrand;
use Illuminate\Validation\Rule;
class CreateCard extends Request
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'digits' => ['required',... | true |
0ff919eb2f53f1f3cf414a264454b21c1424694b | PHP | djoshuapena/MafiaByTheSavages | /Mafia/Assets/Scripts/Login_CreateAccountScene/PHP Scripts/LoginAccountT.php | UTF-8 | 1,744 | 2.765625 | 3 | [] | no_license | <?php
//connections
$Hostname = "localhost";
$DBName = "id619425_savage";
$User = "savagemafia007";
$PasswordP = "Realmafia@Ecu";
$con = mysqli_connect($Hostname, $User, $PasswordP, $DBName) or die("Cant connect into database");
$Username = $_REQUEST["Username"];
$Password = $_REQUEST["Password"];
if(!$Username || !... | true |
767f999da437ad183c65131cd128100ea9506d83 | PHP | canadasatellite-ca/site | /app/code/CanadaSatellite/Cron/Console/CurrencySave.php | UTF-8 | 3,716 | 2.515625 | 3 | [] | no_license | <?php
namespace CanadaSatellite\Cron\Console;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Magento\Catalog\Model\ResourceModel\Product\Collection;
use Magento\Catalog\Model\ResourceModel\Product\CollectionFa... | true |
28eec0f83b1978f588755b0c5e78ee88d4e1c9e3 | PHP | Arul-/reactive-restler | /src/Proxies/UploadedFile.php | UTF-8 | 1,077 | 2.59375 | 3 | [] | no_license | <?php
namespace Luracast\Restler\Proxies;
use Exception;
use Psr\Http\Message\UploadedFileInterface;
class UploadedFile implements UploadedFileInterface
{
private \Psr\Http\Message\UploadedFileInterface $proxy;
private ?int $error = null;
public ?\Exception $exception = null;
public function __c... | true |
e14af4bf87b485f6e64e8aac2f60b8574c492bd6 | PHP | EvonDu/educate | /advanced/common/models/page/Page.php | UTF-8 | 1,965 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models\page;
use Yii;
/**
* This is the model class for table "page".
*
* @property string $name
* @property string $title
* @property string $content
* @property string $content_en
*/
class Page extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static functio... | true |
823cbfcbe60894965178c89d4f2d036e3bdcf1f4 | PHP | jjzhang166/feros_erp_free | /application/model/finance_bank.class.php | UTF-8 | 4,300 | 2.53125 | 3 | [] | no_license | <?php
/**
* 银行管理
*/
namespace model;
class finance_bank extends common {
public $primary_key = 'id';
/**
* 支出
*/
public function expenditure($money, $id) {
$data['money[-]'] = abs($money);
$this->limit(1)->update($data, $id) ? $this->m_operate->success('银行支出变更') : $this->m_o... | true |
8a4dd8afe25387ae1a4978d1a843e18194563b46 | PHP | AchintyaAshok/NYTimes-Book-Reviews-Work | /Feeds/BookHandler.class.php | UTF-8 | 13,477 | 2.953125 | 3 | [] | no_license | <?php
/*
Author: Achintya Ashok
Date-Created: 08/01/13
Purpose: This is a Book Handler Class which derives from the Abstract Parent Class -- MessageHandler.
It's used to handle messages pertaining to Book Reviews that are popped from the
DU SQS Queue that keeps track of recently published articles on... | true |
a6a7b8e3172d543803947ddc6ca6457104495c7d | PHP | trakos/yae-be | /yae_www_2/lib/Tmvc/Model/Mysql/BaseSelect.php | UTF-8 | 5,186 | 2.78125 | 3 | [] | no_license | <?php
class Tmvc_Model_Mysql_BaseSelect
{
protected $_queryBase;
protected $_selectArguments = array();
protected $_groups = array();
protected $_groupArguments = array();
protected $_wheres = array();
protected $_whereArguments = array();
protected $_havings = array();
protected $_havingArguments = array();
... | true |
ebad7f887ad3d5b803e4a2f36eebd4ebcf85cd02 | PHP | JoinGitHubJoinGitHub8/demo-app-package | /src/Apps/Controller/Front/Demoapp.php | UTF-8 | 2,185 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Apps\Controller\Front;
use Apps\ActiveRecord\Demo;
use Extend\Core\Arch\FrontAppController as Controller;
use Ffcms\Core\App;
use Ffcms\Core\Arch\View;
use Ffcms\Core\Exception\ForbiddenException;
use Ffcms\Core\Helper\FileSystem\File;
class Demoapp extends Controller
{
private $appRoot;
pr... | true |
115a67263a08f02a0ece60c79dff1983f6a3148d | PHP | patryksem/dentistry-system | /src/Entity/Visit.php | UTF-8 | 2,527 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\VisitRepository;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
/**
* @ORM\Entity(repositoryClass=VisitRepository::class)
*
* @UniqueEntity(
* fields={"doctorId", "visitDate"},
* errorPath="visitDate",
* ... | true |
5e53fa69393923c3e1f32ac5a4ccb5ea50bfbbce | PHP | eFaiqoh/MonitoringSkripsi | /application/models/Jadwal.php | UTF-8 | 1,690 | 2.8125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Jadwal extends CI_Model {
/* Member variables */
var $id_jadwal;
var $Tanggal;
var $Pukul;
var $Topik;
var $NIK1; // penguji 1
var $NIK2; // penguji 2
var $Jenis;
function __construct() {
parent::__construct();
}
/*... | true |
0567bd5f1aaedd598761626bee8e3d0148c90905 | PHP | faridlab/salt-laravel-countries | /database/migrations/2021_03_03_064854_create_postalcode_table.php | UTF-8 | 1,092 | 2.53125 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('postalcode', function (... | true |
19400c94fb987e5dbe49a17c7e8c1fec0a043935 | PHP | thianxin95/IP-assigment | /getInvoice.php | UTF-8 | 2,245 | 2.609375 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author Chang kwok Fei
*/
include_once 'Controller/OrderListController.php';
include 'Object/InvoiceOB.php';
includ... | true |
3889ed06fdef7642397df1e39b05bed26da6079b | PHP | BetterBrief/silverstripe-nestedcheckboxsetfield | /code/NestedCheckboxSetField.php | UTF-8 | 4,266 | 3 | 3 | [] | no_license | <?php
class NestedCheckboxSetField extends CheckboxSetField {
protected
$labelField = 'Title',
$idField = 'ID',
$className,
$childFunction;
function __construct(DataObject $controller, $name, $title = null, $className = null, $childFunction = 'Children', DataObjectSet $source = null, $value = "", $form = n... | true |
c851a0f59f897c55b1c1c3bdb4596126ee6091fd | PHP | thiagomallon/CertificationRef | /test/OOProgramming/StandardLibraryTest.php | UTF-8 | 6,526 | 2.875 | 3 | [] | no_license | <?php
/**
* Created by Thiago Mallon
*/
/**
* @subpackage Test\OOProgramming
*/
namespace Test\OOProgramming;
/**
* Class StandardLibraryTest
* @author Thiago Mallon <thiagomallon@gmail.com>
* @group OOProgramming
* @group OOProgramming/StandardLibraryTest
*/
class StandardLibraryTest extends \PHPUnit_Frame... | true |
6ad8ebeccfa597f7c3c9c2a3d7be78c1345ae6c7 | PHP | oicrruf/accountyzer | /src/AppBundle/Entity/TrainingCost.php | UTF-8 | 1,755 | 2.828125 | 3 | [] | no_license | <?php
namespace AppBundle\Entity;
/**
* TrainingCost
*/
class TrainingCost
{
/**
* @var string
*/
private $cost;
/**
* @var string|null
*/
private $detail;
/**
* @var int
*/
private $id;
/**
* @var \AppBundle\Entity\Training
*/
private $trai... | true |
c8800a49289dbad21cbc02afbbf0c46975c446d7 | PHP | Mikearaya/egate | /includes/Guest.php | UTF-8 | 5,223 | 3.296875 | 3 | [] | no_license | <?php
class Guest implements Guest_interface {
private $GUEST_ID;
private $first_name;
private $last_name;
private $aka_name;
private $image;
private $title;
private $bio;
private $status;
private $guestImageLocation = "../uploads/eventImages/eventGuests/";
function __cons... | true |
531e60285bce00e72e83993405e4e5316f6d761c | PHP | jubianchi/tml | /src/Visitor/Node/Assign.php | UTF-8 | 739 | 2.53125 | 3 | [] | no_license | <?php
namespace jubianchi\TML\Visitor\Node;
use Hoa\Visitor\Element;
use jubianchi\TML\Visitor;
class Assign extends Visitor
{
public function visit(Element $element, &$handle = null, $eldnah = null)
{
list($left, $right) = $element->getChildren();
$name = ltrim($left->getChildren()[0]->getVa... | true |
f55dd8e6e0ddb281986c219af89560f586bfe940 | PHP | zinovyev/servelat | /app/Components/ProcessManager/Events/ProcessOutputEvent.php | UTF-8 | 1,003 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace Servelat\Components\ProcessManager\Events;
use Servelat\Components\ProcessManager\ProcessInterface;
use Servelat\Components\TaskManager\TaskInterface;
use Symfony\Component\EventDispatcher\Event;
/**
* Class ProcessOutputEvent.
*
* @author Ivan Zinovyev <vanyazin@gmail.com>
*/
class ProcessOutpu... | true |
d31f5b66ab89001255e87fc09372815e11ab5480 | PHP | ammardev/laravel-wp-hash-driver | /src/WordpressHasher.php | UTF-8 | 1,449 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Ammardev\LaravelWpHashDriver;
use Illuminate\Contracts\Hashing\Hasher;
class WordpressHasher implements Hasher
{
protected $hasher;
public function __construct()
{
$this->hasher = new PasswordHash(8, true);
}
/**
* Get information about the given hashed value.
... | true |
4affe090d18288568e81aa0963afc489fa3c13d6 | PHP | ErdogduSemih/voorbeeldSymfony | /src/Entity/User.php | UTF-8 | 2,458 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Entity;
use Symfony\Component\Security\Core\User\UserInterface;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Table("user")
* @ORM\Entity(repositoryClass="UserRepository")
*/
class User implements UserInterface, \Serializable
{
/**
... | true |
80ec0bcc7abf4b620099ab2da3e08eb7a8da9fee | PHP | RijalBarrun/TokoMebel | /app/Models/Category.php | UTF-8 | 1,006 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Category extends Model
{
//
protected $fillable = ['name', 'slug', 'parent_id'];
public function childs() {
return $this->hasMany('App\Models\Category', 'parent_id');
}
public function parent() {
return $t... | true |
bca1305b43efa2e55f373d3fc0d4706acee9e004 | PHP | faithpromise/requests.faithpromise.org | /app/Services/Teamwork/Services/People.php | UTF-8 | 1,017 | 2.828125 | 3 | [] | no_license | <?php
namespace App\Services\Teamwork\Services;
use App\Services\Teamwork\Models\Person;
class People extends AbstractService {
public function findByEmail($email) {
$search_result = $this->search($email);
$people = $search_result->getData()->searchResult->people;
if (count($people))
... | true |
0ab820c8c151c630d311d8dc08f6c254d01e5d34 | PHP | lbigram/Inventory-System | /ivs/application/models/User.php | UTF-8 | 7,417 | 2.65625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
require_once 'IVSModel.php';
include 'UserDAO.php';
//include 'GetUsersDAO.php';
//include 'GetUserDAO.php';
class User extends IVSModel {
private $colNames = ' USERID,USERNAME,LDAPUSERCODE,USERACTIVE,ISADMIN,UNITID,USERTYPE,EMAIL,STAF... | true |
523e5d0208851e07049a7fdf95bf5258a7cf5333 | PHP | elmarhepp/diy-usage | /app/Models/ShopInfo.php | UTF-8 | 1,157 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Models;
use Illuminate\Database\Eloquent\Model as Eloquent;
/**
* Created by PhpStorm.
*
* User: elmarhepp
* Date: 14/12/14
* Time: 18:54
*
* @property-read \Authorization $shop
* @property integer $id
* @property integer $shop_id
* @property string $shopify_shop_id
* @property string ... | true |
d43d99040e16975f16b60f559c804dad59cb4821 | PHP | julienBreem/mvc-fromScratch | /src/core/http/Request.php | UTF-8 | 2,588 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by Julien Breem.
* Date: 12/12/2016
* Time: 16:38
*
* This program 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; under version 2
* of the License (non-upgradable).
*
* This pro... | true |
5b97aee2aeedc36dcd24c2fb556daabe9d694404 | PHP | wenz/core | /apps/files/tests/HelperTest.php | UTF-8 | 2,709 | 2.5625 | 3 | [
"GPL-3.0-or-later",
"BSD-3-Clause",
"GPL-1.0-or-later",
"AGPL-3.0-or-later",
"MIT",
"AGPL-3.0-only"
] | permissive | <?php
/**
* @author brumsel <brumsel@losecatcher.de>
* @author Joas Schilling <coding@schilljs.com>
* @author Morris Jobke <hey@morrisjobke.de>
* @author Robin Appelman <icewind@owncloud.com>
* @author Thomas Müller <thomas.mueller@tmit.eu>
* @author Vincent Petry <pvince81@owncloud.com>
*
* @copyright Copyrigh... | true |
cc3e07d7b353beaca5e21b550ff444dd4abb1191 | PHP | tanvirshaikat/authentication_system_with_social_login | /admin/edit_user.php | UTF-8 | 6,310 | 2.5625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?>
<h1 class="title">Edit User</h1>
<?php
if (isset($_GET['id']) and is_numeric($_GET['id']) and $_GET['id'] > 0 ) {
//If the form is submited
if (isset($_POST['save'])) {
//Create an array with data
$data = array(
'user_id' => ... | true |
f14212178b80c7740a344a8c23ba33c80d002677 | PHP | gcCate/v3_cate | /qconf/Category.php | UTF-8 | 11,854 | 2.703125 | 3 | [] | no_license | <?php
/**
* classdoc: 分类属性相关类库
*
* 函数列表如下:
* 1. getCate1 (获取一级分类)
* 2. getCate2 (获取二级分类)
* 3. getCate3 (获取三级分类,也可能是前置属性)
* 4. getCate4 (获取四级分类,四级为前置属性)
* 5. getCateInfo (根据cateid ,获取分类信息)
* 6. getMultiCateInfo (获取多个分类信息)
* 7. getAttr (获取属性信息,含商品属性+规格属性)
* 8. getChildAttr ... | true |
2266851d27226ad564b0a22c6ef310cdff4f40f8 | PHP | magento-russia/2 | /app/code/local/Df/Shipping/Model/ConfigManager.php | UTF-8 | 926 | 2.59375 | 3 | [] | no_license | <?php
abstract class Df_Shipping_Model_ConfigManager extends Df_Core_Model_Abstract {
/**
* @abstract
* @return string
*/
abstract protected function getKeyBase();
/** @return Mage_Core_Model_Store */
public function getStore() {
return $this->cfg(self::P__STORE);
}
/** @return Df_Shipping_Model_Carrier... | true |
13ac71607328fb2b6d931679446b63dde18a0a56 | PHP | welpdev/mailchimp-bundle | /src/Command/WebhookCommand.php | UTF-8 | 1,671 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Welp\MailchimpBundle\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Welp\MailchimpBundle\Provider\ListProviderInterface;
use Welp\MailchimpBundle\Subscriber\ListRepository;
class Web... | true |
f4cfa8f0fbcd62b5a1261b610d671b7de63bec3d | PHP | deleonl4/e2 | /week7/Catalog.php | UTF-8 | 1,449 | 3.65625 | 4 | [] | no_license | <?php
class Catalog
{
# Property
# Public is a visibility keyword we need before the function (private or protected options also exist)
public $products = [];
# Special method that is the start up method that will be used when we use the class which makes it perfect to load our json file & relates to ... | true |
5632daaff42b92e2630165b1b2d93bc47bf76dd7 | PHP | openva/richmondsunlight.com | /htdocs/admin/tag.php | UTF-8 | 6,727 | 2.796875 | 3 | [
"MIT",
"GFDL-1.1-or-later"
] | permissive | <?php
###
# Tag Bills
#
# PURPOSE
# Provides administrative batch bill-tagging functionality.
###
# INCLUDES
# Include any files or libraries that are necessary for this specific
# page to function.
include_once $_SERVER['DOCUMENT_ROOT'] . '/includes/functions.inc.php';
include_once $_SERVER['DOCUMENT_ROOT'] . '/incl... | true |
f5f1a79cc173490d00d56b040884269213cc5d45 | PHP | alexg0mel/test_postupi | /app/UseCases/Slugs/Slug.php | UTF-8 | 3,374 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\UseCases\Slugs;
use App\Entity\Categ;
use App\DTO\SlugPath;
class Slug
{
private $slug;
private $slugPaths;
private $foundPath;
private $id;
/**
* @var Slug $self
*/
private static $self;
private function __construct() {}
private function __clone() ... | true |
5b769d4c04d59fcb795fff6a7c902596d530d576 | PHP | ipunkt/laravel-rabbitmq | /src/Logging/Monolog/AmqpHandlerWithExtraContext.php | UTF-8 | 957 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php namespace Ipunkt\LaravelRabbitMQ\Logging\Monolog;
use Monolog\Handler\AmqpHandler;
/**
* Class AmqpHandlerWithExtraContext
* @package Ipunkt\LaravelRabbitMQ\Logging\Monolog
*/
class AmqpHandlerWithExtraContext extends AmqpHandler {
/**
* @var array
*/
protected $extraContext = [];
/**
*
*/
publ... | true |
1f152c50293ef6d0d3a8de3ef500802c9406f964 | PHP | zodream/image | /src/Base/FontInterface.php | UTF-8 | 964 | 3.25 | 3 | [
"MIT"
] | permissive | <?php
namespace Zodream\Image\Base;
interface FontInterface {
/**
* Gets the fontfile for current font.
*
* @return string
*/
public function getFile();
/**
* Gets font's integer point size.
*
* @return int
*/
public function getSize(): int;
/**
* Get... | true |
804b52d9bcddecf5140d68a224aebcbdc1c4b4c6 | PHP | JOSERIDER/php-administration-panel | /app/src/Repository/PdoSubjectRepository.php | UTF-8 | 14,468 | 2.546875 | 3 | [] | no_license | <?php
namespace HLC\AP\Repository;
use HLC\AP\Domain\Course\Course;
use HLC\AP\Domain\Subject\Subject;
use HLC\AP\Domain\Subject\SubjectRepositoryInterface;
use HLC\AP\Domain\Task\Task;
use HLC\AP\Domain\Teacher\Teacher;
use HLC\AP\Domain\User\User;
use HLC\AP\Utils\DatabaseConnection;
use Medoo\Medoo;
... | true |
af55c7a7f67ae15e0c96715edce64376bc35585a | PHP | letsdrink/ouzo | /src/Ouzo/Inject/Injection/InstanceFactory.php | UTF-8 | 3,398 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/*
* Copyright (c) Ouzo contributors, https://github.com/letsdrink/ouzo
* This file is made available under the MIT License (view the LICENSE file for more information).
*/
namespace Ouzo\Injection;
use Ouzo\Injection\Annotation\AttributeInjectorRegistry;
use Ouzo\Injection\Creator\InstanceCreator;
use Refle... | true |
fc4d91646c2f738398ac980eb72514af1b5b4dc2 | PHP | dsafioti/Web_Php | /Admin/cadastro/cadastro_historico.php | UTF-8 | 1,966 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
if (!isset($_SESSION)) session_start();
include '../../conexao.php';
$idpadraodevalor = mysqli_real_escape_string($conexao, $_POST['ger_name0']);
$dtinicial = mysqli_real_escape_string($conexao, $_POST['ger_name1']);
$dtfinal = mysqli_real_escape_string($conexao, $_POST['ger_name2']);
$valor ... | true |
3dd1fccf7b9c7d524e3dae7e1e3866c5adeb5607 | PHP | creatydev/laravel-subscriptions | /src/Plan.php | UTF-8 | 3,846 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Sagitarius29\LaravelSubscriptions;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Builder;
use Sagitarius29\LaravelSubscriptions\Contracts\PlanContract;
use Sagitarius29\LaravelSubscriptions\Contracts\GroupContract;
use Sagitarius29\LaravelSubscriptions\Contracts\PlanFeatureC... | true |
567df91a8e46e2427938d8ba2c329a599782adb5 | PHP | taylorwebk/escolar-api | /src/Controllers/StudentC.php | UTF-8 | 4,480 | 2.625 | 3 | [] | no_license | <?php
namespace Controllers;
use \Models\Utils;
use \Models\Response;
use \Models\Estudiante;
use \Models\Inscribe;
use \Models\Cursa;
use \Models\Trabajo;
class StudentC
{
public static function Login($data)
{
$fields = ['username', 'password'];
if (!Utils::validateData($data, $fields)) {
return Re... | true |
7c6c0a4dee7b6687593579350afbd0440b973470 | PHP | boywondercreative/skela-wp-theme | /src/Blocks/SampleACFBlock/ACFBlock.php | UTF-8 | 2,102 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Example for creating custom block that uses ACF fields
*
* In order to have this example work, you first have to create
* a new custom field block with two ACF fields named some_headline and some_text,
* and show the field group if the block is equal to ACF Block
*/
namespace Skela\Blocks\SampleACFBlo... | true |
34b96dce738bf8118511080724dacbb184beb8e6 | PHP | abhinavhitwicket/newblog | /protected/migrations/m161221_061551_like.php | UTF-8 | 545 | 2.53125 | 3 | [] | no_license | <?php
class m161221_061551_like extends CDbMigration
{
// Use safeUp/safeDown to do migration with transaction
public function safeUp()
{
$this->createTable(
'like',
array(
'id'=>'int(11) UNSIGNED NOT NULL AUTO_INCREMENT',
'user_id' => 'int(11) UNSIGNED NOT NULL',
'post_id' => 'int (11) NOT ... | true |
5eaefd0b52b905ef5b78d9eec7f10db6618463ab | PHP | weshare237cm/social_network | /functions/pagination.php | UTF-8 | 823 | 2.546875 | 3 | [] | no_license | <style media="screen">
.active{
background: #666;
color: white;
}
</style>
<?php
$u_id = $_SESSION["user_id"];
$query = "SELECT * FROM posts INNER JOIN followers ON user_id = follower_id WHERE user_id = $u_id";
$result = mysqli_query($con, $query);
$total_posts = mysqli_num_rows($result);
$tota... | true |
0b8ee26e517920ba9b5d1c0bd255848b762dda2e | PHP | Randommer/jarditou | /jarditou_PHP/delete_script.php | UTF-8 | 2,510 | 3.0625 | 3 | [] | no_license | <?php
//Initialisation de la session du site
require("session.php");
//Bibliothèque de fonctions
require("fonctions.php");
//on vérifie si un POST a été envoyé à la page
if ($_SERVER["REQUEST_METHOD"] == "POST" )
{
//on vérifie que le champ ID a été renseigné
i... | true |
478320023ff942aa151189c8f1ac0e8feccb8294 | PHP | y78/oot | /src/Yarik/OOT/View.php | UTF-8 | 974 | 2.859375 | 3 | [] | no_license | <?php
namespace Yarik\OOT;
abstract class View implements ViewInterface
{
protected $params = [];
abstract protected function doDisplay();
public function display(array $parameters = [])
{
$this->set($parameters);
$this->doDisplay();
}
public function render(array $parameter... | true |
9634ad52874fe595ebf5e68ac300375ae2aa952e | PHP | Mrozu8/MVC-php | /App/Models/Post.php | UTF-8 | 395 | 2.828125 | 3 | [] | no_license | <?php
namespace App\Models;
use Core\Model;
use PDO;
class Post extends Model
{
public static function query($query)
{
try {
$db = static::getDB();
$stmt = $db->query($query);
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
return $result;
} catch... | true |
e3c1b18ce73c9d0333a0a473154725704c5f4691 | PHP | Unesio-Severino/eVideoSteaming | /app/Http/Controllers/ChannelController.php | UTF-8 | 4,422 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Channel;
use App\Traits\UploadFiles;
use Illuminate\Support\Str;
use Illuminate\Http\Request;
class ChannelController extends Controller
{
use UploadFiles;
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
... | true |
a84a9d7904ca4092373c53b064f0df11e370c8ad | PHP | ashish2795/vstr-management | /admin/partials/vst.php | UTF-8 | 1,039 | 2.734375 | 3 | [] | no_license | <?php
$query = "select * from tbl_staffs order by fname";
$result = mysql_query($query);
if (mysql_num_rows($result) == 0) {
echo "Not In The Database, Pls Try Inserting Data.";
}
else{
echo "<table class='new'>
<tr class='na'>
<th class='le'>#</th>
... | true |
b7c3e8f7f4156b97142ec4ce5d25d492ae9ba604 | PHP | Kantxapp/KantxApp | /vendor/alexpechkarev/google-maps/src/GoogleMaps.php | UTF-8 | 1,014 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php namespace GoogleMaps;
/**
* Description of GoogleMaps
*
* @author Alexander Pechkarev <alexpechkarev@gmail.com>
*/
class GoogleMaps extends \GoogleMaps\WebService{
/**
* Array of classes to handle web service request
* By default WebService class will be used
* @var service => class ... | true |
cf711962773f16f3276aa5341ebf5dca3f0d91cd | PHP | gurifisu1/ChemSquare | /board.php | UTF-8 | 7,135 | 2.75 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="ja">
<head>
<meta name="viewport" content="width=320, height=480, initial-scale=1.0, minimum-scale=1.0, maximum-scale=2.0, user-scalable=yes">
<meta charset="utf-8">
<title>実験掲示板</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<?php
//データベース接続処理
... | true |
b441e2217fd78321493823032dfd5804d8217e17 | PHP | 6tu/phpcode | /yourshell.info/data/l.php | GB18030 | 817 | 2.625 | 3 | [] | no_license | <?php
$str = file_get_contents('mmh.html');
$link = match_links($str);
print_r($link);
$str2 = file_get_contents('mh.html');
$p = explode('<hr size=1>',$str2);
for($i=0; $i < 42; $i++){
for($j=0; $j < 42; $j++){
if(strstr($p[$i],$link[1][$j]))
$fn = $link[0][$j+4];
$c = $p[$i];
file_put_contents($fn,$c... | true |
b499cb7f9664759f9a6b546914ac44176280a975 | PHP | bionicle12/code-example | /slim-amo-tilda-api/lib/Config.php | UTF-8 | 411 | 2.8125 | 3 | [] | no_license | <?php
namespace lib;
// Configuration Class
class Config
{
static $confArray;
public static function read( $name )
{
if ( isset( self::$confArray[APPLICATION_ENV][$name] ) ) {
return self::$confArray[APPLICATION_ENV][$name];
}
return self::$confArray['local'][$name];
}
public static funct... | true |
3346461112a89f50e9aba69e6ceddc73d4f2b095 | PHP | samhol/samiholck.com | /sphp/php/Sphp/Html/Apps/Manual/ApiGen/ApiGen.php | UTF-8 | 3,890 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/**
* SPHPlayground Framework (http://playgound.samiholck.com/)
*
* @link https://github.com/samhol/SPHP-framework for the source repository
* @copyright Copyright (c) 2007-2018 Sami Holck <sami.holck@gmail.com>
* @license https://opensource.org/licenses/MIT The MIT License
*/
namespace Sphp\Html\A... | true |