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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
b8cf22c7fdb3af127d698c91067d364521490cc3 | PHP | samarth2201/rppo | /app/Controllers/TestController.php | UTF-8 | 1,558 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php namespace App\Controllers;
use App\Models\TestModel ;
class TestController extends BaseController
{
public function index()
{
helper(['form','database','uri','url']) ;
$model = new TestModel();
$res = $model->getUser('ssssssss','sasasasa');
echo $res[0]['username'];
$data = [
'f_name' => ... | true |
4871825e69f285632c098f0f9a8f151d775e34ac | PHP | wotmods/Tankopedia | /src/Imbc/TankopediaBundle/DataFixtures/ORM/LoadNationalityData.php | UTF-8 | 1,655 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Imbc\TankopediaBundle\DataFixtures\ORM;
use Doctrine\Common\Persistence\ObjectManager;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Imbc\TankopediaBundle\Entity\Nationality;
class LoadNationalityData extends AbstractFixture i... | true |
e167051b7da8f1fa968021ae32e69a8d06842bb0 | PHP | yh156/licencePro-bdd-php | /TableHTML.class.php | UTF-8 | 522 | 3.171875 | 3 | [] | no_license | <?php
class TableHTML extends ElementHTML
{
private $lignes;
public function __construct($data){
foreach ($data as $key => $value) {
$this->lignes[$key] = new LigneHTML($value);
}
}
public function construireDebut(){
$debut = "<table style='border: 1px solid black'";
echo $debut;
}
public fu... | true |
f327248b3896a1ee88a9412602e193d01f51b938 | PHP | jadestorm/scalar | /system/application/libraries/tinypass/token/TPTokenData.php | UTF-8 | 1,542 | 2.640625 | 3 | [
"ECL-2.0"
] | permissive | <?php
class TPTokenData {
protected $map = array();
const MARK_YEAR_MILLIS = 1293858000000;
const METER_REMINDER = 10;
const METER_STRICT = 20;
const METER_TRIAL_ENDTIME = "mtet";
const METER_TRIAL_ACCESS_PERIOD = "mtap";
const METER_LOCKOUT_ENDTIME = "mlet";
const METER_LOCKOUT_PERIOD = "mlp";
const ME... | true |
63b46185d26c424cc5cbac18a462adb7743e7646 | PHP | KrunalKaneriya/PHP-Practicals | /global_Variables.php | UTF-8 | 612 | 3.90625 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Variables And Functions</title>
</head>
<body>
<?php
$value1 = 10;
$value2 = 20;
$value3 = ... | true |
2a5bb0b38908deae5c49f1718fe36e5699a04e6a | PHP | haru700/atom | /local-history/Users/haru/php/kbtitPHP/app/2017-05-21_03-46-54_lookup.php | UTF-8 | 390 | 2.953125 | 3 | [] | no_license | <?php
// ->lookup()メソッドの例
require_once('/Users/haru/php/pear/Services_TinyURL-0.1.2/Services/TinyURL.php');
try{
// インスタンス生成
$tiny = new Services_TinyURL();
// 短縮されたURLを伸長
$src = $tiny->lookup('http://tinyurl.com/ll4duyz');
echo $src; // 結果: http://www.amazon.co.jp/dp/477162965
echo $url; // 結果 http:tiny... | true |
3976a35cda54d4a3d94a0e6e72dc6678836bd07a | PHP | gimenezdaw/boletinUno | /forme7.php | UTF-8 | 516 | 3.25 | 3 | [] | no_license | <?php
$number = $_POST['numero'];
function par_impar($number){
if (($number % 2) === 0) {
echo "$number es un número par";
echo "<br><br><button><a href='./e7.php'>VOLVER AL EJERCICIO</a></button>";
}else {
echo "$number es un número impar";
echo ... | true |
7789f33a00f21bdd0b1445b5e5fdfc2695b704ca | PHP | sonvq/symfony_starter | /src/ET/ETTicketBundle/Entity/RatingSettings.php | UTF-8 | 4,998 | 2.71875 | 3 | [] | no_license | <?php
namespace ET\ETTicketBundle\Entity;
/**
* RatingSettings
*/
class RatingSettings
{
/**
* @var integer
*/
private $workedMinRequiredRequests = '0';
/**
* @var boolean
*/
private $workedMinRequiredRatio = '0';
/**
* @var integer
*/
private $closedMinRequir... | true |
c232b9795633817aff061e173708d0171758cdc6 | PHP | Sept28/sid | /database/migrations/2021_08_29_144909_create_family_card_table.php | UTF-8 | 1,023 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateFamilyCardTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('family_cards... | true |
1316004c85ff75e763c06e5683b8128197bc429f | PHP | monmonika21/-spe-skill-test-qa | /bilangan_prima.php | UTF-8 | 313 | 3.515625 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Bilangan Prima</title>
</head>
<body>
<hr>
<h4>Menampilkan bilangan Prima 1-100 </h4><hr><br>
<?php
$n = 100;
for($i=1;$i<=$n;$i++){
$a = 0;
for($j=1;$j<=$i;$j++){
if($i % $j == 0){
$a++;
}
}
if($a == 2){
echo $i.'<br>';
}
}
?>
</body>
</html> | true |
052092a7032510b87645e263e0854f5d61a4ae48 | PHP | apollolux/spotifyfellowshipapp-p2 | /CalendarBackend/luxcal.php | UTF-8 | 5,019 | 2.625 | 3 | [] | no_license | <?php
/****
luxcal.php
by Alex Rosario
calendar backend for Spotify Tech Fellowship application
****/
function param($p, $def="") {
//global $_SERVER, $_SESSION, $_COOKIE, $_REQUEST, $_POST, $_GET;
if (!empty($_SESSION)&&isset($_SESSION[$p])) return $_SESSION[$p];
else if (isset($_COOKIE[$p])) return $_COOKIE[$p];
... | true |
a4fa8651b3352c34238d4b0ed54e653301053ea8 | PHP | maximaam/alamouriska | /src/Command/UpdateLatestPostsCommand.php | UTF-8 | 4,388 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Command;
use App\Entity\Blog;
use App\Entity\Expression;
use App\Entity\Joke;
use App\Entity\LatestPosts;
use App\Entity\Proverb;
use App\Entity\Word;
use App\Service\NotificationManager;
use App\Utils\ModelUtils;
use Doctrine\DBAL\DBALException;
use Doctrine\ORM\EntityManagerInterface;
use Reflec... | true |
abc8f0992edbb1df7bd8d07d6fc140946155d850 | PHP | epfl-si/jahia2wp | /data/wp/wp-content/plugins/epfl/shortcodes/epfl-infoscience-search/renderers/publications.php | UTF-8 | 25,543 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
require_once 'fields.php';
# mainly used to sanitize external values when we convert to class name
define('DOCTYPE_TO_CLASS_NAME_MAP', [
'BOOK CHAPTERS' => 'BookChapters',
'BOOKS' => 'Books',
'CONFERENCE PAPERS' => 'ConferencePapers',
'CONFERENCE PROCEEDINGS' => 'ConferenceProceedings',
'JOUR... | true |
6ca365101cbfe7caee465ad97b64a817a9592730 | PHP | 402502477/shop | /database/migrations/2018_04_05_060353_create_product_table.php | UTF-8 | 1,691 | 2.53125 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateProductTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::enableForeignKeyConstra... | true |
854f5c5041466d6873f2d461ead91cf25f93b4d4 | PHP | nikitasinghal62/project1 | /admin/delete-word.php | UTF-8 | 1,073 | 2.625 | 3 | [] | no_license | <?php
if( !session_id() )
{
session_start();
}
include 'config.php';
// Delete Data
if (isset($_GET['q'])){
$id = $_GET['q'];
// sql to delete a record
$wordSql = "DELETE FROM tb_words WHERE id=$id";
$meaningSql = "DELETE FROM tb_meaning WHERE word_id=$id";
$antonymSql = "DELETE FRO... | true |
dcb19150bd5361277d7e40d8055e7cee355511c4 | PHP | uwitec/outbuying | /lib/Pft/I18n.php | UTF-8 | 3,382 | 2.890625 | 3 | [] | no_license | <?
/**
* 国际化处理类
* 目前包括界面上的字符串 将来还应包括货币单位,时间格式等
*
* @author Terry
* @package Pft
*/
class Pft_I18n{
const I18N_LANGUAGE_DEFAULT = "default";
const I18N_LANGUAGE_CHS = "cn_jt"; //zh-cn
const I18N_LANGUAGE_CHT = "cn_tw"; //zh-tw
const I18N_LANGUAGE_EN = "en";
const I18N_LANGUAGE_JP = "jp";
... | true |
40084c87d73ee37d6abb33bcb346b8583a94f458 | PHP | mikrotik/IcePay | /application/models/Emails_model.php | UTF-8 | 12,100 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
define('EMAIL_TEMPLATE_SEND', true);
class Emails_model extends CRM_Model
{
private $attachment = array();
private $client_email_templates;
private $staff_email_templates;
function __construct()
{
parent::__con... | true |
ae06b7bf0963bbe364444232a0e3a160a69859cf | PHP | adrhumphreys/impetuous | /includes/urlToPath.php | UTF-8 | 4,105 | 2.765625 | 3 | [] | no_license | <?php
namespace AdrHumphreys\Impetuous\Includes;
if (!function_exists('AdrHumphreys\\Impetuous\\Includes\\urlToPath')) {
/**
* @param string $url
* @param string $baseURL
* @return string|null either the path to store the file or null if it's not possible
*/
function urlToPath(string $url,... | true |
17e32eac2450b2c7a59c4ab09e3e213adecab41c | PHP | mediatechnologie/jaarboek | /app/framework/FormElement.php | UTF-8 | 735 | 2.984375 | 3 | [] | no_license | <?php
class FormElement
{
public $type;
public $value;
public $name;
public $id;
public function __construct ( $properties = NULL )
{
if ( NULL === $properties )
return;
foreach ( $properties as $k=>$v )
{
$k = 'set' . $k;
$this->$k( $v );
}
}
public function __call ( $method , $args )
{
... | true |
e1dd5f33c2062f7918150d0950afa259537561ed | PHP | cmmishra9/oops-login-system | /login.php | UTF-8 | 3,815 | 2.796875 | 3 | [] | no_license | <?php
// Initialize the session
session_start();
// Check if the user is logged in, if not then redirect him to login page
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] ===true){
header("location: dashboard.php");
exit;
}
require_once "config/config.php";
$username=$password="";
$username_err=$passwo... | true |
07ad00488596d5a44736440e0eac28a282f927d3 | PHP | globalbag/crm-us-staging | /app/modules/inventory/products/categories.php | UTF-8 | 15,189 | 2.515625 | 3 | [] | no_license | <?php
$categories = new products_categories();
$categories->init();
class products_categories
{
/** @var \novut\DB\BN_PDOMethods|\PDO|\PDOStatement */
protected $db;
protected $input;
protected $FormID;
protected $BaseUrl;
protected $document;
protected $JS;
protected $CategoryInf... | true |
05eb8125f59039ec6c102d180563bd58d870af82 | PHP | netherphp/database | /src/Nether/Database/Coda/In.php | UTF-8 | 819 | 2.796875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace Nether\Database\Coda;
use \Nether;
class In
extends Nether\Database\Coda\Equals {
/*//
before the query code was refactored to include the ability to flatten arrays
out into the main dataset, the need for this coda to manually interpolate the
actual data to generate an IN query was much more impressiv... | true |
c673a84133b7f436c632383651660bc1d7a8e279 | PHP | hilton151084/500-php-26-02-2018 | /aula1/conversoresdetipos.php | UTF-8 | 338 | 3.09375 | 3 | [] | no_license | <?php
echo "<pre>";
//Type Casting
$var = 10;
var_dump($var);
$cast = (boolean) $var;
var_dump($cast);
$cast = (int) $var;
var_dump($cast);
$cast = (float) $var;
var_dump($cast);
$cast = (string) $var;
var_dump($cast);
$cast = (array) $var;
var_dump($cast);
$cast = (object) $var;
var_dump($cast);
$cast = (unset) $var... | true |
4394db2771b1b44d97d9d818bc145bb98e5ba614 | PHP | C7197-Recep/Simplybook-Api-Integration | /callbackpage_for_simplybook_api.php | UTF-8 | 381 | 2.8125 | 3 | [] | no_license | <?php
// Takes raw data from the request
$json = file_get_contents('php://input');
// Converts it into a PHP object
$data = json_decode($json);
if(isset($data)){
$file = 'simplybook.txt';
// Open the file
$content = file_get_contents($file);
// Add callback data
$content .= "BOOKING-ID:".$data."\n... | true |
8849a3ce2d941f9cbad8e1cb146eab88150d55da | PHP | tmbaradel/samples | /PHP/AuthModule Zend 1.7/controllers/actionhelpers/Login.php | UTF-8 | 6,264 | 2.65625 | 3 | [] | no_license | <?php
class Auth_Controller_Action_Helper_Login extends Zend_Controller_Action_Helper_Abstract
{
/**
* Form action
* @var string
*/
protected $_action;
/**
* Auth
* @var Zend_Auth
*/
protected $_auth;
/**
* Auth adapter
* @var Zend_Auth_Adapter_Interface
... | true |
b21aee34a6918704777fa5d58410c8dbbd5e90e4 | PHP | SilverFire/yandex-checkout-sdk-php | /tests/Model/Notification/AbstractNotificationTest.php | UTF-8 | 3,950 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Model\Notification;
use PHPUnit\Framework\TestCase;
use YandexCheckout\Helpers\Random;
use YandexCheckout\Model\Notification\AbstractNotification;
abstract class AbstractNotificationTest extends TestCase
{
/**
* @param array $source
* @return AbstractNotification
*/
abstr... | true |
1bd947b0582e7707a5124fd8ce3c95b0da729568 | PHP | ChechuT10/TFG | /app/class/dbc.php | UTF-8 | 858 | 3.359375 | 3 | [] | no_license | <?php //iniciamos php
// Creamos una clase llamada Db
class Db{
// Creamos las variables con los datos de nuestra base de datos
private $servidor = "localhost";
private $user = "root";
private $pswd = "";
private $base_datos = "tfg";
//Creamos una funcion que nos servira para conectarnos a nue... | true |
54cb011edbeddf3d9cba8110446a2c3616d6fa51 | PHP | penguin72905/php-swool-example | /libs/redis/Predis.php | UTF-8 | 8,159 | 3.140625 | 3 | [] | no_license | <?php
class Predis
{
public $redis="";
public $conf=array(
'host'=>"127.0.0.1",
"port"=>"6379"
);
/**
* 单例模式
* @return void
*/
private static $_instance=null;
public function getInstance()
{
if(empty(self::$_instance)){
self::$_instance =ne... | true |
7586c0b8bc214f64e5647591a2dd171a7cdf0599 | PHP | CampaignChain/hook-data-repeat | /Entity/DateRepeat.php | UTF-8 | 4,684 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
* Copyright 2016 CampaignChain, Inc. <info@campaignchain.com>
*
* 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 re... | true |
1ac3431ede00fc12e1d5163d96bc43d38027d56d | PHP | CharlesMarceau/portfolio | /app/Controller/ContactController.php | UTF-8 | 574 | 2.546875 | 3 | [] | no_license | <?php
namespace app\Controller;
use core\HTML\BootstrapForm;
/**
*
*/
class ContactController extends AppController{
protected $title = 'Contact';
protected $description = "Communiquez avec moi en m'écrivant directement via le formulaire ou à mon adresse info@charlesmarceau.com";
protected $keywords = 'communic... | true |
d6a2b48a3a936c94968deecc50a71b17656a2a5d | PHP | jayant-ism/ciie-blog | /forms/achievementform.php | UTF-8 | 2,525 | 2.734375 | 3 | [] | no_license | <?php require '../formRestriction/userChecking.php';?>
<?php
// define variables and set to empty values
$title = $name = $description = $imgurl= "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$title = test_input($_POST["title"]);
$name = test_input($_POST["name"]);
$description = test_input($_POST["description... | true |
2e6ce19e72e71fc4b0aa0748ba600f20265dfca6 | PHP | brayanesteves/Courses | /source/views/YOUTUBE/views/CHANNELS/FACULTAD AUTODIDACTA/06 - Gestor de archivos con php y mysql/32.- Sistema Gestor de Archivos - Eliminar archivos (parte 1)/source/clases/Gestor.php | UTF-8 | 1,537 | 2.8125 | 3 | [] | no_license | <?php
require_once "Conexion.php";
class Gestor extends Conectar {
/**
* Esto va a agregar un registro a la base de datos que va relacionado al
* archivo que voy a subir en el formulario, por eso es necesario
*/
public function agregarRegistroArchivo($datos) {
... | true |
c8cdda8c15ac19f2ab3edb018de5d19c9ff12f40 | PHP | kskpremier/selfin.tk | /reception/entities/MyRent/UsersBraintree.php | UTF-8 | 3,911 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace reception\entities\MyRent;
use Yii;
use reception\entities\MyRent\User;
/**
* This is the model class for table "users_braintree".
*
* @property int $id
* @property int $user_id
* @property string $environment
* @property string $merchant_id
* @property string $public_key
* @property string ... | true |
2849c03eb4362cbd6cb7c5414336fcf648b5b818 | PHP | nyanlynnhtut/gallery | /src/Gallery/Decorator/AbstractBase.php | UTF-8 | 3,266 | 2.78125 | 3 | [] | no_license | <?php
namespace Gallery\Decorator;
use Reborn\Cores\Facade;
use Gallery\Presenter\GalleryPresenter;
abstract class AbstractBase
{
/**
* Application (IOC) container instance
*
* @var \Reborn\Cores\Application
**/
protected $app;
/**
* GalleryPresenter instance for photo resource
*
... | true |
5ba60e8e5a8bf34b14f9da3c8fa8923447ca1420 | PHP | KevMejia/PuntoVenta | /PuntoVenta/Proveedores/UtileriasProveedores.php | UTF-8 | 801 | 2.640625 | 3 | [] | no_license | <?php
function ObtenMaximoProveedor($PDO){
$sql = 'SELECT count(*) FROM Proveedores';
$Max = 0;
foreach ($PDO->query($sql) as $fila) {
$Max = $fila[0] + 1;
}
return $Max;
}
function ExisteProveedor($PDO, $user){
$sql = "SELECT count(*) FROM Proveedores where UPPER... | true |
501ccbc51ae59d480469bc82db973430d9b847c4 | PHP | emilywallace-price/ewp_docker | /public/Dad.php | UTF-8 | 194 | 2.703125 | 3 | [] | no_license | <?php
class Dad extends Mum {
public function __construct($surname, $firstName, $gender, $age){
parent::__construct($surname, $firstName, $gender, $age);
}
} | true |
c32690c251c93e1f72590dc0b09c7b239f32090b | PHP | rhertzog/tuleap | /plugins/graphontrackers/include/data-access/GraphOnTrackers_Chart.class.php | UTF-8 | 9,840 | 2.5625 | 3 | [] | no_license | <?php
/**
* Copyright (c) Xerox Corporation, Codendi Team, 2001-2009. All rights reserved
*
* This file is a part of Codendi.
*
* Codendi 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 2... | true |
6d3d9d4a93ed1bf1c094be96ebea5cfb8c00709e | PHP | barthuttinga/ldaptools | /src/LdapTools/Enums/AD/ResponseCode.php | UTF-8 | 4,927 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the LdapTools package.
*
* (c) Chad Sikorra <Chad.Sikorra@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace LdapTools\Enums\AD;
use Enums\SimpleEnumInterface;
use Enums\SimpleEn... | true |
b8c1041e7a0ca640de71b8b3395d796f1f1d7dd2 | PHP | YL2120/BeCode-Perso | /03-docker-environment/src/functions/functions.php | UTF-8 | 273 | 3.328125 | 3 | [] | no_license | <?php
$names=["Yassine","Antoine","Thomas","Thibault","Lucas","Adrien","William"];
function display_names($array){
for($i=0;$i<count($array);$i++)
{
echo "<p> Hello $array[$i] !</p>";
echo "<hr>";
}
}
display_names($names);
?> | true |
9de144a7bd82ddea07b7a1517116a5d1b329245d | PHP | llqhz/llqhz.github.io | /docs/algorithm/pattern/05.php | UTF-8 | 753 | 3.625 | 4 | [] | no_license | <?php
// 循环排序
// 遍历每个元素,将其与正确位置的索引替换
function cycle_sort($nums) {
$i = 0;
while ($i < count($nums)) {
// place-index
$p = $nums[$i] - 1;
if ($p != $i) {
// a is not at right place, swap.
[$nums[$i], $nums[$p]] = [$nums[$p], $nums[$i]];
} else {
... | true |
ec5236ceb218863d7219b07c04f99e4df617132f | PHP | Loddrik/CRUD_BDD | /Add-Cliente/createCliente-infoFinanciera.php | UTF-8 | 2,608 | 2.5625 | 3 | [] | no_license | <?php
include_once '../header.php';
include_once '../conexion2.php';
include_once '../conexion.php';
$id = $_POST['id_persona'];
$nombre = $_POST['nombre'];
$rut = $_POST['rut'];
$telefono = $_POST['telefono'];
$direccion = $_POST['direccion'];
$mail = $_POST['mail'];
$edad= $_POST['edad'];
$sentencia = ... | true |
14863f88762fe8828c4eed1529a876311f3f86d8 | PHP | giriposhaneshwar/generalHardware | /contactForm.php | UTF-8 | 1,852 | 2.953125 | 3 | [] | no_license | <?php
if(!isset($_POST['submit']))
{
//This page should not be accessed directly. Need to submit the form.
//echo "error; you need to submit the form!";
}
$name = $_POST['name'];
$visitor_email = $_POST['email'];
$message = $_POST['message'];
$phone = $_POST['phone'];
//Validate first
if(empty($name)||empty($visitor... | true |
0c731e5254386fef41524b9e827bbdf692106e5c | PHP | avolutions/avolutions | /src/Command/CreateMappingCommand.php | UTF-8 | 2,153 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/**
* AVOLUTIONS
*
* Just another open source PHP framework.
*
* @copyright Copyright (c) 2019 - 2021 AVOLUTIONS
* @license MIT License (https://avolutions.org/license)
* @link https://avolutions.org
*/
namespace Avolutions\Command;
/**
* CreateMappingCommand class
*
* Creates a new Enti... | true |
9d1af98fbdc124860d3bf7fa3146eedb2d72c5a0 | PHP | zhuomingliang/predaddy | /src/predaddy/messagehandling/configuration/ConfiguredMessageHandlerDescriptor.php | UTF-8 | 2,892 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/*
* Copyright (c) 2014 Janos Szurovecz
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merg... | true |
dae05b0720ad78006c85cca25c57666853b173d1 | PHP | sergeyfast/eazyphoto-web | /web/lib/EazyPhoto.Albums/AlbumByTag.php | UTF-8 | 487 | 2.578125 | 3 | [] | no_license | <?php
/**
* Album By Tag
*
* @package EazyPhoto
* @subpackage Albums
*/
class AlbumByTag {
/**
* @var int
*/
public $TagId;
/**
* @var Tag
*/
public $Tag;
/**
* @var int[]
*/
pu... | true |
650e718c2169e9ca67bd46bd79da7838814e73a5 | PHP | sethplunkett/Pro-basketball-database-and-applications | /fanValue.php | UTF-8 | 1,997 | 2.703125 | 3 | [] | no_license | <html>
<head>
<title>Fan Merch Value</title>
</head>
<body>
<?php
include('connectData.txt');
$mysqli = new mysqli($server, $user, $pass, $dbname, $port)
or die('Error connecting to MySQL server.');
$fan_name = $_POST['fan_name'];
//execute the SQL query and return records
$query = "SELECT f.fan_name , m.purc... | true |
974a7354274b550d6d1d10f726cba10c52ebfbc6 | PHP | PierreLouisMichel/examenMVC | /src/model/Vehicule.php | UTF-8 | 3,760 | 3.140625 | 3 | [] | no_license | <?php
class Vehicule extends Db
{
const TABLE_NAME = 'vehicule';
protected $id_vehicule;
protected $marque;
protected $modele;
protected $color;
protected $immatriculation;
/* Setters */ // Faut-il créer des setters pour ID et created_at??
public function setId_vehicule($id_vehicul... | true |
e7e371a79b19fb4e0f3afca59af350e6c642945d | PHP | mallikarjunbangargi/school-website | /retrivedisplay.php | UTF-8 | 1,382 | 2.703125 | 3 | [] | no_license |
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
}
</style>
</head>
<body bgcolor=#efefefe;>
<?php
$servername = "localhost";
$username = "sagar";
$password = "sagar";
$dbname = "sagar";
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connecti... | true |
6182b3c517c7dfb1def966bfcad751321e3d1f18 | PHP | stefanoc1/4501 | /ProjetoDexter-ExtraSala/Lab02 - Ajuste de Rotas/library/Dexter/Router/Request.php | UTF-8 | 1,891 | 3.203125 | 3 | [] | no_license | <?php
namespace Dexter\Router;
/**
* Encapsula dados da requisição
*/
class Request implements RequestInterface
{
/**
* Armazena URI
*/
private $uri;
/**
* Armazena parâmetros da requisição
*/
private $params;
/**
* Armazena método http
*/
private $httpMethod... | true |
fa18ef861b68e6dc40d134d402e46f4bd27cebbf | PHP | Harshrajsinh96/PHP-HTML_Practice | /File Upload/File with Checkbox.php | UTF-8 | 807 | 2.625 | 3 | [] | no_license | <?php
include_once "connection.php";
$sql = "SELECT enr_no,'-',first_name,last_name FROM student_master";
$result = mysqli_query($connection, $sql);
if (!$result)
die('Could not successfully run query :'.mysqli_error());
if (mysqli_num_rows($result) > 0)
{
?>
<table style="bor... | true |
6c2dcbc66a8b7facfc57a87356d2535e18216ecd | PHP | mehulsbhatt/yang | /src/JsonApi/Request/JsonApiResource.php | UTF-8 | 2,040 | 2.875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace WoohooLabs\Yang\JsonApi\Request;
class JsonApiResource
{
/**
* @var string
*/
protected $type;
/**
* @var string
*/
protected $id;
/**
* @var array
*/
protected $attributes;
/**
* @var array
*/
protected $relationships;
/**... | true |
0437388b6df5165b7dd07928aefa6a12d5f0fdde | PHP | 0daynick/payment | /src/Alipay/Refund/Client.php | UTF-8 | 1,790 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace OverNick\Payment\Alipay\Refund;
use OverNick\Payment\Alipay\AlipayBaseClient;
use OverNick\Payment\Kernel\Interfaces\RefundInterface;
/**
* 退款
*
* Class Client
* @package OverNick\Payment\Alipay\Refund
*/
class Client extends AlipayBaseClient implements RefundInterface
{
/**
* 创建退款
... | true |
20a1070e2a1c866cb3122ba460df44926204ba43 | PHP | electric-eloquence/fepper-drupal | /backend/drupal/core/lib/Drupal/Core/PageCache/ChainResponsePolicy.php | UTF-8 | 1,334 | 2.734375 | 3 | [
"GPL-2.0-only",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-other-copyleft",
"GPL-2.0-or-later",
"MIT"
] | permissive | <?php
namespace Drupal\Core\PageCache;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/**
* Implements a compound response policy.
*
* When evaluating the compound policy, all of the contained rules are applied
* to the response. The overall result is computed accord... | true |
19f59d46408ce827797f693bbf9e8d75f9e1b243 | PHP | jessicarojas99/almacen | /database/migrations/2020_09_24_004457_create_deposits_table.php | UTF-8 | 1,087 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDepositsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('deposits', fun... | true |
59d1785b438f71714a9f43f1cf1790ced9863e50 | PHP | khuongbv/E-Commerce | /backend/controllers/LoginController.php | UTF-8 | 6,095 | 2.71875 | 3 | [] | no_license | <?php
require_once 'models/User.php';
class LoginController
{
//chứa nội dung view
public $content;
//chứa nội dung lỗi validate
public $error;
/**
* @param $file string Đường dẫn tới file
* @param array $variables array Danh sách các biến truyền vào file
* @return false|string
... | true |
42f7573fdca60e028ec2378618e10713dab4eeba | PHP | msredhotero/crmcreditos | /includes/class/MontoLetras.class.php | UTF-8 | 16,210 | 3.40625 | 3 | [
"MIT"
] | permissive | <?php
class MontoLetras
{
public $monto = '';
public $cadenaMonto = '';
public function __construct($monto, $modo){
$this->monto = $monto;
$cadena = '';
if($modo == 1)
$cadena = $this->covertirNumLetras();
if($modo == 2)
$cadena = $this->covertirPorcientoLetras();
if($modo == 3)
$cadena... | true |
2fe0156a27745ac7ded2f87b6adc5afbbf65d768 | PHP | alphabox/packtub-crawler | /examples/downloadEbooks.php | UTF-8 | 547 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
include_once __DIR__ . '/../vendor/autoload.php';
use Alphabox\PacktubCrawler\PacktubSite;
use Monolog\Logger;
use Monolog\Handler\StreamHandler;
$logger = new Logger('stdout');
$logger->pushHandler(new StreamHandler('php://stdout', Logger::DEBUG));
//Login to Packtub site
$logger->info("Login to packtub.com"... | true |
8d8159ed533aad4217af8cba924dce543ffc19da | PHP | thyagopacher/vale-pratas | /control/Login.php | UTF-8 | 1,512 | 2.515625 | 3 | [] | no_license | <?php
session_start();
function __autoload($class_name) {
if(file_exists("../model/".$class_name . '.php')){
include "../model/".$class_name . '.php';
}elseif(file_exists("../visao/".$class_name . '.php')){
include "../visao/".$class_name . '.php';
}elseif(file_ex... | true |
f1854cad70db652f2bf3f9a4a0b323b818ca153c | PHP | dhadzhiew/ShoppingCart | /mvc/ViewHelpers/Input.php | WINDOWS-1252 | 505 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Hadzhiew
* Date: 3.10.2015 .
* Time: 22:16
*/
namespace DH\Mvc\ViewHelpers;
class Input extends BaseView
{
const TAG_NAME = 'input';
public function __construct($type, $name)
{
$this->setAttribute('type', $type);
$this->setAtt... | true |
faf5a84d49b8016fc2b6c6fe480a87563e3d363f | PHP | HLFer/cursoPHP | /Aula13/index.php | UTF-8 | 757 | 3.0625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
require_once 'Mamifero.php';
require_once 'Lobo.php';
require_once 'Cachorro.php';
$c = new Cachorro();
$m = new Mamifero();
$... | true |
ffde75bfbac2032166156989ae279d8ca0ac1800 | PHP | imran-khan101/Stock_management_system | /includes/function.php | UTF-8 | 2,054 | 2.9375 | 3 | [] | no_license | <?php
function strip_zeros_from_date($marked_string = "") {
// first remove the marked zeros
$no_zeros = str_replace('*0', '', $marked_string);
// then remove any remaining marks
$cleaned_string = str_replace('*', '', $no_zeros);
return $cleaned_string;
}
function redirect_to($location =... | true |
9f2644144860d5cbfa42cf976e2f5797743da74e | PHP | zknight/leagueloo | /app/modules/information/models/email.php | UTF-8 | 2,702 | 2.78125 | 3 | [] | no_license | <?php
require_once "category.php";
class Email extends \simp\Model
{
// fields
// - address
// - category_id
// - param
public static $genders = array(0 => 'boys and girls', 1 => 'boys', 2 => 'girls');
public static $ages = array(
4 => 'u5', 5 => 'u6', 6 => 'u7', 7 => 'u8', 8 => 'u9',
... | true |
1c09050689923c10b217a54796da7ee4da8a801e | PHP | lcsoka/ems-trainer-backoffice | /app/Http/Controllers/API/AuthController.php | UTF-8 | 1,530 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use App\Models\User;
use App\Traits\ApiResponder;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
class AuthController extends Controller
{
use ApiResponder;
public function ... | true |
8d32909ce8d64c15eb6127523531ba8cc60d7048 | PHP | jaagala/Veebiprogrammeerimine | /index.php | UTF-8 | 1,277 | 2.5625 | 3 | [] | no_license | <?php
//echo "See on minu esimene php!";
$firstName = "Jaagup";
$lastName = "Aland";
$dateToday = date("d.m.Y");
$hourNow = date("G");
$partOfDay = "";
if ($hourNow < 8){
$partOfDay = "varajane hommik";
}
if ($hourNow >= 8 and $hourNow < 16){
$partOfDay = "koolipäev";
}
if ($hourNow > 16){
... | true |
bf2676ff10c8dd1acc5dc8f40bf6387a2b09abb8 | PHP | ignited/laravel-omnipay | /src/Ignited/LaravelOmnipay/LaravelOmnipayManager.php | UTF-8 | 3,330 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php namespace Ignited\LaravelOmnipay;
use Closure;
use Omnipay\Common\GatewayFactory;
use Omnipay\Common\Helper;
use Omnipay\Common\CreditCard;
class LaravelOmnipayManager {
/**
* The application instance.
*
* @var \Illuminate\Foundation\Application
*/
protected $app;
/**
* Omn... | true |
48d645a4b822e1d8772e562f07acbb1a30cfffac | PHP | buckmaxwell/robo-api-front | /shit.php | UTF-8 | 1,029 | 2.515625 | 3 | [] | no_license | <?php
include 'constants.php';
function createJSON($post_data, $url_string){
$curl_req = curl_init($url_string);
curl_setopt_array($curl_req, array(
CURLOPT_POST => TRUE,
CURLOPT_RETURNTRANSFER => TRUE,
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),... | true |
cf308f765e43b5c99b6918246387b83e17b559f6 | PHP | kanneg881/PHP | /LearningPHPDesignPatterns/Chapter11/Example/ConnectClient.php | UTF-8 | 460 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* 用戶端連線
* User: Jackson
* Date: 2018/1/15
* Time: 下午1:58
*/
include_once "UniversalConnect.php";
use Chapter11\Example\UniversalConnect;
class ConnectClient
{
/** @var mysqli 資料庫物件 */
private $mysqli;
public function __construct()
{
// 所有的連結操作只需要一行程式
... | true |
159dac4d4cb3ed2842760e8641a7a24cf347230d | PHP | anupdeveloper/laraveleshop-apis | /app/Http/Controllers/AuthController.php | UTF-8 | 1,736 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Auth;
use DB;
use App\Models\User;
use Illuminate\Support\Facades\Hash;
use Validator;
class AuthController extends Controller
{
function login(Request $request){
$credentials = $request->only('email', 'password');
if (Auth::... | true |
f621814d570c6143eaf1ce99b62e529884bfcf12 | PHP | damlaozdemir/IMDB | /details.php | UTF-8 | 928 | 2.796875 | 3 | [] | no_license | <?php require('core/init.php');
if(isset($_GET['imdbID'])) {
$imdbID = $_GET['imdbID'];
$movie = getMovie($imdbID);
$poster = getPoster($imdbID);
$mgenres = getGenres($imdbID);
$genres = "";
$i = 0;
foreach ($mgenres as $genre) {
$i++;
if($i < count($mgenres))
$genres .= $genre['genre']. " | ";
else
... | true |
5566cda2f473da966e0ed2df4ce0e55d07113266 | PHP | ccmorenosa/artemisa | /serviciosacademicos/class/ApreguntaClass.php | UTF-8 | 3,603 | 2.71875 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of convenioClass
*
* @author Administrador
*/
class ApreguntaClass {
//put your code here
var $idsiq_Apregunta= null;
var $titulo= null;
var $descripcion= null;
var ... | true |
a2a6d80b15b2e77514dc90b8d3e5c2215f70b33b | PHP | markronquillo/laracasts-forum | /tests/Unit/ThreadTest.php | UTF-8 | 1,247 | 2.515625 | 3 | [] | no_license | <?php
namespace Tests\Unit;
use Tests\TestCase;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ThreadTest extends TestCase
{
use DatabaseMigrations;
protected $thread;
public function setUp()
{
parent::setUp();
$this->thread = create('Ap... | true |
3b0bde5c66ef945f7d670d830a1a6782cb7e6f80 | PHP | mle86/php-request-authentication | /src/Crypto/Hasher.php | UTF-8 | 1,923 | 3.296875 | 3 | [
"MIT"
] | permissive | <?php
namespace mle86\RequestAuthentication\Crypto;
use mle86\RequestAuthentication\Exception\InvalidAuthenticationException;
/**
* Can be used to compute and verify cryptographic hashes.
*
* This is a symmetric operation,
* so the same class acts both as hasher and hash verifier.
*/
abstract class Hasher
{
... | true |
6ad509db1b53655c90cbadbe2a54cea3f88183b4 | PHP | fiestazzz/verifica-intermedia-2021 | /lib/funzioneCreaOggetti.php | UTF-8 | 522 | 2.875 | 3 | [] | no_license | <?php
function UserFactory ($fileJson)
{
$OggettiJson=[];
foreach ($fileJson as $value)
{
$user= new User();
$user->setUserid($value['id']);
$user->setFirstName(sanitizeName($value['firstName']));
$user->setLastName(sanitizeName($value['lastName']));
$user->setE... | true |
0e9404d5fbf7495ceb551e400f9389f92e722a09 | PHP | sasasaulo/PHPSoftblue | /aula4.php | UTF-8 | 6,022 | 4 | 4 | [] | no_license | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<title>PHP Arrays e Funções Especiais</title>
</head>
<body>
<h1>Curso de PHP - Softblue</h1>
<br/>
<br/>
<h2>Arrays e Funções Especiais:</h2><br/>
<?php
define("BR", "<br/>... | true |
40dbcb6d75f57036993e442c336c0a3558118346 | PHP | federave/AplicacionSM | /servidor/recibirReparto/observaciones.php | UTF-8 | 1,248 | 2.546875 | 3 | [] | no_license | <?php
function eliminarObservaciones($idCliente,$idDireccion,$idRepartidor,$fecha)
{
$aux=false;
$conector = new Conector();
if($conector->abrirConexion())
{
$conexion = $conector->getConexion();
$aux=true;
$sql = "SET SQL_SAFE_UPDATES = 0";
$aux &= $conexion->query($sql);
$sql = "DELETE FROM Observacio... | true |
fc317b2133e34f2a19030803798f82ce682f91af | PHP | zawiszaty/kantor-backend | /src/Command/ConversionCommand.php | UTF-8 | 1,461 | 3.03125 | 3 | [] | no_license | <?php
namespace App\Command;
use Symfony\Component\Validator\Constraints as Assert;
/**
* Class ConversionCommand
* @package App\Command
*/
final class ConversionCommand
{
/**
* @var float
* @Assert\NotBlank()
* @Assert\Type(
* type="float",
* message="The value {{ value }} i... | true |
cfaf8ad1e35017c2c954ce5fbb45cba91bc4442f | PHP | jeql/laravel-server | /src/Jeql.php | UTF-8 | 1,787 | 2.625 | 3 | [] | no_license | <?php
namespace Jeql;
use Jeql\Http\Controllers\BatchController;
use Jeql\Http\Controllers\IntrospectController;
use Jeql\Http\Controllers\OperationsController;
use Jeql\Http\Middleware\CatchExceptions;
use Laravel\Lumen\Routing\Router;
class Jeql
{
/** @var string */
protected static $operationsPath;
/... | true |
f3f4b18fd4f62a3ec71c901044b7e12e8a4cb65c | PHP | iamromeo/Lost-Kingdom-RPG-Resources-API-Provider | /src/App/Services/TradegoodcategoriessService.php | UTF-8 | 346 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Services;
class TradegoodcategoriessService extends BaseService
{
public function getAll()
{
return $this->db->fetchAll("SELECT * FROM tradegood_categories");
}
public function getOne( $id )
{
return $this->db->fetchAll("SELECT * FROM tradegood_categories WHER... | true |
04efd61322b25535d5e0b366091f622b32d1a4fd | PHP | neilgautam/health.net | /includes/adminmodify.inc.php | UTF-8 | 2,930 | 2.53125 | 3 | [] | no_license | <?php
if(isset($_POST['admin_modify_submit'])){
require 'dbh.inc.php';
//search
$docid = $_POST['doctor_id'];
if(empty($docid)){
header("Location: ../adminmodify.php?error=emptyfields");
exit();
}
else{
//might be an error
$sql = "SELECT * FROM doctorsrecord WHERE doctor... | true |
be2c70e5dbdb0062848c11432758ea7fa7f5e569 | PHP | jibundeyare/cours-php | /exam-201505/00-theorie.php | UTF-8 | 990 | 2.8125 | 3 | [] | no_license | <?php
// 1. Quelle est la différence entre php et html ?
// (Dites-le en quelques lignes seulement)
// 2. À quoi servent les fonctions `include`, `include_once`, `require` et `require_once` ?
// 3. À quoi servent les variables `$_GET` et `$_POST` ?
// 4. À quoi sert la variable `$_SESSION` ?
// 5. De quel type de ... | true |
911d8d717315408010c364e95950e4a90077febe | PHP | WaqarKhatana220/Payroll-System | /Payroll/salaryverify.php | UTF-8 | 3,648 | 2.578125 | 3 | [] | no_license |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Salary Slip</title>
<link rel="stylesheet" href="Add.css">
</head>
<body>
<?php
session_start();
include "Connection.php";
if($_SERVER["REQUEST_METHOD... | true |
4c89c7af511890f9f9d06a5e75488829c66a2491 | PHP | InstruktoriBrno/tmou-web | /App/Facades/Qualification/DeleteQualificationProgressFacade.php | UTF-8 | 3,247 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace InstruktoriBrno\TMOU\Facades\Qualification;
use Doctrine\ORM\EntityManagerInterface;
use InstruktoriBrno\TMOU\Model\Event;
use InstruktoriBrno\TMOU\Model\Team;
use InstruktoriBrno\TMOU\Services\Qualification\FindTeamAnswersService;
use InstruktoriBrno\TMOU\Services\Qualificatio... | true |
ecfbf4e4f4f5dce5f12d6ad92f4beff117335c4b | PHP | bolitec/ContactMailer | /php/ResetPassEmail.php | UTF-8 | 3,390 | 2.5625 | 3 | [] | no_license | <?php
// This script first checks to see if the logon information is contained in a session on the web server.
// If it is, it tries to log them in. If this is successful they are redirected to the members area.
// If there is no session, it allows them to logon.
// If logon form has not been posted, it shows them ... | true |
d57c5b037595058776fff78727b88fc4be1f16ef | PHP | profis/pc_shop | /templates/delivery_form/tpl.php | UTF-8 | 1,541 | 2.546875 | 3 | [] | no_license | <?php
/**
* @var PC_plugin_pc_shop_delivery_form_widget $this
*/
if( !isset($data['form']) ) return;
?>
<div class="delivery-form"><?php
foreach( $data['form'] as $inputName => $input ) {
$value = v($data['form_data'][$inputName]);
$id = 'delivery_form_data_' . $inputName;
$name = 'delivery_form_data[' . $... | true |
b17b77589f96d8f5a3bcca9f0866e233a4d66da1 | PHP | vitaliyviznyuk/laravel-chromedriver | /src/Console/InstallCommand.php | UTF-8 | 1,301 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
/**
* @author Vitaliy Viznyuk <vitaliyviznyuk@gmail.com>
* @copyright Copyright (c) 2020 Vitaliy Viznyuk
*/
namespace vitaliyviznyuk\LaravelChromedriver\Console;
use Illuminate\Console\Command;
class InstallCommand extends Command
{
/**
* The name and signature of the conso... | true |
0b8242742c4ea51f7429677211865376c8141a05 | PHP | k-dimitrijevs/product-catalog | /app/Services/ProductsServices/SaveProductRequest.php | UTF-8 | 1,251 | 2.921875 | 3 | [] | no_license | <?php
namespace App\Services\ProductsServices;
class SaveProductRequest
{
//Uuid::uuid4(),
//$_POST['title'],
//$_POST['category'],
//$_POST['quantity'],
//$_SESSION['id'],
//$_POST['tags']
private string $id;
private string $title;
private string $category;
private string $quantity;
private stri... | true |
aecaf830c90b26546f02dbd4f9ac69fba0dce69c | PHP | lynnell/scrap-attack | /htdocs/home.php | UTF-8 | 3,624 | 2.71875 | 3 | [] | no_license | <?php
session_start();
include("config.php");
//including config.php in our file
//echo "The username is: ".$_SESSION['username'];
$username = $_SESSION['username'];
//echo $username;
if(!empty($_POST['message'])){
// Now checking if the message box is entered or not.
$message = $_POST['message'];
$check = "SEL... | true |
80824c5232de3399fe8d607909b7e9d53ccec401 | PHP | charisma-beads/charisma-beads | /module/Shop/src/Hydrator/ProductGroupHydrator.php | UTF-8 | 517 | 2.59375 | 3 | [] | no_license | <?php
namespace Shop\Hydrator;
use Common\Hydrator\AbstractHydrator;
/**
* Class Group
*
* @package Shop\Hydrator
*/
class ProductGroupHydrator extends AbstractHydrator
{
/**
* @param \Shop\Model\ProductGroupModel $object
* @return array
*/
public function extract($object)
{
re... | true |
f96a8c3e6f19c36f21e016319d30ae2973d6cf70 | PHP | ch0c01dxyz/instatoken | /src/Objects/UserId.php | UTF-8 | 699 | 3.0625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
declare(strict_types = 1);
namespace Ch0c01dxyz\InstaToken\Objects;
use Ch0c01dxyz\InstaToken\ObjectInterface;
/**
* @author Egar Rizki <ch0c01d.xyz@gmail.com>
*/
class UserId implements ObjectInterface
{
/**
* @var integer
*/
protected $userId;
/**
* UserId Constructor
*
... | true |
9a28ce921848b2a6cefdfdd6d95de65a7dafb2ce | PHP | krissss/gaode-area-mysql | /cover.php | UTF-8 | 1,368 | 2.859375 | 3 | [] | no_license | <?php
require __DIR__ . '/vendor/autoload.php';
require __DIR__ . '/mysql/Db.class.php';
use Overtrue\Pinyin\Pinyin;
// 定义层级
define('LEVEL_PROVINCE', 1);
define('LEVEL_CITY', 2);
define('LEVEL_AREA', 3);
/**
* @param $adCode
* @return bool
*/
function isProvince($adCode)
{
return $adCode % 10000 == 0;
}
/**
... | true |
bf0aa9f2ec926e688a649e683eb690683903dc4b | PHP | OFFLINE-GmbH/oc-mall-plugin | /components/SignUp.php | UTF-8 | 3,396 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php namespace OFFLINE\Mall\Components;
use Illuminate\Support\Facades\Session;
use OFFLINE\Mall\Classes\Customer\SignInHandler;
use OFFLINE\Mall\Classes\Customer\SignUpHandler;
use OFFLINE\Mall\Models\GeneralSettings;
use RainLab\Location\Models\Country;
use RainLab\User\Models\Settings as UserSettings;
/**
* The ... | true |
06f240a5fa1c68986b5a8ebbf18df57d183f7647 | PHP | LuxCaro19/PHP-DEMO | /models/Conexion.php | UTF-8 | 390 | 2.953125 | 3 | [] | no_license | <?php
namespace models;
class Conexion{
public static $user="root";
public static $pass="";
public static $URL="mysql:host=localhost;dbname=demophp";
public static function conector(){
try{
return new \PDO(Conexion::$URL,Conexion::$user, Conexion::$pass);
}catch(\... | true |
2146348b339bc39f4a61cc76dd139cfc60f25df6 | PHP | ncou/http-header-kit | /tests/HeaderAccessControlAllowOriginTest.php | UTF-8 | 5,210 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Sunrise\Http\Header\Tests;
use PHPUnit\Framework\TestCase;
use Sunrise\Http\Header\HeaderAccessControlAllowOrigin;
use Sunrise\Http\Header\HeaderInterface;
use Sunrise\Uri\Uri;
class HeaderAccessControlAllowOriginTest extends TestCase
{
public function testConstructor()
{
$uri = new Uri('http://l... | true |
764066ceb82845189a358c79c23e25c12919ee64 | PHP | SuloshiPHD/CodelgniterWishList | /application/controllers/Wishlist.php | UTF-8 | 710 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
class Wishlist extends CI_Controller
{
/**
* load the wishlist if the user login session is set, if not
* redirect to login page
*/
public function index()
{
if ($this->session->has_userdata('loginSession')) {
$this->load->view('wishlistview');
} else {
... | true |
c61c6029f638a42075e17cb4a297beee8b4c1268 | PHP | rabindhakal/hotelbookingapi | /user_app/api/searchproperty.php | UTF-8 | 2,902 | 2.65625 | 3 | [] | no_license | <?php
require_once "../../base_config/Connection.php";
require_once "../../panel/model/User.php";
require_once "../../panel/controller/Utils.php";
require_once "../../panel/model/Wishlist.php";
require_once "../../panel/model/Property.php";
$response = array("error"=>true) ;
class SearchProperty{
private $connecti... | true |
6bad546d5784ecc57ae392382a50ed12412a5945 | PHP | vgmdb/user | /src/VGMdb/Component/User/Mailer/MustacheSwiftMailer.php | UTF-8 | 3,803 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace VGMdb\Component\User\Mailer;
use VGMdb\Component\User\Model\UserInterface;
use VGMdb\Component\User\Mailer\MailerInterface;
use Symfony\Component\Routing\RouterInterface;
use Psr\Log\LoggerInterface;
/**
* Mailer with Mustache templating.
*
* @author Gigablah <gigablah@vgmdb.net>
*/
class Mustach... | true |
72a719769bda0354b9a605e79ef92b7078bac98c | PHP | Agus17LA/MoviePass | /Models/Show.php | UTF-8 | 3,339 | 3.1875 | 3 | [] | no_license | <?php
namespace Models;
use DateTime;
class Show{
private $id_show;
private $date;
private $id_cinema;
private $id_movieTheater;
private $id_movie;
private $total_tickets;
private $tickets_sold;
private $ticket_price;
... | true |
16fc0884cb608ffa9670d42a5f77aa5ed383724d | PHP | andresayak/blackmine | /module/Application/src/Application/Form/Admin/User.php | UTF-8 | 849 | 2.515625 | 3 | [] | no_license | <?php
namespace Application\Form\Admin;
use Application\Form\Form;
use Zend\ServiceManager\ServiceLocatorInterface;
class User extends Form
{
protected $_sm;
public function __construct(ServiceLocatorInterface $sm)
{
$this->_sm = $sm;
parent::__construct();
}
public fun... | true |
8891407949f46f00655014084ffd3af863101ef4 | PHP | fureszpeter/testRefactoring | /src/Domain/Contracts/WriteService.php | UTF-8 | 983 | 2.90625 | 3 | [] | no_license | <?php
namespace Language\Domain\Contracts;
use Language\Domain\Entities\Applet;
use Language\Domain\Entities\Application;
use Language\Domain\ValueObjects\Translation;
/**
* Write Translations.
*
* @package Language
*
* @license MIT
*/
interface WriteService
{
/**
* @param \Language\Domain\ValueObjects... | true |
c30e11acdfc5ccf8379688e3c23453c84d48b41c | PHP | PEWEBER/Web-Dev | /Test1/index.php | UTF-8 | 935 | 2.734375 | 3 | [] | no_license | <?php
require("page.php");
class homepage extends Page
{
private $row2buttons = array(
"Form" => "form.php",
"View Records" => "ViewRecords.php",
);
public function Display()
... | true |