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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
e302059cb93720d045854cedad247b82cabc62ae | PHP | casahugo/battlegame | /src/Collection/RoundCollection.php | UTF-8 | 1,779 | 2.90625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Collection;
use App\Player;
use App\Round;
class RoundCollection extends \NoRewindIterator
{
private PlayerCollection $players;
private const DEFAULT_RESULT = 0;
/** @var array<string, int> */
private array $results = [];
public function __constru... | true |
81867da5a44d60038787375c5a01d8e461c557ef | PHP | ccorlatti/AlCentavo | /library/dao/generated/BaseTransactioncomment.php | UTF-8 | 1,160 | 2.59375 | 3 | [] | no_license | <?php
/**
* BaseTransactioncomment
*
* This class is member of the DAO layer.
*
* @author Claudio Corlatti <corlatti@gmail.com>
* $Id$
*/
abstract class BaseTransactioncomment extends Doctrine_Record {
public function setTableDefinition()
{
$this->setTableName('transactionco... | true |
e8e97594b03304899534898d8dda3f21c87a6d69 | PHP | darthmanwe/addrgen | /php/addrgen.php | UTF-8 | 6,739 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright (c) 2012 Matyas Danter
* Copyright (c) 2012 Chris Savery
* Copyright (c) 2013 Pavol Rusnak
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, ... | true |
1552449c379f15f66003f952b395f3e9f7864a40 | PHP | scottsousa/pmpro-social-locker | /pmpro-social-locker/pmpro-social-locker.php | UTF-8 | 2,808 | 2.828125 | 3 | [] | no_license | <?php
/**
* Plugin Name: PMPro Social Locker
* Description: Integrate PMPro with the Social Locker plugin from OnePress (http://wordpress.org/support/plugin/social-locker). The goal is to give a user a free membership if they interact with Social Locker.
* Version: 0.1
* Author URI: http://www.slocumstudio.com/
* ... | true |
f9f5b9bd9079546adebae2f63b45c4a5fa9a46d8 | PHP | VinceLim68/auto | /test/test.php | UTF-8 | 4,686 | 2.875 | 3 | [] | no_license | <?php
$mysqli = new mysqli('localhost', 'root', '', 'property_info');
header("Content-type:text/html;charset=utf-8");
$maxnum = 50; //每页记录条数
$query1 = "SELECT COUNT(*) AS totalrows FROM for_sale_property ";
$result1 = $mysqli->query($query1) or die($mysqli->error);
$row1 = $result1->fetch_assoc();
$totalRows1 = $row1... | true |
b275d519aab225cc2feabf47088bf68033385894 | PHP | SoleSS/yii2-quiz | /models/QuizTest.php | UTF-8 | 1,945 | 2.546875 | 3 | [] | no_license | <?php
namespace soless\quiz\models;
use Yii;
use yii\db\Expression;
use yii\helpers\ArrayHelper;
/**
* This is the model class for table "quiz_test".
*
* @property int $id
* @property string $title Наименование
* @property string|null $description Описание
* @property string|null $questions_list Список вопросо... | true |
4451f34701a110eb24bc5af96a24a86296e96562 | PHP | Diegoni/mutual | /respuestabuscarsaldo.php | UTF-8 | 6,820 | 2.78125 | 3 | [] | no_license |
<?php
include_once("menu.php");
?>
<!--------------------------------------------------------------------
----------------------------------------------------------------------
Cuerpo de la pagina
----------------------------------------------------------------------
------------------------------------------... | true |
c14476bff10fd213bffca6a15b14fa6df9e40e8f | PHP | bryly27/codingDojoAssignments | /projects/eCommerce/application/controllers/wall.php | UTF-8 | 4,018 | 2.5625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Wall extends CI_Controller
{
public function index()
{
$this->load->library('form_validation');
$this->load->view('main');
// $this->session->sess_destroy();
}
//---------------------registering---------------------------
pu... | true |
7d2d4139f53f5bfca35db893d6d57b4f46ffeecc | PHP | llamani/cdp | /api/src/Entity/Project.php | UTF-8 | 5,454 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\ProjectRepository")
* @ORM\Table(name="projects")
*/
class Project
{
/**
* @ORM\Id()
* @ORM\Gene... | true |
795b2c3768b50857729b739118bead2197ede5c2 | PHP | alifrio75/pg-schedule | /frontend/models/Atlet.php | UTF-8 | 2,421 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "atlet".
*
* @property int $id
* @property string $name
* @property int $country
* @property string $avatar
* @property string $birthday
* @property string $gender
* @property int $umur
*
* @property Countries $country0
* @prope... | true |
4b606eb1abd7b134d4470d8ffee17836a4cdbb62 | PHP | SamihaTahsin1/studentmanagement | /application/controllers/Admin.php | UTF-8 | 5,157 | 2.546875 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Admin extends CI_Controller {
public function __construct()
{
parent::__construct();
if (!$this->session->userdata('user_id')) {
return redirect(base_url());
}
}
public function dashboard()
{
$this->load->model('queries');
... | true |
9ae9b74006c87d3ab5db02854bdd188a9e2b121e | PHP | Ferreira17dtr/SistRedeslogin1 | /filmes_edit.php | UTF-8 | 1,737 | 2.765625 | 3 | [] | no_license | <?php
if($_SERVER['REQUEST_METHOD']=="GET"){
if (isset($_GET['filme']) && is_numeric($_GET['filme'])) {
$idFilme = $_GET['filme'];
$con = new mysqli ("localhost","root","","filmes");
if ($con->connect_errno!=0) {
echo "<h1>Ocorreu um erro no acesso à base de dados. <br>" .$con->conect_error. "</h1>"... | true |
c3aafb4e2cf7b1f8c0ec7d580180a288476de8ff | PHP | winatawelly/skripsi | /code/datasetGenerator/createJson/createDatasetJson.php | UTF-8 | 10,448 | 2.625 | 3 | [] | no_license | <?php
$data = file_get_contents("../dataset/datafile/season14-15/season_stats.json");
$data1 = file_get_contents("../dataset/datafile/season15-16/season_stats.json");
$data2 = file_get_contents("../dataset/datafile/season16-17/season_stats.json");
#$dataValid = file_get_contents("dataset/datafile/season17-18/season_st... | true |
cb02e00a691c1061afcf56b21cc5d625450912db | PHP | MiguelKersch/php-morning | /guttentag.php | UTF-8 | 875 | 2.734375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?php
$offset = strtotime("1 hours");
date_default_timezone_get('Europe/Amsterdam');
echo "The time is " . date("h:i", $offset);
$ochtend = date("6:00");
$middag = date("12:00");
$avond = date("18:00");
$nacht = date("0:00");
$tijd = d... | true |
d175f3728d4aa13b16c072b6453c091642b34d0d | PHP | Apurva-tech/IWP-CSE3002 | /Lab-DA-3/Q6/Q6.php | UTF-8 | 387 | 2.84375 | 3 | [] | no_license | <?php
$total_count = 0;
if(isset($_COOKIE['count'])){
$total_count = $_COOKIE['count'];
$total_count ++;
}
if(isset($_COOKIE['last_visit'])){
$last_visit = $_COOKIE['last_visit'];
}
setcookie('count', $total_count);
setcookie('last_visit', date("H:i:s"));
if($total_count == 0){
echo "Welcome! We are glad to see you he... | true |
a1ba740e41201e4545176933b6fbce2d15559029 | PHP | kktsvetkov/asido.kaloyan.info | /examples/resize/example_05.phps | UTF-8 | 1,491 | 2.890625 | 3 | [] | no_license | <?php
/**
* Resize Example #05
*
* This example shows the `passepartout` resize which resizes the image
* proportionally, but the result has the proportions of the provided width and
* height with the blank areas filled with the provided color. In the case we are
* resizing a 640x480 image by making it fit in... | true |
7aabbf7910e00a8074605224676c3db9b337e614 | PHP | atlcurling/tkt | /tkt0.1/bargraph.php | UTF-8 | 882 | 3.234375 | 3 | [] | no_license | <?php
function barfrag($col, $wid = 16)
{
echo "<span style='border: black 1px solid; background-color: $col; padding: 0 {$wid}px 0 0;'></span>";
}
function bargraph($x, $xcol, $n = 0, $ncol = "", $wid = 16)
{
if ($n == 0) $n = $x;
if ($ncol == "") $ncol = $xcol;
echo "<span style='border: black 1px solid'>";
f... | true |
1883e34a7686a6b1687407c7a8acf31f2e55a055 | PHP | jakflo/astromen_symfony | /src/Forms/DataObjects/AstromanAdd.php | UTF-8 | 2,876 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Forms\DataObjects;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\Length;
use App\Forms\MyConstraints\CzDate;
use Symfony\Component\Validator\Constraints\IsTrue;
use Symfony\Component\Validator\Mapping\ClassMetadata;
use App\Entity\Models\A... | true |
7c61207b0aeba54096b3b26b157650ac486f8eeb | PHP | roelti/rentalshop | /product_pdf.php | UTF-8 | 1,155 | 2.671875 | 3 | [] | no_license | <?php
// ------------- Pdf File Attachment Function ------------- \\
# Adds a pdf download section to the description of a single product page
function show_product_pdf($content){
// Only for single product pages (woocommerce)
if (is_product()){
global $post;
$custom_content = "";
... | true |
939f08870b2bbc8e249346d0d0a4ecf041c1fa02 | PHP | jel-massih/APISearch | /inc/processRequest.php | UTF-8 | 1,635 | 2.59375 | 3 | [] | no_license | <?php
include_once('flaggedKeywords.php');
include_once('twilioHandler.php');
include_once('sendGridHandler.php');
include_once('mongoHandler.php');
if($_GET['q'] == null) { return;}
$query = $_GET['q'];
$keywordSearchVersion = preg_replace('/".*?"/', "", $query);
$file = file_get_contents('http://access.alchemyap... | true |
be986c30461839fabbc66938dea29872a229ce6a | PHP | RodriGerometta/CursoWeb | /php/clase 2/ejercicio 2.php | UTF-8 | 654 | 3.671875 | 4 | [] | 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>Ejercicio 2</title>
</head>
<body>
<?php
//punto ... | true |
fae6147a6c3b9f3cbd74cdae019ab245024adaff | PHP | CodeaciousAU/phplib-security | /src/Session/SessionStore.php | UTF-8 | 1,718 | 2.765625 | 3 | [] | no_license | <?php
/**
* @author Glenn Schmidt <glenn@codeacious.com>
*/
namespace Codeacious\Security\Session;
use Codeacious\Security\Authentication\Assertion;
use Codeacious\Security\User;
use Laminas\Session\Container;
/**
* Provides functionality for setting or clearing the current web session user. The session user is
... | true |
8992becde75306dae42be2db5827f2d73c04d1e8 | PHP | veebayerr/Inventory_Mgmt | /PHP Source Code/payment_report.php | UTF-8 | 3,500 | 2.84375 | 3 | [] | no_license | <?php
$servername = 'localhost'; //dont chanage
$username = 'php'; //username for the application
$password = 'dnFRr196rsSK7s0i'; //login credentials php has access to insert and select
$dbname = 'joomla'; //should never need to be changed
$userId = "Null"; //passed from joomla to this application
$storeNo =... | true |
e9caf21aa8302ea49f28849bd6ecf1328dff0c12 | PHP | bishopj88/LaraGab | /src/Traits/EngagePostTrait.php | UTF-8 | 2,227 | 2.859375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php namespace BishopJ88\LaraGab\Traits;
use Exception;
Trait EngagePostTrait {
/**
* Upvotes given post.
*
* @param array $parameters postID ~ Post ID
*
* @return string Returns JSON.
*/
public function postUpvote( $parameters = ['postID' => ''] )
{
return $this->post('https://api.g... | true |
1ee2999b1d3708ad4dfb575ed737fcc97a9ba3a9 | PHP | AlekefromKz/PHP-GlobalCare | /insurance_types/additional/errors/start-end.php | UTF-8 | 424 | 3.125 | 3 | [] | no_license | <?php
if($StartDate == ''){ $errors[] = 'Enter start date!';}
if($EndDate == ''){ $errors[] = 'Enter end date!';}
if($StartDate < date("Y-m-d")){$errors[] = 'Start date can not be earlier than today!!!';}
if($StartDate > $EndDate){$errors[] = 'Start date can not be earlier than end date!';}
if($Star... | true |
aafa619b051f9ee6b4c879089be2927f18929685 | PHP | preetyverma20/Web-Development-Course | /Web Development/MySQL/viewdata.php | UTF-8 | 347 | 2.703125 | 3 | [] | no_license | <?php
include_once 'connect.php';
$query = "select * from `users` where id>4 order by name desc limit 3";
$result = mysqli_query($con,$query);
if(mysqli_num_rows($result)!=0){
while($row = mysqli_fetch_array($result)){
echo $row["id"]." ".$row["name"]." ".$row["age"]." ".$row["qualification"]."<br>";
}
}els... | true |
9bd2ee8b0ff3ef3a5774179026b164035ee7afe5 | PHP | cmooreitrs/monitor-ninja | /modules/reports/libraries/Sla_options.php | UTF-8 | 4,068 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php defined('SYSPATH') OR die('No direct access allowed.');
/**
* Report options for SLA reports
*/
class Sla_options extends Report_options {
public static $type = 'sla';
static function discover_options($input = false) {
# not using $_REQUEST, because that includes weird, scary session vars
if (!empty($in... | true |
483e6f71ce6c043e1904218e808ec64331fd2565 | PHP | rossriley/php-scalar-objects | /tests/StringHandlerTest.php | UTF-8 | 1,787 | 2.84375 | 3 | [] | no_license | <?php
namespace Spl\Scalars\Tests;
class StringHandlerTest extends \PHPUnit_Framework_TestCase {
public function setup() {
}
public function testCapitalize()
{
$str = "hello world";
$this->assertEquals($str->capitalize(), "Hello World");
}
public function testCaseCompare()
{
$str = "hel... | true |
edb2a7e9887d17424652fd71807469bb260d5807 | PHP | aldocf/ta_survey | /model/Responden.php | UTF-8 | 1,894 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ACF
* Date: 16/02/2018
* Time: 10:36
*/
class Responden
{
private $id_responden;
private $jabatan;
private $nama_perusahaan;
private $id_user;
private $pendidikan;
private $lamaBekerja;
/**
* @return mixed
*/
public function getIdR... | true |
e8ddeda32499544aa6b7494cfa9cc506f61025a1 | PHP | nagnit4enko/example | /App/Core/View.php | UTF-8 | 1,427 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Core;
class View {
public $user = [];
public $property = [
'header' => true
];
function __construct($user){
$this->user = $user;
}
function render($content_view, $template_view = null, $data = null) {
$theme = ($template_view ? $template_view : $content_view);
... | true |
525a39cec3808d3b6bd8e25fbe23092c6eb8d8fd | PHP | rheehot/countryside-partner-laravel | /app/Http/Controllers/OpenApiChatController.php | UTF-8 | 2,938 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Exceptions\MeteoException;
use App\Services\OpenApiChatService;
use GuzzleHttp\Client as HttpClient;
use Illuminate\Http\Request;
use Validator;
use Exception;
/**
* Class OpenApiChatController
* @package App\Http\Controllers
*/
class OpenApiChatController extends Con... | true |
117e7abe5d79bc8520180247384711fb074a2394 | PHP | MuZiShark/utilities | /php/http/get_headerArray.php | UTF-8 | 522 | 2.796875 | 3 | [] | no_license | <?php
$url = 'http://www.baidu.com/';
$headerArray = get_headers($url, 1);
//var_dump($headerArray);
// 将数组序列化后写入文件中
$file = 'headerArray.txt';
file_put_contents($file, serialize($headerArray));
$headerArray2 = unserialize(file_get_contents($file));
//var_dump($headerArray2);
// 从文件中反序列化得到数组
$handle ... | true |
975056dcac8a4d469be1b82900888ae685d0e1f6 | PHP | mirea-fcyb-2015/ratings | /rating/discForm.php | UTF-8 | 2,489 | 2.640625 | 3 | [] | no_license | <?php
include_once'../utils.php';
printHeader();
//----------------------------------------------------------------------------------------------------------------------
$dbconnect = pg_connect("host=localhost dbname=ratings user=postgres password=123456") or die('Could not connect: ' . pg_last_error());
//---------... | true |
1f1638eec09acfcd3ab8eed405d8ea5752cc8ce2 | PHP | ARCANEDEV/php-html | /src/Elements/Link.php | UTF-8 | 1,462 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Arcanedev\Html\Elements;
/**
* Class Link
*
* @author ARCANEDEV <arcanedev.maroc@gmail.com>
*/
class Link extends HtmlElement
{
/* -----------------------------------------------------------------
| Properties
| ---------------------------------------... | true |
0947c05fd78b955895bf297059297bb8f39498c6 | PHP | oazist/ComSecureCTF | /include/logout.inc.php | UTF-8 | 726 | 2.625 | 3 | [] | no_license | <?php
// Start session
session_start();
// Include required functions file
require_once('loginfunction.inc.php');
// If not logged in, redirect to login screen
// If logged in, unset session variable and display logged-out message
if (check_login_status() == false) {
// Redirect to
... | true |
9814509945fff40b2c584bcab437b3cdb0c969c5 | PHP | nguyenhoang24695/myEdu | /app/Models/ExternalSource.php | UTF-8 | 2,326 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: hocvt
* Date: 11/18/15
* Time: 08:04
*/
namespace App\Models;
use App\Core\MyStorage;
use Illuminate\Database\Eloquent\Model;
/**
* App\Models\ExternalSource
*
* @property integer $id
* @property integer $course_content_id
* @property integer $user_id
* @property ... | true |
45bbb4655c8eb51965ca898044debb60cff78ce4 | PHP | shun989/Mang-Ham-PHP | /MyExcercise/index.php | UTF-8 | 3,589 | 2.5625 | 3 | [] | no_license | <?php
$customerList = array(
"1" => array("ten" => "Lộc văn Khôi",
"ngaysinh" => "1995/11/11",
"diachi" => "Lạng sơn",
"anh" => "image/khoi.jpeg"),
"2" => array("ten" => "Nguyễn văn Trọng",
"ngaysinh" => "2001/12/03",
"diachi" => "Lào cai",
"anh" => "image/trong.j... | true |
10b5da8cdd535e904ddd89b9370b52de54bfd68e | PHP | nazmulpcc/runner | /src/Compilers/JavaCompiler.php | UTF-8 | 901 | 2.71875 | 3 | [] | no_license | <?php
namespace nazmulpcc\Compilers;
use nazmulpcc\Traits\HasVersions;
/**
* Java compiler class
*/
class JavaCompiler extends BaseCompiler
{
use HasVersions;
public function __construct($code, $object = false)
{
$object = $object ? : dirname($code). "/Main.class";
parent::__construct($code, $object);
$t... | true |
5eccfabd7aad11cae5b75de69be01e345ea9e751 | PHP | surajnair04/Cycling_safety | /public_html/create_account.php | UTF-8 | 1,371 | 2.625 | 3 | [] | no_license | <?php
session_start();
$email = $_POST["Email"];
$pwd = $_POST["Password"];
$username = $_POST["userName"];
$experience = $_POST["experienceLevel"];
//echo 'email: '.$email.'<br/>';
//echo 'pwd: '.$pwd.'<br/>';
//echo 'option: '.$experience.'<br/>';
$db_name = "cy... | true |
5df0a688134cb833306331dfba1ce7531f7d012f | PHP | dehero/fastred | /modules/locale.php | UTF-8 | 9,502 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
if (!defined('LOCALE_DEFAULT')) {
define('LOCALE_DEFAULT', 'en-US');
}
if (!defined('LOCALE_LIBRARY_PATH')) {
define('LOCALE_LIBRARY_PATH', __DIR__ . '/../locales/');
}
$__LOCALE_LIBRARIES = array();
if (!function_exists('locale')) {
function locale($value = null) {
static $locale = LOC... | true |
f3d312220ade920ac01370779a2f42f2e524021c | PHP | lightools/bitbang-http-logger | /src/BitbangLogger/Formatters/IFormatter.php | UTF-8 | 392 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Lightools\BitbangLogger\Formatters;
use Bitbang\Http\Message;
/**
* @author Jan Nedbal
*/
interface IFormatter {
/**
* @param Message $message HTTP request or response
* @return bool
*/
public function canFormat(Message $message);
/**
* @param string|array $body HT... | true |
1e5e571786aa3dee6faaeae7cc68a08ad7568e72 | PHP | vedmant/laravel-shortcodes | /src/helpers.php | UTF-8 | 294 | 2.5625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
use Illuminate\Support\HtmlString;
if (! function_exists('shortcodes')) {
/**
* Render shortcodes.
*
* @param string $string
* @return string|HtmlString
*/
function shortcodes($string)
{
return app('shortcodes')->render($string);
}
}
| true |
2dff4416d2f9c5b0ed42f496eb4f07225baaf048 | PHP | paysera/lib-php-cs-fixer-config | /src/Fixer/PhpBasic/CodeStyle/ClassNamingFixer.php | UTF-8 | 6,161 | 2.59375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Paysera\PhpCsFixerConfig\Fixer\PhpBasic\CodeStyle;
use PhpCsFixer\AbstractFixer;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverRootless;
use PhpCsFixer\FixerConfiguration\FixerOptionBuilder;
use PhpCsFixer\FixerDefinition\CodeSample;
use PhpCsFixer\FixerDefinitio... | true |
444d23a2abaae3e6e1ab50c85fc87ad03f30cea2 | PHP | BibakBangTeam/Spammer | /spamer.php | UTF-8 | 2,379 | 2.515625 | 3 | [] | no_license | <?php
define('API_KEY','303323571:AAFeY2yE2Q8LL5aA7VKpV4ELIB_NsFN8xRE');
/*
created by DR.RASMUS && @DR_RASMUS && @VIZARD_TM
*/
//----######------
function makereq($method,$datas=[]){
$url = "https://api.telegram.org/bot".API_KEY."/".$method;
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
cur... | true |
66aed05279b60aad27f6ec05d401d54fa73a7d9b | PHP | rohanraghuwanshi/PHP_Login-and-Register | /dbconnect.php | UTF-8 | 374 | 2.71875 | 3 | [] | no_license | <?php
$ds = "mysql:host=localhost;dbname=Student";
$username = "root";
$password = "";
try{
$GLOBALS['db'] = new PDO($ds, $username, $password);
$db -> setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
}catch(PDOException $e){
$error_message = $e->getMessage();
... | true |
056a1edcd61caf0ef1a742928ddcd3c2c33dbf0b | PHP | Suylo/Sharing-Pictures | /app/models/User.php | UTF-8 | 2,881 | 3.171875 | 3 | [] | no_license | <?php
namespace App\models;
class User
{
/**
* @var int - User ID - IMPORTANT in order to identificate user.
*/
private $userID;
private $picturesCollection;
/**
* @vars - Identification IRL user
*/
private $firstName;
private $lastName;
private $address;
privat... | true |
954fd07b19964f5f98fd903ac362bedb208049ea | PHP | imneha/apart_api | /app/Commands/Acl/AddRoleModulePermission.php | UTF-8 | 881 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php namespace ApartmentApi\Commands\Acl;
use ApartmentApi\Models\AclRoleResourcePermission;
use Api\Commands\CreateCommand;
class AddRoleModulePermission extends CreateCommand
{
protected $permission;
protected $aclRole;
protected $rules = [
];
public function __construct($request, $... | true |
8f15e7b46c2546f8b109dc4fc285edd023c151ad | PHP | xboston/phalcon-code | /codes/1.2.0/api/Phalcon_Mvc_Model/Phalcon_Mvc_Model-379.php | UTF-8 | 328 | 2.859375 | 3 | [] | no_license | <?php
//What is the maximum robot id?
$id = Robots::maximum(array( 'column' => 'id' ));
echo "The maximum robot id is: " , $id , "\n";
//What is the maximum id of mechanical robots?
$sum = Robots::maximum(array( "type='mechanical'" , 'column' => 'id' ));
echo "The maximum robot id of mechanical robots is " , $id , "\... | true |
130a8b664f85103559f05fe69d77d3dda5ff889e | PHP | juhimulchandani/Content-Management-System | /classes/Posts.class.php | UTF-8 | 6,814 | 3.046875 | 3 | [] | no_license | <?php
class Posts{
private $table = "posts";
private $post_author;
private $post_id;
private $post_category_id;
private $post_title;
private $post_body;
private $post_tags;
private $post_author_id;
private $post_status;
private $post_date;
private $post_image;
private $cr... | true |
2e682af25c6c6d148f3ec170be2a9d0a45987119 | PHP | MohsenMohammadkhani/example-design-patterns-php | /src/structural/flyweight/Faker/UserProfile.php | UTF-8 | 285 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace src\structural\flyweight\Faker;
class UserProfile
{
private $gender;
private $age;
private $city;
public function __construct($gender, $age, $city)
{
$this->gender = $gender;
$this->age = $age;
$this->city = $city;
}
}
| true |
1fbf9c4e57706ef5f021802abb5990342668b21b | PHP | NetassistArtem/switch_diagnostics | /Library/Session.php | UTF-8 | 3,018 | 2.6875 | 3 | [] | no_license | <?php
class Session
{
public static $flash_messages = array();
public static function has($key)
{
return isset($_SESSION[$key]);
}
public static function set($key, $val)
{
if ($key !== 'flash') {
return $_SESSION[$key] = $val;
}
re... | true |
9b1938f0935ff0ec5beb4c7627f59ef57a76f0a1 | PHP | aphoe/benjy-leave | /database/seeds/customer/RolesSeeder.php | UTF-8 | 2,038 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use App\Customers\Models\Role;
use App\Customers\Models\RoleDefinition;
use Illuminate\Database\Seeder;
class RolesSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$roles = [
[
'name' => 'admin',... | true |
ddcf765c2edd43ae268dbc2045d387044a33a5f3 | PHP | bruce1237/OA | /app/lib/contractMaker/LogoApplyContractMaker.php | UTF-8 | 5,195 | 2.578125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2019-04-15
* Time: 10:10
* Used:
*/
namespace App\Lib\contractMaker;
class LogoApplyContractMaker extends ContractMaker
{
protected $wordDummySealName = "image1.png";
protected $contractTemplate = 1;
/**
* @param int $orderId
... | true |
2dff98a7e32e07a5966670e9381753d7f4e52dd9 | PHP | alexmon1989/diplinth | /app/Product.php | UTF-8 | 1,710 | 2.671875 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Product extends Model
{
use \Dimsav\Translatable\Translatable;
public $translatedAttributes = ['title', 'description'];
protected $fillable = ['in_stock', 'enabled'];
/**
* The relations to eager load on every query.
*
... | true |
c0f1fc2eee5c81f77e14abae035efbcde2385365 | PHP | nix-php-training/ads-board1 | /framework/classes/Route.php | UTF-8 | 3,400 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace application\classes;
use application\core\Error;
class Route
{
private $routes;
private $controller;
private $action;
private $params = array();
public function __construct($app){
// Получаем конфигурацию из файла.
$settings = Registry::get();
$this->routes ... | true |
3fcaa1e8262eb86ee817c69eda502bec276a6a56 | PHP | spujadas/exposure | /lib/Exposure/Model/ProjectWant.php | UTF-8 | 1,939 | 2.6875 | 3 | [
"MIT",
"Apache-2.0",
"LicenseRef-scancode-public-domain"
] | permissive | <?php
/*
* This file is part of the Exposure package.
*
* Copyright 2013 by Sébastien Pujadas
*
* For the full copyright and licence information, please view the LICENCE
* file that was distributed with this source code.
*/
namespace Exposure\Model;
class ProjectWant extends Comment {
protected $id = null... | true |
ecc93e1b268d9e378f0944293b7deb91b54a9ebb | PHP | bjorvack/image-stacker | /src/Tests/StylesheetExporterTest.php | UTF-8 | 1,597 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Bjorvack\ImageStacker\Tests;
use Bjorvack\ImageStacker\Exporters\StylesheetExporter;
use Bjorvack\ImageStacker\Helpers\StringTransformer;
use Bjorvack\ImageStacker\Image;
use Bjorvack\ImageStacker\Stacker;
class StylesheetExporterTest extends BaseTest
{
private $fileName;
private $storagePat... | true |
a3fcf493cbaab070740a9e870d3cd283d6affa07 | PHP | c2Vuc2Vp/yumeres | /rs/catalog/index_original.php | UTF-8 | 22,684 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
$assets = '../assets/';
$vendor = '../../vendor/';
$js = '../files/js/';
$img = '../files/img/';
$css = '../files/css/';
/////////////////////////
// demarrer la session //
/////////////////////////
session_start();
////////////////////////////////////////////////////... | true |
39ee67c7bfbf39103d24650977a9d41c5fae2217 | PHP | menthol/laravel-relationships-examples | /app/Report.php | UTF-8 | 705 | 2.53125 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
* App\Report
*
* @property integer $id
* @property integer $user_id
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
* @property-read \App\User $user
*/
class Report extends Model
{
public function articles()
... | true |
1bca2635669954d87eaa357314421b90ba3ebd2d | PHP | sergio-toro/algorithmic-pleasure | /src/Storo/Math/SumNaturals.php | UTF-8 | 2,299 | 3.734375 | 4 | [
"Apache-2.0"
] | permissive | <?php
namespace Storo\Math;
class SumNaturals
{
/**
* Returns the sum of all natural numbers below $limit that are
* multiples of $a or $b, not in a efficient way.
* @param integer $a
* @param integer $b
* @param integer $limit
* @return integer
*/
public function sumIfMu... | true |
9779b4ff4fb47dd1eac1e28f3bfd33ecbb56a8b3 | PHP | jyan0080/its-pawsibal | /database/migrations/2020_05_17_072756_create_suburbareaaffected_table.php | UTF-8 | 801 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSuburbareaaffectedTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('subu... | true |
36cd4c8ff5ba5e5ea974f9e643e1f0414f5d5db5 | PHP | ThemeHow/julemagne | /contact.php | UTF-8 | 1,724 | 2.734375 | 3 | [] | no_license | <?php
$SUBMIT_FROM = 'Julemagne.com <noreply@julemagne.com>';
$SUBMIT_TO = 'iamthetimekiller@gmail.com';
if( !isset($_POST) )
die( 'Quit hacking!' );
$valid = true;
$errors = array();
//
// Submission data
//
$ipaddress = $_SERVER['REMOTE_ADDR'];
$date = date('m/d/Y');
$time = date('H:i:s');
$useragent = $_SERV... | true |
8f6aa9ce2379177d73d99eba9b8f677d68efed30 | PHP | eversudip/officelife | /app/Services/QueuableService.php | UTF-8 | 381 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace App\Services;
use Throwable;
/**
* Makes a BaseService queuable using the generic ServiceQueue job.
*/
interface QueuableService
{
/**
* Execute the service.
*/
public function handle(): void;
/**
* Handle a job failure.
*
* @param \Throwable $exception
... | true |
a1f4b4331eb76bf042a15d5eab25d4cbfb4be290 | PHP | a6software/symfony2-and-codeception | /tests/unit/A6/CodeceptIsAwesomeBundle/Service/ReverseServiceTest.php | UTF-8 | 820 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
class ReverseServiceTest extends \Codeception\TestCase\Test
{
/**
* @var \UnitTester
*/
protected $tester;
private $service;
protected function _before()
{
$this->service = new \A6\CodeceptIsAwesomeBundle\Service\ReverseStringService();
}
protected function _after()... | true |
f309a1cc93f85f00fbcf06dc7b5cf6c8f4fc9933 | PHP | ritwikabanerjee123/GreenLine-BusProject | /insert.php | UTF-8 | 1,616 | 2.546875 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "project";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
if(isset($_POST['insert']))
{
echo "fsdf";
//$bus_no = mysqli_real_escape_string($conn,$_POST['inp']);
// $sql= "SELECT distance_co... | true |
03b4826adbe3994ed413ebe232ab007482f3826c | PHP | poarfrippe/LoginPro | /backend/symetricLogin.php | UTF-8 | 613 | 2.859375 | 3 | [] | no_license | <?php
session_start();
$request = 2;
if(isset($_GET['request'])){
$request = $_GET['request']; //1 = GET, 2 = POST
}
//POST
if($request == 2){
$data = json_decode(file_get_contents("php://input"));
$username = $data->username;
$passwordArray = $data... | true |
530b45640706d1df6869ec8fd2ceb6a471e28bdd | PHP | puncoz/rat_the_logger_ci | /application/config/rat.php | UTF-8 | 1,551 | 2.640625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/*
* "store_in" allows you to set your preference regarding the storage of your logs.
* You can store the logs inside a database by passing "database" as value,
* or inside a directory by passing the directory location as value (relative to... | true |
23a776f5b729d97af5c3c599f5e32f10cb255066 | PHP | MacroMan/nitropack-api | /src/NitroPack/Filesystem.php | UTF-8 | 4,667 | 2.765625 | 3 | [] | no_license | <?php
namespace NitroPack;
class Filesystem {
public static $storageDriver = NULL;
public static function setStorageDriver($driver) {
Filesystem::$storageDriver = $driver;
}
public static function getStorageDriver() {
if (Filesystem::$storageDriver === NULL) {
Filesystem:... | true |
79fe11719911ef3ddc46d3213805a03fd83f3765 | PHP | bellows-io/Cli | /src/Gui/Dialog/Alert.php | UTF-8 | 2,321 | 2.78125 | 3 | [] | no_license | <?php
namespace Cli\Gui\Dialog;
use \Cli\Gui\Traits\RowMemoryTrait;
use \Cli\Gui\Borderset\Borderset;
class Alert extends Dialog {
protected $options;
protected $highlightFormat = [];
public function __construct($terminal, $title, $contents, array $options, Borderset $borderset) {
parent::__construct($termin... | true |
60a19685136b11626ded88448164088be055775a | PHP | chadananda/blink | /blink-wp/bLink-wp.php | UTF-8 | 19,900 | 2.734375 | 3 | [] | no_license | <?php
/**
Plugin Name: bLinks
Plugin URI: http://labs.uswebdev.net
Description: Automatically links your blog posts other web sites.
Author: Daniel Jones
Version: 1.1
Author URI: http://labs.uswebdev.net
*/
include 'blink.class.php';
include_once(ABSPATH . WPINC . '/class-IXR.php');
/**
* BLink plugin class i... | true |
3b86ba4f9f870d56bbce932ea0f2922639f884de | PHP | mduk/gowi | /src/Http/Application/Stage/Config/File.php | UTF-8 | 2,462 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Mduk\Gowi\Http\Application\Stage\Config;
use Mduk\Gowi\Http\Application;
use Mduk\Gowi\Http\Request;
use Mduk\Gowi\Http\Response;
use Mduk\Gowi\Http\Application\Stage;
use Zend\Config\Config as ZendConfig;
use Zend\Config\Reader\Ini as IniReader;
use Zend\Config\Reader\Xml as XmlReader;
use Zend\Con... | true |
6ed58960eed771b471e9cc0a092a6ba484e58dc3 | PHP | MotionlessPotato/Portfolio-Complete | /PHP Files/Animals.PHP | UTF-8 | 941 | 4.0625 | 4 | [] | no_license | <html>
<title> PHP Arrays </title>
<body>
<?php
//PHP ARRAYS
$animals = array("cats","dogs","rabbits");
// in PHP, there are three types of arrays:
//indexed array - array with a numeric inded(list in python)
//associated array - array with named keys(dicctionary in python)
//$Class = array("Marcus" =>... | true |
276a70d0cca3099da3d3ef02df56bf2e002576e4 | PHP | albetnov/vuetik-laravel | /src/Commands/PurgeUnusedImages.php | UTF-8 | 1,709 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace Vuetik\VuetikLaravel\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Storage;
use Vuetik\VuetikLaravel\Models\VuetikImages;
use Vuetik\VuetikLaravel\Utils;
class PurgeUnusedImages extends Command
{
public $signature = 'purge:unused-images {--after} {--disk} {--path} {--sh... | true |
0888194c8e32ddcc08f1a988d26ba0a589f84253 | PHP | obynonwane/publisher-pangaea-assessment | /tests/Feature/PublisherTest.php | UTF-8 | 2,696 | 2.5625 | 3 | [] | no_license | <?php
namespace Tests\Feature;
use App\Models\Message;
use App\Models\Subscriber;
use Tests\TestCase;
use App\Models\Topic;
use GuzzleHttp\Client;
use App\Services\Publisher;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Foundation\Testing\RefreshDatabase;
class PublisherTest extends TestCase
{
u... | true |
528423eac5154332d559c851c6d320e2e114238e | PHP | Folley-05/test | /soutenance_L2/offres2.php | UTF-8 | 1,495 | 2.640625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<?php $connexion=new PDO('mysql:host=localhost;dbname=tourisme', 'root', '');
functi... | true |
f2fd96025d99911b26134568552f32db0bd5e9f5 | PHP | centreon/centreon | /centreon/src/Centreon/Domain/Repository/CfgResourceInstanceRelationsRepository.php | UTF-8 | 839 | 2.65625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Centreon\Domain\Repository;
use Centreon\Infrastructure\CentreonLegacyDB\ServiceEntityRepository;
use PDO;
class CfgResourceInstanceRelationsRepository extends ServiceEntityRepository
{
/**
* Export
*
* @param int[] $pollerIds
* @return array
*/
public function export(... | true |
0805e8d41d41c778ddaa8526cde2a493150afd4f | PHP | dpetrenko1991/vk-loc | /index.php | UTF-8 | 1,654 | 2.8125 | 3 | [] | no_license | <?php
require_once 'classes/db.php';
$errors = array();
if (isset($_POST['data']) && !empty($_POST['data']))
{
$data = $_POST['data'];
//check email
if (!isset($data['mail']) || empty($data['mail'])) {
$errors[] = "Введите корректный E-mail";
}
//check login
if (!isset($data['login']) || empty($data['login'])... | true |
57161d8bfababb80d084756b3aa0aec562d5fee2 | PHP | uuk020/php-design-patterns | /Structural/Bridge/Abstraction.php | UTF-8 | 564 | 3.03125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: WytheHuang
* Date: 2019/4/15
* Time: 23:48
*/
declare(strict_types = 1);
namespace Patterns\Structural\Bridge;
abstract class Abstraction
{
/**
* @var \Patterns\Structural\Bridge\Color
*/
protected $color;
/**
* 设置颜色
*
* @param \Patt... | true |
64e567c266d599d0e8c5358054fb98e99f33ec48 | PHP | lolacld/todolist | /helper/DatabaseHelper.php | UTF-8 | 585 | 2.984375 | 3 | [] | no_license | <?php
// connexion and security file
class DatabaseHelper
{
private static $db_host = 'localhost';
private static $db_name = 'mytotool';
private static $db_user = 'root';
private static $db_password = '';
private static $DB;
public static function getDB()
{
if (is_null(self::$DB))... | true |
3705ec8677ecd23cae1874a4ca373e2519a676c9 | PHP | slicesofcake/file | /src/View/Helper/FileHelper.php | UTF-8 | 923 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace SlicesCake\File\View\Helper;
use Cake\View\Helper;
class FileHelper extends Helper
{
/**
* {@inheritDoc}
*/
public $helpers = [
'Html',
];
/**
* Thumb image.
*
* @param string|array $path Path to the image file, relative to the app/webroot/img/ direct... | true |
3cefda9c72ece768707ab088ddb281af1ae99f61 | PHP | ducquyen/Imagick_PHP | /Imagick::Draw/setviewbox2.php | UTF-8 | 765 | 2.921875 | 3 | [
"Apache-2.0"
] | permissive | <?php
$draw = new \ImagickDraw();
$draw->setStrokeColor('black');
$draw->setFillColor('red');
$points = [['x' => 40 * 5, 'y' => 10 * 5], ['x' => 70 * 5, 'y' => 50 * 5], ['x' => 60 * 5, 'y' => 15 * 5],];
$draw->polygon($points);
$draw->setviewbox(0, 0, 200, 200);
$draw->setFillColor('gree... | true |
e9bad68e3212cac5f35cdd5eaaec8a144fe67117 | PHP | rcdelfin/laravel-mjml | /src/LaravelMJML.php | UTF-8 | 2,694 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace Rennokki\LaravelMJML;
use GuzzleHttp\Client as GuzzleClient;
class LaravelMJML
{
private $secretKey;
protected $appId;
public $publicKey;
protected $client;
protected $mustache;
public static $apiEndpoint = 'https://api.mjml.io/v1';
public function __construct()
{
... | true |
1d4196bf38fa57999d1f0b21bc547aa475c2b214 | PHP | softwareofsweden/adventofcode | /day_06_part_2.php | UTF-8 | 884 | 3.296875 | 3 | [] | no_license | <?php
include_once "ProblemInterface.php";
class Day6Part2 implements ProblemInterface
{
public function expected()
{
return 3430;
}
public function solve()
{
$rows = include 'day_06_input.php';
$totalCount = 0;
$questions = "abcdefghijklmnopqrstuvwxyz";
fo... | true |
a5a6654e9be3f26872906ddfdb6004f53b4e4fb1 | PHP | itmaster921/FBChatBot-Laravel | /common/Jobs/SendBroadcastToSubscriber.php | UTF-8 | 1,098 | 2.796875 | 3 | [] | no_license | <?php namespace Common\Jobs;
use Common\Models\Broadcast;
use Common\Models\Subscriber;
use Common\Services\FacebookMessageSender;
use Common\Exceptions\DisallowedBotOperation;
class SendBroadcastToSubscriber extends BaseJob
{
/**
* @type Broadcast
*/
private $broadcast;
/**
* @type Subsc... | true |
dfe0a9d58eeae506221771ecb84c830b7602a39c | PHP | caiminfang/Learning | /test/349. 两个数组的交集/index.php | UTF-8 | 1,759 | 3.984375 | 4 | [] | no_license | <?php
/**
给定两个数组,编写一个函数来计算它们的交集。
示例 1:
输入: nums1 = [1,2,2,1], nums2 = [2,2]
输出: [2]
示例 2:
输入: nums1 = [4,9,5], nums2 = [9,4,9,8,4]
输出: [9,4]
说明:
输出结果中的每个元素一定是唯一的。
我们可以不考虑输出结果的顺序。
*/
class Solution {
/**
暴力法,判断一个数值在另一个数组是否存在
*/
function intersection1($nums1, $nums2) {
if(count($nums1) <cou... | true |
20ecb91f7691a8a1d4fbc8b9c4eee091d464519d | PHP | GraceWang17/xwang230-comp3512-assign3 | /includes/book-content.php | UTF-8 | 5,813 | 3.046875 | 3 | [] | no_license | <?php
/*
Displays the list of books which are sorted by Subcategory or Imprint from books table.
*/
function outputBooks() {
$db = connectDB();
$books = new BooksGateway($db);
$sql = $books->getSelectStatement();
// Subcategory filter
if (!empty($_GET['subcategory'])... | true |
952b926658c535b55db843e0c3954bda1e78c2e4 | PHP | skullred9x/db_anhtuan | /public/images/mabaomat/mabaomat.php | UTF-8 | 1,402 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
session_start();//Khoi dong sesssion
//md5: hàm mã hóa ko dịch ngược luôn trả về 32 ký tự
//$_SERVER['REMOTE_ADDR']: Địa chỉ IP của người dùng
//rand(): Hàm random ra 1 con số từ 0- 32k (đơn vị)
//time(): THời gian hiện tại tính bằng giây từ năm 1970
$str=md5(time().$_SERVER['REMOTE_ADDR'].rand());
//substr: Sử d... | true |
4fbc86b92967a492e1ee1e31fc32ceddb926db82 | PHP | kkosnull/helpdesk | /library/index.php | UTF-8 | 3,801 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
error_reporting(0);
include 'classes/users.php';
include 'connection/credentials.php';
$login_user = new users();
$login_user->setdb($db);
$login_user->setUser($user);
$login_user->setPassword($password);
$login_user->set_username("null");
$user_name="null";
if ($_POST["enterlibrary"]){
$username=$_P... | true |
1f0294dadbf90d8c88f7d3af05ce82462499075b | PHP | howlee/winzhibo | /app/Console/commands/VideoIndexHtmlCommands.php | UTF-8 | 1,789 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: 11247
* Date: 2018/7/5
* Time: 13:07
*/
namespace App\Console\commands;
use App\Http\Controllers\PC\Live\LiveController;
use Illuminate\Console\Command;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
class VideoIndexHtmlCommands extends Command
{
... | true |
b5b5be9aee5dfd81d4573fe707d76d18bb19e02d | PHP | wj008/beacon-standard | /sdopx/plugin/DbvalModifier.php | UTF-8 | 1,009 | 2.609375 | 3 | [] | no_license | <?php
namespace sdopx\plugin;
use beacon\Console;
use beacon\DB;
class DbvalModifier
{
private static $cache = [];
public static function execute($string, string $tbname, string $field = '', string $where = '')
{
if (empty($field)) {
$field = 'name';
}
if (empty($str... | true |
4c7f02f8c0227e244cf4f47c168c4457b03a4a25 | PHP | fpoirotte/DotGraph | /src/Attributes.php | UTF-8 | 2,016 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace fpoirotte\DotGraph;
class Attributes implements \ArrayAccess, \IteratorAggregate, \Countable
{
protected $attributes;
public function __construct(array $attributes = [])
{
$this->attributes = [];
$this->merge($attributes);
}
public function... | true |
22c3b73ef01a1846296e7a5137c2577d97129251 | PHP | tesstil/blog-approche_MVC | /app/controller/article/view.php | UTF-8 | 689 | 2.765625 | 3 | [] | no_license | <?php
// Test du paramètre
if(isset($_GET['id'])){
// Récupération des paramètres de l'URL et test éventuel
$id = $_GET['id'];
// Appel du modèle pour obtenir le détail d'un article
include_once("app/model/article/lire_article.php");
$articles = lire_article($id);
$article = $articles[0];
... | true |
9c682fa88b0a992dff60ec5d6899cdea24655bc1 | PHP | mishanon/parser-vmstat | /vmstat.php | UTF-8 | 667 | 2.734375 | 3 | [] | no_license | <?php
function parserVmstat($lines = '') {
function isEmpty($value) {
return (strlen($value)) != 0;
}
if (strlen($lines) == 0) {
exec('vmstat', $res);
} else {
$res = $lines;
}
$keys = explode(' ', $res[1]);
$values = explode('... | true |
ee7866cfb16e80802484fc250595651dadd590fc | PHP | brentschuddinck/imdstagram | /explore/profile.php | UTF-8 | 12,974 | 2.546875 | 3 | [] | no_license | <?php
include_once('../inc/sessiecontrole.inc.php');
include_once('../classes/Post.class.php');
include_once('../classes/User.class.php');
include_once('../classes/Comment.class.php');
include_once('../inc/feedbackbox.inc.php');
include_once('../classes/Search.class.php');
include_once('../classes/Validation.class.php'... | true |
9fae1cf56d91342299fc6e6622b6c3a9e66c2412 | PHP | MilitaryShipment/account_service_php | /record.php | UTF-8 | 5,496 | 2.734375 | 3 | [] | no_license | <?php
require_once __DIR__ . '/db7.php';
if(!isset($GLOBALS['db'])){
$db = new DB();
}
interface RecordBehavior{
public function create();
public function update();
public function setFields($updateObj);
}
interface ContactBehavior{
// public function getNotifications();
// publi... | true |
fe75076e999f27d7c2c136eea763179dd52dfe87 | PHP | pptech-ds/Simplon-Project3-FORM | /tests/test_checkString.php | UTF-8 | 601 | 3.03125 | 3 | [] | no_license | <?php require '../service/checkPhoneNumberPattern.php'; ?>
<?php require '../service/checkString.php'; ?>
<?php require '../service/getScore.php'; ?>
<?php require '../service/printScore.php'; ?>
<h2>TEST function checkString</h2>
<?php
echo '<br>TEST function checkString "this is a string": ' .
checkS... | true |
bf8565a189b91220dcf65f8a601dc3ad29eecc24 | PHP | mga-py/droid_shop | /app/src/remoto/webservice/dao/pedidos/get_pedido_by_id.php | UTF-8 | 754 | 2.734375 | 3 | [] | no_license | <?php
require 'PedidoDAO.php';
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
if (isset($_GET['id'])) {
$parametro = $_GET['id'];
$resultado = PedidoDAO::getById($parametro);
if ($resultado) {
$dato["estado"] = "1";
$dato["mensaje"] = $resultado;
print json... | true |
12fd7180742c8ee67497cb69b42322502ee9472f | PHP | lucashv/allcrm-apigility | /module/crm/src/crm/V1/Rest/PermissoesAcesso/PermissoesAcessoService.php | UTF-8 | 798 | 2.515625 | 3 | [] | no_license | <?php
namespace crm\V1\Rest\PermissoesAcesso;
use crm\V1\Rest\AbstractService\AbstractService;
/**
* Classe responsavel pela validacao de acesso atraves do perfil do usuario.
* Class PermissoesAcessoService
* @package crm\V1\Rest\PermissoesAcesso
*/
class PermissoesAcessoService extends AbstractService
{
p... | true |
e3a06f311a040e0df71bca94d057f90dd3f1a8fd | PHP | bleen/ps267 | /web/modules/contrib/crop/src/CropStorageInterface.php | UTF-8 | 768 | 2.609375 | 3 | [
"MIT",
"GPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Drupal\crop;
use Drupal\Core\Entity\EntityBundleListenerInterface;
use Drupal\Core\Entity\Schema\DynamicallyFieldableEntityStorageSchemaInterface;
use Drupal\Core\Entity\Sql\SqlEntityStorageInterface;
/**
* Provides an interface defining an crop storage controller.
*/
interface CropStorageInterface... | true |
edadc64f044e5a1b2a94c9163cf5d7e7ffa69cb4 | PHP | daxingyou/developtest | /cgc_jinhua_server/class/vo/vo_JinHuaGame.php | UTF-8 | 1,169 | 2.59375 | 3 | [] | no_license | <?php
/**
*
* 金花牌局的数据
*
* User: zmliu1
* Date: 17/1/10
* Time: 16:24
*/
class vo_JinHuaGame extends BaseVO{
/** 游戏id */
public $id;
/** 游戏是否开始 */
public $isStart = false;
/** 当前操作者 */
public $currentUid;
/* 记录是否有人没有看过牌 */
public $lastSee;
/* 最后一次下注的类型 */
public $lastMoney... | true |