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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
854325fb4b944512f53d39f0cd594534fccf5481 | PHP | rgardnergruntwork/schoolmap | /service/data/dataFileUploader.php | UTF-8 | 648 | 2.96875 | 3 | [] | no_license | <?php
class DataFileUploader {
var $file;
var $headers = [];
function __construct($file) {
$this->file = $file;
}
function getHeaders() {
$this->headers = fgetcsv($this->file);
}
function getRow() {
if (!feof($this->file)) ... | true |
9b107d8299049fb4d2a2be7a41ac7a15f17c64a4 | PHP | Jakepodell/WVNHS | /insert.php | UTF-8 | 740 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
// escape variables for security
$name1 = mysqli_real_escape_string($con, $_POST['name1']);
$name2 = mysqli_real_escape_string($con, $_POST['name2']);
$grade = mysqli_rea... | true |
24245658a5e4b1beb1970c4880dce881af778d41 | PHP | nicomencia/nicomencia.github.io | /BBDD/CrearBase.php | UTF-8 | 1,135 | 2.546875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="es">
<head>
<title>501px - Crear base</title>
<meta charset="utf-8"/>
<meta name="author" content="UO250721" />
<link rel="stylesheet" type="text/css" href="bbdd.css" />
</head>
<body>
<div><h1>501px</h1></div>
<section>
<h2>Resultado ... | true |
2e04eccb861c0605351611ae949b2a60f90f2d85 | PHP | brandsafric-incorporated/inventory-laravel5.8 | /app/Http/Controllers/RolesPermissionsController.php | UTF-8 | 3,577 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Spatie\Permission\Models\Role;
use Spatie\Permission\Models\Permission;
class RolesPermissionsController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public fun... | true |
1d2b96ac64d6ffea284fd8a4933555f24181b8b1 | PHP | EDataScriptware/ServerProgramming | /Amina/contrerasProject1/classes/ViewTeam.class.php | UTF-8 | 868 | 2.828125 | 3 | [] | no_license | <?php
class ViewTeam{
private $picture;
private $firstname;
private $lastname;
private $jerseynumber;
private $name;
public function AllString(){
$bigString = "";
$bigString .= "
<tr>
<td class='picture' data-id1=".$this->picture." ... | true |
89f38fa0849b8e6b6ad1dd4f8c1dec25efbbd436 | PHP | romosken/PHP | /Exercicios/cap11php/ex05.php | UTF-8 | 1,260 | 2.765625 | 3 | [] | no_license | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cap 11 ex 05</title>
</head>
<body>
<center>
<?php
$Beto=$... | true |
0af6bf1c62384d9637aeb6bf428fd039d2eabe8c | PHP | martiniano/personal-management-system | /src/DataFixtures/Modules/Payments/MyPaymentsMonthlyFixtures.php | UTF-8 | 1,939 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\DataFixtures\Modules\Payments;
use App\Entity\Modules\Payments\MyPaymentsMonthly;
use App\Entity\Modules\Payments\MyPaymentsSettings;
use App\Repository\Modules\Payments\MyPaymentsSettingsRepository;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterfa... | true |
b7e44d852a53a2abac5eb6c8855cea6f9252916b | PHP | shimashimash/accounting_book | /app/Repositories/LaterDelete/HomeRepository.php | UTF-8 | 6,862 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Home;
use Carbon\Carbon;
use App\Month;
use App\Constants\DaysOfWeek;
use App\Constants\MonthlyCategories;
use Illuminate\Support\Facades\Auth;
class HomeRepository implements HomeRepositoryInterface
{
//----------------------------------------------
//
// Constants
/... | true |
a763c9b1f8edcb826252ded65ba3647634846472 | PHP | panipraveen/RestaurantAutomation | /counter.php | UTF-8 | 11,350 | 2.515625 | 3 | [] | no_license | <?php
require("customer_navbar.php");
if($_SESSION["user_role_session"]!="admin" && $_SESSION["user_role_session"]!="manager"){
echo "<script>window.location.href = '/official_Tybsc_project/wrong.php';</script>";
}
?>
<?php
require("config.php");
?>
<?php
if(isset($_POST['pay'])){
$to_change = $_POST['pay']; ... | true |
49b50e72e61244a17c34222714bdaa0fba13ccd3 | PHP | enochval/moje | /app/Department.php | UTF-8 | 671 | 2.609375 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Department extends Model
{
public function faculty()
{
$this->belongsTo(Faculty::class,'faculty_id');
}
public static function getDepartments($id)
{
$departments = Department::where('faculty_id',$id)->pluck('depar... | true |
2e8ce9c3b74b7e90831422fe4da2e65b3926e623 | PHP | envirocycling/dot.ph | /ims/bale_wire_inventory.php | UTF-8 | 8,063 | 2.53125 | 3 | [] | no_license | <?php include("templates/template.php");?>
<style>
#summary_per{
float:right;
}
</style>
<link rel="stylesheet" type="text/css" media="all" href="jsDatePick_ltr.min.css" />
<script type="text/javascript" src="jsDatePick.min.1.3.js"></script>
<script type="text/javascript">
function date1(str){
... | true |
9f16e96361a0a7a98271a1f17409617bb3d241cd | PHP | 2vlad19880508/lesson-4 | /6.php | UTF-8 | 926 | 3.40625 | 3 | [] | no_license | <?php
$f = range(90,150,3); // массив с 90 до 150 и шаг - 3
$a = range(150,90,3);
$c = array_combine($f, $a); // массив с 90 до 150 но ключи в обратном порядке. Например у ключа 90 будет значение 150
print_r($c);
echo '<br>';
// Создать еще один аналогичный массив но с сортировкой по возрастанию ключа. Може... | true |
e3ca2563478e03f55670edfd08679684d9c3d4a1 | PHP | rodolphok/windcell | /src/Windcell/Service/User.php | UTF-8 | 2,125 | 2.59375 | 3 | [] | no_license | <?php
namespace Windcell\Service;
use Windcell\Model\User as UserModel;
use Zend\Crypt\Password\Bcrypt;
use Exception;
class User extends Service
{
public function save($data)
{
$data = json_decode($data);
if (!isset($data->name) || !isset($data->celular) ||
!i... | true |
f4253c8836b2194e7cd4c57f9e80af5d48005e63 | PHP | ousdiallo/crd | /controller/Service.class.php | UTF-8 | 1,946 | 2.546875 | 3 | [] | no_license | <?php
/**
*
*/
class Service extends Controller
{
function __construct()
{
parent::__construct();
require_once 'model/ServiceDB.php';
}
public function index()
{
return $this->view->load("service/index");
}
public function add()
{
$tdb = new ServiceDB();
/*if(isset($_POST['valider']))
{
... | true |
05daf364a7545dacb31fa13cb2573a651e869a36 | PHP | TriKro/auto-content-links | /control_panel.php | UTF-8 | 12,347 | 2.5625 | 3 | [] | no_license | <?php
class autoContentLinksControlPanel
{
/**
* Plugin options
* @var array
* @access public
*/
var $options = array();
/**
* PHP5 constructor - links to old style PHP4 constructor
* @param string $file
* @access public
* @since 1.0
* @return void
*/
function __construct($fil... | true |
aad878a0925e735d61cbaab00fcb696c6fea4933 | PHP | tanvibangad/notes | /Pallavi/Pallavi/register-connect.php | UTF-8 | 1,516 | 2.65625 | 3 | [] | no_license | <?php
$mysql_host="localhost";
$mysql_user="root";
$mysql_password="";
$dbname="notessharing";
$var1=$fname=$stream=$degree=$subject=$email=$password="";
$conn = new mysqli($mysql_host,$mysql_user,$mysql_password,$dbname);
if ($conn->connect_error)
{
die("connection failed" . $conn->connect_error);
}
... | true |
cd21342c0966025eec9a6c271f73e100e0bf8649 | PHP | yokkun/study-at-hal-programming-school | /housekeeping_app/kakeibo/kakeibo_update_form.php | UTF-8 | 3,820 | 2.859375 | 3 | [] | no_license | <?php
require_once '../Encode.php';
require_once '../DbManager.php';
session_start();
if ($_SESSION['errors']) {
$id = $_SESSION['id'];
$date = $_SESSION['kakeibo_date'];
$himoku_id = $_SESSION['himoku_id'];
$memo = $_SESSION['memo'];
$income = $_SESSION['income'];
$outcome = $_SESSION['outcom... | true |
78e6b849ecc199eec2bae8ecb4cf4809e7831cba | PHP | fmmajd/sample-php-project | /app/Http/Resources/BaseResource.php | UTF-8 | 761 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Resources;
use Illuminate\Http\Resources\Json\JsonResource;
abstract class BaseResource extends JsonResource
{
protected $status;
protected $message;
protected $meta;
public function __construct(
$resource,
int $status = 200,
?strin $message = null,
a... | true |
e3779018c58e458a57f5262fd5923634c65c159a | PHP | schwenkspace/sortiment | /backoffice/produkte/2_produkt_anzeigen_und_loeschen.php | UTF-8 | 762 | 2.671875 | 3 | [] | no_license | <?php
include '../../includes/menue.inc';
?>
<?php
$titel = "Produkt wirklich löschen?";
include '../../includes/dbconnect.inc';
include '../../includes/header.inc';
?>
<?php
$dbanfrageergebnis = mysqli_query(
$dbverbindung,
"select *
from produkte
where p_nummer=".$_GET['nr']);
while($datensatz = mysqli_fetch... | true |
1aa8c199ef478d8a1a80637df7c9fcb51efab103 | PHP | Wyru/Checkpoint-Network | /_method/verify_login.php | UTF-8 | 3,399 | 2.609375 | 3 | [] | no_license | <?php
/* Autor: Nixon Silva
* Data: 18/05/2016
* Função: Código acionado quando um usuário clica no botão cadastro, o código
* é responsável por efetuar as validações dos dados e o cadastra efetivamente
* logo em seguida caso sejam informações válidas.
*/
include 'mysql_connect.php';
ob_start ();
// Verifica ... | true |
59da836bf90837f3325cfecf8df142cfd264bb39 | PHP | pavandeore/lead-management-backup | /employee/uploadEmployee.php | UTF-8 | 849 | 2.65625 | 3 | [] | no_license | <?php
$conn = mysqli_connect("localhost","root","","lead_management");
@$emp_name=$_POST['employee_name'];
@$emp_number=$_POST['employee_number'];
@$emp_role=$_POST['employee_role'];
if(empty($emp_name) || empty($emp_number) || empty($emp_role) ){
echo "
<div class='unblurred warning-msg alert ... | true |
cf5711a6fc095bb3020cf82b24660616cd7fa960 | PHP | babanuki/book_review | /source/cgi-bin/Search_help.php | UTF-8 | 2,437 | 2.9375 | 3 | [] | no_license | <?php
include_once('./simple_html_dom.php');
$servername="localhost";
$username="cse20151602";
$password="cse20151602";
$dbname="db_cse20151602";
$conn=new mysqli($servername, $username, $password, $dbname);
$conn->query("set session character_set_connection=utf8;");
$conn->query("set session character_set_r... | true |
efc8bdef06932d4de0dc190591365c179c78ddbe | PHP | ngvdung0809/BTL-Web-20182-nhom4 | /movie-project/app/Http/Requests/Film/EditRequest.php | UTF-8 | 2,273 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests\Film;
use Illuminate\Foundation\Http\FormRequest;
class EditRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get ... | true |
aa12773993db1e32dbdee55231b1d04d364fac7b | PHP | SlobodanLazic/PHP-ITA | /Core PHP Programming/Predavanje 5/print().php | UTF-8 | 179 | 2.890625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Funkcija_ispis</title>
</head>
<body>
<?php
$string = "123";
print($string);
?>
</body>
</html> | true |
c355d55664c357dd91b36032ad355f733e9a19e5 | PHP | ingelby/alphavantage | /src/Models/Quote.php | UTF-8 | 1,632 | 2.71875 | 3 | [] | no_license | <?php
namespace Ingelby\Alphavantage\Models;
use yii\base\Model;
class Quote extends Model
{
/**
* @var string
*/
public $symbol;
/**
* @var string
*/
public $open;
/**
* @var string
*/
public $high;
/**
* @var string
*/
public $low;
/**
... | true |
a697533a2ec4df3dbf14d158ba165c9656c67b1d | PHP | arakdraja/Performance-Management-System | /app/Repositories/Project/ProjectInterface.php | UTF-8 | 243 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Project;
/**
* Interface Project
* Simple contract to force implementation of below functions
*/
interface ProjectInterface
{
public function getProjectById($id);
public function getAllActive();
} | true |
51ae3d3c029d815c2e9823f83271c25629048303 | PHP | nueaf/uteeni | /criteria.php | UTF-8 | 1,243 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
class Criteria {
private $criteria = array();
function add($criteria,$operand = 'and'){
$first = TRUE;
if(is_array($criteria)){
foreach ($criteria as $crit){
if(!is_a($crit,'criterion')){
throw new Exception("Criterion object rules not upheld, in multiple criteria");
}
if($operand ... | true |
fd8e32be2c05f5e9a448ad636bb91a5dc5160c7a | PHP | digideskio/kahlan | /spec/kahlan/matcher/ToBeAnInstanceOfSpec.php | UTF-8 | 372 | 2.765625 | 3 | [] | no_license | <?php
namespace spec\matcher;
use stdClass;
describe("toBeAnInstanceOf::match", function() {
it("passes if an instance of stdClass is an object", function() {
expect(new stdClass())->toBeAnInstanceOf('stdClass');
});
it("passes if an instance of stdClass is not a Exception", function() {
expect(new stdClass(... | true |
c5034f1c217ddd2218ceb640a3e7071d2e0e1ea9 | PHP | mamalias23/mvtsdashboard | /app/database/migrations/2015_05_12_170858_create_guards_table.php | UTF-8 | 1,567 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateGuardsTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('guards', function($table) {
$table->string('id', 36);
$ta... | true |
18f8c44d1bb884afdae33e893dbd36aa8dd5f035 | PHP | XQ-quadrant/yii2cmf | /common/helpers/Util.php | UTF-8 | 853 | 3 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: yidashi
* Date: 16/7/24
* Time: 下午4:22
*/
namespace common\helpers;
class Util
{
/**
* 解析url 格式: route[空格,回车]a=1&b=2
* @param $url
* @return array
*/
public static function parseUrl($url)
{
if (strpos($url, '//') !== false) {
... | true |
ba8594bc2b55e778f55b54555dec3a8823a3c27e | PHP | Ocramius/php-analyzer | /src/Scrutinizer/PhpAnalyzer/DataFlow/VariableReachability/MayBeReachingUseAnalysis.php | UTF-8 | 9,493 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright 2013 Johannes M. Schmitt <johannes@scrutinizer-ci.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*... | true |
aa00085cf8ba8701418ff1512f9c94fc653961eb | PHP | r-d-master/fancyana | /manage/upload.php | UTF-8 | 5,175 | 2.59375 | 3 | [] | no_license | <?php
require_once '../api/include/DbHandler.php';
function add_vendor(){
$actionOk = false;
if(count($_POST)>0) {
$vendor_name = $_POST["add_new_vendor_name"];
$vendor_url = $_POST["add_new_vendor_url"];
$vendor_image = substr($_POST["image_name"], 0, -4);
$response = ar... | true |
387f6bc0d74186c9ea0c597dabf30fbc8ee2e5dc | PHP | Aripower/ecommerce | /Exercicio/functions/prod_detail.php | UTF-8 | 403 | 2.859375 | 3 | [] | no_license | <?php
if(!isset($_SESSION['produto'])) {
$_SESSION['produto'] = array();
}
function addListaProd($id, $quantity) {
if(!isset($_SESSION['produto'][$id])){
$_SESSION['produto'][$id] = $quantity;
}
}
function ObterProduto($pdo, $lista) {
$sql = "SELECT * FROM produtos where id = ".$lista." ";
$stmt = $pdo->... | true |
7d8326ad4e6ef8340e4949f43492e9176a08fc8b | PHP | aw-studio/macrame-cms | /app/Templates/DefaultTemplate.php | UTF-8 | 723 | 2.625 | 3 | [] | no_license | <?php
namespace App\Templates;
use App\Casts\Resolver\ImageResolver;
class DefaultTemplate extends BaseTemplate
{
/**
* Define template specific attributes.
*
* @param array $attributes
* @return array
*/
public function parseAttributes($attributes)
{
$header = array_ke... | true |
2d9425cc2a4d2d7c7973c8b694919e7eff552366 | PHP | AZ-1/luohualiushui.com | /admin/package/article/Special.class.php | UTF-8 | 1,369 | 2.5625 | 3 | [] | no_license | <?php
/*
* 话题
* @author
*/
namespace Gate\Package\Article;
use Gate\Package\Helper\DBSpecialHelper;
use Gate\Package\User\Userinfo;
class Special{
private static $instance;
public static function getInstance(){
is_null(self::$instance) && self::$instance = new self();
return self::$instance;
... | true |
e7513b113232845d80ca7f9e576485afa8988733 | PHP | valysenko/algorithms | /tests/App/Services/Graph/ShortestPathTest.php | UTF-8 | 2,021 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Tests\Services\Sorting;
use App\DataStructures\Graph;
use App\Services\Graph\ShortestPath;
use PHPUnit\Framework\TestCase;
class ShortestPathTest extends TestCase
{
/**
* @var Graph
*/
protected static $graph;
/**
* @var ShortestPath
*/
protected static $shor... | true |
a3bd3ac9f6e0d3cd21aa710de68298d6aaaaa0b3 | PHP | KotenkovAndrey/OwlCMS | /core/model.php | UTF-8 | 12,840 | 2.625 | 3 | [] | no_license | <?php
class OwlModel {
public $id = 0;
public $name = '';
public $published = 1;
public $ordering = 1;
public $list_id = 1;
public $debug = '';
public $where = '';
public $form_struct = array();
public $form_struct_base = array(
'id' => array('type' => 'hidden'),
'list_id' => array('type' => 'hidden'),... | true |
552419a625bbf47c2e6c677e8d13854905714eb7 | PHP | semicdev/BankUploader | /clases/processupload.php | UTF-8 | 1,247 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
ini_set('upload_max_filesize', '512M');
ini_set('post_max_size', '512M');
ini_set('max_input_time', 300);
ini_set('max_execution_time', 300);
if(isset($_FILES["FileInput"]) && $_FILES["FileInput"]["error"]== UPLOAD_ERR_OK)
{
$UploadDirectory = 'tmpfile/';
if (!isset($_SERVER['HTTP_X_REQUESTED_WITH'])){
di... | true |
71db4d290a4dd3056d889bf43f8fb43432c233dc | PHP | alenoir/instawall | /index_2.php | UTF-8 | 687 | 2.765625 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
require_once 'classes/Instagram.class.php';
$insta = new Instagram();
$res = $insta->getPictures();
?>
<!doctype html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>Insta</title>
<link rel="stylesheet" href="/css/bootstra... | true |
33e88ad16892070695f83a100893bb756f89de7e | PHP | losanguyen93/CourseprojectDB | /Сайт PHP/manager/Fuction5.php | UTF-8 | 3,538 | 2.671875 | 3 | [] | no_license | <?php
include 'Struct.php';
include 'connect.php';
$product_beforedate = "2016-12-02";
$product_afterdate = "2016-12-06";
$zap = Struct::factory('date', 'id_product', 'quantity_mw');
$zap2 = Struct::factory('date','name_product', 'quantity_mw', 'price', 'salary');
$id_emp = '1';
... | true |
36b2d8197a590b7490537e5a34382922db40a973 | PHP | Haraldsst/GildedRose-Refactoring-Kata | /php/test/normalItemTest.php | UTF-8 | 1,954 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
require_once (realpath(dirname(__FILE__) . '/../src/gildedRose.php'));
require_once (realpath(dirname(__FILE__) . '/../src/item.php'));
use PHPUnit\Framework\TestCase;
class NormalItemTest extends TestCase
{
function testItemName()
{
$items = array(new Item("foo", 0, 0));
$gilded... | true |
c95f52fb10212e8bbdc51dcf1ab3a75524da9bbd | PHP | lkimsey/php5ineasysteps | /chgarray.php | UTF-8 | 435 | 3.828125 | 4 | [] | no_license | <!-- example for PHP 5.0.0 final release -->
<html>
<head>
<title>Changing array values</title>
</head>
<body>
<?php
#create an array containing 3 strings
$arr = array( "Red ", "Green ", "Blue" );
echo( $arr[0] . $arr[1] . $arr[2] . "<hr>" );
#assign new numeric values
$arr[0] = 44;
$arr... | true |
4d3c687df16bada6458b3b62bf599ef13085ffcd | PHP | ashwini0529/ACM-Event | /acmfinal/register.php | UTF-8 | 4,608 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/*
Version: 2.0.2
http:// .com
*/
require_once("models/config.php");
if (!securePage($_SERVER['PHP_SELF'])){die();}
//Prevent the user visiting the logged in page if he/she is already logged in
if(isUserLoggedIn()) { header("Location: account.php"); die(); }
//Forms posted
if(!empty($_POST))
{
$errors = arr... | true |
e1c1c1ac371705b4f6046289f36c309783989c09 | PHP | MijoeMathew/laravel_forum | /app/controllers/V1/PostsCommentsController.php | UTF-8 | 1,962 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace V1;
use BaseController;
use CommentRepositoryInterface;
use Input;
use View;
class PostsCommentsController extends BaseController {
/**
* We will use Laravel's dependency injection to auto-magically
* "inject" our repository instance into our controller
*/
public function __construct(... | true |
5331a5573b707e5620c9e84eb512dd442e3b9e41 | PHP | xuyazhong/xyz | /index.php | UTF-8 | 1,531 | 2.734375 | 3 | [] | no_license | <?php
include_once('sqlihelper.class.php');
$conn = new SqlHelper();
$sql='select book_id,title,price,total,borrowtime,leave_number from books';
/*
$time=time();
$update='update books set price=89,total=10,borrowtime='.$time.',leave_number=3';
$up= $conn->execute_dml($update);
echo $up;
if($up==1)
echo "执行成功";
if($up=... | true |
1d3ca1aa32031b5bc074274e4b8272e14bdab98d | PHP | fnzbj7/EulerProject | /029/php/29b.php | UTF-8 | 187 | 2.640625 | 3 | [] | no_license | <title></title>
<?php
$n = 0;
for($i=2;$i<=100;$i++){
for($j=2;$j<=100;$j++){
$szoveg = bcpow($i,$j);
if(!isset($tomb[$szoveg])){
$tomb[$szoveg] = 0;
$n++;
}
}
}
echo $n;
?> | true |
d096013ff7082fcf7493819aebac59513b0a9b2e | PHP | TouchTheSound/Project | /View/main_get.php | ISO-8859-1 | 2,043 | 2.53125 | 3 | [] | no_license | <?php
$len=count($ListPatches);
$i=0;
for($i=0;$i<$len;$i++){
//Put the launched patch in the top
if($ListPatches[$i]==$_GET["Patches"]){
?> </br><?php
//Take the needed parameters with information about it
$content=explode(";",file_get_contents("Fichier/" . $_GET["Patches"] ."/required.txt"));
$... | true |
d620dce042d4ebd90534b11b75acbe6d5596a231 | PHP | andrzej-tracz/rapidmail-api | /src/Infrastructure/Campaign/Transport/SwitfMailTransport.php | UTF-8 | 1,068 | 2.9375 | 3 | [] | no_license | <?php
namespace App\Infrastructure\Campaign\Transport;
use App\Infrastructure\Campaign\Contracts;
use Psr\Log\LoggerInterface;
class SwitfMailTransport implements Contracts\TransportInterface
{
/**
* @var \Swift_Mailer
*/
protected $mailer;
/**
* @var LoggerInterface
*/
protected... | true |
4acea4f336c1f3dae30e8449fc1981379cb9e508 | PHP | VickoSantos/Aprendendo-sistema-login-hxtutors | /src/HXPHP/System/Services/SimplecURL/SimplecURL.php | UTF-8 | 865 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace HXPHP\System\Services\SimplecURL;
class SimplecURL
{
public static function connect(string $url, array $post = [], array $get = [])
{
$url = explode('?', $url, 2);
if (count($url) === 2) {
$temp_get = [];
parse_str($url[1], $temp_get);
$get ... | true |
e385316289b80f3584a92dd0853d998dfb0ca5ee | PHP | hasithalakshan/basicphp | /if-else.php | UTF-8 | 432 | 3.609375 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>If Else Statements</title>
<link rel="stylesheet" href="">
</head>
<body>
<?php
$score=50;
echo "Score = ". $score;
?>
<br>
<?php
if ($score>=70) {
echo "Your Grade is A";
}else if ... | true |
c31758797d77752df2473499b6d276c8b99f33ee | PHP | trotri/trotri | /libraries/tfc/mvc/View.php | UTF-8 | 8,775 | 2.5625 | 3 | [] | no_license | <?php
/**
* Trotri Foundation Classes
*
* @author Huan Song <trotri@yeah.net>
* @link http://github.com/trotri/trotri for the canonical source repository
* @copyright Copyright (c) 2011-2013 http://www.trotri.com/ All rights reserved.
* @license http://www.apache.org/licenses/LICENSE-2.0
*/
... | true |
86e8f0084f79c59e52588b24183c216d188d0794 | PHP | Daaarkling/benchmark | /benchmark-php/app/Metrics/Xml/TraegerSimplestXML.php | UTF-8 | 751 | 2.625 | 3 | [] | no_license | <?php
namespace Benchmark\Metrics\Xml;
use Benchmark\Config;
use Benchmark\Converters\XmlConverter;
use Benchmark\Metrics\AMetric;
use Benchmark\Metrics\Info;
use SimplestXML;
class TraegerSimplestXML extends AMetric
{
/** @var SimplestXML */
private $simplestXML;
public function getInfo()
{
return new Inf... | true |
e7637c7c3f3d0e28d75db6867d59f83352161ce7 | PHP | verdad-llc/WorldPay-Magento2.3.x-php.7.1.x | /Gateway/Http/Converter/XmlToArray.php | UTF-8 | 1,115 | 2.5625 | 3 | [] | no_license | <?php
namespace Meetanshi\Cardsave\Gateway\Http\Converter;
use Magento\Framework\Xml\Parser as XmlParser;
use Magento\Payment\Gateway\Http\ConverterException;
use Magento\Payment\Gateway\Http\ConverterInterface;
use Psr\Log\LoggerInterface;
class XmlToArray implements ConverterInterface
{
protected $logger;
... | true |
d625aa64b2629a4f941912f2a5f43f8d4179baae | PHP | youknowriad/anchour | /src/Rizeway/Anchour/Connection/Connection.php | UTF-8 | 1,274 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Rizeway\Anchour\Connection;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
use \Rizeway\Anchour\Config\ResolverInterface;
use \Rizeway\Anchour\Config\ConfigurableInterface;
abstract class Connection implements ConnectionInterface, ConfigurableInterface
{
protected $options;
... | true |
f2f43fdbfb39a4956ea511ed06ace0d449568a1d | PHP | CaioV1/Padoka-Hill-Valley | /Model/CategoriaDAO.php | UTF-8 | 4,158 | 3.125 | 3 | [] | no_license | <?php
require_once("Controller/Categoria.php");
require_once("Model/ConexaoBanco.php");
class CategoriaDAO{
public function inserir(Categoria $categoria){
$conexao = ConexaoBanco::obterConexao();
$SQL = "INSERT INTO tbl_categoria(nome, situacao) VALUES(?, ?)";
... | true |
c865311c11bc8b10b414b241e24710b18e99ae75 | PHP | thenstad/oblig3 | /chat/login.php | UTF-8 | 776 | 2.59375 | 3 | [] | no_license | <?php
if(isset($_POST['name']) && !isset($display_case)){
$name=htmlspecialchars($_POST['name']);
$sql=$dbh->prepare("SELECT name FROM chatters WHERE name=?");
$sql->execute(array($name));
if($sql->rowCount()!=0){
$ermsg="<h2 class='error'>Name Taken. <a href='index.php'>Try another Name.</a></h2>";
}else{
$sq... | true |
bd635673473ad6478bde100cf34a01e58023113a | PHP | bigbenaugust/feedreader-gcp-backup | /php/feedorama-jqm.php | UTF-8 | 3,907 | 2.515625 | 3 | [] | no_license | <?php
date_default_timezone_set('America/New_York');
require("/usr/share/php/simplepie/autoloader.php");
require("get_random_line.php");
$feedarray=file("feeds.txt");
$weatherarray=file("weather.txt");
$linkarray=file("links.txt");
$length = $_GET["length"];
if ( !$length ) {
$length = 4;
}
$days = $_GET["days"];
if ... | true |
c30f2f7f9547f895e89881e1941a09b3bc925631 | PHP | tillwilling/php1 | /tag13/modulo.php | UTF-8 | 345 | 3.5 | 4 | [] | no_license | <?php
// Modulo - Restwert nach einer Division
echo 9%3; // Rest: 0
echo '<br>';
echo 8%3; // Rest: 2
echo '<br>';
echo 14%5; // Rest: 4
echo '<br>';
echo 3%17; // Rest: 3
echo '<hr>';
$obst = ['Apfel', 'Birne', 'Orange'];
for($i=0; $i<20; $i++) {
echo $obst[$i%3];
echo ' ';
}
echo '<hr>';
$zahl = 34;
echo $endz... | true |
971421a4f97e7c6a3bc2090a09c9577972f26508 | PHP | DearMadMan/meiliyoupin | /inc/class/filer.php | UTF-8 | 2,015 | 3.328125 | 3 | [] | no_license | <?php
/**
*filer.class.php
*文件操作类 功能:
*封装各种文件读写操作
*封装复制移动操作
*封装删除操作
*重命名操作
*
*
*/
class filer
{
private static $_instance;
private function __construct()
{
}
private function __clone()
{
}
public static function GetInstance()
{
if(!(self::$_instance instanceof self))
{
self::$_instance=new se... | true |
b0335039b870988eab8d117c1701ad5b1b1b6441 | PHP | phpable/yeti-cms | /app/Command/YetiProjectMigrate.php | UTF-8 | 4,562 | 2.5625 | 3 | [] | no_license | <?php
namespace Yeti\Main\Command;
use \Yeti\Main\Command\Abstracts\ACommand;
use \Illuminate\Support\Facades\App;
use \Illuminate\Support\Facades\Config;
use \Yeti\Core\Model\Page;
use \Yeti\Core\Model\Layout;
use \Yeti\Core\Model\Snippet;
use \Yeti\Core\Model\Template;
use \Yeti\Main\Building\Builder;
use \Able\... | true |
ffc392ccb2e41a50ca39e0b657bb291803a6fd00 | PHP | Blue-Ball/laravel-airport | /laravel-app/app/Models/CmsSettings.php | UTF-8 | 1,848 | 2.75 | 3 | [] | no_license | <?php
namespace App\Models;
use Eloquent as Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
/**
* Class CmsSettings
* @package App\Models
* @version July 5, 2021, 9:08 am UTC
*
* @property string $name
* @property string $content
* @property string $content_input_type
* @property string $datae... | true |
0a783d911b90c408a5c8650cdcc441bd669b77f7 | PHP | fyezool/grocery | /unused files/edit_employee1.php | UTF-8 | 4,313 | 3.140625 | 3 | [] | no_license | <?php
// including the database connection file
require('includes/config.php');
if(isset($_POST['update']))
{
$id = $_POST['id'];
$name=$_POST['name'];
$role=$_POST['role'];
$email=$_POST['email'];
$contact=$_POST['contact'];
$salary = $_POST['salary'];
$city = $_POST['city'];
$state = $_POST['s... | true |
07ecfecf0815557a26fa0a638b3595b50b6cc92e | PHP | ipunkt/rancherize | /app/Plugin/Loader/IdentifierNotFoundException.php | UTF-8 | 671 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php namespace Rancherize\Plugin\Loader;
/**
* Class IdentifierNotFoundException
* @package Rancherize\Plugin\Loader
*/
class IdentifierNotFoundException extends \RuntimeException {
/**
* @var string
*/
private $identifier;
/**
* IdentifierNotFoundException constructor.
* @param string $identifier
* ... | true |
10739f2e3daed374ad6594786774dd637fd7672c | PHP | elaleprieto/Proyecto-Sin-Techo | /app/Controller/ClasesController.php | UTF-8 | 5,852 | 2.703125 | 3 | [] | no_license | <?php
App::uses('AppController', 'Controller');
/**
* Clases Controller
*
* @property Clase $Clase
*/
class ClasesController extends AppController {
/**
* index method
*
* @return void
*/
public function index() {
$this->Clase->recursive = 0;
$this->set('clases', $this->paginate());
}
/**
* view metho... | true |
bf5dfc1e70d0952e6ee8ed45dc74eaafac106c1d | PHP | maleksandrov/sites-rbe | /app/Entity/StatValue.php | UTF-8 | 856 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Entity\StatValueRepository")
* @ORM\Table(
* indexes={
* @ORM\Index(columns={"name"})})
*/
class StatValue {
/**
* @ORM\Column(type="integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
private $id;
/**
* @var s... | true |
e921ef225ea3e002bfb21c6940a25670b54de6c8 | PHP | tromma/elao_ | /src/Model/JobContractType.php | UTF-8 | 776 | 2.640625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Model;
use Elao\Enum\AutoDiscoveredValuesTrait;
use Elao\Enum\ReadableEnum;
/**
* @method static JobContractType CDI()
* @method static JobContractType CDD()
* @method static JobContractType INTERNSHIP()
* @method static JobContractType WORK_STUDY()
*/
class JobCont... | true |
297986bc5c9b85664cd3512b73f67d72f8326193 | PHP | wesnick/RingCentral | /src/Wesnick/RingCentral/Model/CallStatus.php | UTF-8 | 2,598 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @file
* CallStatus.php
*/
namespace Wesnick\RingCentral\Model;
class CallStatus
{
const SUCCESS = 0;
const IN_PROGRESS = 1;
const BUSY = 2;
const NO_ANSWER = 3;
const REJECTED = 4;
const GENERIC_ERROR = 5;
const FINISHED = 6;
const INTERNATIONAL_DISABLED = 7;
const... | true |
b305e6169e4a9376362b16949880ab0dc97cbbdd | PHP | juniorth6/mm-ws | /app/_ws/v2/user/login.php | UTF-8 | 1,199 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This is the request for the login system.
* Authentication is database based.
*
* *** ONLY EDIT IF YOU KNOW WHAT YOU'RE DOING ***
*/
use MMWS\Controller\UserController;
/**
* @var string $procedure is the procedure to be called
*/
global $procedure;
/**
* @var mixed $params are the URL request... | true |
0163347a7fe609b410b63bbd66d858ba789394a9 | PHP | XD-OB/PHP-Piscine | /day02/ex02/magnifying_glass.php | UTF-8 | 498 | 2.78125 | 3 | [] | no_license | #!/usr/bin/php
<?php
function ft_toupper($matches) {
return strtoupper($matches[0]);
}
function ft_replace($matches) {
$matches = preg_replace_callback('/(?<=title=["\'])(?:.|\n)*(?=["\'])/iU', 'ft_toupper', $matches);
$matches = preg_replace_callback('/(?<=>)(?!<.*>)(?:.|\n)*(?=<)/iU', 'ft_toupper', $matche... | true |
d186ddf6e403d7189ca0ca9613b763a307a0b3d3 | PHP | Freelix/InnWebSite | /php/employe/en.employe_add.php | ISO-8859-1 | 1,637 | 2.625 | 3 | [] | no_license | <?php
// On dmarre la session AVANT d'crire du code HTML
require_once('../check_logged_in.php');
//Crer un array pour afficher les erreurs
$message = array();
// insre le fichier
if (($_FILES["file"]["type"] == "image/gif")
|| ($_FILES["file"]["type"] == "image/jpeg")
|| ($_FILES["file"]["type"] == "image/p... | true |
413a4d0cd4c5f953e3402c46cc0854862397666f | PHP | panferov54/site3 | /test/get.php | UTF-8 | 734 | 2.8125 | 3 | [] | no_license | <?php
// СУПЕРГЛОБАЛЬНЫЙ МАССИВ - $_GET - доступен на всем вашем домене
//$name=$_GET['name'];
//$country=$_GET['country'];
//$city=$_GET['city'];
//echo "Name is: $name <br>";
//echo "Country is: $country <br>";
//echo "City is: $city <br>";
?>
<form action=""method="get">
<label for="name">Your name:
<... | true |
61e40439948eae0d2f51c25faefe777f2d1cad22 | PHP | emarkovic/arch482 | /final/signup.php | UTF-8 | 1,228 | 2.734375 | 3 | [] | no_license | <?php
include('common.php');
if (!empty($_POST['userName']) && !empty($_POST['email']) && !empty($_POST['password'])) {
$userName = $db->quote($_POST['userName']);
$email = $db->quote($_POST['email']);
$password = $db->quote($_POST['password']);
if (strlen($userName) > 50) {
error('User name is too lo... | true |
c6563267f7863dc8dcfe3656daf08ad12f555855 | PHP | ipqhjjybj/online | /site/exp/jzy/test.php | GB18030 | 520 | 2.78125 | 3 | [] | no_license | <html>
<body>
<?php
$tomorrow=mktime(0,0,0,date("m"),date("d")+1,date("Y"));
echo date("Y.m.d");
echo "<br />";
echo "ֲǸɵϡ";
echo "<br />";
echo date("Y.m.d",$tomorrow)."<br />ǸɵŶ";
echo "<br />";
$file=fopen("something.txt","r") or exit("Unable to open this file");
while(!feof($file))
{
echo fgets($file)."<br />";
}
f... | true |
fb94cd2b6a093cdb50d1849a3aaf5a5181cd43c8 | PHP | nicollassilva/Scripts-APIs | /Upload de Imagens PHP/Upload.php | UTF-8 | 881 | 2.671875 | 3 | [] | no_license | <?php
session_start();
$image = $_FILES['image'];
if($image['tmp_name'] != '' && !preg_match("/^image\/(pjpeg|jpeg|png|gif|bmp|webp)$/", $image["type"])) {
$_SESSION['error'] = "O sistema só aceita imagens.";
header("Location: index.php");
} else {
if($image['tmp_name'] != '... | true |
cf2140e4ad909f98f1a402dc84f3a71f223d9191 | PHP | atomsolucoesinteligentes/odinfmk | /src/utils/collections/Queue.php | UTF-8 | 1,473 | 3.171875 | 3 | [] | no_license | <?php
namespace Odin\utils\collections;
class Queue
{
protected $queue;
protected $type;
protected $limit;
public function __construct(string $type) {
$this->type = $type;
$this->queue = [];
}
public function add(object $element)
{
if($this->size() <= $this->limi... | true |
945261ed9d75f8d3907613c87019a19821ce13b1 | PHP | NITIN19069/Secure-Social-Networking-Website | /Secure Social Networking Website (Php,Mysql)/enterOTP.php | UTF-8 | 1,846 | 2.640625 | 3 | [] | no_license | <?php
session_start();
include "dbConnection.php";
$Email= $_SESSION['email'];
if(isset($_SESSION['otp_in']) && $_SESSION['otp_in'] == true){
if(isset($_GET['msg'])){
$message = "Invalid OTP/Email ID. Please enter correct details";
echo "<script type='text/javascript'>alert('$message');</script>";
$var=1;
$u... | true |
b6fc301a1f395c67a38f1665de71216592b998a9 | PHP | dharmaelms/elmstest | /app/Model/QuizAttemptData/Repository/IQuizAttemptDataRepository.php | UTF-8 | 1,722 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Model\QuizAttemptData\Repository;
use Illuminate\Support\Collection;
/**
* interface IQuizAttemptDataRepository
* @package App\Model\QuizAttemptData\Repository
*/
interface IQuizAttemptDataRepository
{
/**
* Method to get all the questions in the attempt
*
* @param int $attemp... | true |
2e8aec0ae957c6f3034afff23938b124eed977be | PHP | rayout/vk-demo | /database/migrations/20180820182507_InsertRole.php | UTF-8 | 558 | 2.625 | 3 | [] | no_license | <?php
use Phpmig\Migration\Migration;
class InsertRole extends Migration
{
public $connection = 'db1';
/**
* Do the migration
*/
public function up()
{
$sql = /** @lang MySQL */
"
UPDATE users set role = 1 WHERE email = 'user1@test.ru';
UPDATE us... | true |
9e7742df8879e34b1682cfba2dabb827f68886bc | PHP | arnulfojr/qcharts | /QCharts/CoreBundle/Validation/Validator/NoAsteriscValidator.php | UTF-8 | 2,136 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: tsp-admin
* Date: 1/8/16
* Time: 3:18 PM
*/
namespace QCharts\CoreBundle\Validation\Validator;
use QCharts\CoreBundle\Exception\TypeNotValidException;
use QCharts\CoreBundle\Exception\ValidationFailedException;
use QCharts\CoreBundle\Validation\ValidationInterface\String... | true |
a7ed5521e5530d685a320ba09bbee77cfd222d2a | PHP | derweili/gearlist | /parts/filter.php | UTF-8 | 2,728 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
function gearlist_filter($posts = '') {
if (!empty($post)) {
?>
<div class="filter-section">
Filter:<br />
<dl class="tabs" data-tab>
<dd class="active"><a href="#panel1">Kategorie</a></dd>
<dd><a href="#panel2">Hersteller</a></dd>
</dl>
<div class="tabs-content">
<div class="content active" ... | true |
173714ed2e8bf0c35f8e46e30b0c98ad90af7d73 | PHP | crypticatul/php-sdk | /tests/Events/Channel/AuditPropertiesTest.php | UTF-8 | 3,246 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Frontegg\Tests\Events\Channel;
use DateTime;
use Frontegg\Events\Channel\AuditProperties;
use Frontegg\Events\Channel\AuditPropertiesInterface;
use Frontegg\Events\Config\SerializableInterface;
use PHPUnit\Framework\TestCase;
class AuditPropertiesTest extends TestCase
{
/**
* @return void
... | true |
4569f8e1572fb9434b600d98f6d2d2d47ac0da3f | PHP | lucasmouilleron/thirdPartyServices | /web/tests/facebook-connect-php.php | UTF-8 | 1,371 | 2.515625 | 3 | [] | no_license | <?php require_once __DIR__."/facebook-commons.php";?>
<?php require_once __DIR__."/../includes/header.php";?>
<?php
use Facebook\FacebookSession;
use Facebook\FacebookRequest;
?>
<!--/////////////////////////////////////////////////////////////-->
<h1>Connect and server side validaton</h1>
<?php
// try to retrieve ... | true |
fceb892f87214e81d77edbeff42dd172172aa582 | PHP | valdiney/StandardDeviation | /index.php | UTF-8 | 327 | 3.234375 | 3 | [] | no_license | <?php
require_once("src/StandardDeviation.php");
# Data set
$data = [1,2,3,4,7,8,10,5.5];
$standard = new Statistic\StandardDeviation();
# Inputting the data set
$standard->setRawGroup($data);
# Methods available to be used
var_dump($standard->variance());
var_dump($standard->deviation());
var_dump($standard->aver... | true |
694ba8a2b23678ec12d3c50f411a2d137e7d0d3f | PHP | diplix/reclaim-proxy-scripts | /twitter.php | UTF-8 | 5,715 | 2.671875 | 3 | [] | no_license | <?php
require 'tmhOAuth/tmhOAuth.php';
require 'tmhOAuth/tmhUtilities.php';
include("feed_generator/FeedWriter.php"); // include the feed generator feedwriter file
require_once( './config.php' );
$tmhOAuth = new tmhOAuth($twitter_oauth_setting);
$lang = "de";
$count = 20;
$user = $twitter_user;
$apiurl = "h... | true |
6f7e626221ec1e44ffb0416eb88b86cb593644e7 | PHP | jaguilar87/dag | /DagTablaActiva.php | UTF-8 | 15,976 | 3.15625 | 3 | [] | no_license | <?php
/**
* Clase que representa una tabla de las bases de datos. Está relacionada con una clase de tipo DagRegistroActivo.
*
* Esta clase puede utilizarse de dos modos: primero instanciando una clase heredada (ej: class Libros extends DagTablaActiva { }; $tabla = new Libros();),
* o bien inicializando la... | true |
8549c6cbcb30323b3481b7bb53d052957d55afc1 | PHP | archives-of-michigan/simple-CONTENTdm | /lib/compound_object.php | UTF-8 | 2,700 | 2.8125 | 3 | [] | no_license | <?php
class CompoundObject extends Item {
public $items = array();
function __construct($_alias, $_itnum) {
$this->alias = $_alias;
$this->itnum = $_itnum;
}
public function item_by_itnum($itnum) {
return $this->item_by_position(
$this->item_position($itnum)
);
}
public function it... | true |
95eb11f132ecaf65508c8f06897ef348b232d9ee | PHP | loveclm/AYouProject | /Backend/application/models/settle_model.php | UTF-8 | 10,670 | 2.609375 | 3 | [] | no_license | <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class settle_model extends CI_Model
{
/**
* This function is used to get all Tourist Area
* @return array $result : This is result
*/
function getBuySettles($searchType, $name, $stDate, $enDate, $shopnumber = '')
{
... | true |
18232847c989809e87192700ab2f66a02c624b2a | PHP | daviro05/practicaABD | /funciones_BD.php | ISO-8859-1 | 19,262 | 2.703125 | 3 | [] | no_license | <?php
include 'conf/conf_env.php';
#######################################
### FUNCIONES DE CONEXIN A BBDD ######
#######################################
function conecta()
{
$local = eleccion_servidor(); //true para local y false para servidor.
if($local == true)
{
$host='localhost';
$usuario='root';
$clav... | true |
6e3e5b673163d461bf3f085d937f03477b1374d7 | PHP | nojimage/lg-code-jp | /src/Decorator/Collection/ArrayObjectDecorator.php | UTF-8 | 393 | 2.625 | 3 | [] | no_license | <?php
namespace Nojimage\LocalGovCode\Decorator\Collection;
use ArrayObject;
/**
* convert to ArrayObject
*/
class ArrayObjectDecorator implements CollectionDecoratorInferface
{
/**
* convert to ArrayObject
*
* @param array $records
* @return ArrayObject
*/
public function convert... | true |
6234a2cf7bf0b414266a7f9bc7d0dffe0399a055 | PHP | awgpsk/yajan-php | /lib/11.0/bin/repository/class.repository.php | UTF-8 | 15,821 | 2.5625 | 3 | [] | no_license | <?php
class YajanRepository
{
var $sourceList;
var $info;
var $installedSnapFile;
function __construct()
{
global $CS,$DEFAULT_DB_CONFIG,$YAJAN_DATA,$FORM_BUILDER_VAR,$OUTPUT_CACHE_LOCATION,$CONFIGURATION;
$this->version = "1.1";
if(!is_dir($YAJAN_DATA."/repository"))
{
mkdir($YAJAN_DATA."/repositor... | true |
50a02e97e23bba65979f45d5434774bda3733da8 | PHP | shamim009277/Laravel8 | /app/Exports/EmployeeExport.php | UTF-8 | 594 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Exports;
use App\Models\Employee;
use Maatwebsite\Excel\Concerns\FromCollection;
use Maatwebsite\Excel\Concerns\withHeadings;
class EmployeeExport implements FromCollection,withHeadings
{
public function headings():array{
return [
'Id',
'Name',
'Email'... | true |
0d5d66db0e066ecc3c85966b670bfeed191cf707 | PHP | finnishmiko/Cheat_Sheets | /utils/basic-auth.php | UTF-8 | 624 | 2.71875 | 3 | [] | no_license | <?php
/**
* Add Basic Authentication to web page
*
* Check from env variable if auth is used.
* Username and password are hardcoded in this example.
*
* Env variable can be set to .htaccess file with:
* SetEnv USE_BASIC_AUTH true
*/
if ( (strpos(getenv('USE_BASIC_AUTH'), 'true') !== false) ) {
function Aut... | true |
51f265ac2503b56ae26cd0df1dac2071cb6c6fc5 | PHP | amirzac/design_patterns | /src/Fundamental/EventChannel/Classes/Subscriber.php | UTF-8 | 534 | 3 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace app\Fundamental\EventChannel\Classes;
use app\Fundamental\EventChannel\Interfaces\SubscriberInterface;
class Subscriber implements SubscriberInterface
{
private $name;
public function __construct(string $name)
{
$this->name = $name;
}
public fun... | true |
ff5364febfbc2fd587ca1b64231b5f28300b98a0 | PHP | snowtim/alliedjobtest | /app/Http/Controllers/ConstellationController.php | UTF-8 | 2,421 | 2.75 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Constellation;
class ConstellationController extends Controller
{
public $constellations_url = [
'http://astro.click108.com.tw/daily_0.php?iAstro=0',
'http://astro.click108.com.tw/daily_1.php?iAstro=1',
'http://astro.click108.com.tw/da... | true |
64deb9c65cd6a415807eaa17d8655f5903d330b8 | PHP | hipertom/MoViCo | /app/Http/Controllers/ProjectsController.php | UTF-8 | 3,965 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Validator;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Project;
use App\LinkType;
use App\ProjectLink;
use App\Language;
use App\Framework;
use App\Cms;
class ProjectsController extends Controller
{
publi... | true |
89a34875225ac869caa63007f082c2889c3f220d | PHP | hach-que/Omni | /src/vfs/provider/VFSVirtualFSProvider.php | UTF-8 | 2,130 | 2.78125 | 3 | [] | no_license | <?php
final class VFSVirtualFSProvider extends VirtualFSProvider {
public function getPrefix() {
return 'vfs';
}
public function ls($path) {
$path = VirtualFS::resolveMetaPathComponents($path);
if ($path === '/') {
$providers = id(new PhutilSymbolLoader())
->setAncestorClass('Vir... | true |
29f4ca8f87f178f76a661ed78b1cadf52f989e2e | PHP | VJohn15/Taskbook | /if/11.php | UTF-8 | 580 | 3.390625 | 3 | [] | no_license | <?php
/**
* Даны две переменные целого типа: A и B.
* Если их значения не равны, то присвоить каждой переменной большее из этих значений, а если равны,
* то присвоить переменным нулевые значения.
* Вывести новые значения переменных A и B.
*/
$a=2;
$b=2;
if ($a>$b || $b>$a){
$b=$a || $a=$b ;
echo ' variable... | true |
681e9181daa6fe88eb41881033481297721752c2 | PHP | NathanPri/php-base | /16-Webflix/config/functions.php | UTF-8 | 552 | 3.609375 | 4 | [] | no_license |
<?php
// Permet de formatter le prix (ex: 13.00 devient 13,00)
// function formatPrice($price) {
// $explodedPrice = explode('.', $price);
// return $explodedPrice[0]."<span style='font-size:60%'>€"
// .$explodedPrice[1].'</span>'; //Mettre les centimes en exposants
// }
// ... | true |
46bb60da3945789ae9ae7df8080195df87e55633 | PHP | manoelmerlin/blog-php | /Model/Post.php | UTF-8 | 411 | 2.578125 | 3 | [] | no_license | <?php
App::uses('User', 'Model');
Class Post extends AppModel{
public $name = 'Post';
public function allProjects() {
$userModel = new User();
$users = $userModel->find('all');
return $users;
}
public $validate = array('title' => arra... | true |
eef4ebe71d6d1e596dd4825de73436524e96bea2 | PHP | mchinatang/PHPLab | /LiYanhui_PHP_S2/C172/includes/Parser.class.php | UTF-8 | 2,962 | 3.28125 | 3 | [] | no_license | <?php
// 模板解析类
class Parser {
// 模板的内容
private $tpl;
// 构造方法,初始化模板内容
public function __construct($tplFile) {
// 读取模板里的内容
if (!$this->tpl = file_get_contents($tplFile)) {
exit('ERROR: 读取模板出错!');
}
}
// 解析普通变量
private function parVar() {
$pattern = '/\{\$([\w]+)\}/';
if (preg_match($pattern, $this... | true |