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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
4810e3ef90751702090b493942a4925e3fe4fb95 | PHP | BitBagCommerce/SyliusWishlistPlugin | /src/Command/Wishlist/AddProductToSelectedWishlist.php | UTF-8 | 997 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file was created by developers working at BitBag
* Do you need more information about us and what we do? Visit our https://bitbag.io website!
* We are hiring developers from all over the world. Join us and start your new, exciting adventure and become part of us: https://bitbag.io/career
*/
declare... | true |
4fa1615430c2aea49f3551666b64cd8eb02d498c | PHP | pago/pantr | /src/pantr/functions.php | UTF-8 | 4,151 | 2.890625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
/*
* Copyright (c) 2009 Patrick Gotthardt
*
* 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 the rights
* to use, copy, modify, ... | true |
a499453a18e26e492dfb1384928fa978c119457e | PHP | Shoprenter/api-client | /src/ApiCall.php | UTF-8 | 5,663 | 3.125 | 3 | [] | no_license | <?php
namespace ShopRenter;
use Exception;
class ApiCall
{
/**
* @var string
*/
protected $username = '';
/**
* @var string
*/
protected $apiKey = '';
/**
* @var string
*/
protected $response;
/**
* @var string
*/
protected $format = 'json';
... | true |
2bc1810325d222571c6b6d70d61601373b4d72cc | PHP | Drilyazenh/PHP | /Gallery&Authorization&Upload/index.php | UTF-8 | 1,223 | 2.640625 | 3 | [] | no_license | <?php
$pictures = require __DIR__."/findpictures.php";
$dataBase = require __DIR__ . '/DB.php';
$login = $_COOKIE['login'];
for ($i = 0;$i<count($dataBase);$i++) {
if ($dataBase[$i]['login'] == $login) {
$user = true;
break;
} else {
$user = false;
}
}
?>
<!doctype html>
<html lang=... | true |
1ddd5a2940ca7e35b2c178b05487f8622886c2bb | PHP | enigma1940/helper | /php/connectionDB.php | UTF-8 | 266 | 2.53125 | 3 | [] | no_license | <?php
try{
/*
** DATABASE: dbase
** HOST: localhost
** USER: root
** PASSWORD: [nothing]
*/
$bdd=new PDO('mysql:dbname=dbase;host=localhost','root', '');
}catch(Exception $e){
die('Error : '.$e->getMessage());
}
?>
| true |
c4491f45ef7582fd122b30de90cda52d0f993cee | PHP | larryu/Vue2Laravel | /app/Http/Controllers/ComponentController.php | UTF-8 | 2,307 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Entities\ResourceType;
use App\Models\Services\ComponentService;
use App\Models\Services\PageService;
use App\Models\Services\UserService;
use Illuminate\Http\Request;
use Tymon\JWTAuth\Facades\JWTAuth;
class ComponentController extends Controller
{
protected ... | true |
6ed0235f741694ee02c74567abcacad032199afe | PHP | aaaafr/php_35 | /basics/badwords.php | UTF-8 | 1,270 | 3.25 | 3 | [] | no_license | <?php
/* Correzione Badwords
Creare una variabile con un paragrafo di testo a vostra scelta.
Stampare a schermo il paragrafo e la sua lunghezza.
Una parola da censurare viene passata dall'utente tramite parametro GET.
Stampare di nuovo il paragrafo e la sua lunghezza, dopo aver sostituito
con tre asterischi ... | true |
04cc0521294b0a167054008196f33742aba898b1 | PHP | gilsonrincon/icelular | /app/controllers/UtilsController.php | UTF-8 | 1,172 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
class UtilsController extends BaseController {
/**
* Retorna la lista de stados según el id del país
*/
public function statesOps($id){
$html='';
foreach(Country::find($id)->states() as $state){
$html.='<option value="'.$state['id'].'">'.$state['state'].'</option>';
}
$html.='';
return... | true |
df83123446b389553359134fd2dd4def08b03f0d | PHP | reed-jones/laravel-api-builder | /examples/Cocktail.php | UTF-8 | 1,026 | 2.703125 | 3 | [] | no_license | <?php
namespace ReedJones\ApiBuilder;
use ReedJones\ApiBuilder\ApiBuilder;
class Cocktail extends ApiBuilder
{
// Free api for testing:
// https://www.thecocktaildb.com/api.php
protected $baseUrl = 'https://www.thecocktaildb.com/api/json/v1/1/';
// non-standard primary key ->find($key)
protected... | true |
4f2bbea3afb7f4170ed84aa35c14414db6977c34 | PHP | beeblebrox3/devshop | /app/Beeblebrox3/DevShop/GithubConnection/GithubConnector.php | UTF-8 | 1,030 | 2.734375 | 3 | [] | no_license | <?php
namespace Beeblebrox3\DevShop\GithubConnection;
use Beeblebrox3\DevShop\Foundation\Config;
use Github\Client;
use Github\ResultPager;
class GithubConnector
{
/**
* @var Client
*/
private $client = null;
public function __construct()
{
$this->client = new Client();
$th... | true |
0831993787050dd290dbc5c167e94032d48e244e | PHP | BrunoRHolanda/design-patterns | /backend-challenges/Goomer/app/Services/CategoryService.php | UTF-8 | 1,154 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Entities\Category;
use App\Repositories\CategoryRepository;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\OptimisticLockException;
use Doctrine\ORM\ORMException;
class CategoryService
{
private $categoryRepository;
function __construct(CategoryRepository $categoryR... | true |
6d5a5aec4fd2776de49476a8637b70652d190ce8 | PHP | mohitkr05/awesome-theme | /inc/classes/classes/widget-subscribe.php | UTF-8 | 2,763 | 2.765625 | 3 | [] | no_license | <?php
class tiga_subscribe extends WP_Widget {
/**
* Widget setup
*/
function tiga_subscribe() {
$widget_ops = array(
'classname' => 'tiga_subscribe_widget',
'description' => __('A custom widget to display the feedburner subscription widget.', 'tiga')
);
$control_ops = array(
'width' => 300... | true |
78f2b7849b80506bd9c3d41a2e956cce8957a52f | PHP | SweeSiang/capstoneproject | /public/modules/user/sendmail.php | UTF-8 | 4,213 | 2.515625 | 3 | [] | no_license | <?php
session_start();
require_once '../../includes/autoload.php';
use classes\business\UserManager;
use classes\entity\User;
ob_start();
include '../../includes/security.php';
include '../../includes/header.php';
$checkbox="";
$UM=new UserManager();
if(isset($_POST["compose"])){
if(!empty($_POST["... | true |
ea95ce3712bff3a373d0a93eb67dcd096efcfb3b | PHP | jomerlopez/database | /index.php | UTF-8 | 960 | 2.75 | 3 | [] | no_license | <?php
require('config/config.php');
require('config/dbconnection.php');
$query = 'SELECT * FROM users ORDER BY created_at DESC';
#fetch data
$result = mysqli_query($conn, $query);
#free result
$users = mysqli_fetch_all($result, MYSQLI_ASSOC);
mysqli_free_result($result);
mysqli_close($conn);
?>
<?... | true |
7727523754d69ed237db1e0afe654d998311210f | PHP | ldkhoi100/Web-Back-end-Development | /SQL/football - Copy/view/login/login.php | UTF-8 | 1,605 | 2.609375 | 3 | [] | no_license | <?php session_start();
// Check if the user is already logged in, if yes then redirect him to welcome page
if (isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true) {
header("location: welcome.php");
exit;
}
// Include connect file
require_once "../../model/core/DBConnection.php";
include '../../contr... | true |
c45b399618c9e239d8f6697b7197464cf47a5771 | PHP | Yann-Fontaine/Dev-Go | /C-DEV-111-MAR-1-1-phpday05-yann.fontaine/ex_02/Animal.php | UTF-8 | 3,349 | 4.0625 | 4 | [
"MIT"
] | permissive | <?php
class Animal{
static $count=0;
static $mcount=0;
static $fcount=0;
static $bcount=0;
private $name;
private $legs;
private $type;
const MAMMAL=0;
const FISH=1;
const BIRD=2;
function __construct($nam=null, $leg=null, $typ=null){
if (gettype($nam)=="string"){
... | true |
9aba8d25b17495c8f1df66fdd5e9d21007d595d7 | PHP | cokeetang/oftenfull-erp | /demo.php | UTF-8 | 1,125 | 2.78125 | 3 | [] | no_license | <?php
require_once("sqlconnect.php");
function showOrgs()
{
$thedata=array();
$query="select * from tbOrg";
$result=mysql_query($query);
while($row=mysql_fetch_assoc($result))
{
array_push($thedata,array($row["id"],$row["fdLogin"]));
}
return $thedata;
}
function showclasss()
{
$thedata=array();
$query="se... | true |
13a9c10b304528f5ac79ca91b58484bccd3c0979 | PHP | BillyMalone1979/paw-pets | /sample1/include/contact-process.php | UTF-8 | 2,247 | 2.65625 | 3 | [] | no_license | <?php
// Include the PHPMailer class
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
require 'PHPMailer/Exception.php';
require 'PHPMailer/PHPMailer.php';
require 'PHPMailer/SMTP.php';
$secretKey='6LcZ45EUAAAAAKkxWkmAxGneEIPIGvLmkwdapVgX';
$from = "customerquestions@pawsitivelyvet.co... | true |
f76736f74c4dadc5a3168ce78d92a3f9ec7f1c71 | PHP | minicli/minicli | /src/Command/CommandController.php | UTF-8 | 3,835 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Minicli\Command;
use BadMethodCallException;
use Minicli\App;
use Minicli\Config;
use Minicli\ControllerInterface;
use Minicli\Exception\MissingParametersException;
use Minicli\Logging\Logger;
use Minicli\Output\OutputHandler;
/**
* @mixin OutputHandler
*/
abstract class C... | true |
cd8a712f4c76e15353461f9ec3f8de76a1135c7c | PHP | Oktopost/Wave | /src/Wave/Module/CommandSelector/Validators/UpdateValidator.php | UTF-8 | 530 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Wave\Module\CommandSelector\Validators;
use Wave\Enum\CommandType;
use Wave\Enum\CommandState;
use Wave\Base\Commands\Command;
class UpdateValidator extends BaseValidator
{
/**
* @param Command $command
* @return bool
*/
public function canStart(Command $command)
{
foreach ($this->queue()... | true |
26addf399087cb7cdf969cd4b4cbeae79c1494c6 | PHP | Carnacky79/taskl | /scripts/report.php | UTF-8 | 1,076 | 2.75 | 3 | [] | no_license | <?php
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
require_once "../helpers/Helper.php";
require_once "../models/DataModel.php";
require_once "../models/Customer.php";
require_once "../models/CurrencyConverter.php";
$helper = new Helper();... | true |
ea85850559e30d7f6bb5bab9d130ad4a5d103290 | PHP | GonzaloTorreras/gamification-1 | /funciones.php | UTF-8 | 2,085 | 2.984375 | 3 | [] | no_license | <?php
function addPoints($cantidad, $user){
$puntos = getPoints($user);
setPoints($puntos + $cantidad, $user);
}
function subPoints($cantidad, $user){
$puntos = getPoints($user);
setPoints($puntos - $cantidad, $user);
}
function getPoints($user){
include 'mysql.php';
$sql = "SELECT `puntos` FROM `usuario` WHE... | true |
2f71d1f634e75b2abafb0e5c296f5424447c4acc | PHP | RomaniukVadim/automatic-movies-website | /wp-content/themes/theme/includes/wp_booster/wp-admin/panel/td_demo_util.php | UTF-8 | 36,374 | 2.78125 | 3 | [
"WTFPL"
] | permissive | <?php
class td_demo_base {
/**
* Checks if one of the needles from $needle_array is found in the $haystack
* @param $haystack
* @param $needle_array
*
* @return bool
*/
protected static function multi_instring($haystack, $needle_array) {
foreach ($needle_array as $needle) {
if (str... | true |
d989836ab9d9b35d48543cd158d03fb1f037bd86 | PHP | taylordaughtry/WeeklyWorth | /app/Http/Controllers/ExpensesController.php | UTF-8 | 2,295 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Company;
use App\Expense;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
class ExpensesController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
... | true |
09fec24c6c8de78ff1eb095312446be104960702 | PHP | coolinmc6/CM-Pages | /random/worldcup.php | UTF-8 | 1,163 | 3.109375 | 3 | [] | no_license | <?php
$pot1 = ["Russia", "Germany", "Brazil", "Portugal", "Belgium", "Poland", "France", "Argentina"];
$pot2 = ["Spain", "Peru", "Switzerland", "England", "Colombia", "Mexico", "Uruguay", "Croatia"];
$pot3 = ["Denmark", "Iceland", "Costa Rica", "Sweden", "Tunisia", "Egypt", "Senegal", "Iran"];
$pot4 = ["Serbia", "Ni... | true |
a8fabb6a59e19c9adc4439e376ad55a16c043ece | PHP | alirezaarzehgar/minimal-mvc-framework | /app/Core/Console/DefaultCode.php | UTF-8 | 4,057 | 2.78125 | 3 | [] | no_license | <?php
namespace Core\Console;
class DefaultCode
{
public function createView(string $viewPath, string $viewName)
{
$file = fopen("$viewPath/$viewName.php", 'w');
$viewCode = "
<!DOCTYPE html>
<html lang=\"en\">
<head>
<meta charset=\"UTF-8\">
<meta http-equiv=\"X-UA-Compatible\" conte... | true |
cae4be9a0b4e056c3a53a369c3f08b37b2de8d4f | PHP | ycdoubleb/media_cloud | /common/models/Banner.php | UTF-8 | 3,318 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveRecord;
use yii\redis\ActiveQuery;
/**
* This is the model class for table "{{%banner}}".
*
* @property string $id
* @property string $title 宣传页名称
* @property string $path 内容路径
* @property string $link ... | true |
c9c840800d92354bdde047edb123419d0adf654c | PHP | tungnh/PHPFitSite | /fitnuceeduvn/app/Model/Menu.php | UTF-8 | 605 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class Menu extends Model
{
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'menus';
/**
* The model not using timestamps.
*
* @var boolean
*/
public $times... | true |
8d172550d1a307a7f0a55378de1fde654795b721 | PHP | hsemix/yuga | /yuga/src/Core/App.php | UTF-8 | 300 | 2.640625 | 3 | [] | no_license | <?php
namespace Yuga;
class App
{
public static function __callStatic($method, $args)
{
return call_user_func_array([Application::instance(), $method], $args);
}
public function __call($method, $args)
{
return call_user_func_array([Application::instance(), $method], $args);
}
} | true |
508decc82927ea520313ba41acbe2c594024498c | PHP | FlexibleToast/Pizza-Site | /scripts/pdoConnect.php | UTF-8 | 461 | 2.703125 | 3 | [] | no_license | <?php
# Import config for credentials path and sql host
require_once('config.php');
# Import credentials
require_once($CREDENTIALS_PATH);
# Connect PDO library to MySQL server
try {
$dsn = "mysql:host=". $SQL_HOST . ";dbname=Pizza";
$pdo = new PDO($dsn, $username, $password);
$pdo->setAttribute(PDO... | true |
99329a7094cfeb3724decb82b0f8f7bac3439b97 | PHP | 4yop/miscellaneous | /lar-demo/leetcode/question/144.二叉树的前序遍历.php | UTF-8 | 1,023 | 3.65625 | 4 | [
"MIT"
] | permissive | <?php
class Solution {
//递归
public $data = [];
function preorderTraversal1($root) {
if ($root === null)
{
return $this->data;
}
$this->data[] = $root->val;
$this->preorderTraversal($root->left);
$this->preorderTraversal($root->right);
re... | true |
8338fb3916515b1ec52efbcaee79683b560fda77 | PHP | gitkv/uniteller-php-sdk | /tests/Recurrent/RecurrentBuilderTest.php | UTF-8 | 858 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by gitkv.
* E-mail: gitkv@ya.ru
* GitHub: gitkv
*/
namespace Tmconsulting\Uniteller\Tests\Recurrent;
use Tmconsulting\Uniteller\Recurrent\RecurrentBuilder;
use Tmconsulting\Uniteller\Tests\TestCase;
class RecurrentBuilderTest extends TestCase
{
public function testBuildObject()
{
... | true |
4d88433506ef6cb0e2bf0f0ffa51ac7dd2b89afc | PHP | Adex9ja-Org/airtime_data_hub_web | /admin/app/Jobs/SendMailJob.php | UTF-8 | 1,123 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Jobs;
use App\Mail\EmailForQueuing;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Mail;
class SendMailJob implemen... | true |
12e4c4fcd62f859d58888b6738ee939f0cf7f8b7 | PHP | FrancisBaptiste/vcs | /functions/createMessage.php | UTF-8 | 1,055 | 2.5625 | 3 | [] | no_license | <?php
require("../includes/encryption.php");
require("../includes/setup.php");
$conversation = $_POST['conversation'];
$message = $_POST['message'];
$user = $_POST['user'];
$user = decrypt_id($user);
$statement = $db->prepare("INSERT INTO messages(message, conversation_id, user_id) values(?, ?, ?)");
$s... | true |
12d89e31ee475061208f4fb820b3140974edb268 | PHP | Ernesteps/ControleOsVEP | /VO/SetorVO.php | UTF-8 | 416 | 3.34375 | 3 | [] | no_license | <?php
class SetorVO{
private $idSetor;
private $nome;
public function setIdSetor($id){
$this->idSetor = $id;
}
public function getIdSetor(){
return $this->idSetor;
}
public function setNome($nome){
$this->nome = trim($nom... | true |
bc5cac755dfd32b3f42050c18d53d2d4d69f6e1b | PHP | debimsantos/theorchard | /mailer.php | UTF-8 | 2,490 | 2.859375 | 3 | [] | no_license | <?php
/*
var_dump($_POST);
// input params
array(6) {
["name"]=>
string(11) "Jude Santos"
["email"]=>
string(22) "jude.msantos@gmail.com"
["phone"]=>
string(12) "213-505-5400"
["date"]=>
string(10) "11/23/2018"
["tenant"]=>
string(6) "Debrah"
["tenantType"]=>
string(5) "Witch"
}
*/
function getA... | true |
bf5bac76b4334fbcb30e7ccb68466ba397acc3d4 | PHP | jomaras/Scholar | /php/oneTime/DatabaseImporter.php | UTF-8 | 2,593 | 2.953125 | 3 | [] | no_license | <?php
/**
* Created by Jomaras.
* Date: 28.03.12.@11:29
*/
require_once("php/oneTime/MrtcPaper.php");
require_once("php/helpers/DatabaseAccess.php");
class DatabaseImporter
{
public static function ImportMrtcPapers()
{
$papers = MrtcPaper::GetPapersFromJson();
foreach($papers as $paper)
... | true |
28cc05c0883cb0e17562017fd7f21289751dcfbf | PHP | hshoghi/concrete5 | /concrete/src/Express/Form/StandardViewRenderer.php | UTF-8 | 1,060 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Concrete\Core\Express\Form;
use Concrete\Core\Entity\Express\Entry;
use Concrete\Core\Entity\Express\FieldSet;
use Concrete\Core\Entity\Express\Form;
use Concrete\Core\Express\Form\Context\ViewContext;
class StandardViewRenderer extends AbstractRenderer
{
protected function getContext()
{
... | true |
120e78b8edb803c8394300d5e88b48e47559e69d | PHP | mossnisse/Virtuella-Herbariet | /PHP-HTML/admin/rapportSläkten.php | UTF-8 | 1,824 | 2.546875 | 3 | [
"CC0-1.0"
] | permissive | <!DOCTYPE html>
<html dir="ltr" lang="en">
<head>
<title>Rapport släkten</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Nils Ericson" />
</head>
<body>
<H3>Släkten</H3>
mellanslag eller tabb i slutet eller början av släktnamnet
<table>
<... | true |
b94d54fe51e26f9470b678d7b88ada78be32bd54 | PHP | beppe31d/adventofcode2018 | /src/Manager/StepManager.php | UTF-8 | 5,228 | 3.09375 | 3 | [] | no_license | <?php
namespace AdventOfCode\Manager;
use AdventOfCode\Entity\StepState;
class StepManager
{
/** @var array */
private $readySteps;
/** @var array */
private $executableSteps;
/** @var array */
private $workers;
/**
* @param array $inputs
* @return string
*/
public f... | true |
5491e8cd172f3b96fc20f998eb3609c7de091d55 | PHP | Whiled0S/coursework_php | /backend/classes/ImageLoader.php | UTF-8 | 2,030 | 2.828125 | 3 | [] | no_license | <?php
include_once "{$_SERVER['DOCUMENT_ROOT']}/coursework_php/backend/lib/helpers.php";
class ImageLoader
{
const RESOLUTION = [
'width' => 300,
'height' => 400
];
private $images_arr = array();
public function __construct($images_arr)
{
$this->images_arr = $images_arr;
... | true |
d680969ee051e8f82e1b490ddfce54dfef7e4005 | PHP | diamile/projet-final | /database/seeds/DatabaseSeeder.php | UTF-8 | 649 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class DatabaseSeeder extends Seeder
{
/**
* Seed the application's database.
*
* @return void
*/
public function run()
{
/*
|--------------------------------------------------------------------------
| L'enregistrement des seeders... | true |
8d4da888ddbd34ec03e10315e89b860178d0db87 | PHP | karthigamahe/Registration_form | /update.php | UTF-8 | 1,743 | 2.75 | 3 | [] | no_license | <?php
$con=mysqli_connect('localhost', 'root','','test');
if(mysqli_connect_errno($con))
{echo 'Failed to connect';
}
if(isset($_GET['id']))
{
$id = $_GET['id'];
$sql = "SELECT * FROM registration_form where Id=$id";
$result = $con->query($sql);
$row = $result->fetch_assoc();
}
?>
<html>
<head>
<link rel="stylesh... | true |
a028b07cbd10ac76d83bb1c32b99bc362a056dbf | PHP | soundpress/wegov_displayapp | /data_include/model.php | UTF-8 | 2,765 | 2.671875 | 3 | [] | no_license | <?php
class Model
{
var $db;
function __construct()
{
$this->db = new db(DB_HOST, DB_USER, DB_PASS, DB_NAME);
}
function getAll()
{
return $this->q('SELECT * FROM dd');
}
function mapAssoc($raw, $f='id')
{
$res = [];
foreach ($raw as $r)
$res[$r[$f]] = $r;
return $res;
}
function q($q)
... | true |
d196c5ec1ec16fbb84507c09a2a13c834903d732 | PHP | dcronje/beers | /geocoder_api/app/GraphQL/Area/AreaHelper.php | UTF-8 | 8,680 | 2.640625 | 3 | [] | no_license | <?php
namespace App\GraphQL\Area;
use GraphQL;
use GraphQL\Type\Definition\Type;
use Folklore\GraphQL\Support\Type as GraphQLType;
use App\Area;
use App\Lib\ListObject;
use Exception;
/**
* [AreaHelper a helper for building dynamic GraphQL queries and types for areas]
* Author: [your_name]
* Contact: [your_email]
... | true |
bc9ed2ab4a6c42644f81ba72c5ecedd64a453aa2 | PHP | andreulle/SADeEP | /Modelo/Investimento.class.php | UTF-8 | 2,267 | 2.828125 | 3 | [] | no_license | <?php
include_once("../Interface/IModelo.class.php");
/**
*
*/
class Investimento implements IModelo {
public $id;
public $descricao;
public $status;
private $db;
function __construct() {
$this->db = new DAO();
}
public function buscar($obj){
$query = "select * from investimento where id = :id";
$pa... | true |
79e6429fac46ff63e8ba659f3e8965828b28328e | PHP | ucsc-2nd-year-group-22/RanAswanu | /models/admin_model.php | UTF-8 | 3,761 | 2.53125 | 3 | [] | no_license | <?php
class Admin_Model extends Model
{
public function __construct()
{
parent::__construct();
}
//retrieve all admins
public function adminList()
{
$st = $this->db->prepare("SELECT user.*, group_concat(user_tel.tel_no) AS telNos FROM user JOIN user_tel on user.user_id =user_t... | true |
3646e40aadbd6adc3a2ce1b905d43c6fab493e93 | PHP | WordPress/wordpress.org | /wordpress.org/public_html/wp-content/plugins/wporg-trac-watcher/admin/ui.php | UTF-8 | 4,709 | 2.515625 | 3 | [] | no_license | <?php
namespace WordPressdotorg\Trac\Watcher;
/*
* This is a suuuuper basic admin UI, that's not actually as minimal as I intended...
*/
include __DIR__ . '/list-table.php';
include __DIR__ . '/post.php';
add_action( 'admin_menu', function() {
$svns = SVN\get_svns();
// Limit the display to just this make sites... | true |
222dd83334ac0168bbe19dcc832151cc5fc66d92 | PHP | alexcos/symfony | /src/G4/UtilBundle/Entity/ServiceParams.php | UTF-8 | 3,426 | 2.828125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace G4\UtilBundle\Entity;
/**
* Service Params
*/
class ServiceParams
{
const ROLE_CC = 'cc';
const ROLE_TA = 'ta';
/**
* @var string
*/
public $sessionID;
/**
* @var string
*/
public $clientIP;
/**
* @var string
*/
public $transactionID;
... | true |
fe6f76f2ff43661d259dcc2d99a7649deb8dd6e3 | PHP | JMYok/oldgoodstrade | /app/Http/ViewComposers/RankListComposer.php | UTF-8 | 624 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\ViewComposers;
use Illuminate\View\View;
use App\Models\Product;
class RankListComposer
{
// 当渲染指定的模板时,Laravel 会调用 compose 方法
public function compose(View $view)
{
$salerank = Product::where('on_sale', true)->where('sold_count','!=',0)->orderBy('sold_count','desc')->take(10... | true |
16f66c9ffa6fde2166b1c4976daa3905b82c6aae | PHP | holynation/pry_sec_rms | /application/models/entities/Term.php | UTF-8 | 3,776 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
defined("BASEPATH") OR exit("No direct script access allowed");
require_once("application/models/Crud.php");
/**
* This class is automatically generated based on the structure of the table. And it represent the model of the term table.
*/
class Term extends Crud {
protected static $tablename = "Term";
... | true |
ae49d36bcd4bbf9a87e6488ec509d03b78d5da6e | PHP | npaul007/fxRatesCalculator | /fxCalc.php | UTF-8 | 4,902 | 2.84375 | 3 | [] | no_license | <?php
// import contents of FxDatamodel php
require_once('FxDataModel.php');
require_once('LoginDataModel.php');
require_once('EmailModel.php');
if(!isset($_SESSION)){
session_start();
}
if(!isset($_SESSION[LoginDataModel::USERNAME_SESSION_KEY])){
require_once LoginDataModel::PHP_FILENAME;
exit;
}
if... | true |
841cebc3cd638ea921a2b0d62dd3476f9dc8d2ac | PHP | raymag/dwhome | /Pacotes/PACOTE-VETORES-COMENTADOS-PHP/arrays_associativos/q1.php | UTF-8 | 1,491 | 3.609375 | 4 | [] | no_license | <?php
# ==== Carlos Magno Nascimento ==== #
# ====== Criado em 19/04/18 ====== #
# ====== Comentado em 03/06/18 ==== #
echo "<style>body{background:#cdcdcd;font-size:25px;}</style><center>";
#===================================>
/*
A questão pede um formulário com os campos Nome, Senha, Email, Idade e Altu... | true |
50440d686b36e55b8ce91f7ad8b8d0a6f1584c4a | PHP | cunshanggang/thinkphp5 | /application/test/controller/Index.php | UTF-8 | 1,088 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2017/1/3
* Time: 17:30
*/
namespace app\test\controller;
use think\Controller;
class Index extends Controller
{
// protected $beforeActionList = [
// 'first',
// 'second' => ['except'=>'hello'],
// 'three' => ['only'=>'hello,da... | true |
9743595517a5b009cffbf8378874967a55cb2758 | PHP | kodeartisan/nglaralibrary | /app/Http/Controllers/Api/AuthController.php | UTF-8 | 1,280 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Api;
use Tymon\JWTAuth\JWTAuth;
use Tymon\JWTAuth\Exceptions\JWTException;
use App\Http\Requests\Api\AuthRequest;
use Illuminate\Http\Request;
class AuthController extends ApiController
{
/**
* @var JWTAuth
*/
protected $jwtAuth;
/**
* @var Log
*/
protected $log;
... | true |
67e6335c6eeddab6f846fb18e011fc2324cb708e | PHP | DiegoCV/peticiones | /back/outerController/usuario/Login.php | UTF-8 | 825 | 2.625 | 3 | [] | no_license | <?php
/*
-------Creado por-------
\(x.x )/ Anarchy \( x.x)/
------------------------
*/
// ¿Documentaqué? \\
include_once realpath('../../innerController/UsuarioController.php');
$nombre = $_POST['cargoId'];
$contrasena = $_POST['contrasena'];
$usuario = UsuarioController... | true |
ddfbb76353efa0d6d77ff42fdd56ceb14bdeae01 | PHP | Honvid/yshop | /common/models/MallArea.php | UTF-8 | 3,632 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use common\helpers\ArrayHandle;
use common\helpers\RedisKey;
use Yii;
/**
* This is the model class for table "mall_area".
*
* @property integer $id
* @property integer $parent_id
* @property string $name
* @property string $short_name
* @property string $longitude
* @property ... | true |
e9aafa1daf7bb1e2309133ea5b347f6d8606c597 | PHP | maxxyryo/bitgo-http-client | /src/Provider/Wallet/MaximumSpendableProvider.php | UTF-8 | 811 | 2.671875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Jaddek\Bitgo\Http\Client\Provider\Wallet;
use Jaddek\Bitgo\Http\Client\Client\Wallet\WalletInterface;
use Jaddek\Bitgo\Http\Client\Response\Wallet\MaximumSpendable;
use Psr\Log\LoggerInterface;
final class MaximumSpendableProvider
{
public function __construct(
p... | true |
87831375d825f4723c3f79f32c3342d26164d5c8 | PHP | keyramvar/SapporoNoMinamiRamen_CMS | /controller/OrdenController.php | UTF-8 | 2,093 | 2.6875 | 3 | [] | no_license | <?php
class OrdenController{
public function __construct(){
$this->view = new View();
}
public function agregarAlaOrden(){
$id = $_GET['IdPlatillo'];
$platillo = $this->buscarPlatillo( $id);
foreach ($platillo as $plat) {
$idPlatillo = $plat["IdPlatillo"];
... | true |
c3c03a16e5a9b49acc17a2771eeea1c0639f2d62 | PHP | yunnanwenshan/huacang-api | /app/Services/User/AuthService/MobileCodeService.php | UTF-8 | 7,267 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\User\AuthService;
use App\Exceptions\User\UserException;
use App\Models\Code;
use App\Services\User\AuthService\Contracts\MobileCodeInterface;
use Carbon\Carbon;
use GuzzleHttp\Client;
use Log;
use Exception;
class MobileCodeService implements MobileCodeInterface
{
/**
* 聚合数据发送... | true |
b781592927c99760723df042c9b4dff76ec99fc6 | PHP | marekz/php_clean_arch_app | /application.php | UTF-8 | 1,978 | 2.5625 | 3 | [] | no_license | <?php
/*
* The MIT License (MIT)
*
* Copyright (c) 2017 SBG
*
* 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 the rights
* to use, co... | true |
45b3b1c53a80577cfe146661082007ef54f607c6 | PHP | yiisoft/router | /src/RouteCollectionInterface.php | UTF-8 | 324 | 2.640625 | 3 | [
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Yiisoft\Router;
interface RouteCollectionInterface
{
/**
* @return Route[]
*/
public function getRoutes(): array;
public function getRoute(string $name): Route;
/**
* Returns routes tree array.
*/
public function getRouteTree(): array... | true |
6a2e3fb5274b5982ec6bf6d1616ad7626af15ec1 | PHP | Alessio-source/genshinItalia | /app/Http/Controllers/StreammerController.php | UTF-8 | 2,665 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use App\User;
use App\Streammers;
class StreammerController extends Controller
{
private $validateData = [
'name' => 'required'
];
/**
* Display a listing of the resource.
*
* @r... | true |
706a722a44b16458de43d2a50bf557a039923515 | PHP | kirbyzhu/cmdhere | /autoindex.php | UTF-8 | 5,174 | 2.671875 | 3 | [] | no_license | <?php
define("PASSWORD", "123");
define("MARKED_JS", "https://cdn.bootcss.com/marked/0.3.6/marked.min.js");
define("GITHUB_MARKDOWN_CSS", "https://cdn.bootcss.com/github-markdown-css/2.4.1/github-markdown.min.css");
//var_dump($_SERVER);
//var_dump($_FILES);
if (isset($_FILES['photo']) && !$_FILES['photo']['error'])
{
... | true |
354799432177f2a41056785c7ca2545e2b1ee308 | PHP | nguyentienlong/laravel_sandbox_validation | /app/Http/Controllers/StudentController.php | UTF-8 | 1,462 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\JsonResponse;
use App\Models\Student;
use App\Models\Clazz;
use App\Http\Requests\StudentRequest;
use App\Validators\StudentValidator;
class StudentController extends Controller
{
protected $studentValidator;
protected $s... | true |
376c90de549560983f495f6e534efd9fa14f0b73 | PHP | jonpfeiffer/MeetingManager | /app/models/task.class.php | UTF-8 | 1,156 | 3.046875 | 3 | [] | no_license | <?php
/**
* Task
*/
class Task extends Model {
public function __construct(){
}
private $person_id = 0;
private $meeting_id = 0;
private $deliverable_text = "";
private $datetime_due = "";
public $is_completed = false;
public function getPerson(){
return $this->person... | true |
cd25b0159645596b69388f2c7414dd027ccbbbb6 | PHP | kodmanyagha/FormManager | /app/Helpers/StringUtils.php | UTF-8 | 15,158 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Helpers;
use Illuminate\Support\Facades\Config;
use Illuminate\Support\Facades\DB;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
class StringUtils {
/**
* Türkçe ay isimleri.
*
* @var array
*/
static $months = [
"Ocak",
"Şubat",
"Mart",
"Nis... | true |
7ddff69e03f9c4875272f1f173341b2f82ad678f | PHP | TrollScien/unidad-sanitaria | /modelo/gestorTipovacaciones.php | UTF-8 | 2,064 | 3.015625 | 3 | [] | no_license | <?php
require_once "conexion.php";
class GestorTipovacacionesModel{
#GUARDAR TIPO DE VACACIONES
#------------------------------------------------------------
public function guardarTipovacacionesModel($tabla,$datosModel){
$stmt = Conexion::conectar()->prepare("INSERT INTO $tabla (nombre_tipovac) VALUES (:nombr... | true |
e3da237a3ebfc418e144ed3eaf46c67abad165e6 | PHP | haskel/grind | /src/AbstractWorker.php | UTF-8 | 773 | 2.6875 | 3 | [] | no_license | <?php
namespace Haskel\Component\Grind;
use Haskel\Component\Grind\Enum\WorkerMode;
abstract class AbstractWorker implements WorkerInterface
{
protected $pid;
protected $isActive = false;
protected $periodicallyWaitTime = 0;
protected $mode;
public function __construct()
{
$this->pid ... | true |
9b048e32aaa7991e049d04965e0ac2d55cccf681 | PHP | infection/infection | /tests/autoloaded/mutator-fixtures/FunctionCall/fc-contains-another-func-and-null-is-not-allowed.php | UTF-8 | 235 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace FunctionCall_ContainsAnotherFunctionAndNullIsNotAllowed;
class Test
{
function test(): int
{
$a = function ($element) : ?int {
return $element;
};
return count([]);
}
} | true |
0b1f173482c995b49da62d1870bc42db854cf9df | PHP | zoho/zohocrm-php-sdk | /src/com/zoho/crm/api/dc/USDataCenter.php | UTF-8 | 2,182 | 2.90625 | 3 | [] | no_license | <?php
namespace com\zoho\crm\api\dc;
use com\zoho\crm\api\dc\DataCenter;
/**
* This class represents the properties of Zoho CRM in US Domain.
*/
class USDataCenter extends DataCenter
{
private static $PRODUCTION = null;
private static $SANDBOX = null;
private static $DEVELOPER = null;
... | true |
62ed5b52b0dd385c01b7c5f6fddf3d7ea81069f0 | PHP | radoshordos/lappc | /app/Authority/Runner/Task/Ppc/KeywordDb.php | UTF-8 | 923 | 2.515625 | 3 | [] | no_license | <?php
namespace Authority\Runner\Task\Ppc;
use Authority\Runner\Task\iRun;
use Authority\Runner\Task\TaskMessage;
use Authority\Eloquent\PpcDb;
use Authority\Eloquent\PpcKeywords;
class KeywordDb extends TaskMessage implements iRun
{
public function __construct($db)
{
parent::__construct($db);
}
... | true |
aa65e30227436bd4c2ca3f701258b18c78db3a7f | PHP | agrodriguez/wwwsakilav2 | /app/Inventory.php | UTF-8 | 1,488 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Inventory extends Model
{
protected $table = 'inventory';
/**
* change default primary key
* @var string
*/
protected $primaryKey ='inventory_id';
/**
* set timestaps to false
* @var boolean
*/
publ... | true |
11e012b2afdedfa8c6d45b30c09f6d99353a7ad3 | PHP | Martincl65/Project | /app/Controller/LoginController.php | UTF-8 | 793 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Controller;
use App\Form;
use App\Table\DBAuth;
use App\Table\Developer;
class LoginController extends Controller
{
/**
* @param DBAuth $auth
*/
public function login(DBAuth $auth)
{
$form = new Form('Login_form');
if ($fo... | true |
4b272305118a3fc1ffb126c2cba85b1a5fcee3e6 | PHP | davepadrino/laraliadas | /app/Http/Controllers/personaController.php | UTF-8 | 5,578 | 2.546875 | 3 | [] | no_license | <?php namespace Aliadas\Http\Controllers;
use Aliadas\Http\Requests;
use Aliadas\Http\Controllers\Controller;
use Auth;
use Session;
use Redirect;
use Input;
use Illuminate\Http\Request;
use DateTime;
class personaController extends Controller {
/**
* Display a listing of the resource.
*
* @return Response
... | true |
cd029b3179c19dfbca9062bc7cc2967b90d7f61f | PHP | Heraclesnyx/laravel | /app/Http/Controllers/BookController.php | UTF-8 | 2,482 | 2.75 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Book;
class BookController extends Controller
{
protected function _getAllLoans(){
$loans = [null => "-- Select a loan --"];
foreach (Loan::all() as $key => $value){
$loans[$value->id] = $value->name;
... | true |
0fb7d46b91edd95b4986a93e0816e5163d7aac21 | PHP | narij-group/php-persian-ecommerce-cms | /ClassesEx/datasource/OnlineDataSource.inc | UTF-8 | 2,204 | 3.03125 | 3 | [] | no_license | <?php
require_once __DIR__ . DIRECTORY_SEPARATOR . "../model/Online.inc";
require_once __DIR__ . DIRECTORY_SEPARATOR . "../dataaccess/DataAccessEx.inc";
class OnlineDataSource {
public $da;
function __construct()
{
$this->da = new DataAccessEx();
}
public function open()
{
... | true |
4b3804afc6424fd09f1e1b7eaf7dc51565314170 | PHP | Jenjen1324/BZZ-Projekt-2014-12-04 | /resources/wholefile.php | UTF-8 | 267 | 2.78125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<body>
<?php
echo "<h1>FileGetContents</h1>";
echo "<pre>";
echo htmlentities(file_get_contents("read.php"));
echo "</pre>";
echo "<h1>Implode</h1>";
echo "<pre>";
echo htmlentities(implode("",file("read.php")));
echo "</pre>";
?> | true |
496646c9088f53e3418890edc179fdb74d4e4262 | PHP | bluecipherz/gl-ct | /app/Repositories/Criteria/Criteria.php | UTF-8 | 448 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php namespace App\Repositories\Criteria;
/**
* Created by PhpStorm.
* User: bazi
* Date: 30-Jul-15
* Time: 9:53 AM
*/
use App\Repositories\Contracts\RepositoryInterface as Repository;
/**
* Class Criteria
* @package App\Repositories\Criteria
*/
abstract class Criteria {
/**
* @param $model
* @... | true |
bcd8143fd5558998e2d932b91000043853611ef8 | PHP | gerryramosftw/cudablog | /readcookies.php | UTF-8 | 558 | 3.109375 | 3 | [] | no_license | <!doctype html public>
<html lang="en">
<head>
<title>Testing Cookies</title>
</head>
<body>
<?php
/*
$name = "username";
$value = "mheller";
$expire = time() + (60*60*24*7);
setcookie($name, $value, $expire);
*/
// echo "<h1>Cookies have been set</h1... | true |
7ae1fdb57ebf00f2a107ecfe69761c7d6a2643c4 | PHP | saurabhsjoshi/Recipic | /app/lib/lib.php | UTF-8 | 3,533 | 2.6875 | 3 | [] | no_license | <?php
function do_page_prerequisites()
{
session_start();
}
function output_html5_header($title,
$css = array(), $js = array())
{
do_page_prerequisites();
header('Content-Type: text/html');
$title = htmlspecialchars($title);
$link = '';
foreach ($css as $cssFile)
$link .= '<link rel="stylesheet" ... | true |
3e33a17b05309adb4060b4bf27971396178ed6fb | PHP | taursky/test.job | /src/Service/EventsService.php | UTF-8 | 6,956 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Service;
use App\Entity\Flight;
use App\Entity\User;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\QueryBuilder;
class EventsService
{
private $em;
public function __construct(EntityManagerInterface $em)
{
$this->em = $em;
}
/**
* @param $request
... | true |
b40d83bc1f28206118ec25888b74908e466626d9 | PHP | onglo/edutixticketingsystem | /public_html/eton/mobile/scripts/checkUserPermission.php | UTF-8 | 320 | 2.96875 | 3 | [] | no_license | <?php
// start a session that will authenticate the user
if (session_id() == "") {
session_start();
}
// check if the user can create events
if ($_SESSION["permission"] == md5($_SESSION["idNumber"].$_SESSION["userID"])) {
// say they can
echo "true";
}
else {
// say then can't
echo "false";
}
?>
| true |
a1953413cb70106ac400a258d675d56279272fe0 | PHP | maksstepak/laravel-kanban-api | /app/Http/Controllers/CardController.php | UTF-8 | 1,504 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Requests\StoreCardRequest;
use App\Http\Resources\CardResource;
use App\Models\Card;
use App\Services\CardService;
use Illuminate\Support\Facades\Gate;
class CardController extends Controller
{
protected $cardService;
public function __construct(CardService... | true |
fa0b6eb51f76e25078413657fd5455acc07696b9 | PHP | Argnote/Warhammer40k-scoreBoard | /www/models/Mission.php | UTF-8 | 2,828 | 2.875 | 3 | [] | no_license | <?php
namespace warhammerScoreBoard\models;
class Mission extends Model
{
protected $idMission;
protected $nomMission;
protected $description;
protected $nombrePointPossiblePartie;
protected $nombrePointPossibleTour;
protected $idCategorie;
protected $nomCategorie;
protected $marquag... | true |
c1bd724621a2439422ae1b98f2e6e5391fc76192 | PHP | codykong/AndyCMS | /Admin/Lib/Model/UserModel.class.php | UTF-8 | 920 | 2.625 | 3 | [] | no_license | <?php
class UserModel extends Model{
//自动填充
protected $_auto = array(
array('active','get_active',1,'callback'),
array('password','md5',3,'function'),
array('reg_date','get_date',1,'callback'),
array('last_login_date','get_date',1,'callback')
);
//自动验证
protected $_validate = array(
array('u... | true |
c4f65b3d31928a1320f54a5239da4419e301f872 | PHP | houisberg/perfectPHP_7 | /core/View.php | UTF-8 | 2,335 | 3.078125 | 3 | [] | no_license | <?php
class View
{
protected $base_dir;
protected $defaults;
protected $layout_variables = array();
public function __construct($base_dir, $defaults = array()) {
$this->base_dir = $base_dir; // viewsディレクトリまでの絶対パス
$this->defaults = $defaults; // デフォルトでビューファイルに渡す変数
}
/**
... | true |
107eb8980079d14ffa2ea6fca1031d535f811772 | PHP | Priyanshusingh440/BGVHWD | /Project_files/API/login.php | UTF-8 | 3,280 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
require_once "../config/config.php";
#---------------------<---Code Written and Designed By Priyanshu Raghuvanshi--->-----------------------#
$get_connection=new connectdb;
$db=$get_connection->connect();
class login
{
public function __construct($db)
{
$this->conn=$db;
}
public funct... | true |
9be4d4605b4f614e4ed416e621cb6a38d6ccda82 | PHP | blueprint1985/AdventOfCode | /2016/Day 14/day14_2.php | UTF-8 | 877 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
$myfile = fopen("day14_input.txt", "r") or die("Unable to open file!");
$salt = trim(fgets($myfile));
fclose($myfile);
$curr_index = 0;
$all_keys = array();
while (count($all_keys) < 64) {
$to_try = md5($salt.strval($curr_index));
for ($j=0; $j < 2016; $j++) {
$to_try = md5($to_try);
... | true |
aeedd9a724504ad779adc61de00f15c6e00793c3 | PHP | ehvoluti/fluxo | /class/notafiscalimposto.class.php | UTF-8 | 2,160 | 2.578125 | 3 | [] | no_license | <?php
require_once("websac/require_file.php");
require_file("class/cadastro.class.php");
class NotaFiscalImposto extends Cadastro{
function __construct($idnotafiscal = NULL,$tipoimposto = NULL,$aliquota = NULL){
parent::__construct();
$this->table = "notafiscalimposto";
$this->primarykey = array("idnota... | true |
1554aac25ac30e2799cd662b84e89f37cc42dcf1 | PHP | jack4518/vophp-framework | /vophp/libraries/VO/Acl/Resource.php | UTF-8 | 771 | 2.65625 | 3 | [] | no_license | <?php
/**
* 定义 VO_Acl_Resource 资源控制器
*
* @copyright Copyright (c) 2010 ViSong INC. (http://www.vophp.com)
* @license http://www.vophp.com/user_guide/license
* @link http://www.vophp.com/
* @author JackChen
* @package VO
* @since version 1.0
* @date 2010-09-09
**/
defined('VOPHP') or die('Restr... | true |
2fe0dd79528c2f6bfd103bc09ac057cb9c1917fa | PHP | HaiNguyen412/PHP_OMT | /Basic/numbers.php | UTF-8 | 871 | 3.796875 | 4 | [] | no_license | <?php
//ex1: int, float, gia tri vo han
//kiem tra bien co phai so nguyen hay khong
// $x = 2323;
// var_dump(is_integer($x));
// $x = 234.234;
// var_dump(is_integer($x));
// $x = 234.234;
// var_dump(is_long($x));
// $x = 2323;
// var_dump(is_float($x));
// $x = 234.234;
// var_dump(is_double($x));
//gia tri vo han... | true |
0445404893afb67e6e752f4176f6c1b4bdd97a4d | PHP | mhRumi/Tracker | /BackEnd/getConnection.php | UTF-8 | 496 | 3.203125 | 3 | [] | no_license | <?php
class Connection{
function connect(){
$servername = "localhost";
$username = "root";
$password = "";
$DB_NAME = "Tracker";
/**
*Create connection and finally added database
*if we want to add database then we have to pass db name as last parameter to mysqli method
**/
$co... | true |
98458749e5aa25bb909de523b7b7334ca7d52652 | PHP | codenroller/PHP-UserRegistrationModule | /public_files/img/captcha.php | UTF-8 | 1,050 | 2.9375 | 3 | [] | no_license | <?php
include '../../lib/common/functions.php';
// set session
if (!isset($_SESSION))
{
session_start();
header('Cache-control: private'); //do not cache!
}
// create a 75x30 pixel image
$width = 100;
$height = 30;
$image = imagecreate($width, $height);
// fill the image background color
$bg... | true |
154b457002667d1917c744b8f2fea8dc0f6d1d09 | PHP | IrealiTY/tvo-spa-t3 | /app/Http/Controllers/Auth/UserController.php | UTF-8 | 1,147 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Http\Requests\Users\UserUpdateRequest;
use App\User;
use Illuminate\Http\Request;
class UserController extends Controller
{
/**
* Get authenticated user.
*
* @param \Illuminate\Http\Request $request
* @re... | true |
139999a9dbe76425f0d68d2a7620501d06978488 | PHP | isogai184/php_entry_form | /conf.php | UTF-8 | 17,289 | 2.859375 | 3 | [] | no_license | <?php
if (empty($_POST)) {
header('Location: ./index.php');
exit;
} else {
$id = $_POST['id'];
if (!isset($_POST['job_category'])) {
$job_category = "";
} else {
$job_category = $_POST['job_category'];
}
if (!isset($_POST['employment'])) {
$employment = "";
} else {
$employment = $_POST['employment'];
}
if... | true |
7f9e308a2c7673b749a1313c189a8694b4df177c | PHP | etiennnr/tirage | /writer-module.php | UTF-8 | 2,637 | 3 | 3 | [] | no_license | <?php
/*
Définit tous les modules d'écriture de fichier sur le serveur, puis celui qui gère la suppression du contenu des dossiers avant la création des fichiers
Code écrit par Jeremi Cyr
Date : 16-05-2016
*/
$currentopenFile;
if(isset($_POST["functionname"]) && isset($_POST["args"])){
$args = $_POST["args"];
... | true |
43902dff8a1200131e7e975fd127fd3bc8a1f226 | PHP | DawidBury/syliusik | /src/ShippingCalculator/ParcelCalculator.php | UTF-8 | 655 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\ShippingCalculator;
use Sylius\Component\Shipping\Calculator\CalculatorInterface;
use Sylius\Component\Shipping\Model\ShipmentInterface;
final class ParcelCalculator implements CalculatorInterface
{
public function calculate(ShipmentInterface $subject, array $configu... | true |
de27de44904f61933b5dd1415d7cdc9f4b28d260 | PHP | sta-ka/startschuss_51 | /app/Http/Requests/Organizer/UpdateSeoDataRequest.php | UTF-8 | 478 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Requests\Organizer;
use App\Http\Requests\Request;
class UpdateSeoDataRequest extends Request {
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
$organizer_id = $this->route()->parameter('organizer_id');
return [
'slu... | true |
a98f3ded6a9ca38fe64f81d556f6f909c6fd7f2d | PHP | harshkailash/employee-employer-application-using-javascript-css-php-jquery | /login.php | UTF-8 | 3,864 | 3.03125 | 3 | [] | no_license | <?php
require 'assets/php/1.php';
require 'assets/php/2.php';
?>
<html>
<head>
<title>LOGIN PAGE</title>
<link rel="stylesheet" href="assets/css/login.css">
</head>
<body bgcolor=lightblue>
<!-- Modal action sends the input of the form to the page specified -->
<form class="modal" action="login.php" ... | true |