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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
741dda0524d3479fe995ea732b5ac0f60748f5b1 | PHP | Sirlord-Sen/MySQL | /1.1. Index.php | UTF-8 | 544 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
include('connection.php');
/* $query = "SELECT * FROM users";
$result = mysqli_query( $conn, $query );
if( mysqli_num_rows($result) > 0 ) {
//we have data!
// output the data
echo "<table><tr><th>ID</th><th>Username</th><th>Email</th></tr>";
while( $row = mysqli_fetch_assoc($re... | true |
8433a07e9cba3525595626234a6ef5561d9781ca | PHP | KantiRahul/fee-management-system | /pgportal1/fee_register.php | UTF-8 | 1,749 | 2.6875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="main.css">
</head>
<body>
<?php
include_once '... | true |
2f5e9c7b7a95f7298ca3c269cda83abb0c7ba6bd | PHP | RondineleG/BangPHP | /src/OOP/constructor.php | UTF-8 | 894 | 4 | 4 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Learning PHP - Constructor</title>
</head>
<body>
<?php
class Fruit
{
p... | true |
a372d36c0c0a0fc9294406806b92445807fe4d73 | PHP | ibazanov/oopProject | /application/MacBook.php | UTF-8 | 235 | 2.515625 | 3 | [] | no_license | <?php
namespace application;
use helpers\Helper;
class MacBook extends Computer implements IComputer
{
const IS_DESKTOP = FALSE;
public function identifyUser()
{
Helper::printLine('Apple ID',Helper::$note);
}
} | true |
a143a240990a2f52afff258b90559d42cf8bc292 | PHP | Dragun25/Lesens | /HW_05/DZ5_1.php | UTF-8 | 395 | 3.28125 | 3 | [] | no_license | <?php
define("FIVE", 5);
//for ($i = 1; $i <=100; $i++) { //Реализация просто на цикле
// if ($i%FIVE ==0) $five_schet1 +=1;
//}
//echo "Количество констант - $five_schet1";
for ($i = 1; $i <=100; $i++) { // Реализация на миссиве
if ($i%FIVE ==0) $five_schet[] =$i;
}
print_r ($five_schet) . PHP_EOL;
echo coun... | true |
f3f9b577b4d17747fe8e174a6a342b6604f76930 | PHP | MinhTri1911/laravel-docker-composer | /app/Http/Controllers/NationController.php | UTF-8 | 1,171 | 2.609375 | 3 | [] | no_license | <?php
/**
* NationController.php
*
* @package App\Http\Controllers
* @author Rikkei.Trihnm
* @date 2018/07/23
*/
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Business\NationBusiness;
use App\Common\Constant;
class NationController extends Controller
{
private $_nationB... | true |
21a99d5674f23d2000ac5d004e310f2b43d6ac0b | PHP | mahmudalhakim/Backend-HT19 | /Lektion-02/string.php | UTF-8 | 1,398 | 3.46875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="sv">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>String</title>
<style>
body{
font-family: courier;
font-size:2em;
}
.string{
... | true |
59a09b909f0308f891c2a6876cdc9464a48c5890 | PHP | admbjr/php_project | /ignore/combined codes/project-ghostcoders-master/Nomadic_Escape_Site/hotelsrestaurants/listrestaurants.php | UTF-8 | 1,139 | 2.609375 | 3 | [] | no_license | <?php
// require_once '../../includes/Database.php';
require_once '../includes/Classes/Restaurant.php';
require_once '../includes/header.php';
require_once '../includes/navbar.php';
$dbcon = Database::getDb();
$r = new Restaurant();
$myres = $r->getAllRestaurants(Database::getDb());
?>
<div class="locations">
<l... | true |
131d3eaad96808a09f0ba1abdc9730b063574946 | PHP | jonasiliaens/web-backend-oplossingen | /opdracht-image-manipulation-thumb-classes/classes/Image.php | UTF-8 | 3,347 | 3.140625 | 3 | [] | no_license | <?php
class Image
{
private $fileName;
private $fileTemp;
private $fileType;
private $fileSize;
private $fileExtension;
private $originalWidth;
private $originalHeight;
function __construct($name, $temp, $type, $size)
{
$this->fileName = $name;
$this->fileTemp = $temp;
$this->fileType ... | true |
a7c8930af2fb1ebb9fb55851fa15dfb35baa6cb3 | PHP | SergiiZazymko/zf3.tutorial | /module/Album/test/AlbumTest/Model/Album/AlbumRepositoryFactoryTest.php | UTF-8 | 1,244 | 2.515625 | 3 | [] | no_license | <?php
/**
* @access protected
* @author Sergiy Zazymko <sergiy.zazymko@gns-it.com>
*/
namespace AlbumTest\Model\Album;
use Album\Model\Album\AlbumRepository;
use Album\Model\Album\AlbumRepositoryFactory;
use PHPUnit\Framework\TestCase;
use Test\Bootstrap;
use Zend\ServiceManager\Factory\FactoryInterface;
use Zend\... | true |
3dd2bae4dd21bf75289d09fded1a4b7dc434fa6c | PHP | WondrousSquirrel/php-start | /function.php | UTF-8 | 239 | 3.390625 | 3 | [] | no_license | <?php
/*
# create function
function simpleFunction() {
echo 'Hello World';
}
simpleFunction();
*/
function sayHello($name = 'World'){
echo "Hello $name<br>";
}
sayHello('Alexander');
?> | true |
7921cc4d9a1fa7085a21b7fe0865af434c9b5fe9 | PHP | cronfy/cdek | /src/Api.php | UTF-8 | 2,047 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: cronfy
* Date: 27.09.17
* Time: 16:07
*/
namespace cronfy\cdek;
use GuzzleHttp\Client;
use yii\base\BaseObject;
use yii\helpers\Json;
/**
* @property Client $client
* @property string $sessionId
*/
class Api extends BaseObject
{
// auth
public $authLogin;
... | true |
6a8ff940286846b649239d903887cb0a42189f71 | PHP | madyafaraz/RESTful-Webservice-in-PHP | /courses/add_course.php | UTF-8 | 844 | 2.890625 | 3 | [] | no_license | <?php
// Get the course data
$course_id = filter_input(INPUT_POST, 'course_id');
$course_name = filter_input(INPUT_POST, 'course_name');
// Validate inputs
if ($course_id == null || $course_name == null) {
$error = "Invalid category data. Check all fields and try again.";
include('error.php');
} else ... | true |
14ab5001f92b01128dbbaf9c32974e2eb46e4ff2 | PHP | lweikit/togo | /include/db_connect.php | UTF-8 | 239 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
include_once 'global_variables.php';
// Create connection
$mysqli = new mysqli(HOST, USER, PASSWORD, DATABASE);
// Check connection
if ($mysqli->connect_errno) {
echo "Failed to connect to MySQL: " . $mysqli->connect_error;
}
?>
| true |
b9d72ae9d3ea63c7ccb66a485c8dced864dc2ee6 | PHP | kellerkinderDE/SwagImportExport | /Components/SwagImportExport/Utils/DataHelper.php | UTF-8 | 891 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Shopware\Components\SwagImportExport\Utils;
class DataHelper
{
/**
* @param $column
* @return array
*/
public static function generateMappingFromColumns($column)
{
preg_match('/(?<=as ).*/', $column, $alias);
$alias = trim($alias[0]);
preg_match("/(?... | true |
173be13ab6204ad20644b0afa365e9bee1e73afa | PHP | ashrafnyt/bundle-orders | /tracker.php | UTF-8 | 1,300 | 2.90625 | 3 | [] | no_license | <h1>Hello, World.</h1>
<?php
// connect to the database
dataBaseConnect('localhost','root','');
// get variables value by ajax send
$username = _POST['username'];
$bundle = _POST['bundle'];
$price = _POST['price'];
$sql = 'insert into orders (username,bundle,price)values ("'... | true |
fac4cd57a9a25ed336b99f928acf2144ac3e8a23 | PHP | julianobailao/laravel-module | /Modules/ModuleControl/Services/FrontEndService.php | UTF-8 | 663 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\ModuleControl\Services;
use Modules\ModuleControl\FrontEnd\ComponentGroup;
class FrontEndService
{
protected $title;
protected $subtitle;
protected $fields;
public function create($title, $subtitle, callable $callback)
{
$this->title = $title;
$this->subti... | true |
38656467b9599ae71770ecfe01bce9c5d5c534b9 | PHP | vrshetty/wiki-modern | /classes/wm_page_html.php | UTF-8 | 17,011 | 2.8125 | 3 | [] | no_license | <?php
if ( !class_exists( 'WM_page_html' ) ){
/**
* Responsible for all site pages, post or static page
*/
class WM_page_html {
public function __construct (){}
/**
* Build the HTML for the 404 page
*
* @return string HTML for the page.
*/
public f... | true |
7f82d5b0fe62c62438222765375d7377d5824412 | PHP | iambigd/php-AssetToolkit | /tests/AssetToolkit/DataTest.php | UTF-8 | 1,544 | 2.6875 | 3 | [] | no_license | <?php
use AssetToolkit\Data;
class DataTest extends PHPUnit_Framework_TestCase
{
public function test()
{
is( Data::FORMAT_PHP, Data::detect_format_from_extension("path/to/file.php") );
is( Data::FORMAT_JSON, Data::detect_format_from_extension("path/to/file.json") );
is( Data::FORMAT_YA... | true |
b90a021a46f18ade6f25c859437dfa382fed10e4 | PHP | princelonappan/abhi-delivery-app | /app/Cart.php | UTF-8 | 1,619 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Cart extends Model
{
protected $fillable = ['customer_id', 'status'];
public function customer()
{
return $this->belongsTo('App\Customer');
}
public function items()
{
return $this->hasMany('App\CartItem');
}
... | true |
c9dfd9b84b3fe483315384ea29c0fd2eb6c787ae | PHP | Yuzf-code/More | /Src/Lib/Database/ConnectionFactory.php | UTF-8 | 406 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: weeki
* Date: 2019/5/2
* Time: 23:13
*/
namespace More\Src\Lib\Database;
use More\Src\Core\BaseInterface\Factory;
class ConnectionFactory implements Factory
{
protected $config;
public function __construct($config)
{
$this->config = $config;
}
... | true |
8fcd9c1be6fe6a4aa46f79017050832b2cad1c18 | PHP | giathurton/Web-Application-Student-Center | /StudentView.php | UTF-8 | 3,635 | 2.703125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Student View Page</title>
<meta name="author" content="Gia Thurton">
<meta name="description" content="Final Project">
<style>
body {
background-image: url('Chanelblur.png');
}
.menuba... | true |
41276e21e785c5aba9a076db4593259225b2f22a | PHP | elratondesusi/lamp | /rwcc/src/web/upload.php | UTF-8 | 988 | 2.703125 | 3 | [] | no_license | <!DocType html>
<html>
<body>
<?php
if(!isset($_POST['upload'])) return;
$target_file = '/var/www-data/lampa/requests/newplan.txt';
$current_plan_file = '/var/www-data/lampa/requests/plan.txt';
$original_filename = basename($_FILES['filename']['name']);
$tmp_filename = $_FILES['... | true |
92fab626f98a17808e78148731840ce36536c7d7 | PHP | sirdiego/importr | /Classes/Feature/RenameFile.php | UTF-8 | 1,630 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types=1);
/**
* RenameFile.php
*/
namespace HDNET\Importr\Feature;
use HDNET\Importr\Domain\Model\Import;
use HDNET\Importr\Service\FileService;
use HDNET\Importr\Service\ManagerInterface;
/**
* Class RenameFile
*/
class RenameFile
{
/**
* @var FileService
*/
protected $fil... | true |
6f97fd07cd921bb7c0ff04454dae238e06787648 | PHP | amressamhassan/Airports | /swe2/classes/Feedback.php | UTF-8 | 1,896 | 2.890625 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Feedback
*
* @author Ahmed
*/
class Feedback {
private $id;
private $body;
private $subje... | true |
32aae14265bdbfc09081fa5da4b3ce24b838dbf5 | PHP | BrandConstantin/php | /tema-04/cuadradoYCubo.php | UTF-8 | 1,338 | 3.390625 | 3 | [] | no_license | <!DOCTYPE html>
<!--
Escribe un programa que muestre en tres columnas, el cuadrado y el cubo de los 5 primeros números
enteros a partir de uno que se introduce por teclado.
-->
<html>
<head>
<title>Cuadrado y Cubo</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=d... | true |
ee7cf9fd82a07a805be3148555c0c229d92904d0 | PHP | obaidaattaee/ware | /Enemy.php | UTF-8 | 438 | 3.3125 | 3 | [] | no_license | <?php
include_once 'Person.php' ;
class Enemy extends Person
{
private $warrior ;
public $withdrawal ;
public function __construct($name , $power , $energy , $withdrawal = 0)
{
$this->name = $name;
$this->power = $power ;
$this->energy = $energy ;
$this->withdrawal = $wi... | true |
c14259eebdb2bd14954cbc585cfb9ebd8b2e572f | PHP | amitrazz/ciapanel | /application/views/posts/index.php | UTF-8 | 913 | 2.515625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive |
<?php if($this->session->userdata('loged_in')): ?>
<a href="<?php echo base_url();?>posts/create" class="btn btn-primary pull-right">Add Post</a>
<?php endif; ?>
<?php foreach($posts as $post): ?>
<h2><?php echo ucwords($post['title']); ?></h2>
<div class="row">
<div class="col-xs-3">
<img src="<?php ech... | true |
48c845ee7eb9d8d017e8cc5d0066ecf2e3d04065 | PHP | Surygin/routing | /class/routing.php | UTF-8 | 444 | 2.609375 | 3 | [] | no_license | <?php
class MyRoute {
function Get_my_route($route) {
$routes = [
'/'. 'routing/' => "public/home.php",
"/routing/about" => "public/about.php",
"/routing/contacts" => "public/contacts.php",
];
if(array_key_exists($route, $routes)){... | true |
3c720074c0ea74537e13de8e568aef97b6eef862 | PHP | senthilpsg/retail | /public/add-product.php | UTF-8 | 2,913 | 2.65625 | 3 | [] | no_license | <?php
include "functions.php";
check_out();
$a="localhost";
$b="root";
$c="";
$d="retail";
connect_db($a,$b,$c,$d);
//var_dump($_POST);
$produc_name = $_POST['product_name'];
$product_price=$_POST['product_price'];
$sql="INSERT INTO `product` ( `product_name`, `product_price`) VALUES
( '$product_name'... | true |
fc16dc61113cb32323e50ff33d5643851f038a8c | PHP | ppuljic1/smediAPI | /src/traits/outputHandler.php | UTF-8 | 667 | 3.015625 | 3 | [] | no_license | <?php
namespace Traits;
trait outputHandler
{
/**
* $status -> boolean
* $message -> string
*/
function formatOutput($status, $message, $value=null) {
return json_encode(array(
'status' => $status,
'message' => $message,
'value' => $value... | true |
15a29293a6ec6eca17d2a99fa550f741261b6218 | PHP | ThanhNguyenThi/saveTopGroupShop | /classes/class-commission.php | UTF-8 | 13,186 | 2.6875 | 3 | [] | no_license | <?php
/**
* Commission functions
*
* @author Thanh Nguyen <http://topgroupshops.com.vn>
* @package ProductVendor
*/
class TGS_Commission
{
/**
* Constructor
*/
function __construct()
{
$this->completed_statuses = apply_filters( 'topgroupshops_completed_statuses', array(
'comp... | true |
ed71f986b2fa62e67d2e8e487df8a331474e1242 | PHP | DVLnerd/nextjs | /files/SSP/completed-orders.php | UTF-8 | 3,129 | 2.65625 | 3 | [] | no_license | <?php
/*
* DataTables example server-side processing script.
*
* Please note that this script is intentionally extremely simply to show how
* server-side processing can be implemented, and probably shouldn't be used as
* the basis for a large complex system. It is suitable for simple use cases as
* for ... | true |
54c17b5ffa360a10539e0997899174b3d7940894 | PHP | ShivrajMohite/SignupLoginForm_In_AngularJS | /angularlogin/files/functions/root.php | UTF-8 | 2,604 | 2.796875 | 3 | [] | no_license | <?php
class dataRoot
{
private $conn;
function __construct()
{
require_once 'config.php';
// opening database connection
$data_base = new db_conn();
$this->conn = $data_base->connect();
}
// Fetching record
public function getOneRecord($query)
{
$data... | true |
8dfcdb9d273e1af7c8e39f443fba684aa65394df | PHP | glhd/laralint | /src/Printers/TestPrinter.php | UTF-8 | 1,517 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Glhd\LaraLint\Printers;
use Galahad\LaraLint\Tests\TestCase;
use Glhd\LaraLint\Contracts\Printer;
use Glhd\LaraLint\ResultCollection;
use Glhd\LaraLint\Tests\Constraints\LintingDidNotStart;
use Glhd\LaraLint\Tests\Constraints\LintingStarted;
use Illuminate\Support\Collection;
use Illuminate\Support\Fa... | true |
da99eaab200a6613782ed66914cb398f9dba0660 | PHP | vasilisq/mdx-query-builder | /src/CellSet.php | UTF-8 | 1,079 | 3.28125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Vasilisq\MdxQueryBuilder;
/**
* Represents MDX "table result"
*
* @package Vasilisq\MdxQueryBuilder
*/
class CellSet
{
/** @var array */
protected $columns;
/** @var array */
protected $rows;
/**
* @param array $columns
* @param array $rows
... | true |
f7894f666c01e727f97bcb83325afb7eaaee40dc | PHP | devaris21/garage | /core/classes/myclasses/LOCATION.php | UTF-8 | 3,146 | 2.71875 | 3 | [] | no_license | <?php
namespace Home;
use Native\RESPONSE;
use Native\EMAIL;
/**
*
*/
class LOCATION extends TABLE
{
public static $tableName = __CLASS__;
public static $namespace = __NAMESPACE__;
public $ticket;
public $typelocation_id;
public $prestataire_id = null;
public $started;
public $finished;
public $comment;
pu... | true |
30acf65087e00f9afcdaad8b8e70245d3d17fbd7 | PHP | albertofem/wiser | /tests/Wiser/Tests/WiserTest.php | UTF-8 | 1,937 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of Wiser
*
* (c) Alberto Fernández <albertofem@gmail.com>
*
* For the full copyright and license information, please read
* the LICENSE file that was distributed with this source code.
*/
namespace Wiser\Tests;
use Wiser\Wiser;
use Wiser\Environment;
use Wiser\View;
class WiserTe... | true |
6a6438922d3c0a6a720d4ce22377fa8060cb8aa7 | PHP | zeteticl/MoegirlRating | /MoegirlRating.MRRateApi.php | UTF-8 | 1,708 | 2.640625 | 3 | [] | no_license | <?php
class MRRateApi extends ApiBase {
private $logger;
public function __construct( ApiMain $mainModule, $moduleName, $modulePrefix = '' ) {
parent::__construct( $mainModule, $moduleName, $modulePrefix );
$this->logger = new MRLogging( __FILE__ );
}
public function execute() {
$ratingId = 0;
$user = $t... | true |
37ff819d4b0bcd014ae940ef268815be0a85b1b5 | PHP | AkeEvoX/webgadget | /admin/managers/news_manager.php | UTF-8 | 3,595 | 2.890625 | 3 | [] | no_license | <?php
require_once("../../lib/database.php");
require_once("../../lib/logger.php");
class News_Manager{
protected $mysql;
function __construct(){
try{
$this->mysql = new database();
$this->mysql->connect();
//echo "initial database.";
}
catch(Exception $e)
{
die("initial News m... | true |
c43a1da6a83f4c52769460be459c48399a0ea0f7 | PHP | isaacBats/curso-php | /project/app/Commands/SendMailCommand.php | UTF-8 | 1,438 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Commands;
use App\Models\Message;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Swift_Mailer;
use Swift_Message;
use Swift_SmtpTransport;
class SendMailCommand extends Command
{
prot... | true |
e5512dd652236801d4ce794fd40223da5f899f02 | PHP | adrianomartino/CRUDo | /application/library/DbQuery.php | UTF-8 | 3,524 | 2.984375 | 3 | [] | no_license | <?php
class DbQuery extends DbConnect{
//this function returns a numeric array
//each key of the array contains and associative array ( table row )
static function query($sql,$err_message="Impossibile eseguire la query"){
//open DB connection
$mysqli = self::_DbConnec... | true |
c1b24f14253aede8b32b7e29b83f2f7c7f01f8a0 | PHP | hooshid/imdb-scraper | /tests/ChartsTest.php | UTF-8 | 905 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
use Hooshid\ImdbScraper\Base\Config;
use Hooshid\ImdbScraper\Charts;
use PHPUnit\Framework\TestCase;
class ChartsTest extends TestCase
{
protected function getCharts($language = "en-US"): Charts
{
$config = new Config();
$config->language = $language;
return new Charts($config);... | true |
91dfdfda90297d68a0156f86994991115c51815f | PHP | yuwet15/El-mejor-repo-del-mundo | /Sites/pages/detalle.php | UTF-8 | 1,644 | 2.625 | 3 | [] | no_license | <?php
session_start();
if (isset($_GET['id'])) {
$id = (int)$_GET['id'];
require("../config/conexion.php");
$_SESSION['previous_location'] = 'detalle.php?id='.$id;
$query = "SELECT compra_id FROM detalle WHERE compra_id=$id";
$result = $db -> prepare($query);
$result -> execute();
$r = $result -> fetchA... | true |
804333d3eb49d92c6d817f7b52b35d9d1b9960b4 | PHP | liujunbo409/hjgl | /app/Components/HJGL/UserOrderManager.php | UTF-8 | 5,216 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Components\HJGL;
use App\Models\HJGL\UserOrder;
use App\Components\Utils;
class UserOrderManager{
/*
* 根据id获取订单
*
* By Yuyang
*
* 2019-01-09
*/
public static function getById($id){
$order = UserOrder::where('id','=',$id)->first();
return $orde... | true |
daca838a2043eaebe0ee98823a8c199c231d200b | PHP | Dvory59/web_project | /app/fileUpload/ImageStorage.php | UTF-8 | 990 | 3.21875 | 3 | [] | no_license | <?php
namespace Img;
use Nette\Utils\Finder;
use Nette\Utils\Image;
class ImageStorage
{
private $imagesDir;
public function __construct($dir)
{
$this->imagesDir = $dir;
}
/**
* Smaže soubor (obrázek) ze složky
* @param $name - jmeno souboru
* @param $url - umístění souboru
*/
public function de... | true |
52edc3d953e06a40490c37b80d1c0e243de488e9 | PHP | xuhande/wechat | /App/Wxpay/test/bak/notify.php | UTF-8 | 521 | 2.75 | 3 | [] | no_license | <?php
foreach ($_GET as $key=>$value)
{
logger("Key: $key; Value: $value");
}
$postStr = $GLOBALS["HTTP_RAW_POST_DATA"];
logger($postStr);
if (isset($_GET)){
echo "success";
}
//日志记录
function logger($log_content)
{
$max_size = 100000;
$log_filename = "log.xml";
if(file_exists... | true |
e8fabe64004d614a84b528f664f0f83220d19cfc | PHP | mmezic/fksdb | /app/Models/Exceptions/ContestNotFoundException.php | UTF-8 | 368 | 2.5625 | 3 | [] | no_license | <?php
namespace FKSDB\Models\Exceptions;
use Nette\Http\Response;
use Nette\InvalidStateException;
class ContestNotFoundException extends InvalidStateException {
public function __construct(int $contestId, ?\Throwable $previous = null) {
parent::__construct(sprintf(_('Contest %d not found'), $contestId)... | true |
b946746b7c7fbe023047e2db825fefcfcf347854 | PHP | WHIZENx/School-Docker | /src/class/semester.php | UTF-8 | 469 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
class Semester {
public $semyear, $semterm;
public $con;
public function __construct() {
$this->con = new DMC();
}
public function get_semester_all() {
return "SELECT * FROM semester ORDER BY SemID";
}
public fun... | true |
48b2603ae3011761b2f89a3c7422838b4570387b | PHP | emilia98/Technology-Fundamentals-PHP | /01. Basic Syntax, Conditional Statements & Loops - Lab/10.MultiplicationTable_3.php | UTF-8 | 160 | 3.5625 | 4 | [
"MIT"
] | permissive | <?php
$number = intval(readline());
$i = 1;
do {
printf("%d X %d = %d%s", $number, $i, $number * $i, PHP_EOL);
}
while(++$i <= 10); | true |
f53ccccaa8ac9962c1442982fff2c584bff39c54 | PHP | bakpia-patuk/glapp | /app/core/Auth_Controller.php | UTF-8 | 5,844 | 2.84375 | 3 | [] | no_license | <?php
/**
* Description of Auth_Controller
*
* @author Isht.Ae
*/
if (!defined('BASEPATH')) {
exit('No direct script access allowed');
}
class Auth_Controller extends MY_Controller {
public $user;
public $page;
public function __construct() {
parent::__construct();
date_default_t... | true |
bbc7e79983dfdb583a739fd0350b6d416603cb67 | PHP | thenotsoft/router-fastroute | /tests/UrlGeneratorTest.php | UTF-8 | 4,346 | 2.53125 | 3 | [] | no_license | <?php
namespace Yiisoft\Router\FastRoute\Tests;
use PHPUnit\Framework\TestCase;
use Yiisoft\Router\Route;
use Yiisoft\Router\RouteCollectorInterface;
use Yiisoft\Router\RouteNotFoundException;
use Yiisoft\Router\UrlGeneratorInterface;
class UrlGeneratorTest extends TestCase
{
private function createUrlGenerator(... | true |
266319444f4d020dd5f6fd1e27b5e251f757545f | PHP | DrXiao/DB12_RentSystem | /src/applicant/user_applicant.php | UTF-8 | 1,352 | 2.59375 | 3 | [] | no_license | <html>
<?php
//session值的讀取:
//session值的銷燬
//nset($_SESSION['one']);
//echo $Usr_Name1;
require(dirname(__DIR__) . "/function/queryDB.php");
// 登入檢查
$query = <<<EOF
Select Account, SU_Password From SystemUser;
EOF;
// 用 $query 的請求,檢查 $_POST 是否存在,且帳號密碼有存在於 SystemUser 裡面
LoginCheck($_POST, $query);
... | true |
4490abf3eb48c65701fa55f96b79cbcfab55e144 | PHP | mwin007/magento2-extension-builder | /Console/Command/BuilderCommand.php | UTF-8 | 3,776 | 2.703125 | 3 | [] | no_license | <?php
namespace ADM\DevBuilder\Console\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Compo... | true |
54fad48c72f253d577ae6b88b99d6f6d020a6cd7 | PHP | jacsonhwang/mestrado | /dao/EntidadeUsuarioDAO.php | UTF-8 | 1,851 | 2.6875 | 3 | [] | no_license | <?php
include_once __DIR__ . '/../inc/conexao.php';
include_once __DIR__ . '/../model/Entidade.php';
include_once __DIR__ . '/../model/Usuario.php';
class EntidadeUsuarioDAO {
private $cn;
private $tabela = "entidade_usuario";
/*
public function recuperarIdEntidadeUsuario($usuario) {
$cn = new Con... | true |
5fe98edf2e3e427c5efcbb2ef844208dc8b9307a | PHP | kirill-karpin/toolbox.core | /lib/user/userservice.php | UTF-8 | 1,105 | 2.875 | 3 | [] | no_license | <?php
namespace Toolbox\Core\User;
use Toolbox\Core\User\Group\GroupRepository;
use Toolbox\Core\User\UserGroup\UserGroupRepository;
class UserService
{
/**
* @var UserGroupRepository
*/
private $userGroupRepository;
/**
* @var GroupRepository
*/
private $groupRepository;
/*... | true |
d976a78746cfe4061f7031532c8fe39506b81f76 | PHP | maglink/journal | /module/Journal/src/Journal/Form/MarkForm.php | UTF-8 | 1,106 | 2.59375 | 3 | [] | no_license | <?php
namespace Journal\Form;
use Zend\Form\Element;
use Zend\Form\Form;
class MarkForm extends Form
{
public function __construct($name = null)
{
parent::__construct('mark');
$unit_id = new Element('unit_id');
$unit_id->setAttributes(array(
'type'... | true |
90b731bf16688f17e2a18a7385f048e4c2190ae9 | PHP | DavidCao626/server | /app/EofficeApp/Customer/Entities/SalesRecordEntity.php | UTF-8 | 783 | 2.515625 | 3 | [] | no_license | <?php
namespace App\EofficeApp\Customer\Entities;
use App\EofficeApp\Base\BaseEntity;
class SalesRecordEntity extends BaseEntity
{
/** @var string 销售记录表 */
public $table = 'customer_sales_record';
/** @var string 主键 */
public $primaryKey = 'sales_id';
public function salesRecordToCustomer(... | true |
8e5afc0db8f8fd4506844e0872c394adcd084c6e | PHP | TonyBogdanov/sdom | /tests/classes/DomTest.php | UTF-8 | 57,489 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace SDom\Test\Node;
use Kevintweber\HtmlTokenizer\Tokens;
use PHPUnit\Framework\TestCase;
use SDom\Dom;
use SDom\Node\CData;
use SDom\Node\Comment;
use SDom\Node\DocType;
use SDom\Node\Element;
use SDom\Node\NodeInterface;
use SDom\Node\Text;
use SDom\Test\Helper\DemoGeneratorTrait;
/**
* Class DomTest
... | true |
0af58ff8d923468564822589a63c7af423e7ecd4 | PHP | EVelacio/sisvetbot | /app/Repositories/VeterinarioRepository.php | UTF-8 | 758 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
use App\Models\Veterinario;
use InfyOm\Generator\Common\BaseRepository;
/**
* Class VeterinarioRepository
* @package App\Repositories
* @version May 6, 2019, 1:24 am UTC
*
* @method Veterinario findWithoutFail($id, $columns = ['*'])
* @method Veterinario find($id, $columns = [... | true |
66dbb353136ab2ac2ffb584a9e4d9e395253767f | PHP | atunjeafolabi/estate-intel-book-api | /app/Http/Resources/BookResource.php | UTF-8 | 1,873 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Http\Resources;
use App\Helpers\Status;
use Illuminate\Http\Resources\Json\JsonResource;
class BookResource extends JsonResource
{
/**
* @var bool
*/
public $shouldIncludeId;
public function __construct($resource, $shouldIncludeId = false)
{
$this->shouldInclude... | true |
01873b6038167f73fffeee73ab97b0c3476ce1fb | PHP | emudmudmudmu/myoffice | /src/Quartet/Bundle/KakarotBundle/Service/CleanSchedulesService.php | UTF-8 | 5,251 | 2.734375 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace Quartet\Bundle\KakarotBundle\Service;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\NoResultException;
use Quartet\Bundle\KakarotBundle\Entity\CleanSchedule;
class CleanSchedulesService
{
/**
* EntityManager;
*/
private $em;
/**
* コンストラクタ
* @param $entityManager
... | true |
1edbaabf40eb4ef7d8a3b0b0cd21a04630a5fefc | PHP | UW-Madison-DoIT/caos-php-client | /src/main/classMeeting.php | UTF-8 | 4,342 | 3.390625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace edu\wisc\services\caos;
class classMeeting
{
/**
* @var string $meetingOrExamNumber
*/
protected $meetingOrExamNumber = null;
/**
* @var classMeetingType $meetingType
*/
protected $meetingType = null;
/**
* @var time $meetingTimeStart
*/
protect... | true |
c3cafbc96d8861dcd04796164b29f801ebbfb0f3 | PHP | jhovsepian/jacky-blog | /controller/create-post.php | UTF-8 | 964 | 3.078125 | 3 | [] | no_license | <?php
require_once (__DIR__ . "/../model/config.php");
// this sends info to the title in create-db
$title = filter_input(INPUT_POST, "title", FILTER_SANITIZE_STRING);
// this sends info to the post in create-db
$post = filter_input(INPUT_POST, "post", FILTER_SANITIZE_STRING);
$date = new DateTime('today');
$time... | true |
aaa64c3ff0fd4217216329ef9c1e813963f23eaa | PHP | lgngnr/php-rest-api | /api/product/read_single.php | UTF-8 | 861 | 2.9375 | 3 | [] | no_license | <?php
/** HEADERS */
header('Access-Control-Allow-Origin: *'); // public api
header('Content-Type: application/json');
include_once '../../config/Database.php';
include_once '../../models/Product.php';
/** Istantiate DB & connect */
$database = new Database();
$db = $database->connect... | true |
3db27d2546d5e1340c987f363831e6f752290382 | PHP | laitsky/uts-if430 | /friends.php | UTF-8 | 893 | 2.921875 | 3 | [] | no_license | <?php
require_once 'header.php';
echo "<div class='container'>";
if (!$loggedin) die("<div class='text-center'><h1>Kamu tidak dapat mengakses halaman ini!</h1></div>");
$result = query_my_sql("SELECT user FROM members ORDER BY user");
$num = $result->num_rows;
for ($i = 0; $i < $num; ++$i) {
$row = $result->fetch_... | true |
5971bfa729f1d56a8d584169c269d9b89afc37e5 | PHP | asaokamei/wsCore | /src/wsTests/DiContainer/DimpleMockBiz/Invoice.php | UTF-8 | 516 | 2.546875 | 3 | [] | no_license | <?php
namespace wsTests\DiContainer\DimpleMockBiz;
class Invoice implements \wsTests\DiContainer\DimpleMockDb\injectDbAccessInterface
{
/** @var \Database\DbAccess */
var $dba = NULL;
/**
* @DimInjection New \wsTests\DiContainer\DimpleMockDb\DbAccess
* @param $dba
*/
public function __c... | true |
442edcf5ec0b2b80c3c5bc566cc1f4504a744dca | PHP | ArpitaChatterjee/WPlanner-2 | /verifyemail.php | UTF-8 | 3,007 | 2.6875 | 3 | [] | no_license | <?php
$alert = "";
$error = "";
if(isset($_GET['email']) && !empty($_GET['email']) AND isset($_GET['hash']) && !empty($_GET['hash'])){
// Verify data
include ("connect.php");
$email = mysqli_real_escape_string($link, $_GET["email"]);
$password_hash = mysqli_real_escape_st... | true |
46335af3d724835e2303699314f4686d35fcfc0e | PHP | Ton3t/entornoservidor | /examenPHP/ejer03/clas_consulta.php | UTF-8 | 1,838 | 2.71875 | 3 | [] | no_license | <?php
class Consulta
{
public function insertarProducto($nombre, $anyo, $foto)
{
$conexion = new Conexion();
$pdoObjeto = $conexion->getConexion();
$sql = "INSERT INTO MASCOTAS (nombre, anyo_nac, foto) VALUES (:nombre, :anyo_nac, :foto)";
$consulta = $pdoObjeto->prepare($sql);
... | true |
fc5e819de71b16ba56fffc00e68bd107145c140f | PHP | pablogrubio/PHP | /untitled1/src/Project/Utils/ProjectDao.php | UTF-8 | 250 | 2.59375 | 3 | [] | no_license | <?php
namespace Project\Utils;
interface ProjectDao{
public function fetchAll($sql,$params=null);
public function fetch($sql,$params=null);
public function execute($sql,$params=null);
public function insert($sql,$params=null);
} | true |
b4fa522d2d1b3c6634aa40d4a3a42696469aba9e | PHP | DavidTrn/WebPrograming | /IntroduceBook/UpdateUserInfo.php | UTF-8 | 1,407 | 2.546875 | 3 | [] | no_license | <?php
session_start();
include("dbconnect.php");
//$input = (object) json_decode(file_get_contents('php://input'),true);
$method = $_SERVER['REQUEST_METHOD'];
switch ($method) {
case 'GET':
break;
case 'PUT':
break;
case 'POST':
$id = $_SESSION["userSession"];
$fname = $_POST["... | true |
ee1f410f30f9beb262259ac77948710577a0ef40 | PHP | Ameliergd/Web_LaboAnalyse | /medecin.php | UTF-8 | 4,155 | 2.546875 | 3 | [] | no_license | <?php
// ini_set('display_errors', 'on');
// error_reporting(E_ALL);
include('include/database.php');
include('include/userClass.php');
$_SESSION['uid'] = null;
$_SESSION['pid'] = null;
$userClass = new userClass();
$errorMsgLogin = '<br/>';
/* Login Form */
if (!empty($_POST['loginSubmit'])) {
$usernameEmail ... | true |
f22ade9e235577b8d5b37587384c3b8aabd3639f | PHP | develalfy/laminas-certificates | /module/Certificate/src/Model/DocumentInterface.php | UTF-8 | 108 | 2.5625 | 3 | [] | no_license | <?php
namespace Certificate\Model;
interface DocumentInterface
{
public function getUrl(): string;
} | true |
199ac23f5049a6f7a827bd568ec0899539372188 | PHP | amttmg/performance-appraisal | /app/Http/Requests/EmployeeCsvRequest.php | UTF-8 | 1,552 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class EmployeeCsvRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Ge... | true |
f9b345e507a95822ecbfa9a28dcb97c771ae6af0 | PHP | loganetherton/QM | /QualityMedia/branches/junior-am/base/protected/components/.svn/text-base/ActiveRecord.php.svn-base | UTF-8 | 1,412 | 3.03125 | 3 | [] | no_license | <?php
/**
* Active Record abstract class.
* Custom modifications to yii's CActiveRecord class.
*
* @author Jakub Pospiech <jakub@qualitymedia.com>
*/
abstract class ActiveRecord extends CActiveRecord
{
/**
* Prepare createdAt and updatedAt attributes before saving a record.
* This method is invoked b... | true |
664bfb19b9509ca0fe9fa901d6503dab8d4d7794 | PHP | YevhenArtiukh/onboarding | /src/Adapter/UserResults/UserResults.php | UTF-8 | 1,213 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Smile
* Date: 2020-04-24
* Time: 12:09
*/
namespace App\Adapter\UserResults;
use App\Entity\OnboardingTrainings\OnboardingTraining;
use App\Entity\UserResults\UserResult;
use App\Entity\UserResults\UserResults as UserResultsInterface;
use App\Entity\Users\User;
use Doctri... | true |
a32e8ce120442bec4fcfae5b4633321d978f6471 | PHP | miklobit/opencaching-pl | /lib/Objects/MeritBadge/CategoryMeritBadge.php | UTF-8 | 932 | 2.953125 | 3 | [] | no_license | <?php
namespace lib\Objects\MeritBadge;
class CategoryMeritBadge{
private $id;
private $name;
//////////////////////////////////////////////////////////////////////
// getField functions
//////////////////////////////////////////////////////////////////////
public functio... | true |
637ddfc68fd569e9bfa12c8c66c0163c5061305c | PHP | rohitsoni010/Doctor-sided-login | /doctor.php | UTF-8 | 2,465 | 2.65625 | 3 | [] | no_license | <?php session_start(); ?>
<html>
<?php
$mongo = new \MongoDB\Driver\Manager('mongodb://localhost:27017');
$bulk = new MongoDB\Driver\BulkWrite(['ordered' => true]);
$temp = [
'Patient Attended' => $_POST["patientattended"],
'Category' => $_POST["Category"],
'Hospital Name' => $_POST["hospital_name"],
... | true |
0f3ddf0a92b2679d3351e23e0c71e194beebf8fb | PHP | Sameldon930/hcTravel | /app/Http/Requests/StoreMarketingPost.php | UTF-8 | 1,162 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreMarketingPost extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Ge... | true |
d9d84fb08ab62ee489072aed87bee8af38846808 | PHP | TeryaevNikita/tests | /app/Services/Set/SimpleElement.php | UTF-8 | 161 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Set;
class SimpleElement
{
public $data;
public function __construct($data)
{
$this->data = $data;
}
}
| true |
b25b42bb0ed849e8fc7ae03716b7395e89960fec | PHP | mazhar-rony/pharmacy | /database/migrations/2021_02_24_000739_create_bank_accounts_table.php | UTF-8 | 1,247 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateBankAccountsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('bank_accou... | true |
d93e8bce261683ac1973f5a30cef2e5b8c6bbde4 | PHP | daveWid/Peyote | /classes/Peyote/PDO.php | UTF-8 | 1,490 | 3.28125 | 3 | [
"MIT"
] | permissive | <?php
namespace Peyote;
use \Peyote\Facade as Peyote;
/**
* A very simple wrapper for executing PDO based queries.
*
* @package Peyote
* @author Dave Widmer <dave@davewidmer.net>
*/
class PDO
{
/**
* @var \PDO The PDO instance used to query the database
*/
protected $pdo;
/**
* @param PDO $pdo... | true |
7ffcb043f1878cf77622d23dd883e187f8fc8bcd | PHP | haokj/yaostore | /application/common/Mysqlasync.php | UTF-8 | 1,770 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* 异步操作mysql
*/
namespace app\common;
class Mysqlasync
{
const HOST = '127.0.0.1';
const PORT = 3306;
const USER = 'root';
const PWD = 'hkj123';
const DATABASE = 'yao_store';
const CHARSET = 'utf8';
private static $obj = null;
// private static $db = null;
// ... | true |
467aa5c8fc2e7e901149a3360b7982aba17a1b23 | PHP | Dhruval-kamdar/realestate | /app/Model/Services.php | UTF-8 | 6,526 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Model;
use Illuminate\Database\Eloquent\Model;
class Services extends Model
{
//
protected $table ="services";
public function getdatatable(){
$requestData = $_REQUEST;
$columns = array(
0 => 'services.id',
1 => 'services.servicesName',
... | true |
714b800ace89d80bc91ae6d63a6000e7e0d9fa2f | PHP | princessowotade1/Mock-CompSci-Quiz | /Quiz.php | UTF-8 | 6,724 | 2.84375 | 3 | [] | no_license | <html>
<head>
<title> CS Quiz </title>
<link rel="stylesheet" href="./Quiz.css">
</head>
<body>
<?php
session_start();
# results.txt keeps track of a user's points for the quiz
$rf = fopen("results.txt", "a");
include "Login.php";
$name = ... | true |
75ee7d4215d391dc55496013147d471ba0798c90 | PHP | andreimoldovan23/Web | /AngularPhp/AngularVersion/api/grades.php | UTF-8 | 1,205 | 2.53125 | 3 | [] | no_license | <?php require("helper.php"); require("corsConfig.php");
configureCors();
session_start();
if (invalidateSession()) {
http_response_code(401);
} else {
renewSession();
}
if (checkIfStudent()) {
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "facultymanagement";
... | true |
62b25dcd0eab41f2ab61742273f56ba9e78432f9 | PHP | AternosMC/webcraft | /app/Http/Controllers/ChestController.php | UTF-8 | 2,184 | 2.5625 | 3 | [] | no_license | <?php
namespace Webcraft\Http\Controllers;
use Auth;
use Response;
use Validator;
use Illuminate\Http\Request;
class ChestController extends Controller
{
public function postSellItem(Request $request, $username)
{
$validator = Validator::make($request->all(), [
'piece' => 'required|numeric',
'price' => 'r... | true |
b6143d35851fa56fcbef57adacd7698415f666b5 | PHP | malizec/quantox-test-2 | /app/Libs/Database.php | UTF-8 | 980 | 3.046875 | 3 | [] | no_license | <?php
class Database
{
private $host;
private $user;
private $password;
private $db;
private $mysqli;
function __construct() {
$this->host = "localhost";
$this->user = "quantox";
$this->pass = "@GGyKNNZm8AXQWl33";
$this->data = "quantox";
... | true |
1b31b2d8d15f2311fb6dd920b28a34bf301a64fe | PHP | ozzner/nullpointpe | /cpanel_rade/utils/session.php | UTF-8 | 1,095 | 3.125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Renzo Santillán
* Date: 21/01/2015
* Time: 09:29 AM
*/
class sessionUtil {
private $session_name;
function __construct($session_name) {
$this->session_name = $session_name;
session_start();
}
public function storeMySess... | true |
b7251b56972eb6edfb39ca4dbb38869555770d67 | PHP | JBCaguioa/destina-travels-website | /viewpromoProcess.php | UTF-8 | 2,158 | 2.671875 | 3 | [] | no_license | <?php
session_start();
$mysqli = new mysqli('localhost','root','','destina') or die(mysqli_error($mysqli));
$update = false;
$id = 0;
$promo_image = '';
$promo_title = '';
$promo_desc = '';
$promo_price = '';
$promo_cost='';
if(isset($_POST['savePromo'])){
$promo_image = $_POST['promo_image'];
$promo_title = $_... | true |
3ca1377fbe73d1284a016602f5cbb0ac7c040077 | PHP | bochamsua/vac_e_co_t_c | /app/code/local/BS/Traininglist/Block/Adminhtml/Helper/Column/Renderer/Category.php | UTF-8 | 1,146 | 2.515625 | 3 | [] | no_license | <?php
/**
* BS_Traininglist extension
*
* @category BS
* @package BS_Traininglist
* @copyright Copyright (c) 2015
*/
/**
* related entities column renderer
* @category BS
* @package BS_Traininglist
* @author Bui Phong
*/
class BS_Traininglist_Block_Adminhtml_Helper_Column_Rendere... | true |
ae4a887fe3f39a54a1a4ed127cad39eadc1c11fd | PHP | SlateFoundation/slate | /php-classes/Emergence/People/ContactPoint/IContactPoint.php | UTF-8 | 502 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Emergence\People\ContactPoint;
interface IContactPoint extends \Serializable
{
public function __toString();
public function toString();
public function toHTML();
public function loadString($string);
public static function fromString($string);
public static function fromSeriali... | true |
ebc7b8c01c00e18ace32281a2de045c8dc884a0d | PHP | sayghteight/Caranille | /modules/dungeon/index.php | UTF-8 | 2,049 | 2.84375 | 3 | [
"CC-BY-4.0",
"CC-BY-3.0"
] | permissive | <?php require_once("../../html/header.php");
//S'il n'y a aucune session c'est que le joueur n'est pas connecté alors on le redirige vers l'accueil
if (empty($_SESSION)) { exit(header("Location: ../../index.php")); }
//Si le joueur n'est pas dans une ville on le redirige vers la carte du monde
if ($characterTownId ==... | true |
34cbadb217cb4ae8a8cbd12679a8e659fb882453 | PHP | hieptdbn99/order-management | /app/Product.php | UTF-8 | 887 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Product extends Model
{
//
/**
* The oder that belong to the Product
*
* @return \Illuminate\Database\'Order'lations\BelongsToMany
*/
protected $table = 'products';
// Khởi ạo khóa ngoại bảng trung gian quan hệ n... | true |
8c5ce1392000d4d810e219dbcc3395987d0b55e7 | PHP | rafaelbrteixeira/yearbook | /verificarLogin.php | UTF-8 | 1,981 | 2.5625 | 3 | [] | no_license | <?php
session_start();
require_once("./conf/confBD.php");
$autoLogin=false;
if(isset($_COOKIE["loginAutomatico"])){
$user = utf8_encode(htmlspecialchars($_COOKIE["user"]));
$senha = utf8_encode(htmlspecialchars($_COOKIE["loginAutomatico"]));
$autoLogin=true;
}
... | true |
f649fa8ceec4491734463d2b2df6441d82bfcc84 | PHP | maduong/base | /src/Repositories/Contracts/AbstractRepositoryContract.php | UTF-8 | 1,533 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php namespace Edutalk\Base\Repositories\Contracts;
use Edutalk\Base\Criterias\AbstractCriteria;
use Edutalk\Base\Models\Contracts\BaseModelContract;
use Illuminate\Support\Collection;
use Edutalk\Base\Exceptions\Repositories\WrongCriteria;
use Edutalk\Base\Criterias\Contracts\CriteriaContract;
use Illuminate\Paginat... | true |
5379603e3b454a0cccc7e572b1a97a060c3eed36 | PHP | isaacvandevelde/SENSHITEST | /isaacvandevelde.github.io-main/insert.php | UTF-8 | 751 | 2.609375 | 3 | [] | no_license | <?php
include_once 'db.php';
if(isset($_POST['submit']))
{
$name = $_POST['name'];
$vnaam = $_POST['Voornaam'];
$email = $_POST['email'];
$mobile = $_POST['mobile'];
$street = $_POST['street'];
$postalcode = $_POST['postalcode'];
$city = $_POST['city'];
$country = $_POST['country... | true |
3dd82fffbec29e55f18be99a482d0dd622f04db4 | PHP | PHP-7-PM/Test | /src/pemapmodder/worldeditart/utils/StringWriter.php | UTF-8 | 1,593 | 2.984375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace pemapmodder\worldeditart\utils;
use pocketmine\utils\Binary;
class StringWriter{
private $buffer = "";
public function append($str){
$this->buffer .= $str;
}
public function appendBString($str){
$this->buffer .= chr(strlen($str));
$this->buffer .= $str;
}
public function ap... | true |
990e94b6bce4ec2cb170af422ecc7bf356350f08 | PHP | bastienbonnamant/friend2 | /createfriend.php | UTF-8 | 859 | 2.78125 | 3 | [] | no_license | <?php
include'./connec.php';
include'./navbar.php';
if(isset($_POST['submit']) && $_POST['submit']<>''){
$sql = "INSERT INTO FRIEND VALUES(null, '".$_POST['firstname']."', '".$_POST['lastname']."')";
$result = $pdo->exec($sql);
if($result){
echo'<h2>Bienvenu mon ami</h2>';
}else{
echo... | true |
afffde0716a9d793632fe39620435a3f9208c376 | PHP | kingakidi/sydeestack_devpro_01 | /dashboard/control/action.php | UTF-8 | 3,900 | 2.640625 | 3 | [] | no_license | <?php include 'connection.php';
include 'function.php';
// REGISTER QUERY
if (isset($_POST['register'])) {
// POST VALUES FROM REGISTRED PAGE
$error = 0;
$fullname = checkFormData($_POST["fullname"]);
$email = checkFormData($_POST["email"]);
$phone = checkFormData($_POST["phone"]);
$password = checkPas... | true |