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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
f05c4e47d1d2c6a873f1571227fad5bf3270b7ac | PHP | PEMOHT/gazprom | /src/Domain/ProductValue/ProductValue.php | UTF-8 | 1,579 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
namespace Gazprom\Domain\ProductValue;
use RuntimeException;
/**
* Class ProductValue
* @package Gazprom\Domain\ProductValue
*/
class ProductValue
{
/**
* @var int
*/
private int $id;
/**
* @var string
*/
private string $name;
/**
* @var float
*/
private... | true |
244ec27d97de5723f4eb9098566305794be693dd | PHP | lidingran/cmf5 | /public/plugins/yunpian/Yunpian.php | UTF-8 | 1,165 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace plugins\yunpian;
class Yunpian {
public function sendCode($mobile, $code){
$apikey = "2f89950a6db4a006aea0aa1635548f7d";
$text="【智享云】您的验证码是".$code."。如非本人操作,请忽略本短信";
$ch = curl_init();
/* 设置验证方式 */
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Accept:text/plain... | true |
edcce8caf5e30444879ccdd655b7e5279b9a53cf | PHP | yozaira/UserAuth | /public/profile.php | UTF-8 | 3,155 | 2.921875 | 3 | [] | no_license | <?php
# Include initialize file to make directories and classes available
require_once '../core/init.php';
# use a short alias for validation class namespace
# or simply call namespace of the used classes
use App\User;
use App\Redirect;
use App\Session;
$user = new User();
# The profile page checks whether the user ... | true |
5c65335b64908d8daa73dfc3abd577d1ec0ecf01 | PHP | HugoAlberto/PHP | /Projet Progs/script.php | UTF-8 | 4,623 | 2.984375 | 3 | [] | no_license | <?
function trouverFichier($nom,$emplacement){
include("co.php");
//echo("$emplacement/$nom");
$fichier=fopen("$emplacement/$nom","r");
while($row=fgets($fichier)){
$position1=strpos($row,"function");
$reste=substr($row, $position1-8);
$position2=strpos($reste,"(");
$fin=substr($reste,0,$position2);
$sql=... | true |
0320a946667614f490395f3cbe75ed50efaf6e20 | PHP | gobline/flash | /src/FlashInterface.php | UTF-8 | 2,252 | 3.09375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/*
* Gobline Framework
*
* (c) Mathieu Decaffmeyer <mdecaffmeyer@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Gobline\Flash;
/**
* Allows to store data across requests and objects with a session or... | true |
c85259d1e00592018ef618f67725e392a1d941a5 | PHP | ylabio/yii2-rest | /src/filters/FieldsFilter.php | UTF-8 | 1,875 | 2.59375 | 3 | [] | no_license | <?php
namespace ylab\rest\filters;
use yii\helpers\ArrayHelper;
use yii\web\BadRequestHttpException;
/**
* {@inheritdoc}
*
* FieldsFilter for constraints by requested resource fields.
* Example usage:
* ```
* public function behaviors()
* {
* return [
* 'fieldsFilter' => [
* 'class' => FieldsFi... | true |
5a02e1b5dbefac7afe72f86679a0309c2cbc38d7 | PHP | HaR15/PHP-Secure-Authentication-and-Registration-with-Email-Confirmation | /logout.php | UTF-8 | 359 | 2.71875 | 3 | [] | no_license | <?php
//initialize session
session_start();
// regenerates a new session_id to help prevent session hijacking
session_regenerate_id();
//destory all $_SESSION[] variables
session_destroy();
if(isset($_COOKIE['username'])){
setcookie('username', '', time()-3600, '/');
}
... | true |
aea205662b220887ad892085729ad9817393b882 | PHP | activismap-projects/activismap-api | /src/ActivisMap/Error/ApiException.php | UTF-8 | 1,258 | 2.8125 | 3 | [] | no_license | <?php
namespace ActivisMap\Error;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
/**
* Created by PhpStorm.
* User: ander
* Date: 4/11/16
* Time: 16:06
*/
class ApiException extends \RuntimeException implements ApiError{
private ... | true |
34fea597b665cebaed9d8b743ff843d3fd30bec5 | PHP | dvikas/laravel-vue-admin-panel | /api/app/Transformers/System/TaskTransformer.php | UTF-8 | 652 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Transformers\System;
use App\Entities\ParentTask;
use App\Entities\Task;
use League\Fractal\TransformerAbstract;
class TaskTransformer extends TransformerAbstract
{
protected $parentId;
public function __construct($parentTaskId)
{
$this->parentId = $parentTaskId; //uuid
}... | true |
dd149b87e109a65f778513eab37dcfb958a4491f | PHP | isaq97/isaqsdff2 | /admin/add_hotels.php | UTF-8 | 4,527 | 2.59375 | 3 | [] | no_license | <?php
include "server_hotels.php";
if(isset($_GET['edit'])){
$id = $_GET['edit'];
$edit_state = true;
$rec = mysqli_query($db, "SELECT * FROM hotels WHERE id=$id");
$record = mysqli_fetch_array($rec);
$visit_from = $record['visit_from'];
$visit_to = $record['visi... | true |
78d81b273659286940705e1ed79f3c01c0b8f950 | PHP | JAR-Divine/social-media-clone | /sns/private/functions/login.php | UTF-8 | 1,102 | 2.515625 | 3 | [] | no_license | <?php
if(isset($_POST['Login_btn']))
{
$email = filter_var($_POST['login_email'], FILTER_SANITIZE_EMAIL); //sanitize email
$_SESSION['login_email'] = $email; //store into session variable
$password = md5($_POST['login_password']); //Get password
$check_database_query = mysqli_query($conn,... | true |
def11ccc153096a7d9c8108b811f4e68699c867e | PHP | rahulyhg/echoCMS | /cms/model/admin.php | UTF-8 | 12,313 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* model class for admin
*
* @since 1.0.0
* @author Keith Wheatley
* @package echocms\admin
*/
namespace echocms;
class adminModel
{
protected $config;
protected $edit;
protected $dbh;
function __construct(\PDO $dbh, $config)
{
$this->dbh = $dbh;
$this->config = $con... | true |
16b70fbc08b19c51da706badbcd9719eadc56587 | PHP | navelpluisje/npCMS | /admin/adminPage.php | UTF-8 | 1,824 | 2.640625 | 3 | [] | no_license | <?php
/**
* Class for creating a admin page
* @author Erwin Goossen
*
*/
global $_DIR;
include_once( $_DIR['dbElements'] . '/dbBlog.php');
include_once( $_DIR['dbElements'] . '/dbNews.php');
include_once( $_DIR['dbElements'] . '/dbUser.php');
include_once( $_DIR['dbElements'] . '/dbPage.php');
include_once( $_... | true |
ec193143250592f9615854bba4e539dedf2e09a3 | PHP | jamr200/Cgpimp | /application/models/ubicacion.php | UTF-8 | 16,263 | 2.640625 | 3 | [] | no_license | <?php
/*
* Copyright (C) 2014 jamr200
*
* This file is part Cgpimp.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later ve... | true |
55d09f7ea06975f114283304e599d9981d9866b4 | PHP | superuomo/xhproflink | /xhprof_prepend.php | UTF-8 | 2,982 | 2.59375 | 3 | [] | no_license | <?php
/*
On-demand profiling using xhprof.
This file should be loaded using auto_prepend
Use by appending a ?profile to the initial URL.
Disable profiling for all subsequent URLs fetched by appending ?noprofile.
You need to install and set up xhprof, as described here:
http://web.archive.org/web/20110514095512/http://m... | true |
2056ca09a60b01b549a76eadeaa819f5321e15e8 | PHP | vknyvz/vknyvz.com | /app/modules/public/models/Portfolio.php | UTF-8 | 550 | 2.6875 | 3 | [] | no_license | <?php
class Public_Model_Portfolio extends vkNgine_DbTable_Abstract
{
protected $_name = 'portfolio';
protected $_primary = 'portfolioId';
/**
* fetch a single portfolio item
*
* @param int $portfolioId
*/
public function fetch($portfolioId)
{
$select = $this->select();
$select->where('portfoli... | true |
5f642aaad1f86ba5a6167388e161390c6e4ea3b9 | PHP | gogad/babysmile.dp.ua | /classes/Admin/IModel.php | UTF-8 | 755 | 2.640625 | 3 | [] | no_license | <?php
/**
* Общий интерфейс модели данных
*
*/
interface Admin_IModel {
/**
* Возвращает массив данных для формы
*
* @param array $sourced_fields поля с собстенным источником данных
*/
public function getFieldsData ($sourced_fields);
/**
* Выполняет вс... | true |
1c69872458582d40718da3fb4cb53fcdbb88c14d | PHP | phixuan/POO-in-PHP | /06.php | UTF-8 | 595 | 3.34375 | 3 | [] | no_license | <?php include 'includes/header.php';
//Interface
interface TransporteInterfaz {
public function getInfo() : string;
public function getRuedas() : int;
}
abstract class Transporte implements TransporteInterfaz{
public function __construct(protected int $ruedas, protected int $capacidad)
{
... | true |
6b8e375372e077064190f7518815257295cbff72 | PHP | civicrm/civicrm-infra | /ansible/roles/icinga2/files/etc/icinga2/scripts/check_cmsversion | UTF-8 | 1,673 | 2.609375 | 3 | [] | no_license | #!/usr/bin/php
<?php
$host = trim($argv[1]);
$cms = trim($argv[2]);
$minimum = trim($argv[3]);
if (empty($host)) {
echo 'Missing host argument.';
exit(3);
}
if (empty($minimum)) {
echo 'Missing minimum version argument.';
exit(3);
}
$tmp = '';
if ($cms == 'drupal' || $cms == 'drupal8') {
exec('sudo -u ae... | true |
a8f4a012582e33bbb1bf38a3b1189b390e89e006 | PHP | mtave1202/library | /Autoloader.php | UTF-8 | 10,538 | 2.796875 | 3 | [] | no_license | <?php
// declare(encoding='UTF-8');
/**
* クラスのオートローディングを行う。
*
* クラス名に含まれる _ をディレクトリセパレータに置換してファイルパスとする。
* ただしネームスペースに含まれる _ は置換されない。
* 内部では spl_autoload_register() を利用しているので、他のオートローダとの併用が可能。
* @link http://groups.google.com/group/php-standards/web/psr-0-final-proposal?pli=1
*
* <code>
* <?php
* $al = Autoloa... | true |
c3b6aa6c9cccd40e9f81a206028cec8381d13e6d | PHP | ktktok/integravet | /shell/scripts/all/_old/20151013-clean-doctors-petvale-old-manual-campaigns.php | UTF-8 | 695 | 2.59375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: julio
* Date: 10/13/15
* Time: 5:11 PM
*/
require_once './configScript.php';
$codesWebsites = array(5 => 'doctorsVet', 6 => 'petvale');
foreach ($codesWebsites as $key => $codesWebsite)
{
cleanCampaigns($key, $codesWebsite);
}
function cleanCampaigns($websiteId, $codeS... | true |
14bab03c18465e0af236254d2ca2e6039aa007a4 | PHP | F4N70M/fw | /Fw/Components/Modules/TemplateEngine/Block/Structure/Structure.php | UTF-8 | 437 | 2.625 | 3 | [] | no_license | <?php
/**
* User: F4N70M
* Version: 0.1
* Date: 13.07.2020
*/
namespace Fw\Components\Modules\TemplateEngine\Block\Structure;
use Fw\Components\Modules\TemplateEngine\Block;
class Structure extends Block
{
protected $family = 'Structure';
public function __construct(array $data = [], array $blocks = [])
{
... | true |
2db3d6da09a833fa41f161080536d009e1505245 | PHP | tanjiuyusila/php | /6_string.php | UTF-8 | 479 | 3.859375 | 4 | [] | no_license | <?php
//单引双引区别
//都是字符串,但是双引号可以识别变量。如果字符串中没有变量,用单引号更快
$y = "yaozhilin";
echo "my name is $y"."<br>";
echo 'my name is $y'."<br>";
//获取字符串长度
echo strlen("Hello World!")."<br>";
//检索字符串内指定的字符或文本,返回字符串位置,
echo strpos("Hello world!","world");//返回6,(不是7),字符串首字符的位置是0而不是1,如果找不到,返回false | true |
43dd849c107b4549733599c68962b5a0aa82d2c7 | PHP | integer-net/IntegerNet_Varnish | /src/app/code/community/IntegerNet/Varnish/Model/Index/Priority.php | UTF-8 | 1,245 | 2.515625 | 3 | [] | no_license | <?php
/**
* integer_net GmbH Magento Module
*
* @package IntegerNet_Varnish
* @copyright Copyright (c) 2015 integer_net GmbH (http://www.integer-net.de/)
* @author integer_net GmbH <info@integer-net.de>
* @author Viktor Franz <vf@integer-net.de>
*/
/**
* Class IntegerNet_Varnish_Model_Index_Priori... | true |
05d56c1d6e6ad649ad87c16792b479336ed17e03 | PHP | brian2303/concesionariophp | /modelo/Van.php | UTF-8 | 322 | 2.921875 | 3 | [] | no_license | <?php
require_once("Vehiculo.php");
class Van extends Vehiculo {
private $cantidadPasajeros;
public function getCantidadPasajeros(){
return $this->cantidadPasajeros;
}
public function setCantidadPasajeros($cantidadPasajeros){
$this->cantidadPasajeros = $cantidadPasajeros;
}... | true |
470e0af22d85b44628dc27b5536e584becb03598 | PHP | jasonbronson/virtualfitnesscoach | /apps/admin/modules/admin/templates/showworkoutschedulesdetailSuccess.php | UTF-8 | 1,817 | 2.65625 | 3 | [] | no_license | <br><br>
<br><br>
<div align=center>
<h1>Show Workout Detail for <?php echo ucwords($exerciseinfo['user_username']);
switch($row[0]['type']){
case 1:
$type="Resistence Day";
// $modulename = "_resistence";
break;
case 2:
$type="Cardio Day";
// $modulename = "_cardio";
... | true |
5792edfdf511ee2fc9a63870e72642b2bd050a66 | PHP | jmfeurprier/crud-engine-bundle | /src/Loading/EntityActionRouteLoaderBase.php | UTF-8 | 2,574 | 2.546875 | 3 | [] | no_license | <?php
namespace Jmf\CrudEngine\Loading;
use Jmf\CrudEngine\Exception\CrudEngineMissingConfigurationException;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
abstract class EntityActionRouteLoaderBase implements EntityActionRouteLoaderInterface
{
public function load(
... | true |
f95789d1dcf51c56c268f457bc4b9601d84ae70b | PHP | koolreport/examples | /reports/excel/big_spreadsheet/export.php | UTF-8 | 455 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
include "MyReport.php";
$report = new MyReport;
$report->run();
$type = isset($_GET['type']) ? $_GET['type'] : 'CSV';
if ($type === 'XLSX') {
$report->exportToXLSX('MyReportSpreadsheet')
->toBrowser("MyReport.xlsx");
} elseif ($type === 'ODS') {
$report->exportToODS('MyReportSpreadsheet')
->toBr... | true |
3fc7bdd4aff416d0f8bc8f8242273b2786b7fc6c | PHP | one0212/php_note | /data_list.php | UTF-8 | 4,208 | 2.78125 | 3 | [] | no_license | <?php
require __DIR__. '/__connect_db.php';
$page_name = 'data_list';
$page = isset($_GET['page']) ? intval($_GET['page']) : 1;
// 用戶自己決定自己要看哪一頁 所以是從get方式過來
// 用戶有設定頁數則轉成整數頁 如果沒有設定則預設頁數為第一頁
$per_page = 10; // 每一頁要顯示幾筆
$t_sql = "SELECT COUNT(1) FROM `address_book`";
//$t_stmt = $pdo->query($t_sql);
//$totalRows = $t... | true |
d5d67da71d237bbfa4a47bb945b1365a2d765cf3 | PHP | gterzis/ConnectPlatform | /admin/Reports/Analytics/getSelectedInterests.php | UTF-8 | 2,089 | 2.59375 | 3 | [] | no_license | <?php // called by Analytics.php
// prevent users visit page improperly
if ( !$_SERVER["REQUEST_METHOD"] == "POST" ) {
header("Location: ../../../../index.php");
exit();
}
require '../../../includes/Connection.php';
session_start();
//Interest (or Category) number of selected times range
$selectedFrom = $_... | true |
edf86af7e7e0c0cdeeec4cac0a537254866f5632 | PHP | theyasirahmad/rayeebackendremote | /Admin/database/seeds/HouseHoldCategoryTableSeeder.php | UTF-8 | 587 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Models\house_hold_category;
class HouseHoldCategoryTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$category = [
'Grocery',
'Baby',
'Chilled ... | true |
70642edfd3b2d19fccdf6fd032656760efb12e2b | PHP | DCONLINE1984/surveyengine | /module/Application/src/Application/Model/CommonModel.php | UTF-8 | 1,349 | 3.234375 | 3 | [
"MIT"
] | permissive | <?php
/*
* The common model: all models extend from this one
* @author Dean Clow
* @email <dclow@blackjackfarm.com>
* @copyright 2014 Dean Clow
*/
namespace Application\Model;
class CommonModel
{
/**
* Holds the uid
* @var int
*/
protected $id = 0;
/**
* The base con... | true |
42b85538a2ba6fd6633478a3b2ac97203e29806d | PHP | iquecode/ev_intra | /controls/parts/Statment.php | UTF-8 | 3,167 | 2.9375 | 3 | [] | no_license | <?php
Class Statment {
private $html;
private $entries;
private $class;
private $title;
private $strTotal;
private $check;
private $userId;
public function __construct($entries=[], $userId, $class='extrato', $title='Demonstrativo Financeiro',
$strTotal=... | true |
7e9382499369d79d44755005823a0961a8a7412c | PHP | bireme/wordpress-themes | /NATS/home_news.php | UTF-8 | 3,834 | 2.640625 | 3 | [] | no_license | <?php
// Widget News Home by Category
/*
*/
class SESSP_Widget_News_Categories extends WP_Widget {
function SESSP_Widget_News_Categories() {
$widget_ops2 = array( 'classname' => 'widget_news_categories', 'description' => __( "Widget com posts por Categrias" ) );
$this->WP_Widget('level_categories... | true |
1bcd3cab89877f643995f07b2db58fefc67b697f | PHP | CCUMISIndependentStudy107/robot | /118/kevin/voicetest/player.php | UTF-8 | 2,398 | 2.6875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Audio playbackRate Example</title>
</head>
<body>
<?php
error_reporting(0);
$voiceID = $_GET[voiceID];
?>
<div>
<audio id="audio1" style="width:25%" controls>Canvas not supported</audio>
</div>
<div>
<input type="text" id="audioFile" value="<?php echo $voiceID;?... | true |
0209a673f8504e94198ada722234035da6ec88e8 | PHP | vptrvpr/majot_test | /app/Palindrome/PalindromeBuilder/CollectionPalindromeBuilder.php | UTF-8 | 858 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Palindrome\PalindromeBuilder;
use Illuminate\Support\Collection;
class CollectionPalindromeBuilder implements PalindromeBuilder
{
/**
* @var
*/
public $palindromeCollection;
/**
* Reset
*/
public function reset(): void
{
$this->palindromeCollect... | true |
c84541f7113166322c88db41577d19e52df00976 | PHP | aridwinugraha/tech_test | /array_loop.php | UTF-8 | 219 | 2.515625 | 3 | [] | no_license | $dataArray = ["gtAkademik", "gtFinansi", "gtPerizinan", "eCampuz", "eOviz"];
$panjangArray = count($dataArray);
$i = 0;
while ($i < $panjangArray)
{
echo "$aplikasi[".$i."]" .$dataArray[$i] ."<br/>";
$i++;
}
| true |
553f669f5619ac4f2ddb225299e7d756da5a326f | PHP | VinCHT/ProjetBlog | /model/frontend/ChapterManager.php | UTF-8 | 1,090 | 2.75 | 3 | [] | no_license | <?php
require_once('ConnectManager.php');
class ChapterManager extends Manager
{
public function getPosts()
{
$db = $this->dbConnect();
$posts = $db->query('SELECT id, title, content, num_chapter, images, DATE_FORMAT(creation_date, \'%d/%m/%Y à %Hh%i\') AS creation_date_fr FROM chapters WHERE ... | true |
b82fe0bc047bca699515c261e26e2478a9581eca | PHP | aaronmu/calculator | /src/Tests/Calculator/FirstTest.php | UTF-8 | 549 | 2.984375 | 3 | [] | no_license | <?php
namespace Tests\Calculator;
use Calculator\Math;
use Calculator\Tokenizer;
use Calculator\Dictionary;
class FirstTest extends \PHPUnit_Framework_TestCase
{
public function test_simple_addition()
{
$m = new Math(new SimpleAdditionTokenizer(), new Dictionary());
$this->assertSame(intval(... | true |
ae997b55783dc7c09f3c3c41c5b750daefe7efcf | PHP | z38/dynamicdns | /src/Provider/NoIp.php | UTF-8 | 1,721 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Z38\DynamicDns\Provider;
use Buzz\Listener\BasicAuthListener;
use Buzz\Listener\ListenerChain;
use Z38\DynamicDns\BrowserFactory;
use Z38\DynamicDns\Exception\InvalidHostException;
use Z38\DynamicDns\Exception\UpdateException;
class NoIp implements ProviderInterface
{
protected $browser;
pub... | true |
50802c99408f481f8b534f75d893f53f40a8045e | PHP | alainxavier/gaing | /dexc/inscription.php | UTF-8 | 3,727 | 2.5625 | 3 | [] | no_license | <?php
$message = "<h6 class='mb-4'>ou <a href='connexion.php'>cliquer pour vous connecter</a></h6>";
require('config.php');
if (isset($_REQUEST['email'], $_REQUEST['password'], $_REQUEST['confirmPassword'])){
// récupérer l'email et supprimer les antislashes ajoutés par le formulaire
$email = stripslashes($_REQUEST... | true |
7de0b6693dee4e001635a3765f581689315ca23b | PHP | vladlenov/htdocs | /MVCNews/system/BaseView.php | UTF-8 | 582 | 2.6875 | 3 | [] | no_license | <?php
namespace system;
class BaseView
{
private $content = '';
/**
* @param string $name
* @param array $params
* @param bool $toVar
* приходит из sendWebResponce
*/
public function load($name, array $params = [], $toVar = false)
{
extract($params);
... | true |
a4d4e475471f4778f7ebbd453784738c8882591e | PHP | k-wth/makabeken2016 | /php/Sample/sample3.php | UTF-8 | 926 | 3.46875 | 3 | [] | no_license | <h2> 3.文字列の扱い </h2>
<h3> 3-1.文字列の結合 </h3>
<?php
// javascript : "moji1"+"moji2" -> "moji1moji2"
// phpの文字列結合は「.」
echo "moji1"."moji2"."<br />";
// phpは変数展開があります。
// [変数展開とは????]
// " " の中で、勝手に変数が元に戻っちゃうこと。
$name = "KIMIKO";
echo "私の名前は${name}です."."<br />";
echo "私の名前は".$name.... | true |
ca686cc8e44ace3a33453970df1607780d10d5c0 | PHP | skolodyazhnyy/onesky-bundle | /Onesky/Downloader.php | UTF-8 | 3,628 | 2.71875 | 3 | [] | no_license | <?php
namespace Seven\Bundle\OneskyBundle\Onesky;
use Onesky\Api\Client;
class Downloader
{
/** @var Client */
private $client;
/** @var int */
private $project;
/** @var Mapping[] */
private $mappings = array();
/**
* @param Client $client
* @param int $project
*/
... | true |
427e379cdd5f28a637cfdeaca94f2b0dd0d07030 | PHP | maplerain/bumo-sdk-php | /src/model/response/result/data/Key.php | UTF-8 | 724 | 2.75 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: dw
* Date: 2018/9/3
* Time: 2:34
*/
namespace bumo\model\response\result\data;
class Key
{
/**
* @var string
*/
private $code;
/**
* @var string
*/
private $issuer;
/**
* @return string
*/
public function getCode()
... | true |
4087fc752f3d8e382a7dd00596fdd3e543e88e7a | PHP | ArnoldDev-coder/Mobwiser-IT-Academy | /src/Kernel/Middlewares/RoleMiddleware.php | UTF-8 | 966 | 2.921875 | 3 | [] | no_license | <?php
namespace Kernel\Middlewares;
use App\Authentification\Actions\Authentification;
use App\Authentification\Exception\ForbiddenException;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
class... | true |
fe36729a337875d9a6595c5f769ea268f87bcd60 | PHP | davamigo/php-event-sourcing | /tests/Unit/Vendor/Uuid/RamseyUuidTest.php | UTF-8 | 1,369 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Test\Unit\Vendor\Uuid;
use PHPUnit\Framework\TestCase;
use Ramsey\Uuid\Uuid;
/**
* Test of library ramsey/uuid
*
* @package Test\Unit\Vendor\Uuid
* @author davamigo@gmail.com
*
* @group Test_Unit_Vendor_Uuid
* @group Test_Unit_Vendor
* @group Test_Unit
* @group Test
* @test
*/
class Ramsey... | true |
32d9ab5377968683fe2463421fa07621c1d0b827 | PHP | MAXakaWIZARD/xls-writer | /tests/ValidationTest.php | UTF-8 | 2,541 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace Test;
/**
*
*/
class ValidationTest extends TestAbstract
{
public function testValidation()
{
$sheet = $this->workbook->addWorksheet();
$sheet->setColumnWidth(0, 20);
//positive number
$validator = $this->workbook->addValidator();
$validator->setPromp... | true |
ca13990ff63685b7044e316a69a74ec19fa8b42f | PHP | Ocejo/stripe | /collect_details.php | UTF-8 | 1,294 | 2.578125 | 3 | [] | no_license | <?php
use \Stripe\Stripe;
try {
# vendor using composer
require_once('vendor/autoload.php');
\Stripe\Stripe::setApiKey('sk_test_51G9HjnKAZZhSOcNl6LxbGVUJd7mZaj1sVuKN3EhWIwW5TS3AvhPy2DnH21vzcydWQWH7z9GOPF1Bt9mURv5BDVSr00Cei1GQRo');
header('Content-Type: application/json');
# retrieve json from POST body
$... | true |
7c304049e6ac8dfb79fdbca58946378ae9e28b4e | PHP | geometria-lab/ZF2Library | /library/GeometriaLab/Test/PHPUnit/Plugin/PluginInterface.php | UTF-8 | 508 | 2.578125 | 3 | [] | no_license | <?php
namespace GeometriaLab\Test\PHPUnit\Plugin;
use GeometriaLab\Test\PHPUnit\TestCaseInterface;
interface PluginInterface
{
/**
* Set test case object
*
* @param TestCaseInterface $test
* @return PluginInterface
*/
public function setTest(TestCaseInterface $test);
/**
* ... | true |
33059ac2f8176753babe4bd060054e87e6c54c6b | PHP | allyssalabonete/pcnhs-arms | /registrar/schoolmanagement/phpupdate/curriculum_update.php | UTF-8 | 2,144 | 2.5625 | 3 | [] | no_license | <?php
require_once "../../../resources/config.php";
include('../../../resources/classes/Popover.php');
session_start();
$willInsert = true;
$curr_id = htmlspecialchars($_POST['curr_id'], ENT_QUOTES);
$curr_name = htmlspecialchars($_POST['curr_name'], ENT_QUOTES);
$year_started = htmlspecialchars($_POST['year_st... | true |
2c5858daafe1df94bb795964c4708a1b6bb6dc6e | PHP | PacktPublishing/Functional-PHP | /Chapter05/05-monads-samples.php | UTF-8 | 1,047 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
require_once('05-monad.php');
?>
<?php
print_r(check_monad_laws(
10,
IdentityMonad::return(20),
function(int $a) { return IdentityMonad::return($a + 10); },
function(int $a) { return IdentityMonad::return($a * 2); }
));
// Array
// (
// [left identity] => 1
// [right identity] => 1
// ... | true |
2a5c29bcc9c456eea8ab55c50fb1a3e0e9184516 | PHP | wajatimur/cartella | /sabredav/lib/Sabre/DAV/DOCMGR/Directory.php | UTF-8 | 5,253 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
$GLOBALS["mycounter"] = 0;
/**
* Directory class
*
* @package Sabre
* @subpackage DAV
* @version $Id: Directory.php 706 2010-01-10 15:09:17Z evertpot $
* @copyright Copyright (C) 2007-2010 Rooftop Solutions. All rights reserved.
* @author Evert Pot (http://www.rooftopsolutions.nl/)
* @license http://c... | true |
7f286bcf9186be1304d7f39bc036009ba1555266 | PHP | ncowboy/gu_php2 | /lesson-6/controllers/ProductsController.php | UTF-8 | 609 | 2.703125 | 3 | [] | no_license | <?php
namespace app\controllers;
use app\models\repositories\ProductRepository;
use app\services\Controller;
use Exception;
class ProductsController extends Controller
{
public function indexAction()
{
echo $this->render('catalog', [
'items' => (new ProductRepository())->getAll(),
]);
}
/**
... | true |
f2946d091c20df86741192c3ca2623dc5f0791f4 | PHP | rra-am1a-2015/inlogregistratietutorialsite | /tutorials/jquery/tut_jquery_css.php | UTF-8 | 1,383 | 2.609375 | 3 | [] | no_license | <style>
.test345
{
border:30px dashed pink;
}
</style>
<h4>JQuery CSS example</h4>
<button id="btn_css">Klik op mij voor een Jquery CSS voorbeeld met chaining</button>
<button id="btn_cssJSObject">Klik op mij voor een Jquery CSS voorbeeld met een JavaScript Object</button>
<script>
$("document").ready(function(){
... | true |
cf05cbba451795b2aa5aa06f116ab47cc99a3aad | PHP | 1995tadas/hangman | /app/View/Components/WordForm.php | UTF-8 | 715 | 2.78125 | 3 | [] | no_license | <?php
namespace App\View\Components;
use Illuminate\View\Component;
class WordForm extends Component
{
public $action;
public $value;
public $buttonValue;
/**
* Create a new component instance.
*
* @param $action
* @param $buttonValue
* @param string $value
*/
publi... | true |
35d7d827d6099f1e5e7edd38eb5fd2ed316d3c76 | PHP | latency-pl/php | /response_curl.php | UTF-8 | 1,786 | 2.734375 | 3 | [] | no_license | <?php
// example
// http://localhost:8080/response.php?url=https%3A%2F%2Fsoftreck.com
require("apifunc.php");
header('Content-Type: application/json');
try {
// $url = $_GET['url'];
$url = "https://softreck.com";
$url = urldecode($url);
apifunc([
'https://php.defjson.com/def... | true |
b013fb54bd84e7743ea87607bba552c0575de7d2 | PHP | Juuro/Dreamapp-Website | /sites/silverstripe/sapphire/thirdparty/simplepie/SimplePie.php | UTF-8 | 130,861 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* A PHP-Based RSS and Atom Feed Framework
* Takes the hard work out of managing a complete RSS/Atom solution.
* Version: "Lemon Meringue"
* Updated: 3 November 2006
* Copyright: 2004-2006 Ryan Parman, Geoffrey Sneddon
* http://simplepie.org
* LICENSE: GNU Lesser General Public License 2.1 (LGPL)
* Ple... | true |
472df118ddb48c08bc1261a1f4b2f6f3b39d0be9 | PHP | ewolden/Storytelling-backend | /personalization/runRecommender.php | UTF-8 | 2,339 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*Contributors: Kjersti Fagerholt, Roar Gj�vaag, Ragnhild Krogh, Espen Str�mjordet,
Audun S�ther, Hanne Marie Trelease, Eivind Halm�y Wolden
"Copyright 2015 The TAG CLOUD/SINTEF project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the L... | true |
93fdcb9bc308ddce27c1f5c114c3c1bae2752973 | PHP | mohamedjs/multi-vue | /app/Http/Requests/Api/AdvertismentRequest.php | UTF-8 | 1,227 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Requests\Api;
use Illuminate\Foundation\Http\FormRequest;
use Validator;
use App\Advertisement;
class AdvertismentRequest extends FormRequest
{
/**
* Determine if the advertisment is authorized to make this request.
*
* @return bool
*/
public function authorize()
... | true |
73c8c2745115879ca38cc33318139827d5f0e980 | PHP | xp-forge/address | /src/test/php/util/address/unittest/ValueOfTest.class.php | UTF-8 | 5,779 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php namespace util\address\unittest;
use test\verify\Runtime;
use test\{Action, Assert, Test, Values};
use util\Date;
use util\address\{ValueOf, XmlStreaming};
class ValueOfTest {
#[Test]
public function compact_form() {
$address= new XmlStreaming('<book>Name</book>');
Assert::equals(
['name' => ... | true |
7f749fee77e9259a9c5a281a22ec2a633ca8fe3d | PHP | sabrinaMS/VacinaDigital | /Dao/NurseDAO.php | UTF-8 | 3,244 | 3.140625 | 3 | [] | no_license | <?php
include_once 'Model/Nurse.php';
include_once 'Model/PDOFactory.php';
class NurseDAO{
public function insert(Nurse $nurse){
$qInsert = "INSERT INTO nurse(name, coren, password) VALUES (:name, :coren, :password)";
$pdo = PDOFactory::getConexao();
$comando = $pdo->prepare($qInsert);
... | true |
0255822f648d5961c1b028470453616eb6b169a0 | PHP | otavioeiji/php | /aula09/exercicio03.php | UTF-8 | 692 | 2.75 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="_css/estilo.css"/>
<meta charset="UTF-8"/>
<title>Curso de PHP - CursoemVideo.com</title>
</head>
<body>
<div>
<?php
$n1 = isset($_GET["nota1"])?$_GET["nota1"]:0;
$n2 = isset($_GET["nota2"])?$_GET["nota2"]:0;
$m = (... | true |
236abf151b35ede2b7c301623df279e4da7b3efd | PHP | onaka-black/line_ranking_exporter | /application/exceptions/not_found_exception.php | UTF-8 | 145 | 2.5625 | 3 | [] | no_license | <?php
class not_found_exception extends Exception {
public function __construct($message) {
$this->message = $message;
}
} | true |
6577b610c900d1d0e6c44a9b8b541a83cee44ed4 | PHP | shrestsav/iscent | /myAdmin/quote/classes/order.php | UTF-8 | 45,240 | 2.5625 | 3 | [] | no_license | <?php
class order extends object_class{
public $productF;
public function __construct(){
parent::__construct('3');
if (isset($GLOBALS['productF'])) $this->productF = $GLOBALS['productF'];
else {
require_once(__DIR__."/../../product_management/functions/product_function.php"... | true |
1c6372482f3888bf42a86afe45b6ef6b4f9864c3 | PHP | sandstorm/NeosH5P | /Classes/Domain/Repository/ContentRepository.php | UTF-8 | 1,882 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Sandstorm\NeosH5P\Domain\Repository;
use Neos\Flow\Persistence\Doctrine\Repository;
use Neos\Flow\Annotations as Flow;
use Neos\Flow\Persistence\QueryInterface;
use Neos\Flow\Persistence\QueryResultInterface;
use Sandstorm\NeosH5P\Domain\Model\Library;
/**
* @Flow\Scope("singleton")
*/
class Content... | true |
08f1ef725b5cb9a540623f11b6b913b9df696451 | PHP | Clemards/TypingGame | /scripts/playJs.php | UTF-8 | 3,201 | 2.8125 | 3 | [] | no_license | <?php
$filename = 'inc/quote.txt';
$contents = file($filename);
$tabArray = array();
foreach($contents as $cont)
$tabArray[] = preg_replace( "/\r|\n/", "", $cont);
?>
<script>
var quoteArray;
var i;
var score = 1;
var hours; var minutes; var seconds;
$( document ).ready(fun... | true |
c6b2cc5811d99a2f0ec9e394c4821c94dee232d7 | PHP | Aurous/MySQLChat | /pages/register.php | UTF-8 | 1,995 | 2.578125 | 3 | [
"Apache-2.0"
] | permissive | <?PHP
if(isset($_POST['user']) and isset($_POST['email']) and isset($_POST['password']) and isset($_POST['retype_password']) and isset($_POST['submit'])){
if(!empty($_POST['user']) and !empty($_POST['email']) and !empty($_POST['password']) and !empty($_POST['retype_password'])){
if($_POST['password'] == $_POST['rety... | true |
6ee31810007e2369da34b6ae9670c3910135979d | PHP | brydzu/composer-patches | /src/Utils/DataUtils.php | UTF-8 | 1,776 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright © Vaimo Group. All rights reserved.
* See LICENSE_VAIMO.txt for license details.
*/
namespace Vaimo\ComposerPatches\Utils;
class DataUtils
{
public function removeKeysByPrefix(array $data, $prefix)
{
return array_intersect_key(
$data,
array_flip(
... | true |
851f23d268ffd6a5240688474c535b7006cd2b74 | PHP | pokebrian/teste | /src/NerdHerd/HelloBundle/Controller/FormTestController.php | UTF-8 | 1,243 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace NerdHerd\HelloBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use NerdHerd\HelloBundle\Entity\Product;
use Symfony\Component\HttpFoundation\Request;
class FormTestController extends Controller
{
public function newAction(Request $request)
{
// create a task and give it... | true |
e92675a1c0068a94abc2ede1643f74b104561b1d | PHP | mozartbrito/learning-php | /index.php | UTF-8 | 555 | 3.203125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?php
$sobre_nome2 = 'Soares';
$nome = "Geovane";
$nascimento = '10/02/1998';
$sobre_nome = "$sobre_nome2 Fonseca da Silva";
/*echo $nome;
echo '<br />';
echo $nascimento;
echo '<br />';
echo $sobre_nome;*/
//esse é um comen... | true |
e8aff0642fba4d971a92a09f41197c81230a5c8a | PHP | ScriptSB/Community_coyote | /app/Services/Parser/Factories/AbstractFactory.php | UTF-8 | 2,528 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace Coyote\Services\Parser\Factories;
use Illuminate\Http\Request;
use Illuminate\Container\Container as App;
use Illuminate\Contracts\Cache\Repository as Cache;
use Illuminate\Contracts\Auth\Factory as Auth;
abstract class AbstractFactory
{
const CACHE_EXPIRATION = 60 * 24 * 30; // 30d
/**
... | true |
b0963b80d43096d4c370d71b279c5b1fab3a657e | PHP | Jeket/xml | /src/Xml/Xmlns/Xmlns.php | UTF-8 | 1,160 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace VeeWee\Xml\Xmlns;
/**
* @psalm-immutable
*/
final class Xmlns
{
private string $xmlns;
private function __construct(string $xmlns)
{
$this->xmlns = $xmlns;
}
/**
* @psalm-pure
*/
public static function xmlns(): self
{
... | true |
d10e48d6f6cd7806b8f9a1d08d16bdde5766725f | PHP | jeansebastienh/xdtp | /Afdn/Xdebug/ExecutionNode/Decorator/Dot.php | UTF-8 | 2,046 | 2.734375 | 3 | [] | no_license | <?php
/**
* PHP execution node DOT decorator
*
* PHP version 5
*
* @category AfdnFramework
* @package Xdebug
* @author Jean-Sébastien H. <jeanseb@au-fil-du.net>
* @copyright 2011 AuFilDuNet http://www.au-fil-du.net
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
*/
require_o... | true |
50d1207d3d55ea9af4f71dfe2d57fbd11dfdb363 | PHP | Mubiridziri/patterns | /Builder/Builder/CottageBuilder.php | UTF-8 | 796 | 2.984375 | 3 | [] | no_license | <?php
/**
* @project Patterns
* @author Yury Potapov on 17.10.2020.
*/
namespace App\Builder;
use App\Entity\House;
class CottageBuilder implements Builder
{
/**
* @var House
*/
private $house;
public function reset()
{
$this->house = new House();
}
public function bui... | true |
5986982de9034f4a6965dabf02abd40f476f3cb3 | PHP | Nightzio/htmlPtech | /Auth_ldap.php | UTF-8 | 1,956 | 2.59375 | 3 | [] | no_license | <?php
require "constants.php";
session_start();
if(!empty($_POST)){
if ( isset( $_POST['username'] ) && isset( $_POST['password'] ))
{
$user = $_POST["username"];// timo.boll
$ldap_dn = $user."@sdis60.fr"; // timo.boll@pingpong.fr
$ldap_pwd = $_POST["password"];
//$ldap_DN = "DC=SDIS60,DC=FR";
//ini_set('... | true |
5d5a7666a1b2b0bad630dea6a76a1777a6a827ba | PHP | goksagun/pre-order-api | /src/Utils/StringHelper.php | UTF-8 | 1,008 | 3.390625 | 3 | [] | no_license | <?php
namespace App\Utils;
class StringHelper
{
/**
* Generate a more truly "random" alpha-numeric string.
*
* @param int $length
* @return string
*/
public static function random($length = 16): string
{
$string = '';
while (($len = strlen($string)) < $length) {
... | true |
8cafaf70b561f3e53c9149d5ceeef2382dffd644 | PHP | crysfel/budgeting-app | /app/Http/Controllers/Api/AuthController.php | UTF-8 | 17,966 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Api;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Mail;
use App\Mail\RecoverPassword;
use Tymon\JWTAuth\Exceptions\JWTException;
use App\Http\Serializers\UserSerializer;
use App\User;
use App\Activity;
use... | true |
9ca80d2d62f2c9267273b64bff00f597f301787d | PHP | szerko/Respond2 | /plugins/cart/process.php | UTF-8 | 1,662 | 2.828125 | 3 | [] | no_license | <?php
// load dao
include '../../global.php';
include 'dao/Product.php';
// create controller
class ProcessCart extends Actions
{
private $AuthUser;
function __construct($authUser){
parent::__construct();
$this->AuthUser = $authUser;
$this->Ajax = $this->GetPostData("Ajax"); /* check for any ajax calls *... | true |
c2c3db212159a1d3ad85eb61aa4f22585c5cfaa3 | PHP | sarmentof/CursoPHP7 | /operadores/exemplo-05.php | UTF-8 | 186 | 3.265625 | 3 | [] | no_license | <?php
###############
// Operadores
###############
// Space chip
$a = 50;
$b = 35;
var_dump($a <=> $b); // Caracteres "<=>" faz comparação do tipo Maior(-1)/Menor(1)/Igual(0)
?> | true |
0edeb47acc97ccd3e51410e60736df44cfc71a01 | PHP | CynthiaDanielaGG/Manejo-de-archivos-basico-HTML---PHP | /registro.php | UTF-8 | 345 | 2.828125 | 3 | [] | no_license | <?php
$mostrar=fopen('datos.txt','r');
while(!feof($mostrar))
{
$id=fgets($mostrar);
$nombre=fgets($mostrar);
$calificacion=fgets($mostrar);
if($id!=""){
echo "<br> ID: ".$id."<br>";
echo "<br> Nombre: ".$nombre."<br>";
echo "<br> calificacion: ".$calificacion."... | true |
ab6307a7f9c38b7d2162b7516bad0cf2dbc80c98 | PHP | rahulyhg/happy-giraffe | /site/frontend/modules/community/models/CommunityQuestionForm.php | UTF-8 | 2,846 | 2.5625 | 3 | [] | no_license | <?php
/**
* Форма вопроса специалисту
*
* @property CommunityContent $post
* @property User $user
*/
class CommunityQuestionForm extends CFormModel
{
const FORUM_ID = 2;
const RUBRIC_TITLE = 'Вопросы будущих мам';
public $title;
public $text;
public $first_name;
public $email;
privat... | true |
e8dacef2012b80f0b836b2d454e26da812de08c7 | PHP | hatake04/new-eastbury | /viewAllClasses.php | UTF-8 | 804 | 3 | 3 | [] | no_license | <?php
$query = "SELECT * FROM CLASSES;";
$result = mysqli_query($conn, $query);
if(mysqli_num_rows($conn) == 0)
{
echo("No classes found.");
}
else{
echo("<table><tr><td>CRN</td><td>Faculty ID</td><td>Course ID</td><td>Room ID</td><td>Semester ID</td><td>Class Section</td><td>Sea... | true |
c7c41a5cb7d5c816f76e9b5b990f24bdd563ba4f | PHP | jasontwong/modup | /modup/module/GoogleAnalytics/module.php | UTF-8 | 1,425 | 2.515625 | 3 | [] | no_license | <?php
class GoogleAnalytics
{
public function hook_admin_nav()
{
return array(
'Google Analytics' => array(
'Show report' => '<a href="/admin/module/GoogleAnalytics/data/">Show report</a>'
)
);
}
public function hook_admin_dashboard()
{
... | true |
a10ea5b304a295168547488cb0d5bca226ac75e5 | PHP | devboyarif/laravel-repository-crud | /app/Http/Controllers/DoctorController.php | UTF-8 | 2,374 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Doctor;
use App\Repositories\Doctor\DoctorInterface;
use Illuminate\Http\Request;
class DoctorController extends Controller
{
protected $doctor;
public function __construct(DoctorInterface $doctor)
{
$this->doctor = $doctor;
}
/**
... | true |
9661e63e0c34e6a244fcff24eb41f209c633a456 | PHP | ludoliv/projet_olympiadeSI1A12B | /GestionBD_Android/user.php | UTF-8 | 2,514 | 2.59375 | 3 | [] | no_license | <?php
include '../BD/Interactions/Connexion.php';
$cnn = connect_database();
//Define some value
define("ACTION_LOGIN", "login");
define("RESULT_SUCCESS", 0);
define("RESULT_ERROR", 1);
define("RESULT_USER_EXISTS", 2);
//$action = $_POST["action"];
$action="login";
$result = RESULT_ERROR;
$jury=a... | true |
f59d99c52a47922a2002fa1aec3a30c10ef43ae4 | PHP | sanmark/quotesharp-api | /app/butlers/SessionButler.php | UTF-8 | 261 | 2.515625 | 3 | [] | no_license | <?php
class SessionButler
{
public static function setOrganization ( $organization )
{
return Session::set ( SESSION_ORGANIZATION , $organization ) ;
}
public static function getOrganization ()
{
return Session::get ( SESSION_ORGANIZATION ) ;
}
}
| true |
5d9cbe8c8d6c0831340a663b37522866b70244f1 | PHP | baptistechev/L3-Projet-ComplexeSportif- | /html/score.php | UTF-8 | 4,680 | 2.578125 | 3 | [] | no_license | <?php
if(isset($_POST['up'])){
foreach ($_POST as $k => $v) {
if($k != 'up' && $k!='next'){
$vals = explode("_", $k);
if($vals[0] == "format"){
$pouls=$em->getRepository('Poule... | true |
212ea8ee9f452ff9c1a5ca203bd965ce11e09a49 | PHP | norazmira/clinic-appointment-Rabbitmq | /hospitalApp/src/publisher.php | UTF-8 | 3,011 | 2.671875 | 3 | [] | no_license | <?php
require dirname(__DIR__) . '/vendor/autoload.php';
include_once 'conn.php';
use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Message\AMQPMessage;
$host = 'spider.rmq.cloudamqp.com';
$port = 5672;
$user = 'ydjtkfhg';
$pass = 'SnRM9CiwuIasm1rIDD72gaqsFtsNa5zI';
$vhost = 'ydjtkfhg';
$exchange = 'hos... | true |
97299d0b69206ca0fc9cf91362ebde29521a3f23 | PHP | danleuter/Peter-Mckinnon-kal | /assets/dashboard/create.php | UTF-8 | 4,399 | 2.515625 | 3 | [] | no_license | <?php
require('../../config/config.php');
require('../../config/db.php');
if(isset($_POST['submit1'])){
// Get form data text
$title = mysqli_real_escape_string($conn, $_POST['art_title']);
$desc = mysqli_real_escape_string($conn, $_POST['art_desc']);
$body = mysqli_real... | true |
c3d8d2803a6910693f9d8e841cdabf2ba9c62bac | PHP | sneha2245/online-chatting-system | /chatcontentprocess.php | UTF-8 | 891 | 2.53125 | 3 | [] | no_license | <?php
if(sizeof($_POST)>0){
$servername="localhost";
$username="root";
$password="";
$dbName="chatting-system";
$port="3308";
//var_dump($_POST);
$sen=$_POST["sender"];
$rev=$_POST["receiver"];
if($_POST["content"]==null){
return 0;
}else{
$text=$_POST["co... | true |
9ed60d2f922595713d921057c97ae7ff011a03d4 | PHP | xseduard/FestCar | /app/Models/PagoRelRuta.php | UTF-8 | 1,242 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Eloquent as Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class PagoRelRuta
* @package App\Models
* @version June 25, 2017, 8:35 pm COT
*/
class PagoRelRuta extends Model
{
use SoftDeletes;
public $table = 'pago_rel_rutas';
protected $dates = ['dele... | true |
a130ad65dcdef7f5ec08cc903878001495024095 | PHP | nunoluciano/uxcl | /public_html/modules/openid/class/UpdateCert.php | UTF-8 | 4,303 | 2.625 | 3 | [] | no_license | <?php
/**
* Update Cert File.
* @author Original author: Kisara (http://www.kisara-s.com/)
* @version $Rev$
* @link $URL$
*/
class UpdateCert
{
function download_convert_cert($crt, $txt)
{
$url = 'http://mxr.mozilla.org/seamonkey/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1';
$... | true |
cfe43a5d713b680b5426f73c63f46111d2549a32 | PHP | dnaber-de/wp-provisioner | /src/Wp/WpCliPlugin.php | UTF-8 | 7,724 | 3.140625 | 3 | [] | no_license | <?php # -*- coding: utf-8 -*-
namespace WpProvision\Wp;
use WpProvision\Command\Command;
use InvalidArgumentException;
use Exception;
/**
* Class WpCliPlugin
*
* @package WpProvision\Wp
*/
final class WpCliPlugin implements Plugin {
/**
* @var Command
*/
private $wp_cli;
/**
* @param Command $wp_cli
... | true |
e581a9839015790d0e96b70eba467bda4ae9b127 | PHP | zachzidan/shopping_cart_management | /DisplayProducts.php | UTF-8 | 3,288 | 2.984375 | 3 | [] | no_license | <?php
require_once("./config.php");
// First, include the common database access functions, if they're not already included
require_once("./common_db.php");
require_once("./session.php");
require_once("./login.php");
?>
<HTML>
<HEAD>
<TITLE> <?php echo $store_name; ?> - Products</TITLE>
</HEAD>
<BODY>
<?php include "h... | true |
1e19fe94e173aeef08d1f4a1552b63175d2459ea | PHP | dip7501686040/notredamedelhi | /upload.php | UTF-8 | 1,419 | 2.875 | 3 | [] | no_license | <?php
// Include the database configuration file
include 'connect.php';
$statusMsg = '';
// File upload path
$targetDir = "uploads/";
$fileName = basename($_FILES["file"]["name"]);
$targetFilePath = $targetDir . $fileName;
$fileType = pathinfo($targetFilePath,PATHINFO_EXTENSION);
$category=$_POST['category'];
$type=$_... | true |
4e9bcc51da3ed9e0cbe0d585c90df7c8e49a8ee5 | PHP | cloudinary/cloudinary_php | /src/Tag/JsConfigTag.php | UTF-8 | 1,591 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Cloudinary PHP package.
*
* (c) Cloudinary
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Cloudinary\Tag;
use Cloudinary\ArrayUtils;
use Cloudinary\Configuration\Configuration;
/**... | true |
0ad00e67862de36735d1ed32e9f0e60456a19584 | PHP | barbietunnie/guzzle-playground | /psr7-response.php | UTF-8 | 1,070 | 2.953125 | 3 | [] | no_license | <?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
$client = new Client();
$response = $client->request(
'GET',
'http://jsonplaceholder.typicode.com/posts/1'
);
var_dump($response);
echo "Status code: " . $response->getStatusCode() . "\r\n";
echo "Reason Phras... | true |
269479dfd2559a0adc5b22967cc769f679cdfc88 | PHP | sgh1986915/php-oop-mvc-unbeatablecar | /checkoutfolder/shared/model/filetype/filetypefield.class.php | UTF-8 | 2,218 | 2.640625 | 3 | [] | no_license | <?php
class InvFiletypeField {
protected $value = '';
protected $settings = array();
protected $obj_tokenmanager = null;
public function __construct() {
$this->obj_tokenmanager = InvTokenManager::getInstance();
$this->sitesettings = SiteSettings::getInstance();
}
public function create($settings , $valu... | true |
db4407d6432b7c1d0cf564102056ad44f9160e2d | PHP | hackeroM/webosen04 | /exit.php | UTF-8 | 2,699 | 2.5625 | 3 | [] | no_license | <?php
// Страница авторизации
# Функция для генерации случайной строки
function generateCode($length=6) {
$chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHI JKLMNOPRQSTUVWXYZ0123456789";
$code = "";
$clen = strlen($chars) - 1;
while (strlen($code) < $length) {
$code .=... | true |