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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
7ee0e1fe65aafbbbc15a9041645687bbda59aacf | PHP | doshu/fattura_elettronica | /src/Elements/DatiBeniServizi.php | UTF-8 | 649 | 2.59375 | 3 | [] | no_license | <?php
namespace Inoma\FatturaElettronicaPR\Elements;
use Inoma\FatturaElettronicaPR\Element;
class DatiBeniServizi extends Element {
protected $_name = "DatiBeniServizi";
protected $_children = [
'dettaglioLinee',
'datiRiepilogo',
];
... | true |
1c024bc69d563b8aad9a865d420a29c14b975e81 | PHP | m0r1arty/simpleblog | /modules/grabber/transports/DirTransport.php | UTF-8 | 1,607 | 2.734375 | 3 | [] | no_license | <?php
/**
* Файл содержит транспорт DirTransport
* @author M0r1arty <m0r1arty.nv@yandex.ru>
*/
namespace app\modules\grabber\transports;
use Yii;
use app\modules\grabber\base\BaseTransport;
use app\modules\grabber\interfaces\GetFilesInterface;
use app\modules\grabber\exceptions\DirNotFoundException;
use app\modu... | true |
491382f94b8f7b0cb92c7fc8ad67f5a6fed3b914 | PHP | itchayaketkaew/POS-System | /rat.php | UTF-8 | 750 | 2.921875 | 3 | [] | no_license | <!DOCTYPE html>
<?php
require'./condb.php';
$articleArr=[];
$query=$con->query("SELECT article.id,article.name,AVG(tbl_rating.rating) AS rating FROM article LEFT JOIN tbl_rating ON article.id=tbl_rating.name GROUP BY article.id");
while ($row=$query->fetch_object()){
$articleArr[]=$row;
}
?>
<html>
<head... | true |
09fb40a165dce8d5ab9c4699489ee5aaf583e281 | PHP | borille/zf1-framework | /Urbs/Db/Table/Conscf/Consorcio.php | UTF-8 | 1,163 | 2.53125 | 3 | [] | no_license | <?php
require_once 'Urbs/Db/Table/Conscf.php';
/**
* Classe Db table que acessa a tabela CON_SCF.TB0206_CONSORCIO
*
* @category Urbs
* @package Urbs_Db_Table
* @subpackage Conscf
* @name Urbs_Db_Table_Conscf_Consorcio
* @copyright Copyright (c) 2014 - URBS
* @version 1.0
*/
class Urbs_D... | true |
ceaa28cd0a69169d9d828de1a99f98b7f072c933 | PHP | comcduarte/laminas-box | /src/API/Connection.php | UTF-8 | 659 | 2.828125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Laminas\Box\API;
class Connection
{
/**
*
* @var \Laminas\Box\API\AccessToken
*/
private $access_token;
public function __construct ()
{
}
/**
*
* @return AccessToken
*/
public ... | true |
d3e0f553e70aa8602e507b01fd778e3e56690161 | PHP | lingluadmin/ll_jdy_code | /9douyu-module/app/Http/Logics/Activity/ActivityConfigLogic.php | UTF-8 | 4,744 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: scofie <wu.changming@9douyu.com>
* Date: 17/1/20
* Time: 上午11:20
*/
namespace App\Http\Logics\Activity;
use App\Http\Logics\Logic;
use App\Http\Models\Activity\ActivityConfigModel;
class ActivityConfigLogic extends Logic
{
/**
* @param $page
* @param $size... | true |
45527ba31861b7fd96b727c6db0bbcc4cc07ee91 | PHP | Bladepianist/mini-fwk-master | /modules/CRUDProfesseur/CRUDProfesseur.module.php | UTF-8 | 9,712 | 2.859375 | 3 | [] | no_license | <?php
class CRUDProfesseur extends Module{
public function action_index(){
$this->set_title("Liste");
//création de variables PHP
//on récupère de la base de données des éléments
$data = ProfesseurManager::listerProfesseur();
//passe les variables au template
$this->tpl->assign('data',$data);
... | true |
860f71264f58e1a0f9cf45c91956a2729b7e9f70 | PHP | naureenk30/HelpQuest | /nishi/edit-degree.php | UTF-8 | 2,418 | 2.578125 | 3 | [] | no_license | <?php
session_start();
include 'include/header.php';
include 'include/navbar.php';
include 'include/db.php';
//Fethch ID given in URL
if ( !empty($_GET['ad_id'])) {
$ad_id = $_REQUEST['ad_id'];
}
//Fetch data from... | true |
8235959d226f62a89f572ce8925af879196d9b1b | PHP | notxarb/my_very_own_phpinfo | /memcached.php | UTF-8 | 402 | 2.5625 | 3 | [] | no_license | <?php
if (isset($_SERVER['CACHE2_HOST'])) {
$memcached = new Memcached();
$memcached->addServer($_SERVER['CACHE2_HOST'], $_SERVER['CACHE2_PORT'] );
$memcached->set("test_key", "test_value");
$value = $memcached->get("test_key");
if ($value == "test_value") {
echo "matches!";
}
else {... | true |
3309074c052ad377ee9363538a0428711c2844be | PHP | StanislavEleninWeb/imoti | /app/interfaces/OutputInterface.php | UTF-8 | 155 | 2.65625 | 3 | [] | no_license | <?php
namespace app\interfaces;
/**
*
* @author stanislavelenin
*
*/
interface OutputInterface
{
public function getOutput(): string;
}
| true |
d1843bfa50eaa4de2a5063fc0d38f2897a465295 | PHP | SoftwareEngineering2015/CommunIT_2.0 | /models/remove_resident_from_community_model.php | UTF-8 | 752 | 2.734375 | 3 | [] | no_license | <?php
// Make sure all the required variables are set, if not then exit
if (!isset($_REQUEST['community']) && !isset($_REQUEST['user'])) {
exit;
}
include ('db_class.php'); // Include the database class
// Get the variables and set them
$community_id = $_REQUEST['community'];
$user_id = $_REQUEST['user'];
$sql_de... | true |
6ff2ed3d802df182a8052f95a81757c1a18756c2 | PHP | tomasz-zukowski/laboratorium-mas-bitumicznych | /Models/database_model.php | UTF-8 | 12,599 | 2.84375 | 3 | [] | no_license | <?php
class database_model extends model {
private $backupDirPath = 'Others/Backups';
/**
* @param null $year
* @param null $month
* @param string $extension
* @return array|bool
*/
public function getBackupList($year = null,$month = null,$extension = 'sql') {
/** przetw... | true |
c83110b6b69f60afbf0f225342935b1c1ba056af | PHP | BrainIsBad/mvc_proj | /application/models/model_registration.php | UTF-8 | 902 | 2.890625 | 3 | [] | no_license | <?php
class Model_Registration extends Model
{
private $db;
public function __construct()
{
$this->db = new Data_base();
}
public function check_data($data)
{
$errors = array();
if (trim($data['name']) == '') {
$errors[] = 'Error: enter name!';
}
if (trim($data['surname']) == '') {
$errors[] = 'E... | true |
be078dc7a80e6b873a9180b3185b432f3831a244 | PHP | KonstantinKuklin/PHPBenchHS | /src/Analyzer/HSPHP/InsertBench.php | UTF-8 | 688 | 2.578125 | 3 | [] | no_license | <?php
/**
* @author KonstantinKuklin <konstantin.kuklin@gmail.com>
*/
namespace Analyzer\HSPHP;
use Analyzer\AbstractHSPHPJob;
class InsertBench extends AbstractHSPHPJob
{
public function run()
{
$rows = $this->getRows();
$indexId = $this->getIndexId();
for ($i = 1000, $to = $rows ... | true |
2f78f20f8c15d7f682bf26f91bbba78e308d640d | PHP | fluxapps/AssistedExercise | /classes/Setting/class.xaseSettingM1.php | UTF-8 | 3,967 | 2.65625 | 3 | [] | no_license | <?php
require_once "./Customizing/global/plugins/Services/Repository/RepositoryObject/AssistedExercise/classes/Setting/class.xaseSettingAbstract.php";
/**
* Class xaseSettingM1
*
* @author Benjamin Seglias <bs@studer-raimann.ch>
*/
class xaseSettingM1 extends xaseSettingAbstract {
/**
* @var int
*
* @db_h... | true |
1c55533b93a2ad050584e57218b97cf43216e674 | PHP | martinvium/shackle | /library/Shackle/Rule/DecoratorAbstract.php | UTF-8 | 1,305 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Copyright 2011 Martin Vium
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | true |
e57c3c288f1881c9a8fbd1815ac9ae1ee9e510e7 | PHP | iprbooks/datalib-php-sdk | /src/Client.php | UTF-8 | 429 | 2.859375 | 3 | [] | no_license | <?php
namespace Datalib\Sdk;
use Datalib\Sdk\Core\Curl;
final class Client
{
/*
* jwt token
*/
private $token;
/**
* Конструктор Client
* @param $token
*/
public function __construct($token)
{
$this->token = $token;
}
public function makeRequest($apiMe... | true |
d57b2645f1287c60cf9735848586eb9572bed516 | PHP | davidgilhdez/descuentos-online | /tests/UsersBundle/UnitTests/GetNombreToUrlTest.php | UTF-8 | 414 | 2.578125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace tests\UsersBundle\UnitTests;
use ProductsBundle\Entity\Producto;
class GetNombreToUrlTest extends \PHPUnit_Framework_TestCase
{
public function testGetNombreToUrl(){
$producto = new Producto();
$producto->setNombre('Nombre del producto');
$this->assertEquals('Nombre-del-producto', ... | true |
49d3bc81372bf72c3e57eae8a1bdefad99d1e403 | PHP | Joshuawema/login_regisration | /switch statement.php | UTF-8 | 701 | 3.234375 | 3 | [] | no_license | <?php
//$grades= "80";
//switch ($grades) {
// case 80:
// echo "You have an A";
// echo "<br>";
// case 60:
// echo "You have a B";
// echo "<br>";
// case 40:
// echo "You have a C";
// echo "<br>";
// case 20:
// echo "You have a D";
// echo "<br>";... | true |
ffd984cce618d3b1e5f78fd0c7ac68ad8fbe3432 | PHP | francescosganga/php-notes | /reset.php | UTF-8 | 731 | 2.625 | 3 | [] | no_license | <?php
include("mysql.inc.php");
$connection = new MySQLi($MySQL[0], $MySQL[1], $MySQL[2])
or die($connection->connect_errno);
$result .= "connected to {$MySQL[0]}.\n";
$connection->select_db($MySQL[3])
or _error("can't database '{$MySQL[3]}'", $connection->error);
if(!$error)
$result .= "database '{$MySQL[... | true |
63ba4c3a0828302a34e7e25b9efdf59ca6c5ab53 | PHP | Brezgalov/timeslot-origin-api-client | /src/Client.php | UTF-8 | 3,179 | 2.546875 | 3 | [] | no_license | <?php
namespace Brezgalov\TimeslotOriginApiClient;
class Client extends \Brezgalov\ApiWrapper\Client
{
const PROVIDER_ID_VTERMINAL = 9;
/**
* @var string
*/
protected $host;
/**
* @inheritdoc
*/
public function __construct($host, $token = null)
{
$this->host = $ho... | true |
be96285bd56c4f8523538f4239a4a2b32b5eb58b | PHP | CodeDone4U/niche-one | /wp-content/plugins/woocommerce/packages/woocommerce-admin/src/Notes/RealTimeOrderAlerts.php | UTF-8 | 1,469 | 2.640625 | 3 | [
"LGPL-2.0-or-later",
"LicenseRef-scancode-warranty-disclaimer",
"LGPL-2.1-or-later",
"GPL-3.0-or-later",
"GPL-1.0-or-later",
"GPL-3.0-only",
"LicenseRef-scancode-other-copyleft",
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-only",
"GPL-2.0-or-later"
] | permissive | <?php
/**
* WooCommerce Admin Real Time Order Alerts Note.
*
* Adds a note to download the mobile app to monitor store activity.
*/
namespace Automattic\WooCommerce\Admin\Notes;
defined( 'ABSPATH' ) || exit;
/**
* Real_Time_Order_Alerts
*/
class RealTimeOrderAlerts {
/**
* Note traits.
*/
use NoteTraits;... | true |
a3f251853eb5c82fdaa556672a8296e0ab34c281 | PHP | felipegirotti/quero-ser-clickbus | /testes/cash-machine/src/CashMachine/CashMachine.php | UTF-8 | 1,574 | 3.265625 | 3 | [] | no_license | <?php
namespace CashMachine;
class CashMachine
{
protected $noteMachine = array(100, 50, 20, 10);
protected $input;
public function setInput($input)
{
$this->checkValidInput($input);
$this->input = $input;
return $this;
}
public function getInput()
{
if (empty($this->input))
return 'Empty Se... | true |
55fae59aaaf608bbd17c7af3554c5f02dae5e126 | PHP | sdhar25/basicPHP | /string1.php | UTF-8 | 2,396 | 2.75 | 3 | [] | no_license | <?php
echo strlen("hello worrld");
echo "<br/>" . strrev("hello world");
echo "</br>" . str_replace("to all","Mohan","Good Morning to all");
echo "</br>" . strpos("hello world","hello");
echo "</br>" . strpos("bjsdh","h");
echo "</br>";
var_dump(strpos("dhgh","q"));
echo "</br>" . trim(" dge ");
echo "</... | true |
ea09a6c1da65b7f7f4d53fe389fe1f66e6dbf9f5 | PHP | erimok/uycore | /UYCore/Security/ApiProtection.php | UTF-8 | 689 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace UYCore\Security;
final class ApiProtection
{
public static function protectAllEndpointsByAuth(): void
{
add_filter('rest_authentication_errors', [self::class, 'secureApiByAuth']);
}
/**
* @param $result
* @return \WP_Error|null|true
*/
public static func... | true |
d74dda7550753bcc41250d97d38f9e3b10504dae | PHP | nghiacr002/legophp | /Engine/HTML/Select.php | UTF-8 | 663 | 2.796875 | 3 | [] | no_license | <?php
namespace APP\Engine\HTML;
class Select extends Element
{
protected $_aOptions = array();
public function __construct()
{
parent::__construct();
$this->_sPatternHTML = '<select %s />';
}
public function setOption($mKey, $sName, $aSubCats = array())
{
if (count... | true |
5a33f9b27218911a3031621207669ae9e3b9a659 | PHP | andycheg/oracle-repo-fetcher | /PackageList.php | UTF-8 | 2,471 | 2.953125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: andy
* Date: 10/01/14
* Time: 22:17
*/
require_once ("PackageMeta.php");
class PackageList implements Iterator, Countable
{
private $_fileUri;
private $_opened = false;
/**
* @var XMLReader
*/
private $_reader;
private $_count;
private $_index;
private $_va... | true |
e560c983a7190e03449e6b91733a65f1b5e2d9f3 | PHP | Stanislaw-Golebiewski/Database-Systems-project | /php/change_username.php | UTF-8 | 1,092 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
if (isset($_POST['change_username'])) {
if (empty($_POST['new_username'])) {
$error_username = "Empty field!";
}
else
{
include("db_connect.php");
$old_username = $_SESSION['user_login'];
$new_username = $_POST['new_username'];
$new_username = stripslashes($new_username);
// Form a... | true |
373b458ff2f24c7830d547060f8ee050458a5b53 | PHP | helmedeiros/meucondominio | /sistema/php/email.php | UTF-8 | 230 | 2.71875 | 3 | [] | no_license | <?php
class email{
function sendMail($subject, $message, $to){
$headers = 'From: no-reply@meucondominio.net'."\r\n".'Reply-To: webmaster@example.com.'."\r\n".'Content-Type: text/html; charset="utf-8"';
mail($to, $subject, $message, $headers);
}
}
?> | true |
4d0505271702b33f0bbc3144b86f2e8a4f57a976 | PHP | ce-akhil/eduis | /tnp/trunk/application/models/MemberInfo/Experience.php | UTF-8 | 6,846 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
class Tnp_Model_MemberInfo_Experience extends Tnp_Model_Generic
{
protected $_student_experience_id;
protected $_member_id;
protected $_industry_id;
protected $_functional_area_id;
protected $_role_id;
protected $_experience_months;
protected $_experience_years;
protected... | true |
d47290ec904a3f2408eec460e2bb982bc9ee8d1c | PHP | pckg/auth | /src/Pckg/Auth/Form/Validator/UserEmail.php | UTF-8 | 687 | 2.71875 | 3 | [] | no_license | <?php
namespace Pckg\Auth\Form\Validator;
use Pckg\Concept\AbstractObject;
use Pckg\Htmlbuilder\Validator\AbstractValidator;
/**
* Class UserEmail
*
* @package Pckg\Auth\Form\Validator
*/
class UserEmail extends AbstractValidator
{
/**
* @var string
*/
protected $msg = 'User with email doesn\'... | true |
e2bc95eee09edf30e78d81f3ad2cf2bcf1ad7e4c | PHP | ojalaquellueva/tnrs_db | /prepare_staging/standardizeNulls.inc | UTF-8 | 604 | 2.703125 | 3 | [] | no_license | <?php
// Delete records where scientificName is an empty string.
// Prevents fatal error in the next step, as scientificName
// can't be null.
// No idea how this could happen at this late stage in
// the pipeline, but it did.
echo " Deleting records with missing scientificName...";
$msg_error = "Failed!\r\n";
$s... | true |
54a6ef91739e557f5ae3c9a425c78cd6e724d3f1 | PHP | pokap/USlugify | /tests/USlugifyTest.php | UTF-8 | 969 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
use USlugify\USlugify;
class USlugifyTest extends \PHPUnit_Framework_TestCase
{
/**
* @var \USlugify\USlugifyInterface
*/
private $uslugify;
/**
* {@inheritdoc}
*/
protected function setUp()
{
$this->uslugify = new USlugify();
}
/**
* @dataProvider ... | true |
e9a3eefcd67fed73aafe1919432a9c4745067c82 | PHP | 4406arthur/Training_Todo | /model/Item.php | UTF-8 | 904 | 2.90625 | 3 | [] | no_license | <?php
namespace Models;
// access layer interface for Item.
class Item {
protected $todo;
protected $dm;
//inject necessary class.
public function __construct(){
//Get object document Mapper manager instance $dm.
$this->dm = require_once __DIR__ . '/../bootstrap.php';
$this->... | true |
40fe634a96f78ee415e3240e5521e74a7e75ae2d | PHP | arckinteractive/analytics | /classes/ArckInteractive/Analytics/LatLong.php | UTF-8 | 900 | 3.359375 | 3 | [] | no_license | <?php
namespace ArckInteractive\Analytics;
class LatLong {
protected $lat;
protected $long;
protected $location;
/**
* Constructor
*
* @param float $lat Latitude
* @param float $long Longitude
* @param string $location Location name/address
*/
public function __construct($lat, $long, $l... | true |
9924ecd1e9a044e47e75e086efafe1b1dbff5b5b | PHP | AndreGaytan/ClaseDAO | /Conexion.php | UTF-8 | 534 | 3.046875 | 3 | [] | no_license | <?php
class Db{
private static $conexion=NULL;
public function __construct (){}
public static function conectar(){
$pdo_options[PDO::ATTR_ERRMODE]=PDO::ERRMODE_EXCEPTION;
try {
self::$conexion= new PDO('mysql:host=localhost;dbname=EJEMPLO', 'root', 'AndreRootP@$$');
... | true |
106e71f8ee0a43992d70dc0b02e40f400087208d | PHP | maciej-sz/nbp-php | /src/CurrencyTradingRates/Infrastructure/Mapper/CurrencyTradingRatesMapper.php | UTF-8 | 2,779 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace MaciejSz\Nbp\CurrencyTradingRates\Infrastructure\Mapper;
use MaciejSz\Nbp\CurrencyTradingRates\Domain\CurrencyTradingRate;
use MaciejSz\Nbp\Shared\Infrastructure\Serializer\ArrayDataAccess;
use MaciejSz\Nbp\Shared\Infrastructure\Validator\NbpNumericRateValidator;
use MaciejSz... | true |
93093adf726a4835ba7c97a6052bbc4ab97a312b | PHP | thepurpleblob/railtour | /src/library/Admin.php | UTF-8 | 31,728 | 2.625 | 3 | [] | no_license | <?php
namespace thepurpleblob\railtour\library;
// Lifetime of incomplete purchases in seconds
define('PURCHASE_LIFETIME', 14400);
use Exception;
use ORM;
use thepurpleblob\core\Session;
/**
* Class Admin
* @package thepurpleblob\railtour\library
* @return array list of services
*/
class Admin {
private $s... | true |
2873801f276b74dc15a245a32ea73c2f512dd294 | PHP | Switch-Media/php-m3u8 | /src/AbstractContainer.php | UTF-8 | 846 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the PhpM3u8 package.
*
* (c) Chrisyue <http://chrisyue.com/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Chrisyue\PhpM3u8;
abstract class AbstractContainer implements DumpableInterfa... | true |
3bfbc970377b24db322b41958007e0856bcf2d22 | PHP | KoEonYack/DB-project | /KEY_project/hated_movie_query.php | UTF-8 | 1,189 | 2.671875 | 3 | [] | no_license | <?php
// 본 영화리스트 출력하는 함수
function hateMovieList(){
global $conn;
$user_name= $_SESSION['ses_userid'];
$user_id = $_SESSION['userlist_id'];
$user_sql = "SELECT * FROM `movie_list` WHERE `movie_id` IN (SELECT `movie_id` FROM `user_hate_list` WHERE `userlist_id`={$user_id})";
... | true |
d1f2432535b06925a40712aaf2f04c62d6734457 | PHP | chopstickr/wp_drama_levels | /Drama_Grid_Column_Adaptor_Trait.php | UTF-8 | 4,718 | 2.890625 | 3 | [] | no_license | <?php
require_once 'Drama_Manager.php';
/**
* Adaptor for adding the drama level column to common admin grids.
*/
trait Drama_Grid_Column_Adaptor_Trait {
// php doesn't support constants in traits
public static $COLUMN_TYPE_POSTS = 1;
public static $COLUMN_TYPE_COMMENTS = 2;
/**
* Returns the co... | true |
eb0cd5ddd0fca159f5d35e0f77689aeacaa99eed | PHP | herewithme/bea-multilingual-multisite | /libs/bea_csf/client/class.post_type.php | UTF-8 | 2,883 | 2.53125 | 3 | [] | no_license | <?php
class BEA_CSF_Client_PostType {
/**
* Constructor
*
* @return void
* @author Amaury Balmer
*/
public function __construct() {}
/**
* Add post on DB
*/
public static function new_post( $datas ) {
// Clean values
if ( $datas == false || !is_array($datas) ) {
return new WP_Error('invalid_d... | true |
eec97a074c812eb34a3baaab848e04b10362e3e6 | PHP | AxSa/casepress | /cp-components/cp-metabox-persons/inc/helpers.php | UTF-8 | 3,403 | 2.703125 | 3 | [] | no_license | <?php
/**
* Return formatted hyperlink by specified data
*
* @param mixed $data Term slug or person ID. Example: (int) 1176, (string) persons_category:podrydchiki
*/
function cmp_get_link( $data ) {
// Get plugin object
global $cmp_plugin;
// Post link
if ( strpos( $data, ':' ) === false && is_numeri... | true |
a78f99ede425030b224017055d93db733d203095 | PHP | farukhaiderbd/blockchain | /index.php | UTF-8 | 2,172 | 3.5 | 4 | [] | no_license | <?php
class Block{
// private $index;
// private $timestamp;
// private $data;
// private $previousHash;
protected $nonce;
public function __construct($index,$timestamp,$data,$previousHash=""){
$this->index = $index;
$this->timestamp = $timestamp;
$this->data = $data;
... | true |
688049484f80ee1ad849f1c6703e42a7bea3c272 | PHP | miguel9903/Prontomueble | /presentacion/vendedor/registrarVenta.php | UTF-8 | 1,051 | 2.5625 | 3 | [] | no_license | <?php
date_default_timezone_set('UTC');
date_default_timezone_set("America/Bogota");
$fecha = date("Y-m-d");
$vendedor = $_SESSION['id'];
$datosVenta = $_SESSION['carrito'];
$cliente = 0;
$total = 0;
$i = 0;
foreach ($datosVenta as $key){
$subtotal = 0;
$datos = explode("-", $key);
$subtotal = $datos[2] *... | true |
8ec48950a6558286185ad5f264a8d50fcd0538b0 | PHP | myomaung5255225/social_auth_laravel | /app/Http/Controllers/Auth/SocialController.php | UTF-8 | 2,779 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Laravel\Socialite\Facades\Socialite;
class SocialController extends Controller
{
protected $providers = [
'github','facebook','google'... | true |
07e48a4bc513a4d688afd09306ad9d94a07809f9 | PHP | wuanlife/wuanlife_oidc | /app/Models/Users/UsersBase.php | UTF-8 | 2,508 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models\Users;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Support\Facades\DB;
use Tymon\JWTAuth\Contracts\JWTSubject;
class UsersBase extends Authenticatable implements JWTSubject
{
use Notifiable;
protected $table = 'us... | true |
9a6002d897e06b8621da56ecb7926814bad0cb9d | PHP | cyberspectrum/i18n | /src/Compound/WritableTranslationValue.php | UTF-8 | 1,469 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of cyberspectrum/i18n.
*
* (c) 2018 CyberSpectrum.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* This project is provided in good faith and hope to be usable by anyone.
*
* @package cyberspec... | true |
20c1dab6534bfd466e51ea121c5b00b09300566a | PHP | magento-russia/2 | /app/code/local/Df/NightExpress/Model/Method.php | UTF-8 | 3,158 | 2.53125 | 3 | [] | no_license | <?php
abstract class Df_NightExpress_Model_Method extends Df_Shipping_Model_Method_Ukraine {
/**
* @abstract
* @return bool
*/
abstract protected function needDeliverToHome();
/**
* @override
* @return string
*/
public function getMethodTitle() {
return
implode(
' '
,array(
rm_sprintf... | true |
82d18c3e043ccc90f69b6665435a9b05e504c7c4 | PHP | bartoszmichalski/blabber | /src/connection.php | UTF-8 | 807 | 3.3125 | 3 | [] | no_license | <?php
/**
* Copyright
*/
class Connection
{
private $mysqli;
private $lastResult;
/**
* Connection constructor.
*
* @param $mysqli
*/
public function __construct(mysqli $mysqli)
{
if ($mysqli->connect_error) {
die('Nieudane połączenie. Błąd: ' . $mysqli->... | true |
4235f498396619d5da889833ad0bdafce3606c48 | PHP | syzygypl/kunstmaan-extra-bundle | /src/ContentCategory/ContentCategoryService.php | UTF-8 | 3,879 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace ArsThanea\KunstmaanExtraBundle\ContentCategory;
use ArsThanea\KunstmaanExtraBundle\SiteTree\BreadCrumbsService;
use ArsThanea\KunstmaanExtraBundle\SiteTree\PublicNodeVersions;
use Doctrine\Common\Cache\Cache;
use Doctrine\Common\Collections\ArrayCollection;
use Kunstmaan\NodeBundle\Entity\HasNodeInter... | true |
5368782a04d78145704cb6c62559b05330aa17df | PHP | chr-hertel/symfonycon-bot | /tests/ChatBot/Replier/StartReplierTest.php | UTF-8 | 1,479 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Tests\ChatBot\Replier;
use App\ChatBot\Replier\StartReplier;
use App\ChatBot\Telegram\Data\Message;
use App\ChatBot\Telegram\Data\Update;
use App\ChatBot\Telegram\Data\User;
use PHPUnit\Framework\TestCase;
final class StartReplierTest extends TestCase
{
private Start... | true |
7703cfe7a9b7ef93d39e2a5235d70b560aa5bd2d | PHP | afuer/SCM | /blood_group/blood_group.php | UTF-8 | 1,084 | 2.796875 | 3 | [] | no_license | <?php
class blood_group {
public function getDataGrid($offset, $rows, $search) {
$result = array();
$result["total"] = $this->count($search);
$db = new DbManager();
$db->OpenDb();
$res = $search == "" ? " " : " WHERE BLOOD_GROUP_NAME LIKE '%$search%'";
$limt = $se... | true |
a04fe22a23865f7cc3eccef2ecb4ebf0c8cf5d29 | PHP | black-cap-it/ParkCollectAPI | /app/Http/Controllers/resetPasswordApi.php | UTF-8 | 2,067 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User;
use Hash;
use Validator;
use App\Mail\resetPasswordMail;
use Illuminate\Support\Facades\Mail;
class resetPasswordApi extends Controller
{
public function reset(request $request)
{
$validator = Validator::make($request->a... | true |
2fa5238115e0fcc71296f2f7080c2899a8d7f4a8 | PHP | thetobber/blog | /Application/Security/Validator.php | UTF-8 | 4,247 | 2.96875 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace Application\Security;
use Application\Security\CsrfValidator;
class Validator
{
public static function verifyCreateUser(array $user): array
{
$model = [
'token' => '',
'username' => '',
'email' => '',
'password'... | true |
832c569e4104c5773d71cec71bd4cdd7736ec9b5 | PHP | bronevik-com/hotels-connector | /src/HotelsConnector/Element/Hotels.php | UTF-8 | 517 | 2.921875 | 3 | [] | no_license | <?php
namespace Bronevik\HotelsConnector\Element;
class Hotels
{
/**
* @var HotelWithOffers[]
*/
public $hotel = [];
/**
* @return bool
*/
public function hasHotel()
{
return count($this->hotel) > 0;
}
/**
* @return HotelWithOffers[]
*/
public fu... | true |
2bf73be1c39f439bf55bd5ab16e267e04228b7d1 | PHP | VijayMVC/JsMain | /lib/model/lib/contacts/IncomeCommonFunction.class.php | UTF-8 | 17,052 | 2.84375 | 3 | [] | no_license | <?php
/**
*
* The IncomeCommonFunction class contains the common functions related to Income table.
*
* Code to use method of IncomeCommonFunction
*
* <code>
* $incomeObj = new IncomeCommonFunction();
* //to fetch income mapping array.
* $incomeObj->incomeMapping($rsLowIncome,$rsHighIncome,$dollarLowIncome,... | true |
23f7ccad26715de6a980eff4eda980c258e2ab58 | PHP | MdMonirulIslamMredul/HomeApplianceAndServices | /Home Appliance/user/Login.php | UTF-8 | 3,023 | 2.75 | 3 | [] | no_license | <?php session_start();?>
<?php
$Login_Error = " ";
$U_id=$User_name = $Pass = "";
if (isset($_POST['login']))
{
require_once 'db_connect.php';
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
$U_id = $_POST["uid"];
$User_name = $_POST["u_nam"];
$Pass = $_... | true |
cae25f21b70dc2bc0b31c6cafb493a212fb67c65 | PHP | ayala2160/biblioteca | /app/Http/Controllers/SitioController.php | UTF-8 | 1,736 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Contacto;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class SitioController extends Controller
{
public function bienvenida($nombre = null, $apellido = null)
{
$nombre = strtoupper($nombre);
$apellido = strtoupper($apellido);
... | true |
7793efa0f0b7c5fcb81d87273cbbecbdda7c13dd | PHP | mikankari/hawring | /upload.php | UTF-8 | 615 | 2.65625 | 3 | [] | no_license | <?php
$file = $_FILES["file"];
$file_pathinfo = pathinfo($file["name"]);
$filename = md5_file($file["tmp_name"]) . "." . $file_pathinfo["extension"];
if($file["size"] > 20000000){
exit("too large file");
}
if(!in_array($file_pathinfo["extension"], array("mp3","aac", "wav", "ogg", "m4a"))){
exit("not allowed extensi... | true |
4428fbd9ceebcf961181342322a61fbe77c24170 | PHP | ahmadyusri/cyprotgd | /pertemuan2.php | UTF-8 | 2,382 | 3.5 | 4 | [] | no_license | <?php
$angka = 4;
if($angka >= 3):
echo "Variabel angka lebih besar";
else:
echo "Variabel angka lebih kecil";
endif;
$nilai = 10;
switch($nilai){
case 1:
echo "Variabel nilai = 1";
break;
case 9:
echo "Variabel nilai = 10";
break;
case $nilai <= 20:
echo "Variabel nilai lebih kecil d... | true |
9bb883fbe21eebe430b4ef546a5042ea9537f2f4 | PHP | vmach/nomtrips | /themes/nomtrips/includes/functions/nt-register-endpoints.php | UTF-8 | 5,029 | 2.609375 | 3 | [] | no_license | <?php
/**
* nomlists for user for city
**/
add_action( 'rest_api_init', function () {
register_rest_route( 'nomtrips/nomlist', '/city/(?P<cityid>\d+)/user/(?P<userid>\d+)/get/access_token=(?P<access_token>[a-zA-Z0-9-]+)', array(
'methods' => 'GET',
'callback' => 'nt_nomlist_get',
'args' => array(
... | true |
d2f032a74efe3a0ab654ed933c59e293ef808e78 | PHP | kent-un/POOphp | /class/formCreate.php | UTF-8 | 1,030 | 3.21875 | 3 | [] | no_license | <?php
class formulaire{
public $num=0;
public $nom='<input type="text" placeholder="Nom" name="name';
public $force='<input type="number" placeholder="Force" name="force';
public $forceMag='<input type="number" placeholder="Force Magique" name="forceMag';
public $armure='<input type="number" placeh... | true |
ff312e338e99c057ca5d0d27b80ec28920203e88 | PHP | JensRosseel/language-quiz | /classes/Word.php | UTF-8 | 994 | 3.453125 | 3 | [] | no_license | <?php
class Word
{
public function verify(string $answer, string $guess)
{
if(strtolower($guess) == $answer)
{
$_SESSION['win']++;
if($_SESSION['win'] == 10 || $_SESSION['loss'] == 10)
{
echo "<script> alert('Congratulation you have reached th... | true |
babecd69a721ab3ae9603ff8a5a050e03145194e | PHP | aronvis/PHP-Projects | /Football Schedule/search_form.php | UTF-8 | 3,230 | 2.84375 | 3 | [] | no_license | <?php
require 'config.php';
$mysqli = new mysqli(DB_HOST, DB_USER, DB_PASS, DB_NAME);
if ($mysqli->connect_errno) {
echo "MySQL Connection Error: " . $mysqli->connect_error;
exit();
}
$mysqli->set_charset('utf8');
// Checks if the results are valid and exits otherwise
function validate ($results) {
globa... | true |
fa0dfe93a94f00958e29d6af8362b257cbbf646a | PHP | AbdelliNasredine/elearn_platform | /app/Models/Course.php | UTF-8 | 635 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Course extends Model
{
protected $table = "courses";
protected $fillable = [
"name",
"description",
"department_id",
"academic_level_id",
"user_id",
"cover_image",
"is_active"
];
public function department()
{
return $th... | true |
1d9fd1e044745b9d610056d13ac4b73a9aa6fed5 | PHP | Dheia/advisory.yda | /plugins/nashyang/forum/models/GoogleSheetApi.php | UTF-8 | 6,677 | 2.5625 | 3 | [] | no_license | <?php namespace Nashyang\Forum\Models;
use Bedard\BlogTags\Models\Tag;
use Google_Client;
use Google_Service_Sheets;
use Illuminate\Support\Facades\DB;
use Model;
/**
* Model
*/
class GoogleSheetApi extends Model {
public $googleClient;
public $googleSheets;
public $sheetData;
public ... | true |
07a552a0b92f11c510afbe1f5894ff89c17cea4e | PHP | 5ctechforgood/projectcaring | /piwik/plugins/CoreVisualizations/Metrics/Formatter/Numeric.php | UTF-8 | 1,247 | 2.84375 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"GPL-3.0-or-later",
"LGPL-2.0-or-later",
"LGPL-2.1-or-later",
"GPL-3.0-only",
"GPL-1.0-or-later",
"MIT"
] | permissive | <?php
/**
* Piwik - free/libre analytics platform
*
* @link http://piwik.org
* @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
*/
namespace Piwik\Plugins\CoreVisualizations\Metrics\Formatter;
use Piwik\Common;
use Piwik\Metrics\Formatter;
/**
* A metrics formatter that prettifies metric values... | true |
bd9614181708dbdd61618921a3dadc834bdadf49 | PHP | keyyang0723/kiyama_ec | /models/customerRepository.php | UTF-8 | 2,022 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
class customerRepository extends DbRepository
{
public function insert($customer_name,$password)
{
$password = $this->hashPassword($password);
$now = new Datetime();
$sql = "
INSERT INTO customers(customer_name,password,created_at,updated_at)
VALUES(:customer_name,:password,:created_at,:updated_... | true |
97461e65db702a797740953770804d1ab040e45a | PHP | wesselvanderlinden/ishetkutweerv2 | /src/HistoricData/HistoryDataFactory.php | UTF-8 | 722 | 2.875 | 3 | [] | no_license | <?php
namespace HistoricData;
use Interfaces\DataFactory;
class HistoryDataFactory implements DataFactory
{
public function createDataBlock($data)
{
$historyCollection = new HistoryDataCollection();
foreach ($data as $row) {
$historyCollection->add(new HistoryDataBlock(
... | true |
c866c5655efdd2c6326307f5530b1bf277bf885f | PHP | Tantely28/Billet | /include/dao/ConnexionDB.class.php | UTF-8 | 980 | 2.84375 | 3 | [] | no_license | <?php
/*class Connexion extends PDO
{
private $server="db728406079.db.1and1.com";
private $user="dbo728406079";
private $mdp="Pass@fpvm10";
private $database="db728406079";
public function __construct()
{
try {
PDO::__construct("mysql:host=".$this->server.";dbname=".$this->database,$this->us... | true |
12830e6df74d12b5deb46e60f59238ec6c056c0c | PHP | htdao/Laravel21 | /app/Models/Order.php | UTF-8 | 2,122 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use phpDocumentor\Reflection\DocBlock\Tags\Reference\Url;
class Order extends Model
{
use HasFactory;
static $revenue;
protected $table = 'orders';
protected $fillable = [
... | true |
1976918db0f17f2c5d4a720593255e3af6d69625 | PHP | ElizRe/decouverte-PHP | /login.php | UTF-8 | 1,855 | 2.890625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="FR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>PHP EXO</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<?php
include_once('me... | true |
581f1eb4d8b70205c716dfc468950a6657935762 | PHP | josheytee/application | /app/core/entity_doctrine/fixtures/ActivityData.php | UTF-8 | 1,988 | 2.5625 | 3 | [] | no_license | <?php
namespace app\core\entity_doctrine\fixtures;
use app\core\entity_doctrine\Activity;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Faker;
/**
* Description of ActivityData
*
* @author Agbeja Oluwa... | true |
ff3e4a26579a421173e0a0c871a6eb8a592d41c0 | PHP | hidetobara/VolatileTwit | /include/data/KeyValueFile.class.php | UTF-8 | 562 | 3.234375 | 3 | [] | no_license | <?php
class KeyValueFile
{
private $handle;
private $count;
function __construct( $path )
{
$this->handle = fopen( $path,"r" );
}
function read()
{
if( !$this->handle ) return null;
$line = fgets($this->handle);
if( !$line ) return null;
$this->count++;
$line = rtrim($line);
$cells = mb_split... | true |
c8dbd90136fe7bef6d908e939c71de5069de722c | PHP | stalinscj/jsonapi | /app/JsonApi/Articles/Schema.php | UTF-8 | 1,962 | 2.734375 | 3 | [] | no_license | <?php
namespace App\JsonApi\Articles;
use Neomerx\JsonApi\Schema\SchemaProvider;
class Schema extends SchemaProvider
{
/**
* @var string
*/
protected $resourceType = 'articles';
/**
* @param \App\Models\Article $article
* the domain record being serialized.
* @return string... | true |
c8de637c361b0789077b285f40279fd922efb31e | PHP | uusa35/reports | /app/Models/LocaleTrait.php | UTF-8 | 814 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
trait LocaleTrait {
/**
* @param $name
* @return localized string
* Return Localized String
*/
public function __get($name)
{
if (is_array($this->localeStrings) && in_array($name, $this->localeStrings)) {
$appLang = app()->getLo... | true |
3634d413460889bcb43c4ace443532b8a65531f2 | PHP | colindecarlo/muzzle | /src/functions.php | UTF-8 | 1,739 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace Muzzle;
use GuzzleHttp\Psr7\Response;
use Psr\Http\Message\ResponseInterface;
/**
* @param string $fixture
* @param int $status
* @param array $headers
* @return Response|\Muzzle\Messages\JsonFixture|\Muzzle\Messages\HtmlFixture
*/
function fixture(string $fixture, int $status = HttpStatus::OK, ... | true |
b7a18cc8e54eedfbc29fc2e388ddafb04d4c66a7 | PHP | dasigr/laravelcommerce | /app/repositories/TermRepository.php | UTF-8 | 2,405 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
use Symfony\Component\Routing\Exception\ResourceNotFoundException;
class TermRepository implements TermRepositoryInterface
{
/**
* Update the specified resource in storage.
*
* @param int $id
* @return Collection
*/
public function all()
{
$collection = Term::paginate();
... | true |
eb1046e08c113466a214bf51b43623e4395fa2c4 | PHP | robbertstevens/fizzbuzz-chain-of-responsibility | /tests/FizzBuzz/FizzBuzzTest.php | UTF-8 | 1,121 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Tests\FizzBuzz;
use App\FizzBuzz\FizzBuzz;
use App\FizzBuzz\FizzBuzzMultipleOfFive;
use App\FizzBuzz\FizzBuzzMultipleOfThree;
use App\FizzBuzz\FizzBuzzMultipleOfThreeAndFive;
use App\FizzBuzz\FizzBuzzWithoutMultiples;
use PHPUnit\Framework\TestCase;
class FizzBuzzTest extends TestCase
{
/**
... | true |
6c7bae33658ac4654435c06171bafa65da275f27 | PHP | chabby-hao/laravel_admin | /app/Models/TFriendInvite.php | UTF-8 | 1,340 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Models;
/**
* App\Models\TFriendInvite
*
* @property int $sid
* @property int $inviter
* @property string|null $phone
* @property int $status
* @property \Carbon\Carbon|null $create_tm
* @property \Carbon\Carbon|null $finish_tm
* @property string|null $name
* @property string|null $mobil... | true |
3fcaf2cc6605a947d9d1c9138d7d52e526da09b0 | PHP | supernovus/lum.json-rpc.php | /lib/Client/Curl.php | UTF-8 | 959 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Lum\JSON\RPC\Client;
/**
* Curl transport.
*/
class Curl implements Transport
{
protected $client;
public $url;
public $curl;
public function __construct (Array $opts)
{
if (isset($opts['jsonrpc_client']))
{
$this->client = $opts['jsonrpc_client'];
}
if (isset($opts... | true |
60af1861bbad5f55beb60668ddf76782a9c787a7 | PHP | Klvst3r/login-semiVC | /home.php | UTF-8 | 954 | 2.6875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Login</title>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
</head>
<body>
<?php
session_start();
// Se comprueba si ya se habia iniciado... | true |
bb398e168c99e1ff853cb2a99fd4836c9c541bc0 | PHP | tflori/orm | /examples/fetch.php | UTF-8 | 3,034 | 2.875 | 3 | [] | no_license | <?php
use ORM\EntityManager;
require_once __DIR__ . '/bootstrap.php';
require_once __DIR__ . '/entities.php';
/** @var EntityManager $em */
$username = 'user_a'; // $_POST['username']
$password = 'password_a'; // $_POST['password']
/*******************************
* Fetch entity with own query *
****************... | true |
4aac69a45b13d4421cb6dae11b2b48219b944c4a | PHP | synapse-labs/CScamp-CTF-2012 | /WebApp/7atata/s3Cr3T@dMinDir/upload.php | UTF-8 | 567 | 2.625 | 3 | [] | no_license | <?php
if($_POST['submit']){
$target_path = '../images/'.pathinfo($_FILES['image']['name'],PATHINFO_FILENAME).'.jpg';
$m = move_uploaded_file($_FILES['image']['tmp_name'], $target_path);
if($m) print 'Successfully uploaded image to '.realpath($target_path);
}else{
print '<form enctype="multipart/form-data"... | true |
b82680c997de3e6f89d17354112eba5b0ba1cd8c | PHP | MrBadAxe/gamergoals-dev | /OwnedGame.php | UTF-8 | 1,197 | 3.015625 | 3 | [] | no_license | <?php
namespace GamerGoals;
include_once "./Account.php";
include_once "./Game.php";
use GamerGoals\Account;
use GamerGoals\Game;
class OwnedGame{
private $mAccount;
private $mGame;
private $mPaid;
private $mStatus;
private $mNotes;
public function __construct(Account $acct, Game $g, $paid = 0, $st = 'B', $no... | true |
1bd0554b0d920b5ea875e516945cf37b97342d1b | PHP | BlueDG/PHP_Practice_2018 | /exercices/09-painter svg poo/class/Ellipse.php | UTF-8 | 1,224 | 3.484375 | 3 | [] | no_license | <?php
class Ellipse extends Shape {
// -----------------------------------
// PROPRIETES (caractéristiques)
// -----------------------------------
protected $rx;
protected $ry;
// -----------------------------------
// CONSTRUCTEUR (méthode appelée lors de la création d'un objet d... | true |
17d2970e267774f63339cc103649c22c36da8a10 | PHP | AkaSrivastav/student-information-portal | /action.php | UTF-8 | 1,207 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
define('HOST','localhost');
define('USER','root');
define('PASS','');
define('DB','student_information_portal');
function test_input($data)
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
if($_SERVER['REQUEST_METHOD']=='POST')
{
$email = test_input... | true |
da77eca98979ed36e966be6bfeeb516bdcf41cce | PHP | Uday858/lead-reserve-platform-master | /app/Listeners/HandleNewUserCreation.php | UTF-8 | 455 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Listeners;
use App\Events\UserRegistered;
use App\UserType;
class HandleNewUserCreation
{
/**
* Handle the event.
*
* @param UserRegistered $event
* @return void
*/
public function handle(UserRegistered $event)
{
// Create a default user type for the... | true |
a961f30d79697f885db47451f36330e0006243e1 | PHP | edwin1993/Conexion-BD-php | /registro.php | UTF-8 | 845 | 3.28125 | 3 | [] | no_license | <?php
/*
se incluye el archivo conexion.php
*/
include("conexion.php");
//Aqui guardamos los datos ingresados en el campo del formulario (nombre)
$user = $_POST['user'];
/*
isset() = determina si una variable ha sido declarada y su valor no es NULO
is_null = Comprueba si una variable es NULL
empty() = Dete... | true |
7ded2c28264aa9cef04d74a1cc6986fc9eb79e44 | PHP | ksmith-dev/muckleshoot_tribal_college | /controller/resource_control.php | UTF-8 | 6,932 | 2.6875 | 3 | [] | no_license | <?php
/**
*
* @author Stacie Mashnitskaya
* Date: 5/30/17
* Time: 9:39 PM
*/
class resourceControl
{
private $_f3;
private $_params;
/**
* resourceControl constructor.
* @param $_f3
* @param $_params
*/
public function __construct($_f3, $_params)
{
$this->_f3 = $_f... | true |
6b506e315a3527cfb8e31f55af4dd2dd79bfb6e5 | PHP | fissible/php7-cli-app | /tests/harness | UTF-8 | 3,464 | 2.75 | 3 | [] | no_license | #!/usr/bin/env php
<?php
if (version_compare(phpversion(), '7.4.6', '<')) {
print "ERROR: PHP version must cannot be less than 7.4.6";
exit(1);
}
require_once(dirname(__DIR__).'/vendor/autoload.php');
class RunTest extends PhpCli\Command
{
public static $testCallback;
public function run()
{
... | true |
30322eaa9bab95ffd93b1088f8cd7c0fd7173f44 | PHP | alexander-pecherskih/bridges | /backend/src/Model/Stuff/UseCase/Department/Create/Handler.php | UTF-8 | 1,723 | 2.59375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Model\Stuff\UseCase\Department\Create;
use App\Model\Flusher;
use App\Model\Stuff\Entity\Company\Company;
use App\Model\Stuff\Entity\Company\CompanyRepositoryInterface;
use App\Model\Stuff\Entity\Department\Department;
use App\Model\Stuff\Entity\Department\DepartmentRepos... | true |
3a344f94b9bb2ccc9c55d2f6436c204148c65394 | PHP | sarassoroberto/playlist | /index.php | UTF-8 | 1,016 | 2.625 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*
* framework mvc
*
* 1) esiste un controller per ogni funzionalita / pagina della mia applicazione
* 2) tutti i controller v... | true |
99b470ab1eb69501e5df754317421d7126ace57c | PHP | igor003/MVC-Custom-learning | /edit_database_table.php | UTF-8 | 4,079 | 2.515625 | 3 | [] | no_license | <?php
require 'my_db.php';
$get_data = $_GET;
$query = "SELECT *
FROM `terminal_proprietes`
WHERE id_primary = '".$get_data['id_']."'";
$data_table = mysqli_query($mydb,$query);
$updated_table = mysqli_fetch_assoc($data_table);
$query = "SELECT * FROM `table_terminal`";
$sql = mysqli_query($my... | true |
41bbf3fffe4b789f1fb5880f4c0832765b6c960e | PHP | liuggio/botrelli | /src/Infrastructure/Package/DoctrinePackageWriter.php | UTF-8 | 499 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace PUGX\Bot\Infrastructure\Package;
use Doctrine\Common\Persistence\ObjectManager;
use PUGX\Bot\Package;
use PUGX\Bot\Package\PackageWriterInterface;
class DoctrinePackageWriter implements PackageWriterInterface
{
private $manager;
public function __construct(ObjectManager $manager)
{
... | true |
e7663ba3f67477f0695822932a0e62c66b012790 | PHP | Muqsit/VanillaGenerator | /src/muqsit/vanillagenerator/generator/object/tree/BigOakTree.php | UTF-8 | 6,519 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace muqsit\vanillagenerator\generator\object\tree;
use pocketmine\block\BlockFactory;
use pocketmine\math\Vector3;
use pocketmine\utils\Random;
use pocketmine\world\BlockTransaction;
use pocketmine\world\ChunkManager;
use function array_key_exists;
class BigOakTree extends Gener... | true |
f20df05dcc90b30de85a72adbb4cfded4b8dd570 | PHP | larrychen04/zento | /src/UrlRewriter/Services/UrlRewriterManagerService.php | UTF-8 | 1,858 | 2.703125 | 3 | [] | no_license | <?php
namespace Zento\UrlRewriter\Services;
use Illuminate\Support\Str;
use Zento\UrlRewriter\Model\UrlRewriteRule;
use Zento\UrlRewriter\Illuminate\Routing\RouteCollection;
class UrlRewriterManagerService
{
protected $routeCollection;
public function __construct($app) {
if($app->bound('router')) {
... | true |
ace7b67d5bd21d1bb1f598580b022d62a64f1383 | PHP | JuanGit96/PruebaABInBEV | /app/Http/Controllers/TypeController.php | UTF-8 | 1,891 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Requests\TypeRequest;
use App\Traits\ApiResponser;
use App\Type;
use Illuminate\Http\Request;
class TypeController extends Controller
{
use ApiResponser;
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
... | true |
804681070073c458deddc1601a278689a26251b5 | PHP | lep/ff | /web/auth/module.php | UTF-8 | 1,640 | 2.796875 | 3 | [] | no_license | <?php
class authmodule extends module
{
const LOGIN_TIME= 86400;
private function hashFunction($what)
{
return sha1($what);
}
function createUser($name, $password)
{
if (count($this->model->user->nameLIKE($name)->all())>0)
throw new Exception("user exists");
$user = $this->model->use... | true |