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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
0ff541ff1b2ac0ef19601f892e7eb5a848feb4c3 | PHP | joshfernandez/iat352_beak-and-spur | /php-backend/prepare-update-form.php | UTF-8 | 2,455 | 2.578125 | 3 | [] | no_license | <!--
IAT 352 with Prof. Helmine Serban
D101 with Fatemeh Salehian-Kia
Beak & Spur
Bread-wy Woo
prepare-update-form.php
Main reference is from HTML & CSS: Design and Build Websites by Jon Duckett.
Other references will be noted at appropriate sections of this file.
-->
<?php
// Source: https://stackove... | true |
6de2526e96c88c903c0a477c5053619c2b176570 | PHP | Chicho2011/desoft-d-voyager | /src/Helpers/helpersVisits.php | UTF-8 | 2,328 | 2.53125 | 3 | [] | no_license | <?php
use Desoft\DVoyager\Models\DVoyagerVisitHit;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Session;
if (!function_exists('hitPage')) {
function hitPage($page)
{
$session_id = Session::getId();
$visitas = DVoyagerVisitHit::where('session_id', $session_id)->where('page'... | true |
e82904c37ecff88dccf60cb780b5cba4742cec9c | PHP | derekmcc/live-site | /src/Controller/UserController.php | UTF-8 | 5,489 | 2.578125 | 3 | [] | no_license | <?php
/**
* Summary for user controller.
*/
namespace App\Controller;
use App\Entity\Recipe;
use App\Entity\Review;
use App\Entity\User;
use App\Form\UserType;
use App\Repository\RecipeRepository;
use App\Repository\ReviewRepository;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\Fra... | true |
4c55346c2a872ee2f558175759661074711d2f10 | PHP | haidangdevhaui/core | /src/app/models/Role.php | UTF-8 | 561 | 2.578125 | 3 | [] | no_license | <?php
namespace Haidangdev\Core\App\Models;
use Illuminate\Database\Eloquent\Model;
class Role extends Model
{
protected $table = 'team_roles';
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
];
public static function getForSe... | true |
6afdcd59b23176696031c44b8b45b146e7cc58d2 | PHP | mediamonks/php-rest-api | /src/Request/Format.php | UTF-8 | 374 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace MediaMonks\RestApi\Request;
class Format
{
const FORMAT_JSON = 'json';
const FORMAT_XML = 'xml';
const FORMAT_MSGPACK = 'msgpack';
public static function getDefault(): string
{
return self::FORMAT_JSON;
}
public static function getAvailable(): array
{
... | true |
17c5cc554f23db7c3b76f35164a76269f0c10162 | PHP | ambikeshgautam/All_Core_Trainings_Php | /crud/prepared/procedural/insertandshowwithtable.php | UTF-8 | 3,467 | 2.78125 | 3 | [] | no_license | <?php
include('connection.php');
if(isset($_POST['submit']))
{
if (($_POST['name']== "") ||($_POST['last_name']== "") ||($_POST['rollno']== "") ||($_POST['email']== "") ||($_POST['f_name']== "")) {
echo "All fields are require !";
}else{
// INSERT query into the database
$sql = "INSERT INTO `stude... | true |
da429b98a9f53e656d1aad24227d26a46df7fad5 | PHP | cwmiller/broadworks-connector | /src/Ocip/Models/VoiceMessagingStorageMode.php | UTF-8 | 416 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace CWM\BroadWorksConnector\Ocip\Models;
/**
* VoiceMessagingStorageMode
*
* Choices for the Voice Messaging Storage mode.
*
* @method static VoiceMessagingStorageMode CLOUD()
* @method static VoiceMessagingStorageMode MAIL_SERVER()
* @EnumValueType string
*/
class VoiceMessagingStorageMode extend... | true |
bd4ea4648bf90dfdf40a9599c28d31715646b0d8 | PHP | takdzwiedz/affirm_app | /class/Can.php | UTF-8 | 8,090 | 2.9375 | 3 | [] | no_license | <?php
namespace Mozesz\MozeszNamespace;
use PDO;
class Can
{
private $users;
private $affirmations_male;
public function __construct()
{
$db = new DbConnect();
$con = $db->openConnection();
$query1 = "SELECT * FROM `user` WHERE `is_active` = 1";
$request = $con->pre... | true |
29b29c9715ff8304804f448e2392a7250e434ac1 | PHP | karouani/GestioneCommerciale | /nuovoOrdine.php | UTF-8 | 2,879 | 2.921875 | 3 | [] | no_license | <?php
session_start();
$_SESSION["titolo"] = "Nuovo ordine";
require_once 'files/header.php';
echo "<div class=\"container\">";
?>
<form action="nuovoOrdine.php" method="post">
<div class="form-group">
<label>Cliente</label>
<?php
//Riempimento del menù a tendina
$... | true |
2c7cea3a5e662ad4066833e8fe2fcb482c1033d0 | PHP | MAlejandro26/Proyecto_Kermesse | /src/datos/DTMoneda.php | UTF-8 | 3,508 | 2.765625 | 3 | [] | no_license | <?php
include_once("Conexion.php");
class DTMoneda extends Conexion
{
private $myCon;
public function listarMoneda()
{
try
{
$this->myCon = parent::Conectar();
$result = array();
$sql = 'SELECT * from tbl_moneda';
$stm = $this->myCon->prep... | true |
3b5bd17a6140554d8d887e063bed716f007793cc | PHP | devsandk/bitrix_utf8 | /bitrix/modules/form/classes/general/form_callform.php | UTF-8 | 67,044 | 2.59375 | 3 | [] | no_license | <?
/***************************************
Веб-форма
***************************************/
class CAllForm extends CForm_old
{
function err_mess()
{
$module_id = "form";
@include($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/".$module_id."/install/version.php");
return "<br>Module: ".$module_id." (".$arModu... | true |
62810822367fb5214586d8d07f34bc2bc8ffdb67 | PHP | RodriDFC/Inventario-de-una-Casa | /php/productos_vencidos.php | UTF-8 | 1,292 | 3.265625 | 3 | [] | no_license | <?php
/**
* @author Jose Arevalo
*/
/**
* @global string Consulta para obtener los productos vencidos.
*/
$consulta = "SELECT nombre,precio,tipo,fecha_vencimiento FROM productos";
/**
* Devuelve true si la fecha de vencimiento del producto es menor a la fecha actual.
* @param date $fecha_inicial
* @param ... | true |
c7759ad21b6f4a4742d46937bf6deb1e61912506 | PHP | parth-chow/University | /css/db_conn.php | UTF-8 | 353 | 2.75 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?php
//mysql connection (hostname, username, password, dbname);
$mysqli = new mysqli('localhost', ‘parthac’, '511416', ‘parthac’);
//check connection
if (mysqli_connect_errno())
{
printf("Connect failed: %s\n", mysqli_connect_error());
exit()... | true |
6fe8a32882614c94d38bb1a47280916e7448fad4 | PHP | Drooken/raspdomo | /fonctions.php | UTF-8 | 394 | 2.765625 | 3 | [] | no_license | <?php
function etatLampe($num){
$gpio=array();
exec("gpio read ".$num,$gpio);
if ($gpio[0]){
return "on";
}
else{
return "off";
}
}
function classe($num){
$gpio=array();
exec("gpio read ".$num,$gpio);
if ($gpio[0]){
return "active";
}
... | true |
73a8045743d28386fe2bffef3718df7d81083071 | PHP | Diannuryana15/pw2020_193040045 | /kuliah/uts/No.1.php | UTF-8 | 599 | 3.359375 | 3 | [] | no_license | <?php
function cetak_bintang($bintang) {
for($i=1;$i <= $bintang; $i++) {
for($j=1;$j<=$i;$j++) {
echo "<p>*</p>";
}
echo "<div class ='clear'></div> ";
}
echo "</div>";
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" cont... | true |
a83817642f17691073ce940c4038ad8464dec3d4 | PHP | robo47/BlazeFramework | /src/blaze/ds/driver/pdobase/meta/AbstractViewMetaData.php | UTF-8 | 855 | 2.578125 | 3 | [] | no_license | <?php
namespace blaze\ds\driver\pdobase\meta;
use blaze\lang\Object,
blaze\ds\meta\ViewMetaData;
/**
* Description of AbstractViewMetaData
*
* @author Christian Beikov
* @license http://www.opensource.org/licenses/gpl-3.0.html GPL
* @since 1.0
*/
abstract class AbstractViewMetaData extends Object imple... | true |
e3d6270f1f6f445212aa29a2bfb7a97af6aba621 | PHP | umonkey/ufw1 | /src/Node/Entities/Node.php | UTF-8 | 595 | 2.859375 | 3 | [] | no_license | <?php
/**
* Basic node entity.
**/
declare(strict_types=1);
namespace Ufw1\Node\Entities;
use ArrayObject;
class Node extends ArrayObject
{
public static function fromArray(array $props): self
{
switch ($props['type']) {
case 'user':
return new User($props);
... | true |
560a4bfcff0f567ef8dbc40d4eee5586a92bcca8 | PHP | JustinHook/royal-mail-price-api | /index.php | UTF-8 | 2,710 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
require_once 'vendor/autoload.php';
use \RoyalMailPriceCalculator\Calculator;
use \RoyalMailPriceCalculator\Package;
$app = new \Slim\Slim();
$app->response->headers->set('Content-Type', 'application/json');
$app->config('debug', false);
$app->error(function (\Exception $e) use ($app) {
$app->response->se... | true |
d5630cb417688dfb9428bc2a5136d4001bb1be49 | PHP | shamusdougan/htdocs_imp2 | /_protected/models/SyncRelationships.php | UTF-8 | 2,261 | 2.78125 | 3 | [] | no_license | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "syncrelationships".
*
* @property integer $index
* @property string $description
* @property string $syncModelName
* @property string $endPoint
* @property string $username
* @property string $password
* @property integer $frequen... | true |
8f7c4685554ead08cf2c0d2ce324f778fbc00809 | PHP | MateuSilveira/PHP | /exemplo 10.php | UTF-8 | 184 | 3.5 | 4 | [] | no_license |
<html>
<head>
<title>Exemplo 10</title>
</head>
<body>
<h1>Estrutura de Repetição(while)</h1>
<?php
$num=1;
while($num<=10){
echo"Número: $num <br>";
$num++;
}
?>
</body>
</html> | true |
03f1917ca082c778926df72ab2a0419e41c8e539 | PHP | zhouchang2017/laravel-vuetify | /app/Criteria/NewPostCriteria.php | UTF-8 | 1,255 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Criteria;
use Prettus\Repository\Contracts\CriteriaInterface;
use Prettus\Repository\Contracts\RepositoryInterface;
/**
* Class NewPostCriteria.
*
* @package namespace App\Criteria;
*/
class NewPostCriteria implements CriteriaInterface
{
/**
* @var int
*/
protected $skip;
... | true |
7d5dc8a88da4d09ea5c7ed659b9078265b1b7543 | PHP | thephpleague/oauth2-server | /src/CryptTrait.php | UTF-8 | 2,118 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Encrypt/decrypt with encryptionKey.
*
* @author Alex Bilbie <hello@alexbilbie.com>
* @copyright Copyright (c) Alex Bilbie
* @license http://mit-license.org/
*
* @link https://github.com/thephpleague/oauth2-server
*/
namespace League\OAuth2\Server;
use Defuse\Crypto\Crypto;
use De... | true |
69673dfb1f2b26752000f334e9f85a95e0b2dfdf | PHP | Ipssi-Portfollow/portfollow | /portfollow-app/src/Entity/Abonnement.php | UTF-8 | 1,462 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Entity;
use App\Repository\AbonnementRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=AbonnementRepository::class)
*/
class Abonnement
{
/**
* @ORM\Id
* @ORM\... | true |
b695a5f5a5fe04d1fe747462f804fea64307a444 | PHP | OngKarWei5107/SEP_PROJECT | /application/models/registrationModel.php | UTF-8 | 1,260 | 2.765625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class registrationModel extends CI_Model{
var $account = 'account';
var $customer = 'customer';
public function __construct()
{
parent::__construct();
$this->load->database();
}
//to validate email and password during login
function login($email, $password)
{
$this->db->from($this->account);
$t... | true |
e01a0f477f53b913677ad42000e638ccdda09d4d | PHP | lygPP/myblog | /Video.class.php | UTF-8 | 1,771 | 2.671875 | 3 | [] | no_license | <?php
/**
* 视频管理实现类
* Author: Lin
* Date: 2014-01-22
*/
include "conn/conn.php";
include "interface/VideoInterface.php";
class Video implements VideoInterface{
public function shareVideo($videolink,$videodate,$videodetail,$userid){
$result = mysql_query("insert into vi... | true |
13d2e48173a44d6c6a99a0019b26f35aadae4929 | PHP | ifeghali/planet-php | /include/Model/Feed/Entry.php | UTF-8 | 1,312 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Planet PHP
*
* Feed Entry model
*
* PHP version 5
*
* @package Planet_PHP
* @author Till Klampaeckel <till@php.net>
* @author Igor Feghali <ifeghali@php.net>
* @copyright 2011 The Authors
* @license http://opensource.org/licenses/MIT The MIT License
* @link http://github.com... | true |
ddad86c43c3b5841b30f93a94c26c880a4268218 | PHP | TranTien139/cms-backend-laravel5.2 | /app/CustomFunction/function.php | UTF-8 | 5,125 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
function stringUnicode($str){
if(!$str) return false;
$unicode = array(
'a'=>'á|à|ả|ã|ạ|ă|ắ|ặ|ằ|ẳ|ẵ|â|ấ|ầ|ẩ|ẫ|ậ',
'A'=>'Á|À|Ả|Ã|Ạ|Ă|Ắ|Ặ|Ằ|Ẳ|Ẵ|Â|Ấ|Ầ|Ẩ|Ẫ|Ậ',
'd'=>'đ',
'D'=>'Đ',
'e'=>'é|è|ẻ|ẽ|ẹ|ê|ế|ề|ể|ễ|ệ',
'E'=>'É|È|Ẻ|Ẽ|Ẹ|Ê|Ế|Ề|Ể|Ễ|Ệ',
'i'=>'í|ì|ỉ|ĩ|ị',
'I'=>'Í|Ì|Ỉ|Ĩ|Ị',
'o'=>'ó|ò|ỏ|õ|ọ|ô|ố|ồ|... | true |
5ed085449947cbb9a5fe9cca70ce7bf1e3ff23c1 | PHP | zab3355/wwwDot | /tutorials/JavaScriptPage8.php | UTF-8 | 5,507 | 3.203125 | 3 | [] | no_license | <?php
$title = "Loops";
$section ="JavaScript";
require_once "../includes/jsHeader.php";
?>
<main role="main" class="col-sm-9 ml-sm-auto col-md-10 pt-3">
<h1>Loops</h1>
<div class="jumbotron">
<div class="col-sm-8 mx-auto">
<h2>Why do we need loops?</h2>
... | true |
1e20a02578abe33af21962817378ea9e0a5c595a | PHP | UnionOfRAD/li3_couchbase | /tests/mocks/MockCouchbase.php | UTF-8 | 12,458 | 2.921875 | 3 | [] | no_license | <?php
namespace li3_couchbase\tests\mocks;
/**
* Class-representation of the native Couchbase client for PHP
*
* Deprecated methods are currently not part of the official API
*/
class MockCouchbase {
public function __construct(
$host,
$user = '',
$password = '',
$bucket = '',
$persistent = ''
) {}
... | true |
556830e98002ee2936861d4315c9e5a99098692c | PHP | BluePay/NewMerchantApplications | /sample_webhook_usage.php | UTF-8 | 855 | 2.515625 | 3 | [] | no_license | <?php
include_once('BluePayOnlineApp.php');
$secretkey = 'SharedOnlineAppApiAccessKey';
$inputJSON = file_get_contents('php://input');
$input = json_decode($inputJSON, TRUE);
$bluepay = new BluePayOnlineAppWebhook();
$bluepay->setSecretKey($secretkey)
->setAccountNo($input['account_no'])
->setSubmiss... | true |
b8669443f1b7d86e0bf4d0c4a6733b04f189a88a | PHP | godfreygan/laraval | /vendor/lightservice/lightservice/src/LightService/DefaultEventEmitter.php | UTF-8 | 517 | 2.625 | 3 | [] | no_license | <?php
/**
* default global eventemitter facade
*
* @author yuanbaoju
*/
namespace LightService;
use LightService\Util\EventEmitter;
class DefaultEventEmitter
{
private static $instance;
public static function getInstance()
{
if (!self::$instance) {
self::$instance = new EventEmit... | true |
cd743d319e7e340893bd543bfb84ffce3b3b0f2d | PHP | Phoenix2140/itemsystem | /app/controllers/Salir.php | UTF-8 | 228 | 2.671875 | 3 | [] | no_license | <?php
class Salir{
private $config;
public function __construct($config){
$this->config = $config;
}
public function salir(){
session_destroy();
header('Location: '.$this->config->get('baseUrl'));
}
}
?> | true |
e4bc354522b279e933a39e12c66d1c5962515b85 | PHP | tungfpm/PTUDTMTM | /Khang_Travel/register.php | UTF-8 | 7,089 | 2.796875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Register</title>
<link rel="stylesheet" href="">
<link rel="stylesheet" type="text/css" href="css/bootstrap.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css" />
<li... | true |
7f8d58047272b4bd070da8b7ac6ed1cfd0159365 | PHP | HukW/YETask2 | /modules/read.php | UTF-8 | 1,459 | 2.65625 | 3 | [] | no_license | <?php
//Обработка Excel при помощи библиотеки PHPSpreedsheet
require '../../../vendor/autoload.php';
include "dbConnection.php";
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
function isNumber($str){
for ($i = 0; $i < 10; $i++){
if ($str[0] == $i){
... | true |
11a0d37380014f9779201224310a1c90ae1813ba | PHP | ndnhan132/aptech-php-12-ndnhan | /aptech/4-php-oop-mvc/5-kethua.php | UTF-8 | 866 | 3.453125 | 3 | [] | no_license | <?php
class DongVat
{
// Thuộc Tính
var $mat = '';
var $mui = '';
var $mieng = '';
var $chan = '';
var $gioitinh = '';
// Hàm, phương thức
function an(){
echo $this->mat ."<br>";
}
function ngu(){
e... | true |
33397cd252b55bf9e91dfedfa23b55e9fe7e2d70 | PHP | Fabiobr27/PruebaTecnica | /controllers/SectorController.php | UTF-8 | 3,129 | 2.65625 | 3 | [] | no_license | <?php
// Controlador sector
//Fabio Benitez Ramirez
require_once "BaseController.php";
require_once "libs/Sesion.php";
require_once "models/Sector.php";
require_once "models/Sector_Usuario.php";
/**
* Class SectorController
* @author Fabio Benitez Ramirez
*/
class SectorController extends BaseController {
p... | true |
c6849a6d02823ee75efee72f9c8eb36079b89436 | PHP | mariamkhalifa/Chang_K_Khalifa_M_3014_CMS | /index.php | UTF-8 | 2,499 | 2.734375 | 3 | [] | no_license | <?php
require_once 'load.php';
if(isset($_GET['filter'])){
// work around for if you have too many parameters - an array
// also ensures you don't have to use all the parameters or in the same order
$args = array(
'tbl'=>'tbl_products',
'tbl2'=>'tbl_categories',
... | true |
147f25e8221584558aa77c12a6b621b77f2faf3b | PHP | dinho19sp/mvc_codigos | /system/core/Encryption.php | UTF-8 | 1,666 | 3.171875 | 3 | [] | no_license | <?php
final class Encryption {
private $key;
private $iv;
private $_caracter = "";
private $_array_caracter;
private $_size_length;
private $_keys;
public function __construct($key = NULL) {
$this->key = hash('sha256', $key, true);
$this->iv = mcrypt_create_iv(32, MCRYPT_RAN... | true |
c83c5522c94d9135cbd5009773590816c9d36702 | PHP | maxwellkenned/my-test | /src/Service/Email/EmailService.php | UTF-8 | 2,013 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Service\Email;
use App\Entity\Usuario;
use App\Exception\TemplateNotFoundException;
use http\Exception\BadMessageException;
use SendGrid;
use SendGrid\Mail\Mail;
use SendGrid\Response;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Throwable;
class EmailService
{
/** @var S... | true |
b1fac075eb7026389e33162aab4184c316e0fe40 | PHP | seans888/H-Iris | /advanced/backend/models/HousekeepingLog.php | UTF-8 | 3,251 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "housekeeping_log".
*
* @property integer $id
* @property integer $room_id
* @property integer $room_room_type_id
* @property integer $employee_id
* @property string $housekeeping_log_status
* @property string $housekeeping_log_time... | true |
044bc714819542b758a044627e036105285e6b03 | PHP | eduardozo/employeeManager | /Model/persistence/PersonShow.php | UTF-8 | 733 | 3.125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Eduardo Zaldivar
* Date: 3/7/18
* Time: 21:44
*/
require_once "DB.php";
require_once "../Model/Person.php";
class PersonShow extends DB
{
private $conn;
public function __construct()
{
$this->instance = parent::getInstance();
$this->conn ... | true |
56da906b607ca0e6668c31a38998fefcb417c331 | PHP | cguevaraa/PHP_Vehicles | /src/LightableInterface.php | UTF-8 | 249 | 3.015625 | 3 | [] | no_license | <?php
interface LightableInterface
{
//Methods to implement within the
//Vehicles with switchable lights
/**
* Switch on
*/
public function switchOn();
/**
* Switch off
*/
public function switchOff();
}
| true |
2993a326225fa2a314a6022503793c5faa5403c4 | PHP | universityofadelaide/shepherd-drupal-scaffold | /src/actions/Directories.php | UTF-8 | 1,175 | 2.625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace UniversityOfAdelaide\ShepherdDrupalScaffold\actions;
use Composer\Script\Event;
use Symfony\Component\Filesystem\Filesystem;
use UniversityOfAdelaide\ShepherdDrupalScaffold\ScaffoldTrait;
use UniversityOfAdelaide\ShepherdDrupalScaffold\tasks\CreateDirectory;
/**
* Ensure ne... | true |
c25a73e51856e9004546c73731aebf5d3551d152 | PHP | alphaGithub/online_editor | /files.php | UTF-8 | 394 | 2.6875 | 3 | [] | no_license | <html>
<body>
<?php
$uid=1;
$conn =mysqli_connect('localhost', 'admin', '12345678','website');
$sql="select fname from file where uid=".$uid."";
$result=query($sql);
if($result->num_rows>0)
{
echo "<table>";
echo "<tr><th>Files</th><th></th></tr>";
while($row=$result->fetch_assoc())
{
$fname=$row["fname"];
echo... | true |
751af6c7251346421bfc773d4d4e9853428e6285 | PHP | Flyingmana/PieCrust | /src/PieCrust/Environment/LinkCollector.php | UTF-8 | 2,600 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace PieCrust\Environment;
use PieCrust\IPieCrust;
use PieCrust\PieCrustDefaults;
use PieCrust\PieCrustException;
use PieCrust\Util\UriBuilder;
/**
* A singleton class that collects all declared links
* while the application is running.
*/
class LinkCollector
{
protected $pieCrust;
protected $... | true |
1c8c6b0a6ef899fc5e7aa6a83aea2f387642bc2f | PHP | huzhangzheng/test-oop | /interface_modern/2.php | UTF-8 | 781 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Admin
* Date: 2018/4/14
* Time: 21:01
*/
interface IConnectInfo{
const HOST='localhost';
const UNAME='root';
const DBNAME='test';
const PWD='123456';
public function aa();
}
class ConSql implements IConnectInfo{
private $server = IConnectInfo::HOST;
... | true |
408c7abf0429036b93cfaf1d01cc25ef1f5ee268 | PHP | ptduc08/shop-np_290914 | /library/Zendvn/Filter/AddLink.php | UTF-8 | 471 | 2.796875 | 3 | [] | no_license | <?php
class Zendvn_Filter_AddLink implements Zend_Filter_Interface {
protected $_findWord;
protected $_link;
public function __construct($findWord, $link) {
$this->_findWord = $findWord;
$this->_link = $link;
}
public function filter($value) {
$pattern = '#' .$this->_findWord .'#imsU';
$replace = '<a... | true |
039ce87da192333c15be55bc74cc84b9d1c9783b | PHP | big-shadow/Content_Management_Website | /Business/Content_Area.php | UTF-8 | 4,605 | 3.09375 | 3 | [] | no_license | <?php
require_once '../Data/aContentAreaDataAccess.php';
class ContentArea {
private $m_alias;
private $m_created;
private $m_createdBy;
private $m_description;
private $m_divID;
private $m_divOrder;
private $m_lastModified;
private $m_modifiedBy;
private $m_name;
// constru... | true |
ef1d4aac8e87b3ad3a9e338c3e1936a0c81f16e1 | PHP | pressoholics/prso-clean-start | /mu-plugins/presso-core/models/mailchimp/mailchimp.php | UTF-8 | 5,333 | 2.703125 | 3 | [] | no_license | <?php
/**
* Mailchimp Model class file.
*
* Acts as a framework to allow prso plugins to interact with Mailchimp API via
* wordpress actions and filters.
*
* CONTENTS:
*
*
*
*/
class PrsoCoreMailchimpModel {
private $data = array();
//API Key - see http://admin.mailchimp.com/account/api
private ... | true |
8024e7607660f59e2e3b45b669d4bde3ca133491 | PHP | AurelienN/Quiz | /vue/inscription.php | UTF-8 | 2,313 | 2.84375 | 3 | [] | no_license | <?php
//define('__ROOT__', dirname(dirname(__FILE__)));
// on teste si le visiteur a soumis le formulaire
if (isset($_POST['inscription']) && $_POST['inscription'] == 'Inscription')
{
// on teste l'existence de nos variables. On teste également si elles ne sont pas vides
if ((isset($_POST['login']) && !empty($_POS... | true |
b5de1f6d162997b2c71574e972c2d847ba047671 | PHP | robmeijer/Advent2016 | /public/day5.php | UTF-8 | 274 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
use Advent2016\Day5\Door;
require_once __DIR__ . '/../vendor/autoload.php';
$door = new Door();
$door->generatePassword('ugkcyxxp');
echo $door->getPassword() . PHP_EOL;
$door = new Door();
$door->generatePassword('ugkcyxxp', true);
echo $door->getPassword();
| true |
7b483fbe40d942552c3a1b9640906e63aecf0ea7 | PHP | Windygo/phpoop | /index.php | UTF-8 | 2,839 | 2.671875 | 3 | [] | no_license | <?php
<<<<<<< HEAD
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn... | true |
13638a67e4dfe86a318b84446b06c181c3caff4d | PHP | fuzeli/phpblog | /admin.php | UTF-8 | 938 | 2.65625 | 3 | [] | no_license | <?php
// 用get 传参 用来区分你要干什么
/*
入口文件:
1、项目初始化
SESSION
加载函数库
2、加载相应的功能模块
*/
// 在入口文件定义一个常量 在html里调用
define('IN','admin.php');
session_start();// 开启session
include('functions.php');//引入封装函数/包含函数
// 只记住,入口文件,就是把所有文件放到一个文件里
// 接收请求,默认是 main 页面
// isset : 判断一个变量是否存在,有可能出现值为空的情况,所以这里使用empty更合适
$action = !empty($... | true |
36aa26abb6491a5ebab8a99a2da7a04cd3f1b236 | PHP | rafazingano/cw-cms | /app/Mail/Contact.php | UTF-8 | 1,932 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
use App\Lead;
use App\LeadRule;
class Contact extends Mailable {
use Queueable,
SerializesModels;
public $lead;
/**
* Cr... | true |
0314f88f84d4d483d7bae3de8e85d404a2799f14 | PHP | Database-Systems-Course/course-project-aas | /Project Final Submission/HTML and PHP files/index.php | UTF-8 | 2,874 | 2.546875 | 3 | [] | no_license | <?php
session_start();
$con = mysqli_connect("localhost", "root", "");
if(!$con)
{
echo "Unable to establish connection.".mysqli_error();
}
$db = mysqli_select_db($con, "test");
if(!$db)
{
echo"Database not found! ".mysqli_error();
}
if(isset($_POST['submit']))
{
$type = $_POST['type'];
$email = $_POST['email'];
... | true |
9c7e48a3dc2ba86e33eba34bc00e19ddba152484 | PHP | Grigory-Shade/568653-doingsdone | /function.php | UTF-8 | 3,785 | 2.90625 | 3 | [] | no_license | <?php
// показывать или нет выполненные задачи
$show_complete_tasks = rand(0, 1);
// Часовой пояс по умолчанию
date_default_timezone_set("Europe/Moscow");
// Функция шаблонизатор
function include_template($name, $data) {
$name = 'templates/' . $name;
$result = '';
if (!file_exists($name)) {
return $result;
}
ob_st... | true |
faa628be0e295959038cb733aa936bccdbec5b46 | PHP | rumsnownsk/newsToday | /api/controllers/SearchController.php | UTF-8 | 1,804 | 2.71875 | 3 | [] | no_license | <?php
namespace api\controllers;
use api\models\Category;
use api\models\News;
use Illuminate\Database\Capsule\Manager as DB;
class SearchController extends CommonController
{
// поиск новости по названию (или совпадению через оператор LIKE) (есть обязательные GET-параметры onfield и search)
public function... | true |
524f2cf1aa7ecb8efaf6ad9d2efb33d9311005e7 | PHP | gggvgyver/PhpProjects | /PHP_Essential_Training/User_Defind_Function/Scope_and_Global_Variables.php | UTF-8 | 359 | 3.296875 | 3 | [] | no_license | <?php
// 로컬변수와 글로벌 변수
$bar = "글로벌";
function foo() {
global $bar;
if (isset($bar)) {
echo "foo: ". $bar . "<br />";
}
$bar = "로걸";
}
function bar() {
$bar_local = "inside";
}
echo "global: ". $bar . "<br />";
foo();
echo "local: ". $bar . "<br />";
bar();
echo "local: ". $bar_local . "... | true |
912b938457283addc0a790f47c987580a34c111f | PHP | bingo-soft/jabe | /src/Impl/Variable/Serializer/BooleanValueSerializer.php | UTF-8 | 1,417 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Jabe\Impl\Variable\Serializer;
use Jabe\Variable\Variables;
use Jabe\Variable\Impl\Value\UntypedValueImpl;
use Jabe\Variable\Type\ValueType;
use Jabe\Variable\Value\BooleanValueInterface;
class BooleanValueSerializer extends PrimitiveValueSerializer
{
// boolean is modeled as int values
priva... | true |
18abdf66857d02889d2602ad7a34f6f6bd282556 | PHP | al2a-e2dine/phpCRUD | /add_emp.php | UTF-8 | 1,994 | 2.5625 | 3 | [] | no_license | <?php
include_once('connect.php');
if(isset($_POST['submit'])){
$name=$_POST['name'];
$lastname=$_POST['lastname'];
$age=$_POST['age'];
$email=$_POST['email'];
$phone=$_POST['phone'];
$q="INSERT INTO `employer`(`name`, `lastname`, `age`, `email`, `phone`) VALUES ('$name','$lastname','$age','$e... | true |
3fb4d6793f508e121b4c4fce924b9dbf83c15466 | PHP | Talha1818/EndSemesterWebProject6thSemester | /database/insert_contact.php | UTF-8 | 839 | 2.59375 | 3 | [] | no_license | <?php
require_once("database.php");
$db= new database();
$username = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$message = $_POST['message'];
$data = array($username,$email,$phone,$message);
if(!empty($username)&&!empty($email)&&!empty($phone)&&!empty($message))
{
if(ctype... | true |
4e014fd05c6baf2456f0b7f1540a419d4507a80a | PHP | Kwoldu/workqueue | /app/Controller/UsersController.php | UTF-8 | 2,224 | 2.71875 | 3 | [] | no_license | <?php
App::uses('AppController', 'Controller');
class UsersController extends AppController{
public $name = "Users";
public function beforeFilter() {
parent::beforeFilter();
// Allow users to register and logout.
$this->Auth->allow('register', 'login');
}
public function register(){
if ($this->req... | true |
ab1ea9edd40dcea5270a4403944937bc3929d67a | PHP | mohsinahmed22/Scho | /admin365/lib/Schools.php | UTF-8 | 5,333 | 2.59375 | 3 | [
"CC-BY-3.0",
"CC-BY-4.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Mohsin
* Date: 10/8/2018
* Time: 2:52 PM
*/
class Schools extends User{
/**
* @var Database
*/
private $db;
function __construct()
{
parent::__construct();
}
public function AddteacherToSchool($tutor_id, $school_id, $user_id){... | true |
82a0186cc9c65c845cf97d93a1ed8d70929049f4 | PHP | ArkaitzUlibarri/rtm | /app/Http/Requests/FilterApiRequest.php | UTF-8 | 3,090 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Carbon\Carbon;
use Illuminate\Validation\Rule;
class FilterApiRequest extends ApiRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'by' => [
'required',
Rule::in(array_keys(config(... | true |
bfa6fc71db8c2d339bc6baee9de59d816a2e5c82 | PHP | frix360/php-intro-homework | /src/BookingManager.php | UTF-8 | 1,307 | 3.046875 | 3 | [] | no_license | <?php
namespace Nfq\Akademija;
class BookingManager
{
/**
* @param Room $room
* @param Reservation $reservation
* @throws ReservationException
*/
public static function bookRoom(Room $room, Reservation $reservation): void
{
$existingReservations = $room->getReservations();
... | true |
514a801aafc044cc3ed7963f28c66e84fb072fda | PHP | spider-unknown/deliveryShop | /app/Http/Forms/Web/V1/ProductWebForm.php | UTF-8 | 1,019 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Forms\Web\V1;
use App\Core\Interfaces\WithForm;
use App\Http\Forms\Web\FormUtil;
class ProductWebForm implements WithForm
{
public static function inputGroups($value = null): array
{
$array = [];
if($value) {
$array = FormUtil::input('id', 1, null,
... | true |
06d51db9665241638cc961451a369fb21b1274b6 | PHP | ClementLSW/ICT1004-Project | /login/process_forgot.php | UTF-8 | 2,838 | 2.671875 | 3 | [] | no_license | <?php
session_start();
//Calling the php mailer library
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
use PHPMailer\PHPMailer\SMTP;
require '../PHPMailer/src/Exception.php';
require '../PHPMailer/src/PHPMailer.php';
require '../PHPMailer/src/SMTP.php';
//Checking if email is empty
if (isset(... | true |
15ee92d8044a15c6fa0d3a23f5de51724d86e1a9 | PHP | jdsllk7/Bidding-Management-System | /db/submitBuy.php | UTF-8 | 1,824 | 2.640625 | 3 | [] | no_license | <?php
include 'connect.php';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (
isset($_POST["finalCost"]) &&
isset($_POST["address"]) &&
isset($_POST["city"]) &&
isset($_POST["country"]) &&
isset($_POST["zip"]) &&
isset($_POST["tel"]) &&
isset($_POST["product... | true |
f36e5203d8a741f2da121f21e1a656ad02419b73 | PHP | rmhdev/server-status | /tests/ServerStatus/Domain/Model/Measurement/MeasurementStatusTest.php | UTF-8 | 3,164 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* This file is part of the server-status package.
*
* (c) Roberto Martin <rmh.dev@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace ServerStatus\Tests\Domain\Model\Measurement... | true |
e27c605c17ea881ffbededea1bef36490d08e581 | PHP | palmerc/lab | /www/gradebook/studentEdit.php | UTF-8 | 3,389 | 2.640625 | 3 | [] | no_license | <?php
require('database.php');
require('student.php');
database_connect();
if ($_SERVER['REQUEST_METHOD'] == "POST")
{
// Validate submission
$student_key = $_REQUEST['student_key'];
$empl_id = $_REQUEST['empl_id'];
$first_name = $_REQUEST['first_name'];
$last_name = $_R... | true |
7f5cf701619dfd199a13966644faaf8a23685ba2 | PHP | dmitry575/RedButton3 | /inc/lib/model/multihttp.php | UTF-8 | 8,191 | 2.6875 | 3 | [] | no_license | <?php
//+------------------------------------------------------------------+
//| Copyright c 2012, RedButton Web Sites Generator |
//| http://www.getredbutton.com |
//+------------------------------------------------------------------+
/**
Работа с сокетами
*/
clas... | true |
b29b055cd016e8074c5a27edffe54a7b190f1889 | PHP | RASmith1/braddockheights | /app/routes.php | UTF-8 | 5,554 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/*
Note there are no before=>csrf filters in here - it's being handled in the BaseController
*/
/*
Route::get('/classes', function() {
echo Paste\Pre::render(get_declared_classes(),'');
});
*/
/* To find out what environment you're running in ******************/
Route::get('/get-environment',function() {
... | true |
15dd5b986572788dd22d4f4d1fe40809314b99a3 | PHP | zouxiang0639/thinkphp-cms | /application/common/consts/user/UserStatusConst.php | UTF-8 | 468 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\common\consts\user;
/**
* 用户状态
*/
class UserStatusConst
{
const ABLE = 1;
const UNABLE = 2;
const ABLE_DESC = '正常';
const UNABLE_DESC = '禁用';
public static function desc()
{
return [
self::ABLE => self::ABLE_DESC,
self::UNABLE => self::U... | true |
e2ecd4ce8b7fc1d5268cfa2671c083dd2581ad93 | PHP | rafaelfelipesantos/query-builder | /src/Expression/ExpressionAggregateInterface.php | UTF-8 | 473 | 2.78125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace QueryBuilder\Expression;
use QueryBuilder\Expression\ExpressionInterface;
use QueryBuilder\Operator\Logic;
/**
* @package manofirmz/query-builder
* @author Rafael Felipe aka Manofirmz
*/
interface ExpressionAggregateInterface extends ExpressionInterface
{
/**
* @p... | true |
83da7958ac9ae0f6497336c76cfb4263255790f3 | PHP | Anteris-Dev/form-request | /src/Attributes/Validation.php | UTF-8 | 692 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Anteris\FormRequest\Attributes;
use Attribute;
#[Attribute(Attribute::TARGET_PROPERTY)]
class Validation implements Rule
{
private array $rules;
public function __construct(string ...$rules)
{
$rules = $this->expandSeparators($rules);
$this->rules = $rules;
}
pu... | true |
f1ecea6b53b0522a18c97220a6560fc8b2758d82 | PHP | salesbeat/salesbeat-delivery-for-moguta | /lib/salesbeat/http.class.php | UTF-8 | 2,084 | 2.953125 | 3 | [] | no_license | <?php
namespace Salesbeat;
class Http
{
/**
* Http constructor
* @param object $registry
*/
public function __construct($registry = null)
{
}
/**
* @param $url
* @param $data
* @return array
*/
public function get($url, $data)
{
if (!$url)
... | true |
8590d89f45d9a354e563da00ecff93814d4c497c | PHP | shivshankarzapbuild/training_example | /Algorithms/binarySearch.php | UTF-8 | 1,060 | 3.640625 | 4 | [] | no_license | <?php
$arr = array(12,125,451,547,56,45,457,25,174,896);
sort($arr);
print_r($arr);
//element to be searched
$element = 45;
$high = count($arr);
//echo count($arr);
$length = $high;
function binarySearch($arr,$low ,$high,$element){
if($low < $high){
... | true |
2c687384ccc567d081edd769044be04f481d7f81 | PHP | Jedediah04/TARDIStart | /statsServ.php | UTF-8 | 1,730 | 2.71875 | 3 | [] | no_license | <?php
function getUpTime() {
// UPTIME
$data_uptime = file_get_contents('/proc/uptime');
$data_uptime = explode(' ', $data_uptime);
$data_uptime = trim($data_uptime[0]);
$time = [];
$time['min'] = $data_uptime / 60;
$time['hours'] = $time['min'] / 60;
$time['days'] = floor($time['hours'... | true |
5b38f929d968cfae2465f3f7e6a79051b44b40f3 | PHP | lauraintan/getname | /index.php | UTF-8 | 10,390 | 2.671875 | 3 | [] | no_license | <?php
include('class.stemmer.inc');
$db_news="news";
$mysqli_news= mysql_connect('10.0.10.3','jakpost','jakpost')or die(mysql_error());
mysql_select_db($db_news, $mysqli_news) or die("Database Error News");
$mysqli_places= mysql_connect('localhost','root','')or die(mysql_error());
mysql_select_... | true |
cb2717c708f5befc2b26043b4b32ee03e959822f | PHP | julienLeger05/phpTP21 | /city.php | UTF-8 | 313 | 2.6875 | 3 | [] | no_license | <?php
require('index.php');
$bdd = connect();
$req = $bdd->prepare('SELECT * FROM city ');
$req->execute();
$result = $req->fetchAll();
foreach ($result as $city) {
echo '<p>' . $city['name'];
echo '<a href="detailCountry.php?' . 'name=' . $city['countrycode'] . '">' . $city['countrycode'] . '</a>';
}
| true |
ebf069a1858cde0797842a3a57015767e0efbc89 | PHP | hungluong249/mato | /application/controllers/Contact.php | UTF-8 | 3,618 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
include "class.phpmailer.php";
include "class.smtp.php";
defined('BASEPATH') OR exit('No direct script access allowed');
class Contact extends MY_Controller {
public function __construct() {
parent::__construct();
$this->load->helper('url');
$this->load->library('session');
... | true |
9923bc4ab8d5b879f9f301b7a32482e4e8a50661 | PHP | Adrieldf/greenbook | /src/view/cadastro-titulos.php | UTF-8 | 9,586 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace greenbook\view;
use greenbook\helper\EntityManagerFactory;
use greenbook\model\Titulo;
use greenbook\repository\TituloRepository;
require_once __DIR__ . '\..\controller\MainController.php';
require_once __DIR__ . '\..\..\vendor\autoload.php';
require_once("header.php");
?>
<!DOCTYPE html>
<html>
<?p... | true |
7dfa878ed6b242f54790ae155347b10b8773eae3 | PHP | ratepay/php-library | /tests/Unit/Model/Request/TraitRequestContentTest.php | UTF-8 | 2,119 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright (c) Ratepay GmbH
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace RatePAY\Tests\Unit\Model\Request;
use PHPUnit\Framework\TestCase;
use RatePAY\Model\Request\SubModel\AbstractModel;
use RatePAY\Model\... | true |
1943e0ab579390930980d39278abf20e0ac08ef9 | PHP | agilemusicproject/agilemusicproject.com | /src/AMP/Controller/MeetTheBandController.php | UTF-8 | 5,429 | 2.578125 | 3 | [] | no_license | <?php
namespace AMP\Controller;
use Silex\Application;
use Silex\ControllerProviderInterface;
use Symfony\Component\HttpFoundation\Request;
use \AMP\Exception\PhotosOptionsException;
class MeetTheBandController implements ControllerProviderInterface
{
public function connect(Application $app)
{
$contr... | true |
b4701231878eef89680123948f60b805d7faf0f1 | PHP | cubesystems/leaf | /shared/custom_apis/leaf/imageBase/imageBase.class.php | UTF-8 | 4,844 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?
class imageBase extends leafComponent{
protected $imageQuality = 80;
protected $inputTypes = array('resource', 'file', 'string');
protected $outputTypes = array('resource', 'file', 'display');
protected $inputType = 'file';
protected $outputType = 'file';
protected $outputFilename = NULL;
protected ... | true |
5f0237ee5212a359403a5ec27aa9666dacf3d60e | PHP | Guillaume59220/php-poo | /Projet 2/TechNews/Core/Core.php | UTF-8 | 568 | 2.953125 | 3 | [] | no_license | <?php
class Core
{
public function __construct($params)
{
print_r($params);
$controller = $params['controller'];
$action = $params['action'];
if ($controller == "news" && $action == "index"){
echo "<h1>Je suis sur la page accueil</h1>";
}
if ($contro... | true |
4b01ce58e319d6a657cca636a5c997665ee914f3 | PHP | potogan/potogan-rest | /lib/RequestHandlerInterface.php | UTF-8 | 700 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Potogan\REST;
use Http\Promise\Promise;
use Psr\Http\Message\RequestInterface as HttpRequest;
/**
* A REST request handler process a REST request and produces a REST response.
*
* Inspired by PSR 15 & Psr\Http\Server\RequestHandlerInterface.
*/
interface RequestHandlerInterface
{
/**
* H... | true |
fe2a7ae1443846d74b269f235b0d523b90205edb | PHP | Anotherjez/tarea9web | /pages/panel/guestedit.php | UTF-8 | 4,463 | 2.53125 | 3 | [] | no_license | <?php
$isEditing = false;
include('../../libs/panelutils.php');
Connection::testconnection();
include_once('../../libs/user.php');
include_once('../../libs/user_session.php');
$userSession = new UserSession();
$user = new User();
if(isset($_SESSION['user'])){
$user->setUser($userSession->getCurrentUser());
... | true |
21317ca4ba3d4c563ca5427957db79a616b221e5 | PHP | IvayloIV/PHP-Web-Basics | /PHP-Web-Basics-May-2019/Exercise-Interfaces_and_Abstraction/08.Military_Elite/contracts/IPrivateSoldier.php | UTF-8 | 113 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
interface IPrivateSoldier
{
/**
* @return float
*/
public function getSalary(): float;
} | true |
e829860cddb2868df9f90e9997f81c0a8b778ee9 | PHP | colinjeanne/garden | /app/Auth/GoogleJwtAuthorization.php | UTF-8 | 895 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Auth;
use Google_Client;
use Google_Exception;
use Psr\Log\LoggerInterface as Log;
class GoogleJwtAuthorization implements JwtAuthorization
{
/**
* The client used to talk to the Google API
*
* @var Google_Client
*/
private $googleClient;
public function __construc... | true |
8aa8fbcd1ee967c4914a3576a5051de6aaaf7f1b | PHP | rouralberto/sqlite-todo | /code/app/controllers/categories.php | UTF-8 | 1,927 | 2.65625 | 3 | [] | no_license | <?php
class Categories {
private static $title = 'Categories';
private static $icon = 'fa fa-folder';
public function index() {
$categories = ORM::for_table( 'categories' )->raw_query( "
SELECT c.*
,count(t.id) AS total
FROM categories c
LEFT O... | true |
3c11e8dbdda53662e1b57f94b418ad0d3ebfad28 | PHP | harlericho/EncryDesencryPasswordPHP | /base64.php | UTF-8 | 857 | 3.125 | 3 | [
"MIT"
] | permissive | <?php //metodo para encryptar y desencryptar cadenas de texto
if (!isset($_POST['texto'])) {
header("Location: ./");
}
define('METHOD', 'AES-256-CBC');
define('SECRET_KEY', '$charlie86@2020');
define('SECRET_IV', '909090');
class SHA1
{
//encriptacion
static function _encryptacion($cadena)
{
$ou... | true |
148e67a64356efd7067c7e31f64f459f672e187e | PHP | Demon66/do4a | /CMF/upload/library/CMF/Core/Template/Helper/Core.php | UTF-8 | 2,257 | 2.796875 | 3 | [] | no_license | <?php
/**
* Helper methods for the core template functions/tags.
*
* @package XenForo_Template
*/
class CMF_Core_Template_Helper_Core
{
/**
* Array to cache model objects
*
* @var array
*/
protected static $_modelCache = array();
/**
* Returns a formatted tag string with search links.
*
* @param stri... | true |
13db6dc96517781975a5751e0bb99188828853bc | PHP | gorandam/phpro | /thisphp/restaurant/index.php | UTF-8 | 4,438 | 3.078125 | 3 | [] | no_license | <?php
class MenuItem {
private $menuitemid;
private $itemname;
private $description;
private $picture;
private $servingsize;
private $price;
public function setID($menuitemid){$this-> menuitemid = $menuitemid;}
public function getID(){return $this-> menuitemid;}
public function setPrice($price){$this->pri... | true |
42ca951d77aae0c6c276667b805dd4efb9a6d764 | PHP | Jonny-L/library-for-offline | /private/KAASoft/Util/RSS/ItemInterface.php | UTF-8 | 2,546 | 2.9375 | 3 | [] | no_license | <?php
namespace KAASoft\Util\RSS;
interface ItemInterface {
/**
* Set item title
* The title of the item.
* @param string $title
* @return $this
*/
public function setTitle($title);
/**
* Set item link
* The URL of the it... | true |
274fd1872ec562451102dcb91ae689fd98dc66f2 | PHP | vmancier/Site-ADCOG | /add_offer.php | UTF-8 | 10,197 | 2.5625 | 3 | [] | no_license | <?php
require_once "includes/functions.php";
session_start();
$code = generateCode();
if (isset($_POST['title'])) {
// The offer form has been posted : retrieve offer parameters
$title = escape($_POST['title']);
$offer_type = escape($_POST['offer_type']);
$company_name = escape($_POST['company_name'])... | true |
d0fcbdd04efe747734cedb6650a35927666510f8 | PHP | khoidh/StudentManager | /application/models/point_type_model.php | UTF-8 | 1,526 | 2.515625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Point_type_model extends CI_Model
{
public function __construct()
{
parent::__construct();
$this->load->database();
}
public function get_all(){
//$query = $this->db->query("Select * from point_type where delete_flag = '0'");
$query = $this->db->get_where('point_type', array('delet... | true |
1be1179243ba72aad5ab30843fa28bd38798ee6e | PHP | gianninimail/api-reverse-engineer-laravel | /app/Models/Syst/ObjetivoProjeto.php | UTF-8 | 952 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models\Syst;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $cd_objetivo_projeto
* @property string $tx_nome_objetivo_projeto
* @property string $tx_codigo_objetivo_projeto
* @property Syst.dcMetaProjeto[] $syst.dcMetaProjetos
*/
class ObjetivoProjeto extends Model
{
/**
... | true |
0324bcd434b142af147f9a0e916786f51da95a03 | PHP | hxmwr/happy-socker | /models/HsGuessChampion.php | UTF-8 | 851 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "hs_guess_champion".
*
* @property int $id
* @property string $guess
* @property int $user_id
* @property int $created_at
*/
class HsGuessChampion extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static ... | true |
79ef1286126071e658708ed5c83ddf01bd02b55e | PHP | craigm131/qbonline_connect | /transaction.php | UTF-8 | 1,791 | 2.84375 | 3 | [] | no_license | <?php
//
/* This file creates a base class that is extended by the transaction classes (eg invoice.php, bill.php, etc.)
* @programmer Craig Millis
* Which files call this file: all of the transaction files like invoice, bill, ...
* Debugging notes:
* How this file will be used: this file retrieves data fr... | true |