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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e7ac7a97cc3598bac56e2e631ec6005f47a43b74 | PHP | ab-a/SSH-Management | /master/web-ui/action.php | UTF-8 | 1,432 | 2.8125 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | <?php
function checkValue($json, $vUser, $vKey) {
foreach($json['keys'] as $key => $value) {
if ($vUser == $value['username'] && $vKey == $value['key']) {
return $key;
}
}
return FALSE;
}
function searchEntry($json, $vUser, $vKey) {
$i = 0;
foreach($json['keys'] as $key... | true |
ad3f8a666994cd8971004ed29f9ad5d19543b60b | PHP | Stinger-Soft/ExcelCreator | /tests/StingerSoft/ExcelCreator/IntegrationTest.php | UTF-8 | 2,505 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
/*
* This file is part of the Stinger Excel Creator package.
*
* (c) Oliver Kotte <oliver.kotte@stinger-soft.net>
* (c) Florian Meyer <florian.meyer@stinger-soft.net>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this ... | true |
7b535f189a856524b615dc83b6ae2d35ac919690 | PHP | andela-joyebanji/Techphin | /database/seeds/VideoSeeder.php | UTF-8 | 7,180 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Pyjac\Techphin\Category;
use Pyjac\Techphin\Tag;
use Pyjac\Techphin\User;
use Pyjac\Techphin\Video;
class VideoSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
$pyjac = User::w... | true |
7dc7e2333fdbd66b128f34d879264612149df013 | PHP | ingfelipegon/contratosSoft | /app/Models/Area.php | UTF-8 | 562 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Area extends Model
{
use SoftDeletes;
protected $date = ['delete_at'];
protected $hidden =['created_at','updated_at'];
protected $fillable = [
'nombre', //STRING NOMBRE DE... | true |
b85f3a8522bd2ff9d2a4b121c954d5a50f620c9b | PHP | RandSs/tradFast | /entity/Restaurant.php | UTF-8 | 1,512 | 2.703125 | 3 | [] | no_license | <?php
namespace Entity;
class Restaurant
{
//restaurant
public $id_restaurant;
public $nom;
public $pseudo;
public $adresse;
public $tel;
public $email;
public $code_postal;
public $mdp;
public $image;
//commande
//commander
// public $quantite;
//... | true |
52b054e02008c1ed1b285d0aaba2ba3a35dabd4d | PHP | sharedoit/WWW1 | /Smarty/smarty.class.php | UTF-8 | 777 | 2.953125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: hynet
* Date: 2018/12/26
* Time: 10:38
*/
class Smarty{
private $vars=array();
//第一个 向模板中分配变量
//有两个参数,一个参数是模板中的变量名,一个是分配给它的变量值
public function assign($varname,$varvalue){
$this->vars[$varname]=$varvalue;
}
//加载制定的模板,并显示
//有一个参数,参数就是模板的... | true |
354752db5acef00d9f356f8c8d857f2ca0ccfa70 | PHP | LionRoar/Head-First-Design-Patterns-PHP | /ch06/HomeAutomation/Receiver/Stereo.php | UTF-8 | 570 | 3.5 | 4 | [] | no_license | <?php
namespace Receiver;
class Stereo {
private $name = '' ;
public function __construct(string $name)
{
if(isset($name))
$this->name = $name;
}
public function on(){
echo $this->name . ' Stereo is ON.' . PHP_EOL;
}
public function setCD(){
echo $this... | true |
03ae44bb17601a0ef7cf4768985ea67f623173e1 | PHP | luksamuk/treinamento-backend-aula5 | /src/delete.php | UTF-8 | 2,376 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
/*
delete.php
Copyright (c) 2018 Lucas Vieira <lucasvieira@lisp.com.br>
This file is distributed under the MIT License.
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 withou... | true |
b08dcc20cf782773ed75ccbcfa5092b4ae1643a6 | PHP | nibasabin/Projects | /WebApplication(UniversityBazzar)/sabin/ForgotPassword.php | UTF-8 | 5,667 | 2.640625 | 3 | [] | no_license | <?php
require'connect.php';
$Password='';
$Your='';
if (isset($_POST['submit1']))
{
//print_r($_POST);
$Username = $_POST['UserName'];
$ID=$_POST['ID'];
$Name=$_POST['Name'];
$LName=$_POST['LName'];
$Pin= $_POST['SPin'];
$DOB=$_POST['date'];
$result = mysql_query("SELECT * F... | true |
f86a5ab38bbb145a82e95b9546141c23dbb3dc89 | PHP | PalashNemade/Message-Board | /login.php | UTF-8 | 1,991 | 2.546875 | 3 | [] | no_license | <HTML>
<HEAD>
<TITLE>Message Board</TITLE>
<style>
#input{
background-color: aquamarine ;
}
#para{
font-weight: bold;
text-align: center;
}
</style>
</HEAD>
<Body>
<form action = 'login.php' method = 'post' >
<h1 id = "para">Message Bo... | true |
5906a5987382b12bc7a5545bfdb617d4cc05f684 | PHP | WirVsVirus-Arvato/WirVsVirus-Backend | /src/Controller/CasesController.php | UTF-8 | 4,525 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\Patient;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\Extension\Core\Type\DateType;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\H... | true |
f83f1cadf8681ed1968633f51893c3c13aaab7d3 | PHP | mchlebosz/CAPSys_API | /courses.php | UTF-8 | 2,471 | 2.546875 | 3 | [] | no_license | <?php
require "./database.php";
if (isset($_SERVER['HTTP_ORIGIN'])) {
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Max-Age: 86400'); // cache for 1 day
}
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
if (... | true |
4377ac13d612b85515e674774aafcc835852399d | PHP | AmitTheBest/atk4-joomla | /lib/ApiJoomla.php | UTF-8 | 1,848 | 2.515625 | 3 | [] | no_license | <?php
/*
Implements support for Joomla
http://agiletoolkit.org/a/joomla
*/
class ApiJoomla extends ApiFrontend {
protected $pathfinder_class='JoomlaPathFinder';
public $db_prefix=''; // waht should be in front of every db
/*
Specify NULL as argument to use default connectivity method. You may
als... | true |
2f149aad4f2a4c3141f4615dc1425422310859cf | PHP | cahuk/silent | /core/base/BaseApplication.php | UTF-8 | 5,979 | 3.0625 | 3 | [] | no_license | <?php
namespace silent\core\base;
use silent\core\Silent;
/**
* Base application
* Class BaseApplication
* @package silent\core\base
*/
abstract class BaseApplication
{
/** @var string default controller */
public $defaultController = 'default';
private $_controller;
private $_controllerId;
... | true |
155f68b87bd32d55b570ed0ca029057431455869 | PHP | estandarte/syclass | /src/Entity/Currency.php | UTF-8 | 863 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Syclass\Core\Entity;
class Currency
{
private $code;
private $name;
private $description;
private $enabled;
public function getCode(): ?string
{
return $this->code;
}
public function getName(): ?string
{
return $this->name;
}
public fun... | true |
769029e89827d7d24157144bd55d92fb3d1a8573 | PHP | yokkun/study-at-hal-programming-school | /JavaScriptHonkaku/Chapter5/this_call.php | UTF-8 | 708 | 3.4375 | 3 | [] | no_license | <script>
//thisのcallメソッドでの動作
var data = 'Global data';
var obj1 = {data: 'obj1 data'};
var obj2 = {data: 'obj2 data'};
var obj3 = {xxx: 'obj3 data'};
function hoge(){
console.log(this.data);//ここではthisはまだ確定していない
}
hoge.call(null);
hoge.call(obj1);//連想配列としてわたる
hoge.call(obj2);
hoge.call(obj3); //undefinedとなる 中身がわからないと... | true |
614e145ce5adc4db622d436e5ef1eedcf4a9daa7 | PHP | ErickDomingues/projpdo1 | /index.php | ISO-8859-1 | 1,699 | 3.03125 | 3 | [] | no_license | <?php
try{
$conexao = new \PDO("mysql:host=localhost;dbname=phppdo", 'atrat364_atrat', '!O!$*}WR!Tbk');
$query="select * from alunos;";
//uma alternativa
// foreach ($conexao->query($query) as $teste){
// echo $teste['teste_descricao']."<br>";
// }
... | true |
35619485b9e66b14124dbfbc211abe2109eeee28 | PHP | emilssonn/1DV408 | /Project/src/form/model/Form.php | UTF-8 | 6,593 | 3.15625 | 3 | [] | no_license | <?php
namespace form\model;
require_once("./src/form/model/exception/TitleLength.php");
require_once("./src/form/model/exception/DescriptionLength.php");
require_once("./src/form/model/exception/DateError.php");
/**
* @author Peter Emilsson
* Represents a form, do not need to be a complete representation
*/
clas... | true |
40103fd9ac4d4d3aeaa1bfaac744c78888229da7 | PHP | codingDuan/pecl-tools-stomp | /tests/010-timeout/001.phpt | UTF-8 | 1,933 | 2.953125 | 3 | [] | no_license | --TEST--
Test Stomp::getReadTimout() and Stomp::setReadTimeout() - tests functionnality and parameters
--INI--
stomp.default_read_timeout_sec=5
stomp.default_read_timeout_usec=5
--SKIPIF--
<?php
if (!extension_loaded("stomp")) print "skip";
if (!stomp_connect()) print "skip";
?>
--FILE--
<?php
$s = new Stomp(... | true |
141fb5419c6ba4367cd4ee7f1201519c40063b6b | PHP | Palethorn/Yeah | /src/Yeah/Fw/Event/Event.php | UTF-8 | 835 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Yeah\Fw\Event;
class Event {
const PRE_ROUTING = 0;
const POST_ROUTING = 1;
const PRE_SECURITY = 2;
const POST_SECURITY = 3;
const PRE_CACHE = 4;
const POST_CACHE = 5;
const PRE_ACTION = 6;
const POST_ACTION = 7;
const PRE_RENDER = 8;
const POST_RENDER = 9;
... | true |
f31a0a35203efd0c42582faf331da9c89aab954b | PHP | khromalabs/phpcs-variable-analysis | /Tests/BaseTestCase.php | UTF-8 | 1,504 | 2.671875 | 3 | [
"BSD-3-Clause",
"BSD-2-Clause"
] | permissive | <?php
namespace VariableAnalysis\Tests;
use PHPUnit\Framework\TestCase;
use PHP_CodeSniffer\Files\LocalFile;
use PHP_CodeSniffer\Ruleset;
use PHP_CodeSniffer\Config;
class BaseTestCase extends TestCase {
const STANDARD_NAME = 'VariableAnalysis';
const SNIFF_FILE = __DIR__ . '/../VariableAnalysis/Sniffs/CodeAnalys... | true |
91f23ccb5109bb0bc20df89d9d58098efa22e4af | PHP | predictator/association-rule | /src/AssociationRule.php | UTF-8 | 3,537 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Predictator;
use Predictator\AssociationRule\AssociationModel;
use Predictator\AssociationRule\AssociationModelInterface;
use Predictator\AssociationRule\OrderInterface;
use Predictator\AssociationRule\ProductInterface;
use Predictator\AssociationRule\Result;
use Predictator\AssociationRule\ResultSet;... | true |
5ba2bda214288128e4e4f128a583d15eb3ea829f | PHP | elgervb/imagemanipulation | /src/imagemanipulation/rasterize/strategy/GridRasterStrategy.php | UTF-8 | 2,062 | 2.90625 | 3 | [] | no_license | <?php
namespace imagemanipulation\rasterize\strategy;
use imagemanipulation\ImageResource;
use imagemanipulation\rasterize\ImageRaster;
use imagemanipulation\rasterize\Segment;
use imagemanipulation\Args;
class GridRasterStrategy extends AbstractRasterStrategy {
private $width;
private $height;
priva... | true |
399fd317d9cfb325925bd0ec06433fbd64de3fd5 | PHP | sonypiay/test_simple_ecommerce | /app/Model/Users.php | UTF-8 | 1,850 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Session;
use App\Helpers\GlobalFunction as HelperFunction;
class Users extends Model
{
use HelperFunction;
public $timestamps = true;
public $incrementing = false;
protected $primaryKey = 'id';
protected ... | true |
3fa21f688e5ec5517360f18a01cdbd4b86797719 | PHP | Friendster/Website | /system/ImageManager.php | UTF-8 | 1,704 | 2.859375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: mancr
* Date: 20-May-17
* Time: 14:15
*/
class ImageManager {
public static function serveImage($file) {
global $session;
$iv = $session->get(Session::IV);
$file_name = urldecode(EncryptionManager::decrypt($file, $iv));
$file_name = I... | true |
5454eae9cdb3aade2a6f25a7c30f62f675e8682b | PHP | betzih/php | /formulario_login/index.php | UTF-8 | 2,027 | 2.78125 | 3 | [] | no_license | <?php
ini_set ('display_errors', 1);
ini_set ('display_startup_errors', 1);
error_reporting(E_ALL);
if($_POST){ /* es postback ? */
$usuario = $_REQUEST["txtUsuario"];
$clave = $_REQUEST["txtClave"];
//Si usuario es distinto de vacio y clave es distinto de vacio, entonces:
if($usuario !="" && $clav... | true |
9de603f826b9aca6bc35c85a1b1ea174a710af1c | PHP | kochm8/ch.bfh.bti7054.w2014.p.beerwebshop | /classes/Category.php | UTF-8 | 737 | 3.359375 | 3 | [] | no_license | <?php
class Category {
private $_db;
public function __construct() {
$this->_db = DBHandler::getInstance();
}
/*
* Get all category links
*/
public static function getCategoryLinks() {
//get categories from database
$_db = DBHandler::getInstance ();
$res = $_db->getAllCategories ();
... | true |
692f1a7f3c8416935d0039a6bf335e83aa5d90e4 | PHP | leoferraari/estruturaDev2 | /src/Titulo.class.php | UTF-8 | 581 | 3.53125 | 4 | [] | no_license | <?php
class Titulo {
private $type; //h1, h2...
private $title;
private $elements;
function Titulo($sType, $sTitle, $aElements = []) {
$this->type = $sType;
$this->title = $sTitle;
$this->elements = $aElements;
}
public function __toString() {
$sElementos = '';... | true |
861520144a3bdfb28223d712b3c0f6f2a8cf0ea0 | PHP | sunvalley-technologies/php-loop-common | /src/Io/Connector.php | UTF-8 | 1,839 | 3 | 3 | [
"MIT"
] | permissive | <?php
namespace SunValley\LoopUtil\Common\Io;
use React\Promise\PromiseInterface;
use React\Socket\ConnectionInterface;
use React\Socket\ConnectorInterface;
use SunValley\LoopUtil\Common\Server\ConnectionHandlerInterface;
/**
* Class Connector wraps any React's Connector and allows to use a ConnectionHandlerInterfa... | true |
e93dda0d79f9a972847e90b5ee03ae00318e65d6 | PHP | Grow-Dawn/Growindesign | /model/users.php | UTF-8 | 3,319 | 2.640625 | 3 | [] | no_license | <?php
require_once $_SERVER['DOCUMENT_ROOT'].'/util/connection.php';
function getUsers(){
$db = connAdmin();
$sql = 'SELECT * FROM users';
try {
$stmt = $db->prepare($sql);
$stmt->execute();
$users = $stmt->fetchAll();
} catch (PDOException $e){
return FALSE;
... | true |
b78629ea0c0308b891aa2ebc8ad0cb5372cc3a5b | PHP | sedaym/agency | /app/Contracts/Repositories/UserRepositoryInterface.php | UTF-8 | 2,714 | 2.96875 | 3 | [] | no_license | <?php namespace Agency\Contracts\Repositories;
/**
* @author Abed Halawi <abed.halawi@vinelab.com>
*/
interface UserRepositoryInterface
{
/**
* Create a new user
*
* @param string $name
* @param string $email
* @param string $avatar
* @param string $blocked
* @return Agen... | true |
d71f941a274612c7616d43f3e55771b8a3f7c720 | PHP | opexnetwork/network-weathermap-influxdb | /WeatherMapDataSource_influxdb.php | UTF-8 | 3,204 | 2.6875 | 3 | [] | no_license | <?php
// Datasource plugin for influxdb, target is defined as:
// influxdb:host:database:username:password:seriesin:seriesout:from:whereclause
// NOTE: due to config file limitations, spaces in the whereclause must be
// escaped with %20, for example:
// TARGET 8*influxdb:localhost:telegraf:::ifHCInOctets:i... | true |
f777da59bf28336fa011b1f38efbf986d3574d39 | PHP | goranpavlovic/Praksa2012 | /scripts/jsonToEAV.php | UTF-8 | 3,668 | 2.625 | 3 | [] | no_license | <?php
if(!$con = mysql_connect("localhost","root","Praksa2012"))
{
echo 'error connecting to database';
break;
}
if(!mysql_select_db('Praksa2012', $con))
{
echo 'error selecting database';
break;
}
if(mysql_set_charset('utf8', $con))
if(!$file = fopen($argv[1],'r'))
{
echo 'error opening file';
break;
}
$file_c... | true |
c253594a8cf4d5d11358f8ef19c258e6c2b2cf30 | PHP | 4val0v/xtoolza-public | /newtoolza/Security.php | UTF-8 | 219 | 2.96875 | 3 | [] | no_license | <?php
class Security {
private $algorithm;
function __construct($alg){
$this->algorithm = $alg;
}
public function Decrypt($text){
return $this->algorithm->decrypt($text);
}
}
?> | true |
2680d9aeb3ec182794fd97f5cc046872d2e4980d | PHP | Wakup/monge-php-api | /src/models/wakup/ProductPrice.php | UTF-8 | 1,215 | 3.328125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: agutierrez
* Date: 2019-02-20
* Time: 18:47
*/
namespace Wakup;
class ProductPrice
{
var $priceWithVat, $priceWithoutVat, $vat;
/**
* @return float Product price with VAT applied
*/
public function getPriceWithVat() : float
{
return $th... | true |
b7ad2887c6713aafe55ecfa24ed98eda31c109f0 | PHP | nishant0131/admin_panel_php | /includes/functions.php | UTF-8 | 1,424 | 2.625 | 3 | [] | no_license | <?php
include_once("connection/config.php");
// class Admin{
// function adminConnect(){
// if(!$connect){
// $this->error = 1; //raised a flag of 1 if error found and return null
// return NULL;
// }
// //selecting the database if everything goes fine
// ... | true |
5e224d33856425437b1bf5f1866e2da9bde30baa | PHP | ryuto94/exphp | /aula4/incluir.php | UTF-8 | 284 | 2.515625 | 3 | [] | no_license | <?php
echo "Sou incluir.php"."<br>";
//ex.a
include_once "cumprimento.php";
echo "<br>";
//ex.b
require "cumprimento.php";
echo "<br>";
//ex.d e e
include_once "cumprimento.php";
echo "<br>";
include_once "cumprimento.php";
echo "<br>";
include_once "cumprimento.php";
echo "<br>";
?> | true |
68a4163b98b8940600380e468250264a43bfd2e5 | PHP | mthad829/Project3 | /ProjectBoot/ProjectMaha/processReview.php | UTF-8 | 1,181 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
if($_SERVER["REQUEST_METHOD"] == "POST"){
$movie_category = $_POST["category"];
$movie_title = $_POST["title"];
$movie_rating = $_POST["rating"];
$movie_review = $_POST["review"];
$fileCom = "crm/data/comedy.txt";
$fileAct = "crm/data/action.txt";
$fileRom = "crm/data/romance.txt";
... | true |
702985c9d1150cb5375b3e566a2457f31ba097b3 | PHP | Stuffa1991/Tinderboxsem1 | /application/models/Task_model.php | UTF-8 | 2,515 | 2.796875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Task_model extends CI_Model {
private $id; // int
private $memberid; // int
private $placeid; // int
private $teamid; // int
private $name; // string
private $fromtime; // int
private $totime; // int
private $mode; // ... | true |
12ce44ff2ba5f72819f5a6bbd519df664916a1f7 | PHP | cxj798704443/college-cate | /高校美食论坛/my_forum_collection.php | GB18030 | 3,540 | 2.546875 | 3 | [] | no_license | <?php session_start(); include("conn/conn.php"); if ($page=="") {$page=1;}?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>ҵղ</title>
<style type="text/css">
<!--
body {
background-color: #8496BD;
}
-->
</style></head>
<body>
<table width="950" height="123" border="0" align... | true |
b87a9c8a74dbf495419fe0939e4bae53ef60433e | PHP | etwuerschmidt/Music-And-Computers | /imap_test.php | UTF-8 | 3,034 | 2.78125 | 3 | [] | no_license | <?php
//Set up phpmailer requirements
$mailpath = 'C:\xampp\PHPMailer-master\PHPMailer-master';
$path = get_include_path();
set_include_path($path . PATH_SEPARATOR . $mailpath);
require 'PHPMailerAutoload.php';
$mail = new PHPMailer();
//Connect to database, drop old email table, create new email table
$db = n... | true |
df824fb4cb7450be7622756b8ca9259257a16d52 | PHP | AlfaVIT/gksCheckBot | /core/library/view.php | UTF-8 | 3,352 | 2.671875 | 3 | [] | no_license | <?php
namespace library;
class view {
protected $_viewTemplateDir = __DIR__."/../views/template/";
protected $_viewLayoutDir = __DIR__."/../views/layout/";
protected $_title;
protected $_seo = [];
protected $_css = [];
protected $_js = [];
protected $_layout;
protected $_template;
public function ... | true |
8792962b5974ce94dd58bae4b7b7b2ae3f81ced8 | PHP | IcyApril/object-orientedphp-book-code | /5/ChainOfResponsibility/Executive.php | UTF-8 | 609 | 3.3125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: junade
* Date: 19/03/2017
* Time: 12:19
*/
class Executive implements Purchaser
{
private $nextPurchaser;
public function setNextPurchaser(Purchaser $nextPurchaser)
{
$this->nextPurchaser = $nextPurchaser;
}
public function buy(float $price): ... | true |
d6782c02d5ef4dcff596e5a7cbcc1397d5e3d4b6 | PHP | Noouush/FindYourGame-API | /app/Http/Controllers/TestController.php | UTF-8 | 650 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
// use Illuminate\Http\Response;
use App\Models\Test;
class TestController extends Controller
{
public function listTests()
{
return response()->json(Test::all());
}
//Store a new Product in the Database.
public function addTes... | true |
ee901e140c0150b1911a14ca9f91e05af2b35545 | PHP | fcocascales/CursoServidorWebFTN2017 | /php/dia18/web1/datos3.php | UTF-8 | 244 | 2.796875 | 3 | [] | no_license | <?php
require_once "Curso.php";
$datos3 = array(
new Curso("Mates", 15, 40),
new Curso("Música", 20, 120),
new Curso("Filosofía", 18, 90),
new Curso("Gimnasia", 22, 60),
new Curso("Lengua", 17, 100),
);
| true |
790f1bfe592d14c3a78a8dbda0714b07399eba9f | PHP | carvalholeo/desafio-folha | /app/Http/Controllers/StarSystemController.php | UTF-8 | 3,121 | 3.15625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class StarSystemController extends Controller
{
private $star;
private $customStar;
private $engineers;
private $counterDefaultStar;
private $counterEnginners;
private $counterCustomStar;
private $starHasVowels;
priva... | true |
78488099a29b6ee4d3697caca66eb4670bd11d20 | PHP | Al4r1c/AlaroxFramework | /src/AlaroxFramework/utils/unparser/UnparserFactory.php | UTF-8 | 579 | 2.8125 | 3 | [] | no_license | <?php
namespace AlaroxFramework\utils\unparser;
class UnparserFactory
{
/**
* @param string $nomClasse
* @return AbstractUnparser
* @throws \Exception
*/
public function getClass($nomClasse)
{
switch ($nomClasse) {
case 'json':
return new Json();
... | true |
607ef7e9e98fa98cb0f11b2986d30c7da82857fa | PHP | estellacarp/TheStudio | /app/Repository/formInterface.php | UTF-8 | 155 | 2.5625 | 3 | [] | no_license | <?php
namespace Repository;
interface formInterface {
public function inData();
public function attachImage($photo);
public function upData($id);
} | true |
80a138efc84f45049cb61326ec85e883ed8488e3 | PHP | bricev/AssetDistributor | /src/Adapter/AdapterCollection.php | UTF-8 | 2,512 | 2.671875 | 3 | [] | no_license | <?php
namespace Libcast\AssetDistributor\Adapter;
use Libcast\AssetDistributor\Asset\Asset;
use Libcast\AssetDistributor\Configuration\ConfigurationFactory;
use Libcast\AssetDistributor\Owner;
class AdapterCollection extends \ArrayIterator
{
/**
*
* @param string $key
* @param Adapter $adapter
... | true |
493285ddc5e8530c4cab168e33efdbe65131ade2 | PHP | kaushal-ghimire/webdevelopment | /E-commerse_Site/setting_script.php | UTF-8 | 1,554 | 2.6875 | 3 | [] | no_license | <?php
require 'includes/common.php';
if(!isset($_SESSION['email'])){
header('location: index.php');
}
if ($_SERVER["REQUEST_METHOD"] == "POST") {
//Validates password & confirm passwords.
if(!empty($_POST["password"]) && ($_POST["password"] == $_POST["cpassword"])) {
$password = test_input($_P... | true |
3b9958ef0d81de2926c9927f6bd156389eb0ff8a | PHP | silverstripe/silverstripe-framework | /src/ORM/Filters/WithinRangeFilter.php | UTF-8 | 1,042 | 2.6875 | 3 | [
"CC-BY-3.0",
"BSD-3-Clause"
] | permissive | <?php
namespace SilverStripe\ORM\Filters;
use SilverStripe\ORM\DataQuery;
/**
* Incomplete.
*
* @todo add to tests
*/
class WithinRangeFilter extends SearchFilter
{
private $min;
private $max;
public function setMin($min)
{
$this->min = $min;
}
public function setMax($max)
... | true |
3e56d72666f0c1a01c5a11b76e8f82f0807ec6a1 | PHP | geniv/nette-authorizator | /src/Forms/AclForm.php | UTF-8 | 3,684 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Authorizator\Forms;
use Nette\Application\UI\Control;
use Nette\Application\UI\Form;
use Nette\Localization\ITranslator;
use Nette\Security\IAuthorizator;
/**
* Class AclForm
*
* @author geniv
* @package Authorizator\Forms
*/
class AclForm extends Control
{
/** @var IAuthorizator */
pr... | true |
8f55c27bdfab141a40e2257a83569d072ccdedd9 | PHP | rmccue/Numbat | /numbat/classes/config.php | UTF-8 | 1,929 | 3.203125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Numbat configuration
*/
class Config {
protected static $instance = null;
protected $config;
public function __construct() {
}
public static function &instance() {
if ( empty(Config::$instance) ) {
Config::$instance = new Config();
}
return Config::$instance;
}
public function set($con... | true |
5fb48a1de00e80889a8821a76704286133e53c19 | PHP | elfeylord/cs313php | /fishing/TheGuides.php | UTF-8 | 1,903 | 3.109375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang = "en">
<head>
<title>
Reese's Fish Hunt - Guide Info
</title>
<?php include 'links.php';?>
</head>
<body>
<?php include 'header.php';?>
<div id = "wrapper">
<h1>
Welcome to the Guide Info
</h1>
<?php
//Get the variables
require('dbSetup.php');
//echo "ho... | true |
893dc88bbf187a219b7e0f5d828b967a92d2d7c8 | PHP | DirkSonguer/zeitgeist-framework | /framework/trunk/modules/gamesystem/gamesetup.class.php | UTF-8 | 6,987 | 3.0625 | 3 | [] | no_license | <?php
/**
* Zeitgeist Application Framework
* http://www.zeitgeist-framework.com
*
* Gamesetup class
*
* Provides setup functionalities to create the game data structure
* needed for your game
*
* @author Dirk Songür <dirk@zeitalter3.de>
* @license MIT License <http://creativecommons.org/licenses/M... | true |
eef12be56660ec6b332a89bb1c2ea40eaadd147f | PHP | portchris/portchris.co.uk | /database/migrations/2017_04_28_000000_create_users_table.php | UTF-8 | 1,710 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateUsersTable3 extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::dropIfExists('users');
... | true |
2f8952f8aa507c5a29ba76103b22ef9ab03f9e32 | PHP | BigBlueHat/Phlattr | /lib/httpresponse.php | UTF-8 | 1,061 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | <?php
class FlattrHttpResponse
{
public $body, $responseCode = null;
public $errors = array();
public $info = array();
public $responseHeaders = array();
public function __construct()
{
}
public function readHeader($ch, $header)
{
list($key, $value) = self::parseHeader($hea... | true |
3a6e6effa0baf71f5eba9423d442b581eec384db | PHP | Smart-Core/cms-sf4 | /cms/Module/Texter/Entity/TextItemHistory.php | UTF-8 | 2,884 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Monolith\Module\Texter\Entity;
use Doctrine\ORM\Mapping as ORM;
use Smart\CoreBundle\Doctrine\ColumnTrait;
/**
* @ORM\Entity
* @ORM\Table(name="texter_history",
* indexes={
* @ORM\Index(columns={"deleted_at"}),
* }
* )
*/
class TextItemHistory
{
... | true |
4dce9c7e808f359f5a9a43b73c8c8bc825f9dfc1 | PHP | jamesdu0504/ppknn | /run.php | UTF-8 | 991 | 3.09375 | 3 | [] | no_license | <?php
##################3
# args should be:
# pattern = the pattern we should replace with #layers
# min = minimal value of #layers
# max = maximal value of #layers
# command = the command to run
# output = output filename to use
function binary_search($args) {
$low = $args['min'];
$high = $args['ma... | true |
b5fc473577149afcbefc6903a991548af925e6f4 | PHP | DeBrites/php | /a12-repeticaod1.php | UTF-8 | 974 | 3.328125 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Estruturas de Repetição do While</title>
</head>
<body>
<?php
$c = 1;
do {
echo "$c ";
$c ++;
} while($c<=10); ... | true |
2bd85a86f54e90cae3e0f64530c70fab04904ea3 | PHP | Noor54/Gestion_etudiants | /ChercherEtudiant.php | ISO-8859-3 | 950 | 2.640625 | 3 | [] | no_license | <?php
include "includes/connexion.php";
include "includes/session.php";
//include "includes/sessionAdmin.php";
$mc="NULL";
if(isset($_POST['motCle']))
{
$mc=$_POST['motCle'];
}
$req=$connexion->prepare("SELECT* FROM etudiants WHERE nom like '%$mc%'");//% qlq soit ce qui avant ou apres
$req->execute();
?>
<html>
<bo... | true |
efacf9f105ac34aba7b39050859ed1a068d9f3db | PHP | mohsinhassantp/translationportal | /backend/models/ScreenWindow.php | UTF-8 | 1,819 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\models;
use Yii;
/**
* This is the model class for table "screen_windows".
*
* @property integer $window_id
* @property string $window_name
* @property string $type_id
* @property string $created_at
*/
class ScreenWindow extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/... | true |
2cae5cc5fcaa4fb18359892a3b9afb8ca91290db | PHP | BonyGeorge/Move-Miu | /MoveRecruitment/php/model/theme.php | UTF-8 | 1,872 | 2.984375 | 3 | [] | no_license | <?php
include_once 'database.php';
include_once 'crud.php';
class theme extends database implements crud {
private $id;
private $user_id;
private $theme_links_id;
public function create(array $data) {
$sql = "INSERT INTO `theme`( `user_id`, `theme_links_id`) VALUES ($data[0],$data[1])";
... | true |
b007463c06ff5781b0f820f6b5ab92f6201bfd91 | PHP | nikkikapadia/RyeViews | /RyeViews/post_submit.php | UTF-8 | 2,433 | 3.046875 | 3 | [] | no_license | <?php
session_start();
//include url and base path
include("path.php");
//connect to database, access methods db.php
include(ROOT_PATH . '/app/database/connect.php');
//set username to Guest unless logged in
$username = 'Guest';
if (isset($_SESSION['username'])) {
$username = $_SESSION['username'];
}
//set these va... | true |
fb78c3860d2f0fcec6c65b0daf7dc3dee9676eff | PHP | WsdlToPhp/PackageOvh | /src/StructType/TelephonyTonesOptionsListReturn.php | UTF-8 | 4,474 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Ovh\StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for telephonyTonesOptionsListReturn StructType
* @subpackage Structs
* @author WsdlToPhp <contact@wsdltophp.com>
*/
class TelephonyTonesOptionsListReturn extends AbstractStructBase
{
/**
* The toneRing... | true |
023ca4c40870ca8aad4b8fdca8267e2299682561 | PHP | kaidorei/siseveeb | /include/sessionmanager.php | UTF-8 | 5,472 | 3.25 | 3 | [] | no_license | <?php
/**
* @file
* File that describes the SessionManager class.
*
* @author Morten Piibeleht
*/
/**
* @class SessionManager
* @brief Creates, destroys and validates user sessions using MySQL and cookies.
*
* Uses the MySQLi interface for database communications.
*/
class SessionManager {
// Configuration ... | true |
74047b63a38d6b07deaaa86d5ff4d5f0eefbbd23 | PHP | caendesilva/laradocgen | /src/ParsesLinkIndex.php | UTF-8 | 3,508 | 3.359375 | 3 | [
"MIT",
"CC-BY-4.0"
] | permissive | <?php
namespace DeSilva\Laradocgen;
use Exception;
/**
* Parse the linkIndex.yml file which is used to determine the order the
* MarkdownPageCollection::class collection for pages in the sidebar.
*/
class ParsesLinkIndex
{
/**
* Path where the index is stored.
*
* Usually <laravel-project>/reso... | true |
45ebc2bf9e90f704779553606ef994c12bba4c49 | PHP | wuding/php-ext | /src/JSON.php | UTF-8 | 3,771 | 2.890625 | 3 | [] | no_license | <?php
/**
* JavaScript 对象标记法
*/
namespace Ext;
class JSON
{
private static $constants = [];
protected static $json_decoded = null;
/**
* 构建函数
*/
public function __construct($filename = null)
{
$this->init($filename);
}
/**
* 初始化
*... | true |
f423695e958c5c34514c0be6a82e34c197138ae5 | PHP | xi-project/xi-zend-application | /library/Xi/Zend/Application/Resource/Assetic/DirectoryParsingFileAssetFactory.php | UTF-8 | 3,475 | 2.859375 | 3 | [] | no_license | <?php
namespace Xi\Zend\Application\Resource\Assetic;
class DirectoryParsingFileAssetFactory
{
/**
* @var callback(array $options)
*/
private $parserFactory;
/**
* @var array<SplFileParser>
*/
private $parsers;
/**
* @param callback(array $options) $parserFactory... | true |
9320f686d0c74ec853490628d80bdd1a006c22ad | PHP | marcosjrs/TestCakePHP2.5.3_Con_Bake | /app/Controller/PlatosController.php | UTF-8 | 3,205 | 2.546875 | 3 | [] | no_license | <?php
App::uses('AppController', 'Controller');
/**
* Platos Controller
*
* @property Plato $Plato
* @property PaginatorComponent $Paginator
*/
class PlatosController extends AppController {
/**
* Components
*
* @var array
*/
public $components = array('RequestHandler','Session');
public $helper = array('Ht... | true |
ce93b94cf606aba19aca7f0386b4fdf3887db784 | PHP | laborci/PhlexDev | /modules/Phlex/Kraft/Response/PageView.php | UTF-8 | 2,108 | 2.875 | 3 | [] | no_license | <?php namespace Phlex\Kraft\Response;
class PageView extends HtmlView{
protected $js = array();
protected $css = array();
protected $serverVars = array();
/**
* @var static
*/
static protected $instance;
public static function factory($template = null, $data = array()) {
if(static::$instance !== null) t... | true |
b965e53ba999bb3eaa9a60d3f870c16cb323a03a | PHP | hschiebold/ep3-bs | /vendor/payum/payum/src/Payum/Security/Util/Random.php | UTF-8 | 1,317 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/*
* This file is part of the FOSUserBundle package.
*
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Payum\Security\Util;
/**
* This is adopted vers... | true |
404fd56f07fec00455e3f95a4a696ba1b8d039c5 | PHP | thanosk/eclass-ruler | /tests/RatingEventTest.php | UTF-8 | 2,432 | 2.53125 | 3 | [] | no_license | <?php
require_once 'AbstractEventTest.php';
require_once 'src/RatingEvent.php';
class RatingEventTest extends AbstractEventTest {
private static $forumData;
private static $socialBookmarkData;
public static function setUpBeforeClass() {
self::$hasResource = false;
self::$hasThres... | true |
f949e6cb9741c81bced4b34e8cfb123319bace05 | PHP | legacy-fatcode/hydration | /src/Exception/HydrationException.php | UTF-8 | 2,363 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace FatCode\Hydration\Exception;
use FatCode\Hydration\Schema;
use function get_class;
use function gettype;
use function is_object;
use RuntimeException;
class HydrationException extends RuntimeException implements Exception
{
public static function forUndeclaredClass(string... | true |
b66678f7c3f32bbc576a7a6c10f6798399eaa171 | PHP | MilestoneInnovativeTechnologies/web | /laravel/database/migrations/2017_09_30_113633_create_ticket_statuses_table.php | UTF-8 | 1,478 | 2.53125 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTicketStatusesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('ticket_s... | true |
4cb2026062d3f9644eecd014198275365dbbff63 | PHP | terablaze/core | /src/Validation/Exception/ValidationException.php | UTF-8 | 1,816 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Terablaze\Validation\Exception;
use Exception;
use Terablaze\HttpBase\Response;
use Terablaze\Validation\Validation;
class ValidationException extends Exception
{
public Validation $validation;
/**
* The recommended response to send to the client.
*
* @var Response|null
*... | true |
ac175592ebc6a6c93f6eb1102f653af23235346b | PHP | momotaro39/Core_UI_Laravel8.6__only | /Memos/モデルメモ.php | UTF-8 | 37,606 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/*
|--------------------------------------------------------------------------
|
| モデル記載の統一(保守性維持)
|
|--------------------------------------------------------------------------
|
| 共通変数定義は先頭にまとめる。
| 0 use SoftDeletes; (新規・更新処理導入)
| 1 自動インクリメントIDの「タイプ」設定
| 2 Fillable
... | true |
e3071e2e05344cd5da349bd9a42a9b2c4b426250 | PHP | HuyDang1311/do_an | /app/Http/Controllers/Apis/BusStations/ShowBusStationController.php | UTF-8 | 1,230 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Apis\BusStations;
use App\Http\Controllers\ApiController;
use App\Repositories\Interfaces\BusStation\BusStationRepositoryInterface;
use Illuminate\Http\JsonResponse;
use Exception;
use Illuminate\Http\Request;
class ShowBusStationController extends ApiController
{
/**
*... | true |
7c361cfaa23cd7128c4f0bbbe606d9d0a2245b3a | PHP | phpbench/phpbench | /lib/Reflection/ReflectorInterface.php | UTF-8 | 705 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace PhpBench\Reflection;
use PhpBench\Model\ParameterSetsCollection;
interface ReflectorInterface
{
/**
* Return an array of ReflectionClass instances for the given file. The
* first ReflectionClass is the class contained in the given file (there
* may be only one) additional Reflectio... | true |
4e701c361068b5bc8ca2edf72c8ff945b63828a8 | PHP | kafruhs/fws | /base/php/ui/site/Footer.php | UTF-8 | 1,291 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Alex
* Date: 09.11.2014
* Time: 13:39
*/
class base_ui_site_Footer
{
/**
* @var string
*/
protected $cssClass = 'footer';
/**
* @var string
*/
protected $content = '';
/**
* @return string
*/
public function getCssCla... | true |
ecaf778ee71dbf7d954e568e50b3073f1ab7c257 | PHP | eyumay/srms.psco | /lib/Statuses.php | UTF-8 | 17,344 | 2.703125 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of StudentStatus
*
* @author eyumay
*/
Class Statuses
{
static public function getStudentStatus($studentEnrollments = null, $year = null, $semester = null, $sectionId = null ) ... | true |
2b4871f63cb010e0cb4e0b8c481bcf4c8cf7c1d1 | PHP | positivecodes/nomnom | /models/Preference.php | UTF-8 | 1,307 | 2.609375 | 3 | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | <?php
namespace app\models;
use yii\behaviors\TimestampBehavior;
use yii\db\ActiveQuery;
use yii\db\ActiveRecord;
/**
* "{{%preference}}".
*
* @property integer $id
* @property integer $restaurant_id
* @property integer $like
* @property integer $created_at
* @property integer $updated_at
*... | true |
0945fcbe23bb05d0321e04b2575eb042fdd30658 | PHP | GitInVisualStudio/mynote | /api/Exceptions/AuthTokenExpiredException.php | UTF-8 | 203 | 2.625 | 3 | [] | no_license | <?php
class AuthTokenExpiredException extends Exception
{
function __construct() {
parent::__construct("The used authentification token has expired. Please request a new one.", 4);
}
}
| true |
97cf537b0c1fbd20831aab81772b92610ac7e085 | PHP | Cav0n/Bebes-Lutins | /app/Order.php | UTF-8 | 2,127 | 2.703125 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
* @author Florian Bernard <fbernard@openstudio.fr>
*/
class Order extends Model
{
/**
* The attributes that should be hidden for arrays.
*
* @var array
*/
protected $hidden = [
'id'
];
/**
* Items of ... | true |
9b515d898a675da08a27c965d58974bc5f09c23f | PHP | chucamphong/cpmusic.view-api | /app/Http/Controllers/API/UserController.php | UTF-8 | 4,744 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use App\Http\Requests\User\StoreRequest;
use App\Http\Requests\User\UpdateRequest;
use App\Http\Resources\UserResource;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Http\Response;
use Spatie\QueryBuilder\QueryBuilder;
... | true |
609e679a05b375903554a7fc0b30fb275233f0a7 | PHP | museuvirtual/atlas | /app/Services/Registrar.php | UTF-8 | 1,818 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Services;
use App\User;
use App\Collector;
use Validator;
use Illuminate\Contracts\Auth\Registrar as RegistrarContract;
class Registrar implements RegistrarContract {
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate... | true |
9d7728b4a1bc22167b80aa842a93461891317244 | PHP | jasperdecaestecker/gardenLogger | /server/dao/datalogDAO.php | UTF-8 | 1,729 | 3.03125 | 3 | [] | no_license | <?php
require_once WWW_ROOT . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'DatabasePDO.php';
class dataLogDAO
{
public $dbh;
public function __construct()
{
$this->dbh = DatabasePDO::getInstance();
}
public function getDatalog()
{
try
{
$sql = "... | true |
73c1f275469605f28b7c830caaf6ca7154a2712c | PHP | BadChoice/bucketdesk-cli | /app/Commands/Finish.php | UTF-8 | 1,086 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Commands;
use App\Models\Issue;
use App\Services\Bucketdesk\Bucketdesk;
use LaravelZero\Framework\Commands\Command;
class Finish extends Command
{
protected $signature = 'finish {issue?}';
protected $description = 'Creates a pull request for the issue';
use IssueCommand;
public... | true |
577b943b065291a44313c33e98e42413261dcb27 | PHP | yousefmansour/Cofein-Website | /classes/Shop.php | UTF-8 | 1,752 | 2.703125 | 3 | [] | no_license | <?php
class Shop extends Controller {
public function __construct() {
parent::__construct();
}
public function getContent() {
if(isset($_GET['additem'])){
$id = (int)$_GET['additem'];
$cart = new ShopCart();
$cart->addToCart($id)... | true |
3198ede942f233f9d61004e080572d0d7ac1be4a | PHP | yjjmuz/eth-contract | /contract.php | UTF-8 | 3,802 | 2.578125 | 3 | [] | no_license | <?php
require_once 'ethereum.php';
$ethereum = new Ethereum('127.0.0.1', '8545'); //以太坊类
$conAddr = "0x063b528c344a63648dbb65c0ecef5068d64adcd1"; //合约地址
$addr = $ethereum->eth_accounts()[0]; //执行合约的地址
// $ethereum->net_version();
/*
* $orderid为为字典映射的下标做索引
* $data传入四个参数,string jydh,string name,... | true |
75c325ed786ac4906b426b7b709d88d427c9ad27 | PHP | NareshKurukuti/Php-MySQLDataByBetweenTwoDates | /MySQL Data Between Two Dates.php | UTF-8 | 1,023 | 3.453125 | 3 | [] | no_license | <?php
/* For loop for printing the start Date and end date from current month to next year same month */
for($i = 0;$i<13;$i++) {
/* Start Date and End Date */
$startDate = date('Y-m-01 00:00:00',strtotime('first day of +'.$i.' month')).'<br/>';
$endDate = date('Y-m-t 12:59:59',strtotime('last day of +'.$... | true |
87eafbdf47de10bb14493b94f2ad79fd2e21d804 | PHP | yesenm/soltechstorage | /includes/proclientespo.php | UTF-8 | 4,178 | 2.96875 | 3 | [] | no_license | <?php
//Declarar las variables vacías
$nombrepo="";
$telefonopo="";
$direccionpo ="";
$correopo="";
$rfcpo="";
//Validar que los campos sean llenados.
if(isset($_POST['nombrepo'])){
$nombrepo = $_POST['nombrepo'];
$telefonopo = $_POST['telefonopo'];
$direccionp... | true |
8e6f1ff17686549b87c8755a36ff3fe1327abbf1 | PHP | trafik8787/lara-crud | /src/Form/FormManagerTable.php | UTF-8 | 4,946 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Trafik8787\LaraCrud\Form;
use Trafik8787\LaraCrud\Contracts\FormManagerInterface;
/**
* Created by PhpStorm.
* User: Vitalik
* Date: 18.09.2017
* Time: 13:07
*/
abstract class FormManagerTable implements FormManagerInterface
{
public $objConfig;
public $admin;
protected $componentMan... | true |
1dfc2fd6cefd32b30818a0617ba1d750a18a3894 | PHP | bartko-s/stefano-tree | /src/StefanoTree/NestedSet/Adapter/AdapterInterface.php | UTF-8 | 1,434 | 3 | 3 | [] | permissive | <?php
declare(strict_types=1);
namespace StefanoTree\NestedSet\Adapter;
interface AdapterInterface
{
/**
* Begin db transaction.
*/
public function beginTransaction(): void;
/**
* Commit db transaction.
*/
public function commitTransaction(): void;
/**
* Rollback db tra... | true |
7f45a2af35aec7a22fd8bb99ea712ef310367073 | PHP | imalisusan/ams-xpro | /app/Http/Controllers/DegreeController.php | UTF-8 | 1,438 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Degree;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Requests\StoreDegreeRequest;
class DegreeController extends Controller
{
public function index(Request $request)
{
$degrees = Degree::latest()->paginate(20);
... | true |
5fe544f942acdafd791c054b774f82a0dd66e119 | PHP | osuagwu/laradmin | /packages/bethelchika/laradmin/src/Tools/Tools.php | UTF-8 | 11,533 | 2.578125 | 3 | [] | no_license | <?php
namespace BethelChika\Laradmin\Tools;
use Money\Money;
use Money\Currency;
// NOTE either depend on Cashier for the following of install:: composer require moneyphp/money
use NumberFormatter;
use Corcel\Model\Option;
use Illuminate\Support\Facades\Log;
use Money\Currencies\ISOCurrencies;
use Money\Formatter\I... | true |
731bd53d60a1d26ebd403b9c2a19317f1c0886ea | PHP | Sander-Kroeze/NaikieDasVacatures | /pages/loginPHP.php | UTF-8 | 1,362 | 2.75 | 3 | [] | no_license | <?php
// voegt bestanden toe.
include_once('loginForm.php');
include('functions/Register.php');
include('functions/login.php');
// controleerd of de 'registersubmit' gepost is.
if (isset($_POST['registersubmit'])) {
// lees de waarden uit de POST en controleerd ze op speciale tekens.
$userEmail = htmlspe... | true |
2d20b866c4d0939ceee42fcbb2f5463d99ca9603 | PHP | laziestcoder/BDTTMS | /hotelReg.php | UTF-8 | 5,125 | 2.53125 | 3 | [] | no_license | <?php require_once("includes/init.php"); ?>
<?php
$cities = City::find_all();
$message = '';
if (isset($_POST['submit'])) {
$registerHotel = new RegisterHotel();
$registerHotel->hotel_name = $_POST['hotel_name'];
$registerHotel->hotel_admin_name = $_POST['admin_name'];
$registerHotel->phone_number = $_P... | true |
d5441621b79dcbd6ec29022539edc670e3ef2344 | PHP | koraykupe/playground | /app/Algorithms/Sorting/BubbleSort.php | UTF-8 | 1,068 | 3.765625 | 4 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: koray.kup
* Date: 28.12.2016
* Time: 16:12
* Sort an array using bubble sort algorithm order by asc
* Find swap count and proper list
*/
$numbers = [9, 5, 8, 3, 1];
/**
* @param array $numbers
* @return array|string
*/
function bubbleSort($numbers = []) {
// Count... | true |
7c8800c4e25291846b754ecaa16b083c678411e3 | PHP | wpextra/bridge | /modules/elementor/widget.php | UTF-8 | 3,411 | 2.578125 | 3 | [] | no_license | <?php
namespace Bridge\Module\Elementor;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
class Widget extends \Elementor\Widget_Base {
static public $control_type = [
'text' => \Elementor\Controls_Manager::TEXT,
'select' => \Elementor\Controls_Manager::SELECT,
'textarea' => \Elementor\Controls_Manager::TEXTAREA,
... | true |