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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
35745c9f30ef178615b78eafdf15ed53a5dd2fba | PHP | ku-alps/cse17_keunbum | /Baekjoon/solved/2739/sol.php | UTF-8 | 132 | 3.28125 | 3 | [] | no_license | <?php
fscanf(STDIN, "%d", $n);
for ($i = 0; $i < 9; $i++) {
fprintf(STDOUT, "%d * %d = %d\n", $n, $i + 1, $n * ($i + 1));
}
?>
| true |
15416b5fee8e41fbdeea6171cbdf074192e0a593 | PHP | luigif/WsdlToPhp | /samples/xignite-insider/Get/Insiders/XiInsiderTypeGetInsiders.php | UTF-8 | 2,027 | 2.53125 | 3 | [] | no_license | <?php
/**
* Class file for XiInsiderTypeGetInsiders
* @date 08/07/2012
*/
/**
* Class XiInsiderTypeGetInsiders
* @date 08/07/2012
*/
class XiInsiderTypeGetInsiders extends XiInsiderWsdlClass
{
/**
* The InsiderCIK
* Meta informations :
* - minOccurs : 0
* - maxOccurs : 1
* @var string
*/
public $I... | true |
5de14cea5e16d654c81d5cf53faa3c57333d9924 | PHP | shark2202/php-asio | /stubs/TcpSocket.php | UTF-8 | 1,798 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* php-asio/stubs/TcpSocket.php
*
* This file is a stub of php-asio, which is implemented in extension asio.so.
* For source code of asio.so, see src/ directory.
*
* @author CismonX<admin@cismon.net>
*/
namespace Asio;
/**
* Class TcpSocket
*
* Provides operations on TCP sockets.
*
* @package Asi... | true |
a69abab7bc6c8252cb40282616036c26cf17cbba | PHP | xpl-php/Common | /src/Arrayable.php | UTF-8 | 235 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
namespace xpl\Common;
/**
* Contract for a class that can return its data as an array.
*/
interface Arrayable
{
/**
* Return the list items as a native PHP array.
*
* @return array
*/
public function toArray();
}
| true |
98b435050bafb8c8f0b3b85619204d7c7b67448c | PHP | rozmarbeka/paddle-php | /tests/generate_auth_code.php | UTF-8 | 1,164 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
require_once __DIR__ . '/test_case.php';
class Generate_Auth_Code extends Test_Case {
public function test_valid_arguments() {
// generate new api credentials
$generate_auth_code_result = $this->api->generate_auth_code($this->vendor_email, $this->vendor_password);
$this->assertTrue(is_int($generate_auth... | true |
265fe4688eea9e88a3d08230eda2f17d13272136 | PHP | ciromattia/rovirus-theme | /vendor/soberwp/intervention/src/Module/UpdatePagination.php | UTF-8 | 1,466 | 2.609375 | 3 | [
"MIT",
"CC-BY-SA-4.0"
] | permissive | <?php
namespace Sober\Intervention\Module;
use Sober\Intervention\Instance;
use Sober\Intervention\Utils;
/**
* Module: update-pagination
*
* Hooks into admin_menu to change pagination for posts, pages and comments.
*
* @example intervention('update-pagination', $amount(integer));
*
* @link https://developer.... | true |
a0b0979f3a4a32f624bc3ab2767c5022f93a2c14 | PHP | sami55th/ProSys | /weeklyReportS.php | UTF-8 | 6,828 | 2.546875 | 3 | [] | no_license | <?php
$title = "ProSys";
$subtitle = "Weekly Report";
include('db/db_connect.php');
session_start();
//check if student logged in
if($_SESSION['type'] != 'Student'){
header("location: login.php");
}
$studentId = $_SESSION['usrId'];
//Getting groupId
$groupId = $link->query("SELECT groupId FROM student WHERE student... | true |
8d4b0889005c9484db87f5f55ef8aecabce2330e | PHP | granitebps/silisa | /app/Imports/convert.php | UTF-8 | 616 | 3.125 | 3 | [] | no_license | <?php
function dms_to_dec($dms)
{
$vars = preg_split("/[^\d\w]+/", $dms);
$deg = (float)$vars[0];
$min = (float)$vars[1];
$sec = (float)$vars[2];
return $deg + ((($min * 60) + ($sec)) / 3600);
}
// function dec_to_dms($dec)
// {
// $vars = explode(".", $dec);
// $deg = $vars[0];
// $te... | true |
15eb81bf2f9d1cc4c7e9f8ed880ead1499eab4cb | PHP | Adrian268/comp296 | /Models/Item.php | UTF-8 | 2,047 | 2.734375 | 3 | [] | no_license | <?php
require_once 'Model.php';
class Item extends Model{
protected $table = 'items';
protected $fillables = ['list_id', 'user_id', 'item_name', 'quantity'];
function delete($item_id, $user_id, $session_id){
if($user_id == $session_id || $this->listIsEditable($item_id)){
$query =... | true |
3394435b4feaedc0571c4a30905e6554ae7b9bd9 | PHP | wme2a/wme2a | /testProj/xampplite/htdocs/xampp/splash.php | UTF-8 | 1,215 | 2.515625 | 3 | [] | no_license | <?php
header("Content-Type: text/html; charset=iso-8859-1");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="author" content="Kai Oswald Seidler, Kay Vogelgesang, Carsten Wiedmann">
<link href="xampp.css" rel="styl... | true |
0bd672262361f9cbd9753291ca34ad61be415d49 | PHP | StuntsKhumza/mathebula | /sms.php | UTF-8 | 377 | 3.234375 | 3 | [] | no_license | <?php
$i = 0;//$_GET['i'];
$ii = $_GET['i'];
//
echo getCount($ii);
function getCount($ii){
$d = "00";
$dd = "000";
$ddd = "0000";
$dddd = "00000";
if ($ii < 10)
{$i = $dddd . $ii; return $i;}
else if ($ii < 100)
{$i = $ddd . $ii; return $i;}
else if ($ii < 1000)
{$i = $dd . $ii; return $i;}... | true |
72ab1de9b63afb3d3cb7f080b4070dfefa1dacca | PHP | xiayiyongphper/pintuan | /protobuf/message/product/OrderReviewProductsReq.php | UTF-8 | 6,619 | 2.8125 | 3 | [] | no_license | <?php
/**
*
* message.product package
*/
namespace message\product;
/**
* OrderReviewProductsReq message
*/
class OrderReviewProductsReq extends \framework\protocolbuffers\Message
{
/* Field index constants */
const items = 1;
const wholesaler_ids = 2;
const store_id = 3;
const type = 4;
c... | true |
a9d5af7e947ca52f6c603e682d4f5fdb9d12ebed | PHP | 496808527/thinkssycms | /application/common/logic/DataLogic.php | UTF-8 | 4,138 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?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.
*/
namespace app\common\logic;
use app\common\model\ModelsModel;
use app\common\model\FieldsModel;
use think\Db;
/**
* Descript... | true |
5a265365b99f6e3a5cb6ce8ea703e91e4857b447 | PHP | vidavenel/sdis_recouverture_ops | /app/Models/TypeVehicule.php | UTF-8 | 484 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
/**
* Type de vehicule SP
* @property-read int $id
* @property string $libelle
* @property Collection $competences
*/
class TypeVehicule extends Model
{
... | true |
4f8c2a85056099ed878f8b89bd67aef123292921 | PHP | TravelSite/ts.vg | /app/models/url_model.php | UTF-8 | 481 | 2.546875 | 3 | [] | no_license | <?
// model for URL references
class url_model extends CI_Model {
// declare variables here
function __construct(){
// Call the Model constructor
parent::__construct();
}
// gets link by ID
function link_by_id($id = 0){
$query = $this->db->get_where('short_urls', array('id' => $id), 1);
... | true |
ac35a7196aa539f02441172577de58e11cdf69e2 | PHP | Victor19Rodrigues/issues_PHP | /app_upload_multiplo/index.php | UTF-8 | 668 | 2.75 | 3 | [] | no_license | <pre>
<?php
$flag = false;
if(isset($_FILES['arquivo']) && !empty($_FILES['arquivo'])){
if(count($_FILES['arquivo']['tmp_name']) > 0){ // há pelo menos um arquivo
for($q = 0; $q < count($_FILES['arquivo']['tmp_name']) ; $q++){
$nomeArq = md5($_FILES['arquivo']['name'][$q].time().rand(0,999)).'jpg';
m... | true |
7d9c64619f9971517e53c4a799e3ffcd464eb82c | PHP | elliotfehr/acmephp | /src/Ssl/Generator/KeyPairGenerator.php | UTF-8 | 2,088 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Acme PHP project.
*
* (c) Titouan Galopin <galopintitouan@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace AcmePhp\Ssl\Generator;
use AcmePhp\Ssl\Exception\KeyPairGeneratio... | true |
3cfef01507eeb845e252808425d7924fd5e2298d | PHP | rasseljandavid/tiendalaravel | /app/User.php | UTF-8 | 1,775 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
// dependencies
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Auth;
// models
use App\Models\Address\Address;
use App\Models\Ecommerce\Order;
class User extends Authenticatable
{
use Notifiable;
/*---------- VARAIBLES ----------*/
... | true |
75b07239b5a8d5b2db2122e3113f5adc7cc2264a | PHP | maxwebstar/secco | /database/seeds/PixelTypeSeeder.php | UTF-8 | 933 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Carbon\Carbon;
class PixelTypeSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$data = [
'JavaScript' => 'JS', /*Javasript*/
'Image' => 'IMG',
'ServerS... | true |
c830fccdb0eeb2e0a8d5804fa1849ebf2dbf6e0a | PHP | MichalYosef/LS49 | /kobi/CRM_Project_review/BLL/crmBLL.php | UTF-8 | 679 | 2.609375 | 3 | [] | no_license | <?php
class crmBLL{
private $dbName;
private $dbHandler;
public function __construct( $dbName, $dbHandler )
{
$this->$dbName = $dbName;
if( $dbHandler )
{
$this->$dbHandler = $dbHandler;
}
else
{
$... | true |
1baba084a8738f4b7887462f6e344b29ee701aea | PHP | maciejmrug/simple-omdb-finder | /tests/app/Infrastructure/Api/Omdb/ResponseFormatterTest.php | UTF-8 | 2,073 | 2.625 | 3 | [] | no_license | <?php
/**
* Tests the response formatter that formats responses from OMDB Api
*
* @author Maciej Mrug-Bazylczuk <maciej.mrug@gmail.com>
*/
namespace OMDBFinder\Tests\Infrastructure\Api\Omdb;
use OMDBFinder\Infrastructure\Api\Omdb\ResponseFormatter;
class ResponseFormatterTest extends \PHPUnit_Framework_TestCase {... | true |
c147a262cea1ac5a68005586fba90343270db914 | PHP | WeTurkstra/SymfonyWidget | /Widget/WidgetInterface.php | UTF-8 | 730 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Willem
* Date: 20-10-2017
* Time: 21:43
*/
namespace WTWeb\WidgetBundle\Widget;
interface WidgetInterface
{
/**
* @return string
*/
public function getName() : string;
/**
* @return array
*/
public function getData() : array;
/**... | true |
4ba523b87d956e6324e4be1d240a9577b00a3559 | PHP | kristoffersobere/kristoffersobere.github.io | /excercise2/csp2tryoop/About.php | UTF-8 | 331 | 3.03125 | 3 | [] | no_license | <?php
function displayTitle(){
echo 'About';
}
function displayContent() {
$ages = [
'Peter' => 35,
'Ben' => 37,
'Joe' => 43
];
/*echo $ages['0']."<br>";
echo $ages['Ben']."<br>";
echo $ages['Joe']."<br>";*/
foreach ($ages as $name => $age) {
echo $name.' '.$age.'<br>';
}
}
require 'templat... | true |
1ad8cb9935eede7d960697fc05c8d79af18879cc | PHP | ArthurHoaro/web-thumbnailer | /src/WebThumbnailer.php | UTF-8 | 7,365 | 2.859375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace WebThumbnailer;
use WebThumbnailer\Application\Thumbnailer;
use WebThumbnailer\Exception\MissingRequirementException;
use WebThumbnailer\Exception\WebThumbnailerException;
/**
* WebThumbnailer.php
*/
class WebThumbnailer
{
/*
* SIZES
*/
public const MAX_W... | true |
8ee56932a910a0f7ca1b32b2f80c0712046b78fb | PHP | lenlorijn/environment | /src/Len/Environment/Command/Stores/Urls/TransformCommand.php | UTF-8 | 4,944 | 2.78125 | 3 | [] | no_license | <?php
/**
* Command to transform base URLs from one environment to another.
* E.g.: production => staging, production => dev, staging => dev.
* Note: This transformation is one-way directional.
*
* @package Len\Environment\Command\Stores\Urls
*/
namespace Len\Environment\Command\Stores\Urls;
use \N98\Magento\Co... | true |
f65d5bb9a5b3bc3bf90582e47e5061bad8652236 | PHP | angusty/designPatterns | /Pool/WorkerPool.php | UTF-8 | 1,637 | 3.265625 | 3 | [] | no_license | <?php
namespace DesignPatterns\Pool;
use Countable;
class WorkerPool implements Countable
{
private $occupiedWorkers = [];
private $freeWorkers = [];
public function __construct()
{
// $worker = new StringReverseWorker();
// $this->freeWorkers[spl_object_hash($worker)] = $wor... | true |
dfa85c53b750bc0ef38b2ab455df1e28639ac273 | PHP | bergman01/sartorymx | /costo.php | UTF-8 | 1,152 | 2.703125 | 3 | [] | no_license | <?php
include_once("lib/conexion.php");
$link=conectarse();
function porcentaje($venta,$porciento,$decimales){
return number_format($venta*$porciento/100 ,$decimales);
}
$utilidad = '30';
$query="select * from articulos where costos = 0";
$resultado=mysql_query($query, $link);
while($row=mysql_fetch_array($resulta... | true |
b1b0b266f9bc414f5544ff54d2a0244ca30bfc20 | PHP | Antoine07/Game | /src/Game/Battle/Gamer.php | UTF-8 | 1,429 | 3.59375 | 4 | [
"MIT"
] | permissive | <?php namespace Game\Battle;
class Gamer implements \Countable
{
/**
* @var
*/
protected $name;
/**
* @var int
*/
protected $power = 0;
/**
* @var array
*/
protected $cards = [];
public function __construct($name)
{
$this->setName($name);
}
... | true |
e0c8031fe4d20d7a2a19a2f6e605034e43b5f652 | PHP | BureauVeritasPeru/CertificacionVehiculos | /app/class/entity/eCrmCala.php | UTF-8 | 685 | 2.84375 | 3 | [] | no_license | <?php
/**
* Object represents table 'crm_cala'
*
* @author: Junior Huallullo
* @date: 2012-11-30 17:14
*/
class eCrmCala{
public $calaID;
public $chiID;
public $numReporteCala;
public $codigoFaenaWeb;
public $fechaRegistro;
public function __construct($calaID=NULL, $chiID=NULL, $... | true |
5e541f9588c3db459c275abfa2635b11990638fc | PHP | digitalesherz/gambio-shop | /system/classes/external/paypal3/PayPalPaymentFactory.inc.php | UTF-8 | 18,836 | 2.71875 | 3 | [] | no_license | <?php
/* --------------------------------------------------------------
PayPalPaymentFactory.inc.php 2016-12-09
Gambio GmbH
http://www.gambio.de
Copyright (c) 2015 Gambio GmbH
Released under the GNU General Public License (Version 2)
[http://www.gnu.org/licenses/gpl-2.0.html]
------------------------------------... | true |
a5f8d160aede7027542cc6d88b7e602983ada8f3 | PHP | llewellyn-kevin/willow | /tests/Factories/BasicApiFactory.php | UTF-8 | 310 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Factories;
use Willow\Factory;
class BasicApiFactory extends Factory
{
/**
* Mocks a simple API response that returns a quote.
* @return array
*/
public function definition(): array
{
return [
'quote' => 'Hello there',
];
}
}
| true |
0ecf8ae5d1d073dddf484bded2fa355f5257aa08 | PHP | soneharatooru/Lambton_college_transit | /College-Transit-master/createPickup.php | UTF-8 | 1,161 | 2.671875 | 3 | [] | no_license | <?php require_once("db_functions.php") ?>
<?php
// Starts the session
session_start();
// Checks if the user is logged in
if (isset($_SESSION['logged']) != TRUE )
{
header("Location: " . "login.php");
exit();
}
?>
<?php
$db = connect();
?>
<?php
if($_SERVER['REQUEST_METHOD'] == 'POST') {
$bustime=$_POST['hour'... | true |
9f26b034e01c7d4d95f9de76bcfc5dc2e906b119 | PHP | Taroth-Ito/Laravel-ec-app | /src/database/migrations/2020_11_23_031335_create_purchases_table.php | UTF-8 | 1,006 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreatePurchasesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('t_purchases',... | true |
0b891f64e6bba34ebf6ebdef04dc1b835b92d82d | PHP | franciscoferrandez/SymfonyTechTest | /symfony/src/Infrastructure/ObjectReader/JsonReader.php | UTF-8 | 697 | 2.859375 | 3 | [] | no_license | <?php
namespace App\Infrastructure\ObjectReader;
use Psr\Log\LoggerInterface;
use stdClass;
class JsonReader implements ObjectReaderInterface
{
private $source;
private $logger;
public function __construct(LoggerInterface $logger) {
$this->logger = $logger;
$this->logger->info(__CLASS__.'... | true |
763871bdf783cd3e2fbea1f22b5b40d85a330d5f | PHP | JordivanGiezen/EnigmaIRC | /modules/winamp.php | UTF-8 | 876 | 2.671875 | 3 | [] | no_license | <?php
namespace Enigma\modules\winamp;
use \Enigma\brain as enigma;
class main {
#Implementation
static $conditions = array(
"commands" => "winamp"
);
function onCommand($nick, $host, $target, $args, $command) {
switch($args) {
case "stop": exec('"'.$this->winamp.'" /stop'); break;
case "pause": exec('"... | true |
bc5ef5c834e308177d8215c6e7f526f648f5fb95 | PHP | laurent-allegre/Mylibrairie | /exercices/function.php | UTF-8 | 793 | 3.359375 | 3 | [
"MIT"
] | permissive | <?php
/**
* writeLog
*
* @param string $filename = le fichier à ecrire
* @param string $ajout = la phrase à ajouter
*
* @return bool la valeur renvoyée
*/
function writeLog($filename, $ajout ): bool {
if(is_writable($filename)){
if(!$fp=fopen($filename, 'a')){
echo "impossible d'... | true |
48f20e4b4f57fb4b7e66ae8ce650e38dc4e8126f | PHP | cgiansante/e15 | /p3/database/seeders/PondsTableSeeder.php | UTF-8 | 1,228 | 2.953125 | 3 | [] | no_license | <?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use App\Models\Pond;
use Carbon\Carbon;
class PondsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$this->addAllPonds();
}
private function addAllP... | true |
3ba674a78328bb656b64e5d56ea1637ad38ef886 | PHP | pauldiez/iphone-photography | /app/Http/Controllers/ApiController.php | UTF-8 | 3,929 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Http\Helpers\InfusionsoftHelper;
use App\Http\Requests\ModuleReminderAssignerRequest;
use App\Models\Module;
use App\Models\ModuleReminderTag;
use App\Models\User;
use Illuminate\Http\Request;
class ApiController extends Contro... | true |
da78fb393b837a2c3e9a3787e24b503359ed659a | PHP | sameplace/server | /createDealSpace.php | UTF-8 | 1,797 | 2.515625 | 3 | [] | no_license | <?php include("spauth.php"); ?>
<?php
include("config.php");
echo "<html>\n<head>\n <title>create dealspace</title>\n";
echo ' <link rel="stylesheet" href="style.css" type="text/css">'."\n";
echo "</head><body>\n";
$me = spUser::lookupMe();
if (null == $me) {
echo 'You do not belong here!</body></html>';
retur... | true |
9600b5fe67193a870cd798ec9b945cab83d0c52c | PHP | george8706/test.loc | /migrations/m160704_205658_create_authors_table.php | UTF-8 | 589 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Handles the creation for table `authors_table`.
*/
class m160704_205658_create_authors_table extends Migration
{
/**
* @inheritdoc
*/
public function up()
{
$this->createTable('authors', [
'id' => $this->primaryKey(),
'author' =... | true |
8f0658f1e2f0ec3bbfec3ebe2e3f468e82649a70 | PHP | ilqar1903/PHP_PROJECT | /connect.php | UTF-8 | 2,238 | 2.625 | 3 | [] | no_license | <?php
if($_POST){
$name=@$_POST['name'];
$topic=@$_POST['topic'];
$whom=@$_POST['whom'];
$mesaj=@$_POST['mesaj'];
if(!$mesaj || !$topic || !$name){
echo '<div> You must be filled non empty areas</div>';
}
else{
$insert=$db->prepare("insert into mesajlar set
mesaj_send=?,
... | true |
4118cbe46b69a22f64b5b0ad3246f6c24955261e | PHP | Violet88github/silverstripe-bugsnag-module-vue | /src/BugsnagController.php | UTF-8 | 1,262 | 2.5625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | <?php
namespace Violet88\BugsnagModule;
use Psr\Container\NotFoundExceptionInterface;
use RuntimeException;
use SilverStripe\Control\Controller;
use SilverStripe\Control\HTTPResponse;
use SilverStripe\Core\Injector\Injector;
class BugsnagController extends Controller
{
private static $allowed_actions = [
... | true |
2be54a8eb35c23cffe6d136c846b0945b2b205f6 | PHP | KayO-GH/Quick-CMS | /admin/index.php | UTF-8 | 2,813 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
//start session
session_start();
include_once('../includes/connection.php');
if (isset($_SESSION['logged_in'])) {
//display index
?>
<html>
<head>
<title>CMS Template</title>
<link rel="stylesheet" href="../assets/style.css" />
</head>
<body>
<div class="containe... | true |
0ffbcd230778f96197e83ef5a12f724c29c3c6e0 | PHP | eddiedb6/ej | /web/php/EJCalendar.php | UTF-8 | 2,843 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
function EJAddCalendarEvent(&$calendarParams) {
$aid = "aidAddCalendarEvent";
return EJExecuteWithAuthenticatedFamily($aid, $calendarParams, function ($fid, $aid, &$calendarParams) {
if (EJInsertCalendarEvent($calendarParams, $fid)) {
return W3CreateSuccessfulResult();
}
... | true |
55d43816e9dbc1102e625c57aed65d008e259209 | PHP | lukman-fun/spv | /application/models/MUsers.php | UTF-8 | 470 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class MUsers extends CI_Model{
function get($where = null){
if($where == null){
return $this->db->get('users');
}else{
return $this->db->get_where('users', $where);
}
}
function add($data){
$this->db->insert('users', $data);
}
function... | true |
40935bca0b11174f8b9b6ab2e94f80945543f39f | PHP | brendanmanning/S5 | /S5.php | UTF-8 | 18,737 | 3.234375 | 3 | [
"MIT"
] | permissive | <?php
//
// S5.php
// Super Simple Server Side Security
// User authentication and API backend made easy
// Available from: https://github.com/brendanmanning/S5/
//
// (c) 2017 Brendan Manning
// MIT License
//
class S5 {
// Your database connection information here
private $database_conn... | true |
cf5861f20423bfc1a944d4c4a69bae3e3933bccd | PHP | taogitHubs/php | /day4/demlu2.php | UTF-8 | 1,073 | 2.796875 | 3 | [] | no_license | <?php
if($_SERVER['REQUEST_METHOD']==='POST'){
$usrename=isset($_POST['usrename'])? $_POST['usrename']:'';
$password=isset($_POST['password'])? $_POST['password']:'';
$xuz=isset($_POST['xuz']) && $_POST['xuz'] ==='on';
if ($usrename == '') {
echo "用户名";
}elseif($password == ''){
echo "密码";
}elseif(... | true |
654ea7fd43f239f214cad065ce7309aa4410ecf5 | PHP | SandyTaillan/php-mvc-voiture | /app/libraries/Database.php | UTF-8 | 3,237 | 3.65625 | 4 | [] | no_license | <!--app/libraries/Database-->
<?php
/**
* Classe Database pour gérer le PDO
* Sert à :
* se connecter à la base de données
* créer des déclarations préparées
* bind values
* return rows and results
*
* gestionnaire de base de données : sdbh
* gestion... | true |
df506e1d20acc69c10e8ae3ca9b0f0f9b1886906 | PHP | winnie-muriuki-k/Dating-site | /app/Conversation.php | UTF-8 | 1,179 | 2.5625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
// use Illuminate\Database\Eloquent\SoftDeletes;
class Conversation extends Model
{
// use SoftDeletes;
//
/**
* Message belongs to Sender.
*
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
pu... | true |
bd6007c16fa2b72cbc8dea87a83e37f2eb8e0611 | PHP | DMcRae45/Dungeons | /Model/connection.php | UTF-8 | 439 | 2.703125 | 3 | [] | no_license | <?php
/*
Description: Database Connection and Log in Credentials to the sites database.
Author: David McRae
*/
// Connection To Abertay
try
{
$host ='localhost';
$dbname = 'Dungeons';
//$un = 'Pi';
//$pw = '#R_pi';
$un = 'root';
$pw = '';
$connection = new PDO ("mysql:host=$host;dbname=$dbname;... | true |
5fa31b73fde8d2bdfd715a10e8d8838bbe1ebc34 | PHP | skyavy-cebu/DoubleClick | /lib/model/doctrine/TeacherTable.class.php | UTF-8 | 846 | 2.53125 | 3 | [] | no_license | <?php
/**
* TeacherTable
*
* This class has been auto-generated by the Doctrine ORM Framework
*/
class TeacherTable extends Doctrine_Table
{
/**
* Returns an instance of this class.
*
* @return object TeacherTable
*/
public static function getInstance()
{
return Doctrine_Co... | true |
524eeb8d711e6695c5fded9fbc043f946a647c45 | PHP | hacker7897iiita/quoralike | /signup.php | UTF-8 | 754 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
session_start();
function signup($name,$pwd,$email){
include 'connect.php';
if($_SESSION['login'] == 1){
header('Location: feed.html');
}
else{
$dum = "select * from users where email = '$email'";
//echo $dum;
$_SESSION['name'] = $name;
$_SESSION['email'] = $email;
$ret = mysqli_query($con,$dum);
... | true |
12faf333b7c3a507c802cf6f8ac7e6ab9f6acb24 | PHP | bipsBro/test_library | /System/Event/Manager.php | UTF-8 | 1,899 | 2.734375 | 3 | [] | no_license | <?php
namespace Library\System\Event;
class Manager extends \Phalcon\Events\Manager
{
/**
* Checks if the eventType passed in the params , is actually defined in the event object.
* {@inheritDoc}
* @see \Phalcon\Events\Manager::attach()
*/
public function attach($eventType, $handler, $prior... | true |
cf6055ad2a1c7b7f5d110b69d3774b1bf0cade7f | PHP | lugovov/phpfunctions | /Converter.php | UTF-8 | 1,190 | 3.234375 | 3 | [] | no_license | <?php
/**
* Класс для разных преобразований
*/
class Converter {
/**
* Получает элемент из массива $data
* $field - Может быть:
* - строкой - Возвращает элемент массива
* - Массивом - Возвращает элемент вложенного массива, по пути строк во входящем массиве
* - функцией - выполняе... | true |
3df04f006353b9027b991f4993232f787d21b1f6 | PHP | harish98r/inmarproject1 | /additems.php | UTF-8 | 420 | 2.609375 | 3 | [] | no_license | <?php
session_start();
?>
<html>
<body>
<center style="color:olive"><h1 style="font-size:10vw">Inmar</h1>
</center>
<?php
$f=$_POST["a"];
$v=$_SESSION["p"];
$r=mysqli_connect("localhost","root","","inmar");
$q=mysqli_query($r,"insert into " . $v . "fruits (fruitName) values ('$f');");
if($... | true |
259b4bddc447799997e4e8fc24d3e341c6977397 | PHP | trak2018z/Facelike-tr | /account/systeminfo.php | UTF-8 | 3,673 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | <?php
$path = "./couchdb/"; //Ścieżka operacyjna
//Upewnij się że użytkownik jest zalogowany
if(!checksession()) {
if(headers_sent()) {
?>
<script type="text/javascript">
//<![CDATA[
location.replace('index.php');
//]]>
</script>
<?php
}
else{
exit(header('Location: index.php'));
... | true |
9ee74e2104afeb1a7ed124f7db1165217d14dae4 | PHP | rashidalabri/Musanada | /user/login.php | UTF-8 | 4,522 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Rashid
* Date: 26-Jan-17
* Time: 2:13 PM
*/
require_once('../includes/config.php');
require_once('../includes/common.php');
require_once('../includes/db.php');
require_once('../libraries/securimage/securimage.php');
$email_address = '';
$raw_password = '';
$alerts = arra... | true |
2611ce312c4d8ca9f8922018df483a2a93572ca0 | PHP | huunghia5814/english-center | /login.php | UTF-8 | 4,308 | 2.59375 | 3 | [] | no_license | <?php
require "header.php";?>
<?php error_reporting(0) ?>
<div class="group-box">
<div class="title">Đăng nhập</div>
<div align="center">
<?php
// nếu nút Logout được nhấn
if (isset($_GET["logut"])){
// hủy bỏ session
unset($_SESSION["loggedin"]);
unset($_SESSION["User"]);
unset($_SESSION["HoTen"]);
... | true |
43ef1d242899738388c0c32ce2698803f211d028 | PHP | kbanyal10/Ice-Hockey-game-schedule | /AcademicRecords.php | UTF-8 | 3,058 | 2.65625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<title>
Student Records
</title>
<link rel="stylesheet" href="css/bootstrap.min.css" /> <!--This is to bind it with bootstrap-->
</head>
<meta charset="UTF-8">
<body>
<h1> Academic Records </h1>
<!--This will show the student records by going on the Sho... | true |
f2d978c6008558d0e7944353939236cf3fafdca3 | PHP | tropotek/tk-auth | /Tk/Auth/Adapter/NullAuth.php | UTF-8 | 1,043 | 2.515625 | 3 | [] | no_license | <?php
namespace Tk\Auth\Adapter;
use Tk\Auth\Result;
/**
* @author Michael Mifsud <info@tropotek.com>
* @see http://www.tropotek.com/
* @license Copyright 2016 Michael Mifsud
*/
class NullAuth extends Iface
{
/**
* NullAuth constructor.
*/
public function __construct()
{
parent::__c... | true |
a447bc94f78d47cdfa48fabfb6d0ba7c8d6fbfb0 | PHP | highchair/hcd-trunk | /models/admin_page.php | UTF-8 | 2,022 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
class StaticPage
{
var $area_name;
var $name;
var $display_name;
var $path;
var $template;
var $parent_page_id;
function FindByAreaAndName($area, $name)
{
//if($area != "admin")
//{
//die("admin page tried to be a normal page");
//}
$page_has_parent = array_shift(Pages::FindBySql("Pages", "SE... | true |
028a4d011ddde24bb583e832a562f47d651686f4 | PHP | jreatherford/SoftwareEngineeringProject | /Modules/code/driver files/PR/PRdriver.php | UTF-8 | 729 | 3 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<a href="testAll.php">To check all the files, click here!</a><br>
<?php
include 'File_Readers.php';
//put the file you want to che... | true |
5596452c76fae1975bd76d9e0c586f2b714c6ea9 | PHP | stepanoff/senter | /www/protected/modules/VAdmin/components/AdminInputWidget.php | UTF-8 | 1,143 | 2.609375 | 3 | [] | no_license | <?php
class AdminInputWidget extends CWidget
{
public $id =0;
public $action = ''; // урл отправки данных
public $options = array(); // htmlOptions для селекта
public $params = null; // массив ключ=>значение дополнительных данных для передачи скрипту
public $value = false; // текущий выбор
public $ajax = false; /... | true |
8676b8ce58bd0d127804a509edc532c741eacb87 | PHP | lovecn/lovecn.github.io | /wechatMultiPay/classes/alipay/Alipay.php | UTF-8 | 3,100 | 2.78125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Elvis Lee
* Date: 2016/12/19
* Time: 13:15
*/
namespace MultiPay\classes\alipay;
use MultiPay\Config;
use MultiPay\Pay;
class Alipay extends Pay
{
/**
* 发起支付请求
* @param $data
* @return mixed
*/
public function request($da... | true |
008a61d5e5ad82da3673945c646d5319cd00c3be | PHP | yusufkenar/Symfony-Demo-Rest-Api-With-JWT | /src/Controller/AuthController.php | UTF-8 | 1,522 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\User;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
class AuthController extends ApiController
{
/**
* @param Request $request
* @param UserPasswordEncoderInterface $encoder
... | true |
2f8ca2083a20f47f112d0e669929eb0784eca5eb | PHP | GiveToken/GiftBox | /ajax/recruiting_company_image/delete.php | UTF-8 | 1,144 | 2.515625 | 3 | [] | no_license | <?php
use Sizzle\Bacon\Database\RecruitingCompanyImage;
if (isset($_SESSION['user_id'])) {
$user_id = $_SESSION['user_id'];
if (isset($_POST['id'])) {
$id = $_POST['id'];
try {
// Delete the token image
$recruiting_company_image = new RecruitingCompanyImage($id);
... | true |
af02658a8c775d7f075c3416c1066c90d72647e7 | PHP | papertank/origami-api | /src/TransformResources.php | UTF-8 | 2,433 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Origami\Api;
use Exception;
use League\Fractal\Manager;
use League\Fractal\Resource\Collection;
use League\Fractal\Resource\Item;
use Origami\Api\Pagination\PaginatorAdapter;
trait TransformResources {
protected $transformer;
protected $include_key = 'include';
protected function buildPagi... | true |
10cdc78dc34e9452f5eaeb9445b02bc3c944c1e7 | PHP | georgemickleburgh/vsf | /library/VSF/Forms/Validators/NotEmpty.php | UTF-8 | 352 | 3.015625 | 3 | [] | no_license | <?php
namespace VSF\Forms\Validators;
class NotEmpty extends Validator
{
public $errorMessage = 'Input must not be empty';
public function isValid($value)
{
if(!empty($value)) {
return true;
}
else {
return false... | true |
a63e694935c48de2f258a5457458ba1a690a58b2 | PHP | 161710085/latihan5 | /motor.php | UTF-8 | 226 | 2.796875 | 3 | [] | no_license | <?php
// buat class laptop
class motor {
public $pemilik;
public $merek ;
public $harga ;
public function __construct($p,$m,$h){
$this->pemilik=$p;
$this->merek=$m;
$this->harga=$h;
}
}
?> | true |
7b63bf4a2dc993abba101961d3cb2d515b542baa | PHP | yoxiua/php-dom-wrapper | /src/Traits/ManipulationTrait.php | UTF-8 | 17,699 | 2.859375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace DOMWrap\Traits;
use DOMWrap\Document;
use DOMWrap\Element;
use DOMWrap\Collections\NodeList;
define('DOM_NODE_TEXT_DEFAULT', 0);
define('DOM_NODE_TEXT_TRIM', 1);
define('DOM_NODE_TEXT_NORMALISED', 2);
/**
* Manipulation Trait
*
* @package DOMWrap\Traits
* @license http://opensource.org/licenses/... | true |
f3be8d52feeeb05ac339711df76d2edfe1f04de5 | PHP | agnunez/espore | /log.php | UTF-8 | 1,047 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
// populating $_GET
$DEBUG = true;
parse_str($_SERVER['QUERY_STRING'], $_GET);
$sid=$_GET['sid'];
$pm1 = $_GET['pm1'];
$pm25 = $_GET['pm25'];
$pm10 = $_GET['pm10'];
// do work
echo "Content-type: text/html\r\n";
echo "Connection: Close\r\n\r\n";
// start output here.
echo "<html><body>";
//$file = fopen("/home/... | true |
a468a71b458a818139d72653455995e44ecbf670 | PHP | emorri08/itc250 | /sandbox/form1.php | UTF-8 | 958 | 3.109375 | 3 | [
"Apache-2.0"
] | permissive | <?php
//form1.php
/*
if data is submitted, show it
if no data is submitted, show the form
*/
if(isset($_POST["FirstName"])){//if data is submitted, show it
//echo $_POST["FirstName"];
//best way to troubleshoot a form that is misbehaving
echo '<pre>';
var_dump($_POST);
echo '</pre>';
... | true |
2e4e5f4fe2dcee3c04aceae55a11ab406536c9cc | PHP | JamieMac96/EE4023-Project | /TTTphpClient/includes/game_board.php | UTF-8 | 2,499 | 2.78125 | 3 | [] | no_license | <?php
include_once('control/SoapClientConnection.class.php');
$boardConfig = array();
$boardConfig['00'] = "";
$boardConfig['01'] = "";
$boardConfig['02'] = "";
$boardConfig['10'] = "";
$boardConfig['11'] = "";
$boardConfig['12'] = "";
$boardConfig['20'] = "";
$boardConfig['21'] = "";
$boardConfig['22'] = "";
$clien... | true |
244a03c4a2ede2a61c1f15070fa952da16092ae7 | PHP | rundeveloper/consultaestudiante | /index.php | UTF-8 | 1,888 | 2.8125 | 3 | [] | no_license | <?php
//Definición de los parámetros de conexión.
// La sintaxis del código fuente (Data Source Name o DSN)
// es específica de cada controlador.
$codigo = 'mysql:host=bjeinhljkvgjxtnufqej-mysql.services.clever-cloud.com;dbname=bjeinhljkvgjxtnufqej';
$usuario = 'uohtx3roycvhvief';
$contrasenia = 'SBCu4PUBWCZoEAwX... | true |
5464e65380acf2172ef2ce604900b473a1e01e5c | PHP | DebbautSara/bludit | /bl-themes/micro/php/sidebar.php | UTF-8 | 479 | 2.65625 | 3 | [
"MIT"
] | permissive | <h1 class="site-title">
<a href="<?php echo $Site->url() ?>">
<?php echo $Site->title() ?>
</a>
</h1>
<ul class="static-pages">
<?php
$staticPages = $dbPages->getStaticDB();
$staticPagesKeyList = array_keys($staticPages);
foreach ($staticPagesKeyList as $pageKey) {
$staticPage = build... | true |
b962791ebbd8464049bd1412703fdd3da639c1e6 | PHP | merlindiavova/postcodesio | /src/Factory/Psr17Factory.php | UTF-8 | 2,667 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace PostcodesIO\API\Factory;
use Psr\Http\Message\UriInterface;
use Psr\Http\Message\StreamInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\UriFactoryInterface;
use Psr\Http\Message\UploadedFileInterface;
use Psr\Http\... | true |
cdc4f20e4f6111b2222632762bcf3c0e216d8e6a | PHP | stephenwmcla/invoices3 | /app/Http/Requests/CreateInvoiceHeaderRequest.php | UTF-8 | 871 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use App\Http\Requests\Request;
class CreateInvoiceHeaderRequest extends Request {
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize() {
return true;
}
/**
* Get the valida... | true |
552bbb30ae63fe88f3c4cff8853f7101a022717a | PHP | hamzaafzal9009/spree-retail | /app/Http/Requests/Product/UpdateRequest.php | UTF-8 | 3,248 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Requests\Product;
use App\Models\Category;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Gate;
class UpdateRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public functio... | true |
ded92d31887cfcb12fdec4eb85e728045c50ec04 | PHP | izzetbek/engine | /core/services/manager/Site/TagManageService.php | UTF-8 | 750 | 2.84375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace core\services\manager\Site;
use core\entities\Site\Tag;
use core\forms\manager\Site\TagForm;
use core\repositories\Site\TagRepository;
class TagManageService
{
private $tags;
public function __construct(TagRepository $tags)
{
$this->tags = $tags;
}
public function create... | true |
cf9bf7694ac256c7b4301e254b634b21906ee9a2 | PHP | kurtericmiller/Zbloggi | /library/Local/Domain/Mappers/KeywordMapper.php | UTF-8 | 5,389 | 3 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Keyword Mapper object definition
* @package Mapper
*/
/**
* KeywordMapper class
* Maps Keyword objects to database
*/
class Local_Domain_Mappers_KeywordMapper extends Local_Domain_Mapper implements KeywordFinder {
/** Instantiate - prepares object specific sql statements*/
function __construct() {
... | true |
c98296b350b8a1bbda2a3d4d0085c5bb8eacd7fc | PHP | stupmich/sem_checkpoint2 | /App/Views/Account/add.view.php | UTF-8 | 1,061 | 2.546875 | 3 | [] | no_license | <?php /** @var Array $data */ ?>
<div id="container2">
<form method="post">
<div class="form-group">
<label>Username</label>
<input name="username" type="text" placeholder="enter username" class="form-control" required>
</div>
<div class="form-group">
<la... | true |
05167713e4c453ce4580a8211ed0f0785ebdd28f | PHP | mafengwo/operation | /ko/tool/StrParser.php | UTF-8 | 3,551 | 3.125 | 3 | [] | no_license | <?php
/**
* StrParser
*
* @package ko\tool
* @author zhangchu
*/
/**
* 字符串分析基类实现
*/
class Ko_Tool_StrParser
{
/**
* @var string
*/
protected $_sHtml = '';
/**
* @var int
*/
protected $_iOffset = 0;
public function __construct($sHtml)
{
$this->_sHtml = strval($sHtml);
}... | true |
923d5696236b0203d0b824f507d8356194761660 | PHP | MadiniGo/tp5.1blogMS | /application/common/model/Cates.php | UTF-8 | 819 | 2.625 | 3 | [
"PHP-3.0",
"Apache-2.0"
] | permissive | <?php
namespace app\common\model;
use think\Model;
class Cates extends Model
{
public function articles(){
return Cates::hasMany(Articles::class,'cates_id');
}
//获取分类数据
public function getCatesList($list,$max_deep)
{
return $this->tree($list,0,0,$max_deep);
}
//获取分类树方法
... | true |
9c96d78ea73c057ba5e396ea96088acaef612efe | PHP | darpankumar1986/auctionsonclick | /application/helpers/share_helper.php | UTF-8 | 5,087 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* CodeIgniter helper for generate share url and buttons (Twitter, Facebook, Buzz, VKontakte)
*
* @version 1.0
*
*/
if( !function_exists('share_check') ){
/**
* Check type of share and return $URL or FALSE
*
* @param string $type type of share
* @return string|bool
*/
funct... | true |
f3e5554b53eefa007b4efa64921d6f635ac6d321 | PHP | pandaengine/qingmvc | /src/utils/Url.php | UTF-8 | 1,300 | 2.875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace qing\utils;
/**
* URL相关的一些帮助方法
*
* @author xiaowang <736523132@qq.com>
* @copyright Copyright (c) 2013 http://qingmvc.com
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache-2.0 all rights reserved.
*/
class Url{
/**
* 移除多余的斜杠
* 两个以上的斜杠,替换成一个
*
* @param $url 指定url
*/
publi... | true |
301e107da2b2c31e2154c9fba665a8cbd42ada1f | PHP | veldeta/286-ArkhipovVS | /index2.php | UTF-8 | 870 | 2.671875 | 3 | [] | no_license | <?php
if($_FILES['file'] == true)
{
header("Location: http://gg/PhP/%d1%80%d0%b0%d0%b1%d0%be%d1%82%d0%b0%20%d1%81%20%d0%b1%d0%b0%d0%b7%d0%be%d0%b9%20%d0%b4%d0%b0%d0%bd%d0%bd%d1%8b%d1%85/%d0%a4%d0%be%d1%80%d0%bc%d0%b0.php");
}
include 'VarDumper.php';
class Form
{
public $name;
public $name1;
public $password;
pu... | true |
3f37784d072e1a77ca837e57596d2dae79ca4b0e | PHP | mvlcek/ext-simple | /ext-simple/test/plugins/plugin1.php | UTF-8 | 408 | 2.5625 | 3 | [] | no_license | <?php
registerPlugin('plugin1', 'Plugin 1', '0.1', 'N.N.', '', 'Something', 'en', null);
addListener('do-something', 'plugin1_echoit', array('zero','one','two'));
addListener('return-something', 'plugin1_returnit', array('zero','one'));
function plugin1_echoit($args) {
$args = func_get_args();
echo join(', ', $a... | true |
90b69b173012550c309a019f39894952059b751a | PHP | lAlejandrocd/Aurora_TPS_P3_Proyecto_Final | /Conexion_BD/Admin/ad_usuarios/editar_usuarios.php | UTF-8 | 5,577 | 2.640625 | 3 | [] | no_license | <?php
session_start();
include("../../conexion.php");
if (!isset($_SESSION['admin'])) {
header("location: ../../../index.php");
}else{
?>
<link rel="stylesheet" href="../../../css/bootstrap.css">
<body style="background: url(../../../img/inin.jpg); background-size: cover; width: 100%; height: 100%;">
<?... | true |
3d39a9d3e6d69ee132c1abda7846b22be231dd15 | PHP | Rareloop/ning-api-php | /src/NingApi.php | UTF-8 | 11,125 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
define('SRC_PATH', __DIR__);
define('OBJECTS_PATH', SRC_PATH . '/objects');
set_include_path(get_include_path() . PATH_SEPARATOR . SRC_PATH . PATH_SEPARATOR . OBJECTS_PATH);
require_once('OAuth.php');
require_once('NingException.php');
require_once('NingObject.php');
require_once('NingUpload.php');
require_once(... | true |
6b8a280fa1aeee799868dbe82f5723cf9279351f | PHP | jeonhyein1122/mrhiAndroid | /web/03AndroidHttpRequest/insertDB.php | UTF-8 | 815 | 2.828125 | 3 | [] | no_license | <?php
header('Content-Type:text/plain; charset=utf-8');
$name= $_POST['name'];
$message= $_POST['msg'];
$now= date('Y-m-d H:i:s'); //"2021-01-20 11:15:23"
//MySQL DB의 board2 테이블에 저장
//1. DB서버에 접속
$conn= mysqli_connect("localhost","mrhi2021","a1s2d3f4!","mrhi2021");//DB서버주소, DB접속... | true |
84930db1bd5fe5ba8773caf4ebef276c49b88ee3 | PHP | gzqsts/core | /src/throttle/throttle/ThrottleAbstract.php | UTF-8 | 981 | 2.984375 | 3 | [] | no_license | <?php
namespace Gzqsts\Core\throttle\throttle;
abstract class ThrottleAbstract
{
/** @var int */
protected int $cur_requests = 0; // 当前已有的请求数
/** @var int */
protected int $wait_seconds = 0; // 距离下次合法请求还有多少秒
/**
* 是否允许访问
* @param string $key 缓存键
* @param float $micronow 当前时... | true |
b795dffa156c5d382c6ea5fa2cc00cb1f1cce6be | PHP | aunghtet-star/intermediate_php_lesson_pratice | /Chapter3/php_2_databinding2.php | UTF-8 | 364 | 3 | 3 | [] | no_license | <?php
class One
{
private static $name = "Aung Htet";
public static function Name()
{
return self::$name;
}
public static function getName()
{
echo static::Name();
}
}
class Two extends One
{
private static $name = "Noe Noe";
public static function Name()
{
... | true |
29227fd6f69ebc17e5424cfe30f8529f32c382e9 | PHP | githubfisher/zsylou | /Application/Home/Controller/MemberController.class.php | UTF-8 | 2,540 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Home\Controller;
use Think\Controller;
class MemberController extends Controller
{
public function __construct()
{
$scheck = A('SessionCheck');
$scheck->index();
header("content-type:text/html; charset=utf-8;");
}
public function query()
{
$post = I();
// logger('查询会员卡信息... | true |
42699821b0464479d5b9d196a52262fd63b9b6ca | PHP | ddrv/php-sypexgeo-reactphp-service | /src/Database/Reader.php | UTF-8 | 13,532 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Database;
use App\Database\Exception\InvalidDatabaseFormat;
/**
* Based on https://sypexgeo.net
*/
class Reader {
/**
* @var array
*/
private $about;
/**
* @var int
*/
private $range;
/**
* @var array
*/
private ... | true |
28fb696c85b75eab7f0bcf3c8bea97cc6f4e472e | PHP | mkondratek/BuyList | /connect.php | UTF-8 | 721 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: mkondratek
* Date: 12.07.17
* Time: 15:31
*/
$host = "localhost";
$root = "root";
$passwd = "";
$dbname = "buylistdb";
mysqli_report(MYSQLI_REPORT_STRICT);
try {
$db = new mysqli($host, $root, $passwd, $dbname);
if ($db->connect_errno !== 0) {
throw new E... | true |
197d8c758e5fe5bcc368def3676bf0c69c71ace4 | PHP | metropolisiii/Online-Forms-App | /tests/validation_tests.php | UTF-8 | 982 | 2.78125 | 3 | [] | no_license | <?php
require_once('simpletest/autorun.php');
require_once('../misc/functions.php');
class Validationtests extends UnitTestCase{
function __construct() {
parent::__construct('Validation tests');
}
public function setUp(){
}
function testNormalValidation(){
$test = sanitize("test input");
... | true |
d59d93bb7bc7c47402f9103b9e589d44062dd124 | PHP | Whiny/SE_Recipe | /서버/RecipeManager.php | UTF-8 | 4,126 | 3.0625 | 3 | [] | no_license | <?php
require 'DBManager.php';
/// todo
/// 레시피 열람기록 등록 함수
/// 레시피 열람기록 삭제 함수
/// 코드 정리
/// 테스트 케이스 정리
/// 문서 구조 변경
/// 레시피를 관리하는 클래스
class RecipeManager
{
private $db;
private $recipeInfoTableName;
private $recipeIngredientTableName;
pri... | true |
1a1f18525c523c06c57e3d17924b59d5330e2784 | PHP | freezed-or-frozen/yaslob | /templates/search.php | UTF-8 | 1,165 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/**
* YASLOB : Yet Another Simple Library Of eBooks
* Search page View (V of MVC)
*
* @author David SALLÉ
* @date April 2021
* @license MIT
*/
?>
<?php
// Add the header part
include("header.php");
?>
<!-- Content of the search page -->
<h1>Search</h1>
<form action="index.php" method="POST">
<div c... | true |
d1416bf1b02cb450ad509ae8ed0c66756e1b5b13 | PHP | tonyberrynd/SugarDockerized | /sugar/include/RecordListFactory.php | UTF-8 | 2,918 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Your installation or use of this SugarCRM file is subject to the applicable
* terms available at
* http://support.sugarcrm.com/Resources/Master_Subscription_Agreements/.
* If you do not agree to all of the applicable terms or do not have the
* authority to bind the entity as an authorized representative... | true |
6b08ee913027e590c6e6e92cefda44cf8efa74c7 | PHP | myxiaoao/VanillaBootstrap4China | /views/entry/passwordform.php | UTF-8 | 3,070 | 2.515625 | 3 | [] | no_license | <?php if (!defined('APPLICATION')) exit(); ?>
<div>
<?php
// Make sure to force this form to post to the correct place in case the view is
// rendered within another view (ie. /dashboard/entry/index/):
echo $this->Form->Open(array('Action' => $this->Data('FormUrl', Url('/entry/signin')), 'id' => 'Form_User_Sig... | true |