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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
87b2a24e3cfed3023183aa1af5dec74962b58039 | PHP | mikelovely/slim-blog | /app/Controllers/TagsController.php | UTF-8 | 791 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controllers;
use App\Models\Tag;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Router;
use Slim\Views\Twig;
class TagsController
{
protected $router;
public function __construct(Router $router)
{
$this->ro... | true |
2df1f49555257630d5271bf398f177db94d12fd6 | PHP | saufiane/React_js | /php/ajax.php | UTF-8 | 644 | 2.53125 | 3 | [] | no_license | <?php
require_once('bdd.php');
// header('Access-Control-Allow-Origin: *');
// header('Access-Control-Allow-Methods: POST, GET, DELETE, PUT, PATCH, OPTIONS');
// header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, X-Requested-With");
// header('Content-Type: application/json');
// $name =... | true |
66181d5a3198e9e0d04f712286d018a2aa8cc20f | PHP | thapab1/CSC301_2020_Assignment12 | /edit.php | UTF-8 | 1,012 | 2.5625 | 3 | [] | no_license | <?php
require_once('includes/functions.php');
require_once('includes/database.php');
require_once('includes/authentication.php');
displayPageHeader('Edit Room Info');
if (is_admin() || is_manager() || $database->is_postOwner($_GET['id'])) {
if(count($_POST) > 0){
$database->editRoomInfo($_POST,$_GET['id']... | true |
4f366098166113766d4b42298cb6163bacd21741 | PHP | Nicklas766/Comment | /src/Page/PageRenderMock.php | UTF-8 | 2,101 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Nicklas\Page;
use \Anax\DI\InjectionAwareInterface;
use \Anax\DI\InjectionAwareTrait;
/**
* A default page rendering class.
*/
class PageRenderMock implements PageRenderInterface, InjectionAwareInterface
{
use InjectionAwareTrait;
public function add($data)
{
// if multiple vi... | true |
06b58b8a3cf7964b4f386a3928401c9a0b5b771b | PHP | olkorsia/SystemMenegaMarks | /controller/AdminStudent.php | UTF-8 | 2,597 | 2.953125 | 3 | [] | no_license | <?php
session_start();
require_once "ConnectDB.php";
class AdminStudent
{
private $_db = null;
public function __construct()
{
$this->_db = connectDB::getInstance();
}
public function outputTableStudent() {
$sql = "SELECT students.id, students.name, surname, patronic, groups.name ... | true |
df900f7ac39b8af65927b4cde739091102813e1f | PHP | glofru/Cinema | /MagicBoulevardCinema/Foundation/FForum/FGiudizio.php | UTF-8 | 6,644 | 3.1875 | 3 | [] | no_license | <?php
/**
* Classe che permette il salvataggio e il caricamento di oggetti EGiudizio dal DB.
* Class FGiudizio
* @author Lofrumento - Di Santo - Susanna
* @package Foundation
*/
class FGiudizio
{
/**
* Nome della classe.
* @var string
*/
private static string $className = "FGiudizio";
... | true |
8244847c776386f4fa90f926fa2ebee46256b2d1 | PHP | artweb-ou/trickster-cms | /cms/core/persistableObject.class.php | UTF-8 | 3,804 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Class persistableObject
*/
class persistableObject
{
/**
* array of loaded data from database row
* @var array
*/
protected $rowData = [];
/**
* Shows whether this object was loaded from a database or it's created dynamically
* @var bool
*/
public $loaded = f... | true |
c57e4625e1b70b2cafdd6837517dce8300260c53 | PHP | lkun99/earnMachine | /register_user.php | UTF-8 | 6,885 | 2.78125 | 3 | [] | no_license | <?php
ob_start();
// Include config file
require_once "sql_connect.php";
require_once "functions.php";
//include 'functions.php';
// Define variables and initialize with empty values
$username = $password = $confirm_password = $email = $pin = "";
$username_err = $password_err = $confirm_password_err = $email_err = $pin... | true |
f55a549d0bd2a53a7dcc9d3e47aab6400a7a58af | PHP | hexlet-basics/exercises-php | /modules/50-loops/23-aggregation-strings/index.php | UTF-8 | 263 | 2.96875 | 3 | [] | no_license | <?php
namespace HexletBasics\Loops\AgregationString;
// BEGIN
function joinNumbersFromRange($start, $end)
{
$i = $start;
$result = '';
while ($i <= $end) {
$result = "{$result}{$i}";
$i = $i + 1;
}
return $result;
}
// END
| true |
01517f7b2ebfa2e85d1e698fe61bc612904a0b5c | PHP | LeandroSantosGit/SiteEmpresarialBog-Administrador | /adm/module/site/Models/StsListArticle.php | UTF-8 | 1,771 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Module\site\Models;
if (!defined('URL')) {
header("Location: /");
exit();
}
/**
* Description of StsListArticle
*
* @copyrigth (c) year, Leandro Santos - Leandro
*/
class StsListArticle
{
private $result;
private $pageId;
private $limitResult = 10;
private $resultPg;
... | true |
92843e7bd7085cfb2790a1b8715c9e04742bc3a3 | PHP | StuntsKhumza/yenzicebo | /php/sql_secured.php | UTF-8 | 388 | 2.78125 | 3 | [] | no_license | <?php
class sqlClass {
private $connectionObj = null;
public function initialize(){
require_once('sql_connections.php');
$sqlConnectionClass = new connections();
$sqlConnectionClass->initialize($this->connectionObj);
if ($this->connectionObj != null){
//echo "1";
} else {
// echo "0";
}
... | true |
41cdbefbdae8c844f441034a29a21f5ac6d1e0b2 | PHP | itephp/framework | /test/Unit/Error/ErrorManagerTest.php | UTF-8 | 1,100 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Test\Error;
use ItePHP\Error\ErrorManager;
use Test\Asset\Error\TestHandler;
class ErrorManagerTest extends \PHPUnit_Framework_TestCase{
/**
* @var ErrorManager
*/
private $errorManager;
protected function setUp(){
$this->errorManager=new ErrorManager();
}
public function testG... | true |
e542288b085c13c8c91477400e47507e41f44d24 | PHP | m2epro/magento2-extension | /Model/Listing/Product/Action/Configurator.php | UTF-8 | 6,712 | 2.671875 | 3 | [] | no_license | <?php
/**
* @author M2E Pro Developers Team
* @copyright M2E LTD
* @license Commercial use is forbidden
*/
namespace Ess\M2ePro\Model\Listing\Product\Action;
/**
* Class \Ess\M2ePro\Model\Listing\Product\Action\Configurator
*/
abstract class Configurator extends \Ess\M2ePro\Model\AbstractModel
{
pu... | true |
de542f039cf62a1b776671c188446b42fd37bc33 | PHP | LionheartKing73/prodata-display-Codeigniter- | /application/models/v2_log_model.php | UTF-8 | 1,508 | 2.625 | 3 | [] | no_license | <?php
class V2_log_model extends CI_Model {
protected $CI;
private $collection = 'v2_audit_log';
private $id;
private $io;
private $action;
private $note;
private $timestamp;
public function __construct() {
parent::__construct();
$this->CI =& get_instance();
$this->CI->load->database();
}
public... | true |
ef59055f1bf55c5bf4e529619fd6541e6a7ad7d1 | PHP | tiannahomer/MOOC | /assignweb/index.php | UTF-8 | 927 | 2.734375 | 3 | [] | no_license | <?php
/**
* Front controller index.php
*/
// include the application configuration file and the autoloader
require_once '../assigncode/include/configure.php';
require_once '../assigncode/include/autoloader.php';
// reset the application by killing the session in case things go wrong
if (isset($_GET['reset'])) {
... | true |
eb28f4a8a2c3023620ed8e366eb336249146326e | PHP | euclid1990/timesheet | /src/Google.php | UTF-8 | 2,559 | 2.8125 | 3 | [] | no_license | <?php
namespace Src;
use Google_Client;
use Google_Service_Sheets;
define('APPLICATION_NAME', 'Framgia Timesheet Checking');
define('CREDENTIALS_PATH', __DIR__ . '/../credentials/sheets.googleapis.com.json');
define('CLIENT_SECRET_PATH', __DIR__ . '/../credentials/client_secret.json');
define('SCOPES', implode(' ', ... | true |
44bece751e4357fa7ab3bf93f489d1d94b9bed2a | PHP | kelghachi/LEBONCOIN | /tests/service/ContactServiceTest.php | UTF-8 | 886 | 2.75 | 3 | [] | no_license | <?php
require_once __DIR__ . '/../../src/service/ContactService.php';
require_once __DIR__ . '/../../vendor/phpunit/phpunit/src/Framework/TestCase.php';
/**
* Class ContactServiceTest
* @testdox Contact Service
*/
class ContactServiceTest extends \PHPUnit\Framework\TestCase
{
/** @var ContactService */
pri... | true |
64c4a47b58b4108772d8eea7322ff8c0184b34fa | PHP | knsalim/Magento_Product_SalesCount | /Helper/SalesData.php | UTF-8 | 1,256 | 2.53125 | 3 | [] | no_license | <?php
//
//namespace Mageplaza\HelloWorld\Helper;
//use \Magento\Framework\App\Helper\AbstractHelper;
//use Magento\Framework\App\Helper\Context;
//
//class SalesData extends AbstractHelper
//{
// protected $_productAttributeRepository;
//
// public function __construct(Context $context,\Magento\Catalog\Model\Pro... | true |
8a33d9a34c2210d3f0b15090bbf6aa93b5ab9e93 | PHP | froq/froq-database | /src/Link.php | UTF-8 | 5,403 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Copyright (c) 2015 · Kerem Güneş
* Apache License 2.0 · http://github.com/froq/froq-database
*/
declare(strict_types=1);
namespace froq\database;
use froq\common\trait\FactoryTrait;
use PDO, PDOException;
/**
* A wrapper class for PDO with some utilities.
*
* @package froq\database
* @object froq... | true |
c176a01690ce598c6fb472fcc1a3f38cefb0dd4f | PHP | billsomen/radiorelax | /src/XS/CoreBundle/Controller/RateController.php | UTF-8 | 3,302 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace XS\CoreBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
class RateController extends Controller
{
public function addAction($obj_id, $obj_name, $value, Request $request){
//Si on trouve l'objet, on persiste les vale... | true |
1542f891b2ed6be6b26442494da9fd928f5067f3 | PHP | ullright/ullright | /plugins/ullCorePlugin/lib/generator/ullGeneratorTools.class.php | UTF-8 | 8,794 | 2.953125 | 3 | [] | no_license | <?php
/**
* ullGenerator tools
*
* @package ullCore
* @author Klemens Ullmann-Marx
* @version SVN: $Id: actions.class.php 2692 2006-11-15 21:03:55Z fabien $
*/
class ullGeneratorTools
{
/**
* Search for a string in multiple columns
*
* Note: This should be deprecated.
* Use ullQuery... | true |
7c1c09dd1145baa2df4a4373d7241c906a668733 | PHP | juancamunoz/barberify-api-platform | /src/Security/Authorization/Voter/ScheduleDetailVoter.php | UTF-8 | 1,571 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Security\Authorization\Voter;
use App\Entity\Schedule;
use App\Entity\ScheduleDetail;
use App\Entity\User;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
class ScheduleDetailVoter extends Voter
{
public... | true |
b39ac7965f54f61263e4f71d24beb468e307d8aa | PHP | happyhardik/yii-ecommerce | /common/models/PersonalMessageReply.php | UTF-8 | 1,713 | 2.546875 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
/**
* Personal Message Reply model
*/
class PersonalMessageReply extends ActiveRecord
{
/**
* @return object
*/
public static function model($className=__CLASS__)
{
return parent::model($className);
}
/**
* @return string Table name
*/
public function tableName()
{
return 'personal_messag... | true |
e9c3d15192abdce105b0266fbd8b9d70c4726688 | PHP | angelicagirl86/fluffy-fiesta | /CRUD_music/add_form.php | UTF-8 | 3,499 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
//include_once("config_local.php");
include_once("config.php");
/* Vi organiserar sidan på sån sätt att vi har all processkod här i toppen av
sidan. All information som vi behöver processa hämtas från den nedre delen
av sidan där html formuläret finns.
Där finns namnen på formulärfälten som vi använder... | true |
13cd356d76c13a33cc4e4bc55d8ffd5bfc837183 | PHP | stavtsob/Hutch-WMS | /application/models/item_model.php | UTF-8 | 2,742 | 2.6875 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
class item_model extends CI_Model
{
public function __construct()
{
$this->load->database();
$this->load->model('barcode_model');
}
public function insert($data)
{
$res= $this->db->insert('item', $data);
$ite... | true |
e9db31581c87df7e813349056877981796a48932 | PHP | Ryan8765/ripped | /application/controllers/ajax/Add_exercise.php | UTF-8 | 1,277 | 2.5625 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Add_exercise extends CI_controller {
public function index() {
$this->load->library('session');
/*
*make sure session is valid and check session user agent to help prevent session hijacking.
*/
$redirect... | true |
596038a86cc88f70a0726dcdc446af8c3c16bd11 | PHP | menphors/symfony | /src/AppBundle/Controller/Game.php | UTF-8 | 897 | 3.03125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: User
* Date: 1/30/2019
* Time: 11:41 AM
*/
namespace AppBundle\Controller;
use Symfony\Component\Routing\Annotation\Route;
class Game
{
var $price;
var $name;
var $photo;
var $dir = 'games/';
const BR= '<br />';
/**
* @Route("class")
*/... | true |
77e5bb1b923a8f1f7b493c7f0e79a1d491c8e4d4 | PHP | jaylad2598/ArsenalTech | /Blog_System/connection.php | UTF-8 | 518 | 3.1875 | 3 | [] | no_license | <?php
class Connection
{
private $servername = "localhost";
private $username = "root";
private $password = "";
private $dbname = "blog";
private $conn;
function DBconnection()
{
try
{
$this->conn = new PDO("mysql:host=$this->servername;dbname=$thi... | true |
717d690c08c843cdf9f6707b35a5caea2c782eee | PHP | Ortanov/wed_gallery | /gallery/admin.php | UTF-8 | 1,964 | 2.546875 | 3 | [] | no_license | <?php
$fil_name = $_FILES['img']['name'];
$file_type = $_FILES['img']['type'];
move_uploaded_file($_FILES['img']['tmp_name'],"img/".$fil_name );
$conect = mysqli_connect('localhost','root','root','gallery')
or die('Ошибка');
if(!empty( $fil_name )){
echo( "данные отправлены "." Тип даннх:".$file... | true |
9bde079980e6e56601acc59ed74c9ed16d89ef5c | PHP | quayle/elektroniczny-nadawca | /lib/ElektronicznyNadawca/getProfilListResponse.php | UTF-8 | 637 | 2.84375 | 3 | [] | no_license | <?php
namespace PocztaPolska\ElektronicznyNadawca;
class getProfilListResponse
{
/**
* @var profilType $profil
*/
protected $profil = null;
/**
* @param profilType $profil
*/
public function __construct($profil)
{
$this->profil = $profil;
}
/**
* @return p... | true |
1d271cbe3d5aab0227fc9bf316a1ebae7d31a27b | PHP | AlvaroDDG86/AdmininstratorWeb | /inc/CentroService.php | UTF-8 | 2,140 | 2.75 | 3 | [] | no_license | <?php
//Incluimos el archivo de la validación
/*include_once 'validacion.inc.php';*/
//Incluir el archivo de la clase, evaluando primero si existe
if(file_exists('CentroClass.php'))
include_once 'CentroClass.php';
include_once 'CentroConstants.php';
//Se crea un objeto de la clase
try{
$oCentro=ne... | true |
779a7283d898e820cbfdf834b21feee904a5523d | PHP | MarzioMonticelli/3db-database-explorer | /models/DBCol.php | UTF-8 | 14,830 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
require_once('interfaces/DBColInterface.php');
require_once('../utilities/AdmittedRowValues.php');
require_once('../utilities/StringGenerator.php');
require_once('mysql_utilities/ConnectionFactory.php');
require_once('interfaces/MVCModelInterface.php');
class DBCol implements DBColInterface, MVCModelInterface{
... | true |
9377eafefa3ba16792c8eac104046d11b481b119 | PHP | AymanMalak/online-shop | /handlers/handleEdit.php | UTF-8 | 1,597 | 2.890625 | 3 | [] | no_license | <?php
session_start();
require_once '../classes/Product.php';
require_once '../classes/validation/Validator.php';
use validation\Validator;
// if form is submitted
if ($_POST['submit']) {
$id = $_GET['id'];
echo "<h1>$id</h1>";
// read data from form
$name = $_POST['name'];
$desc = $_POST[... | true |
9b3e668bdd3efceb09d40b86575604f71359d5e5 | PHP | adee1an/laravel_101-bootcamp-1 | /Modules/Post/Http/Controllers/PostController.php | UTF-8 | 1,112 | 2.515625 | 3 | [] | no_license | <?php
namespace Modules\Post\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller;
use Modules\Post\Entities\Post;
class PostController extends Controller
{
public function index()
{
$lists = Post::orderBy('id', 'DESC')->paginate(20); // SELECT * FROM post ORDER id DESC
... | true |
14193d5fb3f14e96551f3404214d9021a0ca3da3 | PHP | michi174/team_cdn_renew | /classes/controller/error/error.php | UTF-8 | 904 | 2.65625 | 3 | [] | no_license | <?php
namespace controller\error;
use wsc\controller\controller_abstract;
use wsc\systemnotification\SystemNotification;
use wsc\view\renderer\Tpl;
use wsc\application\Application;
/**
*
* @author Michi
*
*/
class Error extends controller_abstract
{
public function nopermission_action()
{
$view = $t... | true |
858cc01a616f19352ec106746f2e63eb5888d4ec | PHP | saveryanov/slinker | /includes/stemmer.php | UTF-8 | 8,906 | 3.125 | 3 | [] | no_license | <?php
define('CHAR_LENGTH', 2);
// Стеммирование в 3 раунда
function stem($word){
return (stem_round(stem_round($word)));
}
// Раунд стеммирования
function stem_round($word){
$a = rv($word);
return $a[0].step4(step3(step2(step1($a[1]))));
}
function rv($word){
$vowels = array('а','е','и','о','у','ы','... | true |
f60ae1a75b20ccb4c2fccef97972d264ea87f68f | PHP | mawena/ottackuAttack | /Library/NewsFormBuilder.class.php | UTF-8 | 1,050 | 2.84375 | 3 | [] | no_license | <?php
namespace Library;
class NewsFormBuilder extends FormBuilder
{
public function build()
{
$this->form->add(new StringField(array(
'label' => 'Auteur',
'name' => 'auteur',
'maxLength' => 20,
'validators' => array(new MaxLengthValidator("L'auteur spéc... | true |
2a4b3886bdb82cfdfa4be43a84f4982edcb8486a | PHP | dietcake/dietcake | /src/Inflector.php | UTF-8 | 731 | 3.265625 | 3 | [
"MIT"
] | permissive | <?php
namespace DietCake;
class Inflector
{
/**
* @param string $str
* @return string
*/
public static function camelize($str)
{
return str_replace(' ', '', ucwords(str_replace('_', ' ', $str)));
}
/**
* @param string $str
* @return string
*/
public static... | true |
b993cfd757d63afb3339d4281fcfb69776bd75c2 | PHP | Piuliss/hackazon | /classes/App/Core/Route.php | UTF-8 | 1,231 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by IntelliJ IDEA.
* User: Nikolay Chervyakov
* Date: 22.01.2015
* Time: 18:02
*/
namespace App\Core;
class Route extends \PHPixie\Route
{
public function url($params = array(), $absolute = false, $protocol = 'http', $filterParams = true)
{
if (is_callable($t... | true |
ab3d3be498c9a04693a4df74e55e3be74adfa7a0 | PHP | rebeccadumazert/motmeles | /templates/inscription.php | UTF-8 | 4,411 | 2.71875 | 3 | [] | no_license | <?php
require_once 'function.php';
if(!empty($_POST)){
$errors = array();
require_once 'db.php'; //Permet de se connecter a la BDD
//Verifie l'identifiant
if(empty($_POST['username']) || !preg_match('/^[a-zA-Z0-9_]+$/', $_POST['username'])){
$errors['username'] = "Votre ... | true |
dce797458e860b2a4b3b5706fab99691bf6dcc47 | PHP | wakeless-net/Rex | /Rex/View/SortableTable.php | UTF-8 | 668 | 2.515625 | 3 | [] | no_license | <?php
namespace Rex\View;
class SortableTable extends Table {
function __construct($display, $data = null, $app = null) {
$this->id = "sortable";
$this->addColumn("DragIcon");
parent::__construct($display, $data, $app);
}
function getColumnHeading($key) {
if($key == "DragIcon") {
... | true |
aa8cf00bfa1247c5bdf57084ca0f6c78a26ca2f8 | PHP | viashop/admin_cake | /app_application/src/AppVialoja/Interfaces/Model/IShopPagamento.php | UTF-8 | 535 | 2.53125 | 3 | [] | no_license | <?php
/**
* @copyright Vialoja (http://vialoja.com.br)
* @author William Duarte <williamduarteoficial@gmail.com>
* @version 1.0.1
* Date: 17/10/16 às 17:48
*/
namespace AppVialoja\Interfaces\Model;
use Shop;
interface IShopPagamento
{
/**
* Obter Arrays para usar em IN
* @param Shop $shop
*... | true |
2fce90446a8bd34d7aa1709d2ec75470bddc04d0 | PHP | terafc/SRDA | /application/view/trombi.php | UTF-8 | 781 | 2.578125 | 3 | [] | no_license | <?php if(!empty($liste)){ ?>
<div id="articles">
<div class="tableDiv articles">
<h4>Vos collègues</h4>
<table class="tableExemple">
<th width=125>Nom</th>
<th width=125>Prenom</th>
<th>Email</th>
<?php foreach($liste as $valeur) { ?>
<tr>
<td>
<?php
if(!empty($valeur['promo'])){
... | true |
b89ab01d88db0d791ef8110eb0b868489d31e27c | PHP | julioapo/siscg_botI | /controllers/colocadorController.php | UTF-8 | 10,835 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by SERVICIOS Y SISTEMAS MARIANNY MARTINEZ FP.
* User: Julio Aponte
* Date: 02/07/16
* Time: 01:48 PM
* Clase Controller de los Colocadores de Divisas
*/
class ColocadorController extends Controller {
private $_colocadores; //se declara un atributo privado para instanciarlo y utilizarlo e... | true |
798ce259dd9c622353ff69cc343a2a6d20ef3402 | PHP | Rayman208/uploadphoto | /showall.php | UTF-8 | 464 | 2.609375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>girls</title>
</head>
<body>
<?php
$db = mysql_connect("localhost","root","");
mysql_select_db("gilrs",$db);
mysql_set_charset('utf-8',$db);
$query_result = mysql_query("SELECT * FROM `photo`");
$data = array();
while... | true |
a6cbc1828cf67f7d0c4f41132e46a92d5dbd3782 | PHP | karthikswarna/Asset-Manager | /config.php | UTF-8 | 573 | 2.609375 | 3 | [] | no_license | <?php
DEFINE('DB_USER', 'root');
DEFINE('DB_PASSWORD', '1017f001');
DEFINE('DB_NAME', 'assets_db');
DEFINE('DB_HOST', 'localhost');
$dsn = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME;
try
{
$db_conn = new PDO($dsn, DB_USER, DB_PASSWORD);
$db_conn->setAttribute... | true |
373092990d8fb634a4a9d52ebd722afdc3406c28 | PHP | kitapyurdu/bkm-express-php | /samples/operations/BexUtil.php | UTF-8 | 1,049 | 2.671875 | 3 | [] | no_license | <?php
use Bex\merchant\security\EncryptionUtil;
use Bex\util\MoneyUtils;
class BexUtil
{
public static function readJsonFile($jsonFile)
{
return json_decode(file_get_contents($jsonFile), true);
}
public static function writeJsonFile($jsonFile, $jsonData)
{
return file_put_contents... | true |
49c282e3268095022c03cc40d59869d6711e5d96 | PHP | pcelta/di-exercise | /tests/CarTest.php | UTF-8 | 1,103 | 2.921875 | 3 | [] | no_license | <?php
namespace Monster\Tests;
use Monster\Car;
use Monster\Wheel;
class CarTest extends \PHPUnit\Framework\TestCase
{
public function testTurnShouldReturnRightWhenRightDirectionIsGiven()
{
$wheel = $this->getMockBuilder(Wheel::class)
->setMethods(['right'])
->getMock();
... | true |
0a9c51ace28369e60535b22578ba266fc2438398 | PHP | OSPFIA32/osp | /php/Repositories/EventRepository.php | UTF-8 | 3,174 | 3.09375 | 3 | [] | no_license | <?php
/**
* Repository - Füllt das Model application-user
*/
require_once 'Models/EventModel.php';
class EventRepository {
/**
* Gibt alle Einträge des Blogs zurück.
* testing
* @return EventModel[] $event
*/
public static function findAll() {
$connection = Connection::getInstance();
if(!$... | true |
b91ceffd9aaaf05dbac0cccfad362d4897dce4b4 | PHP | skrypnik-dzencode/tt_ccfiles | /app/Console/Commands/ConvertFileInline.php | UTF-8 | 1,874 | 3 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use App\Console\Traits\ConvertFilesTrait;
use App\FileClasses\FileFactory;
use Illuminate\Console\Command;
class ConvertFileInline extends Command
{
use ConvertFilesTrait;
/**
* The name and signature of the console command.
* php artisan convert:countries --in... | true |
dab25ade352229eda4c8724852d353abded2d218 | PHP | yocyo357/ezmoney | /Home.php | UTF-8 | 13,033 | 2.796875 | 3 | [] | no_license | <?php
session_start();
include "DBconfig.php";
function alert($msg)
{
echo '<script language="javascript">alert("' . $msg . '");</script>';
}
//create connection
$conn = new mysqli($HostName, $HostUser, $HostPass, $DatabaseName);
function actives($page)
{
$active = "";
$str = basename($_SERVER['PHP_S... | true |
6754857c1a9dce4a3e0f1be58097e11f7f0aedb2 | PHP | wmde/Diff | /src/DiffOp/DiffOpAdd.php | UTF-8 | 1,764 | 3.15625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
declare( strict_types = 1 );
namespace Diff\DiffOp;
/**
* Represents an addition.
* This means the value was not present in the "old" object but is in the new.
*
* @since 0.1
*
* @license BSD-3-Clause
* @author Jeroen De Dauw < jeroendedauw@gmail.com >
*/
class DiffOpAdd extends AtomicDiffOp {
privat... | true |
7bd710bb6a5841b1f5c20220f7e48e626d909c01 | PHP | leminhluan4244/WebManageScore | /docs/Tài liệu nộp về PQLKH/Tài liệu chép vào đĩa CD/10. Soure code ứng dụng web và di động/Web/model/TranscriptMod.php | UTF-8 | 13,316 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: TanPhat
* Date: 5/8/2017
* Time: 5:43 PM
*/
define("COL_FINAL_SCORE", "scores");
define("COL_STUDENT_SCORE", "scoresStudent");
define("COL_ADVISER_SCORE", "scoresTeacher");
class TranscriptMod {
private $connSQL;
public function __construct() {
$this->connSQL = new C... | true |
134f62686cd2bd3f08b467f6cf8b8016defd5af2 | PHP | nextras/orm | /src/Collection/EmptyCollection.php | UTF-8 | 2,208 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace Nextras\Orm\Collection;
use EmptyIterator;
use Iterator;
use Nextras\Orm\Entity\IEntity;
use Nextras\Orm\Exception\NoResultException;
use Nextras\Orm\Mapper\IRelationshipMapper;
/**
* @template E of IEntity
* @implements ICollection<E>
* @implements MemoryCollection<E>... | true |
bf6c316fa3542ea53812e609c1e76e79f90f0694 | PHP | skvaros/test | /Test/Model/entity/PageEntityTest.php | UTF-8 | 1,344 | 2.625 | 3 | [] | no_license | <?php
require_once $PROJECT_DIR .'/Model/entity/PageEntity.php';
class PageEntityTest extends PHPUnit_Framework_TestCase
{
private $page;
public function setUp() {
$this->page = new PageEntity();
}
/*public function testId() {
$this->page->setId(1);
$this->assertEquals(1, $this->page->getId());
}
pu... | true |
aa1720139d2dbab35c282105db38539ebbe23e0c | PHP | krixon/math | /tests/Decimal/ComparisonTest.php | UTF-8 | 7,337 | 3.09375 | 3 | [] | no_license | <?php
namespace Krixon\Math\Test\Decimal;
use Krixon\Math\Decimal;
/**
* @coversDefaultClass Krixon\Math\Decimal
* @covers ::<protected>
* @covers ::<private>
*/
class ComparisonTest extends DecimalTestCase
{
/**
* @dataProvider stringProvider
* @covers ::equals
*
* @param string $string
... | true |
b392e1d62fcc158f94eb7b0337b90ffa62905b82 | PHP | SajidAbbas/key2cars | /app/CityAreas.php | UTF-8 | 1,831 | 2.53125 | 3 | [] | no_license | <?php
namespace App;
use DB;
use Illuminate\Database\Eloquent\Model;
class CityAreas extends Model
{
public function getAllAreas()
{
return $data=DB::table('city_areas')
->join('cities','cities.id','=','city_areas.city_id')
->select('city_areas.*','cities.title as city')
->orderby(... | true |
3f99210363920fbd05d3d30e60de890b9a6d9e97 | PHP | XCloneX/PRG2 | /session_redirect1.php | UTF-8 | 397 | 2.796875 | 3 | [] | no_license | <?php
session_start();
echo "Array de sessao <br>";
echo "<pre>";
print_r($_SESSION);
echo "<pre>";
if (!isset($_SESSION['username'])) {
echo "Amigo ,tendes que iniciar uma sessao <br>";
exit;
}
echo "ola meu bom amigo " . $_SESSION['username'];
?>
Agora se quizeres podes voltar a pagina inicial carregando <a hr... | true |
582fa1435bc51ef800e066c5a2fd89c1a0a73c7a | PHP | EyadJ/Smart-Home-Website | /models/device.php | UTF-8 | 7,346 | 2.953125 | 3 | [] | no_license | <?php
/**
*
*/
require_once("config.php");
require_once("critical.php");
class Device
{
public static function getDevicesDetailsByRoomID($RoomID)
{
$db = new mysqli(HOST_NAME, USERNAME, PASSWORD, DATABASE);
if ($db->connect_errno > 0) {
die('unable to connect to database [' . $db->connect_error .']');
... | true |
139426f353cc139b7d8ba76d993320dfabdb8c9f | PHP | smartweber/yii2-ecommerce | /frontend/components/VtexClient.php | UTF-8 | 2,556 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace frontend\components;
use yii\httpclient\Client;
use \Exception as Exception;
class VtexClient
{
public $vtexRequestClient = null;
private $vtex_account = null;
private $vtex_env = null;
private $app_key = null;
private $app_token = null;
private $base_url = null;
public ... | true |
dd0f2e8feeab8962feb7d0d653d89b1bd7bbcf2a | PHP | htmlacademy-yii/1674445-task-force-1 | /yii-taskforce/frontend/models/Replies.php | UTF-8 | 918 | 2.625 | 3 | [] | no_license | <?php
namespace frontend\models;
use Yii;
/**
* This is the model class for table "replies".
*
* @property int $reply_id
* @property string $dt_add
* @property string|null $rate
* @property string|null $description
*/
class Replies extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public... | true |
6a1bb8777a69756031a0a51c94ad7fe359272bd0 | PHP | kentronvzla/webkentron | /app/Grupo.php | UTF-8 | 3,008 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use App\BaseModel;
/**
* App\Grupo
*
* @property integer $id
* @property string $name
* @property string $permissions
* @property \Carbon\Carbon $created_at
* @property \Carbon\Carbon $updated_at
* @property-read \Illuminate\Database\Eloquent\Collection|\App\User[] $users
* @property-re... | true |
bb583f7ceec97daac54e325c792ec3197f8fe480 | PHP | alperen2/fatura.github.io | /controllers/service.php | UTF-8 | 7,772 | 2.53125 | 3 | [] | no_license | <?php
$mpdf = new \Mpdf\Mpdf();
$id = $params[0] ?? false;
// $id = row_count($db, "drivers", $id) > 0 ? $id : false;
$post = isset($_POST) ?? false;
$currencies = [
0 => 'Leva',
1 => 'Euro',
];
$template_data['message'] = show_message();
$template_data['currencies'] = $currencies;
$q = $db->prepare("Sel... | true |
7170ca74158e233826d7574b682f42a12e5c28f4 | PHP | e-electra/homework-LB-1 | /app/contact_me.php | UTF-8 | 1,174 | 2.515625 | 3 | [] | no_license | <?php
$name = htmlentities(strip_tags(trim($_POST['name'])));
$email = htmlentities(strip_tags(trim($_POST['email'])));
$mess = htmlentities(strip_tags(trim($_POST['message'])));
$captcha = $_POST['g-recaptcha-response'];
$ip = $_SERVER['REMOTE_ADDR'];
$secret_key = "6LfohBMTAAAAADCZBgxfbUfmhWvJgDZ6M1A9JKv0";
... | true |
4d7a6067c2b4d316ca8c15d10a93d87f42650314 | PHP | EQBids/web | /app/Http/Middleware/RoleMiddleware.php | UTF-8 | 661 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class RoleMiddleware
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $n... | true |
902e46d0bba4df1b00a5f8e55b103c57315eafa9 | PHP | MapoBG/DevriX | /Database/DatabaseStatement.php | UTF-8 | 722 | 3.203125 | 3 | [] | no_license | <?php
namespace Database;
class DatabaseStatement implements DatabaseStatementInterface
{
private $pdoStatement;
/**
* DatabaseStatement constructor.
* @param $pdoStatement
*/
public function __construct(\PDOStatement $pdoStatement)
{
$this->pdoStatement = $pdoStatement;
}
... | true |
318df9642c4e4428ee858f7d9226fbe50c67b9c7 | PHP | kiprox/tvstreamscript | /includes/plugins.class.php | UTF-8 | 12,995 | 2.5625 | 3 | [
"WTFPL"
] | permissive | <?php
class Plugins{
var $basepath = null;
function __construct(){
global $basepath;
$this->basepath = $basepath;
}
public function getFrontendMenu($activeplugins){
$path = $this->basepath."/plugins";
$dir_handle = @opendir($path);
$m... | true |
2b63c57731e6df051aaf3ea9305cf9308f20caa5 | PHP | clearbooks/php-paypal-api | /Paypal/Api/SetDataResponseType.php | UTF-8 | 786 | 2.75 | 3 | [] | no_license | <?php
namespace Paypal\Api;
class SetDataResponseType
{
/**
* @var ExpressCheckoutTokenType $Token
* @access public
*/
public $Token = null;
/**
* @var AddressType[] $ShippingAddresses
* @access public
*/
public $ShippingAddresses = null;
/**
* @var ErrorType[... | true |
0cb9b6b78e0f40da636724d36faa3fbc1b32af1d | PHP | kas-test/framework | /application/controllers/Start.php | UTF-8 | 595 | 2.5625 | 3 | [] | no_license | <?php
/**
* This class manages the index page in the application
*
* @copyright KASalgado 2012
* @author Kleber Salgado
* @version 1.2
*/
class Start extends Master
{
/**
* Load the necessary resources for this page
*/
public function __construct()
{
$this->loadReso... | true |
ec2c1fb002b75c0e510ccb58293d1492dcd7c69a | PHP | nick964/Owleats | /updateorder.php | UTF-8 | 1,764 | 2.734375 | 3 | [] | no_license | <?php
/****************************************************
Name:
Purpose:
date developer comment
20130912 Nick Robinson Created page to handle menu items for vendors
*****************************************************/
//this sets that if browser is closed, session is destroyed
session_set_cookie_params(0);
... | true |
3b899b50f0f62a52f8c5095c3edb73579404b13b | PHP | HoneySens/honeysens-legacy | /server/app/controllers/Users.php | UTF-8 | 5,721 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace HoneySens\app\controllers;
use HoneySens\app\models\entities\User;
use HoneySens\app\models\exceptions\NotFoundException;
use Respect\Validation\Validator as V;
class Users extends RESTResource {
static function registerRoutes($app, $em, $beanstalk, $config, $messages) {
$app->get('/api/u... | true |
b557ad39b7930834f606290cbd023f32b0456ceb | PHP | ajunlonglive/php-ext-vedis | /tests/018.phpt | UTF-8 | 1,659 | 2.90625 | 3 | [] | no_license | --TEST--
vedis hMSet/hMGet
--SKIPIF--
--FILE--
<?php
include_once dirname(__FILE__) . '/init.inc';
$vedis= new Vedis;
// hmset
var_dump($vedis->hMset('h', array('x' => 123, 'y' => 456, 'z' => 'abc')));
var_dump($vedis->hGet('h', 'x'));
var_dump($vedis->hGet('h', 'y'));
var_dump($vedis->hGet('h', 'z'));
var_dump($vedi... | true |
5d03738d842b3d90ce0da85ba472fd12ba818b48 | PHP | TeamSnowflake/research-and-development | /demo002-me/demo/php/app/Models/FundSponsor.php | UTF-8 | 1,171 | 2.75 | 3 | [
"MIT",
"Unlicense"
] | permissive | <?php
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class FundSponsor
* @property mixed $id
* @property integer $fund_id
* @property integer $sponsor_id
* @property string $state
* @property Fund $fund
* @property Product $p... | true |
ccb3dc8db43e2d8ddba290df67644a851ee537d1 | PHP | nwut/namsai | /backed_up/helper/Story.php | UTF-8 | 5,232 | 2.734375 | 3 | [] | no_license | <?php
class Story{
/*
add
*/
public static function add($repoId,$storyName = '',$order = null){
global $pdo;
if($order == null){
$order = self::getMaxOrder($repoId)+1;
}
$query = $pdo
->insert(array('story_repoid', 'story_name', 'story_order'))
->into('s... | true |
840af02dc3ce660fe30f4445ea02327929fe1806 | PHP | ygorkauawj/desafio-php-exceptions | /src/Exceptions/OutOfStockException.php | UTF-8 | 309 | 2.796875 | 3 | [] | no_license | <?php
namespace ygorkauawj\Desafio\Exceptions;
use DomainException;
class OutOfStockException extends DomainException
{
public function __construct($stock)
{
$message = "Temos apenas $stock unidades, por favor tente outra quantidade." . PHP_EOL;
parent::__construct($message);
}
} | true |
5684c649df0c09539ab3a605d16da22cd7955c2b | PHP | popopchicken/CSE135 | /Aristocart/app/Http/Controllers/LoginController.php.BASE.62978.php | UTF-8 | 1,089 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Controllers;
use Request;
use App\Models\User;
use Response;
use View;
class LoginController extends Controller {
/*
|--------------------------------------------------------------------------
| Signup Controller
|--------------------------------------------------------------------------... | true |
7122ce381464aa40f045e4df75295db335971cbb | PHP | rodravid/PTManager | /database/migrations/2016_05_03_185409_create_tasks_table.php | UTF-8 | 885 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTasksTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('tasks', function (Blueprint $request) {
$req... | true |
b03b3846fbd94f7629e04edd3577fe7cc2e39034 | PHP | marcoceppi/secleanup | /lib/vendor/stackphp/tests/run_tests.php | UTF-8 | 4,328 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
//=========================================
// Enumerates all of the tests available
// and captures the output in an HTML file.
//=========================================
// Send a header indicating text output:
header('Content-type: text/plain');
require_once '../src/api.php';
// A list of all... | true |
c57730c9b15d4ec19d8206dda1e1c53ea4974f45 | PHP | Kellandor/CST336 | /Lab6/page.php | UTF-8 | 1,636 | 2.796875 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION['userName']))
{
header("Location: index.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<style>@import url("css/style.css");</style>
</head>
<body>
<div class="main">
<h1>Admin Main</h1>
<h2>Welcome <?php echo $... | true |
923d70a58c29d601d3fd0cffbb87140e6aafc8b4 | PHP | dave-redfern/better-entities | /src/Support/Traits/RaisesDomainEvents.php | UTF-8 | 660 | 2.671875 | 3 | [] | no_license | <?php
namespace AppBundle\Support\Traits;
use AppBundle\Events\AbstractEvent;
/**
* Trait RaisesDomainEvents
*
* @package AppBundle\Support\Traits
* @subpackage AppBundle\Support\Traits\RaisesDomainEvents
*/
trait RaisesDomainEvents
{
/**
* @var array|AbstractEvent[]
*/
protected $events =... | true |
ad2aa41999b092c7eada725dd50c334e42dcd001 | PHP | BonyGeorge/Move-Miu | /MoveRecruitment/php/controller/get_group_list.php | UTF-8 | 525 | 2.546875 | 3 | [] | no_license | <?php
include_once '../model/group.php';
include_once '../model/student.php';
$g1 = new group();
$s1 = new student();
//echo $s1->updateIDs();
$searchBy = $_POST['searchBy'];
$value = $_POST['value'];
$result = $g1->read(array($searchBy, $value));
for ($i = 0; $i < count($result); $i++) {
if ($i == count($re... | true |
c3015edf1062c1478d058b3d86c8c51a1c0b5926 | PHP | gonpineiro/api-rest-php | /server.php | UTF-8 | 2,830 | 2.78125 | 3 | [] | no_license | <?php
/* Haders */
include('header.php');
/*Autenticacion via HTTP */
// include('auth/http.php');
/* Autenticacion via HMAC */
// include('auth/hmac.php');
/* Autenticacion via Token */
// include('auth/token.php');
/* Definimos los recursos disponibles */
$allowedResourceTy... | true |
2f1bcb512a835ef4002c45b52dea2ae369e6d8ff | PHP | Dal2018/move1 | /signup.php | UTF-8 | 1,848 | 2.71875 | 3 | [] | no_license | <?php
session_start();
require('database.php');
$message="";
if(!empty($_POST['signup'])){
$db = Database::getInstance();
$name = $_POST["name"];
$email = $_POST["email"];
$pass = $_POST["pass"];
$sql = "INSERT INTO `User`(`u_email`, `u_pass`, `u_name`, `u_type`) VALUES ('$email','$pass','$na... | true |
83ed55ce2d3af6afc3a7e3139b62d5935912a627 | PHP | iliass02/Code-Camps | /Big_Data/Hadopi/drame_a/.svn/pristine/83/83ed55ce2d3af6afc3a7e3139b62d5935912a627.svn-base | UTF-8 | 665 | 2.828125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
</head>
<body>
<?php
if (file_exists('bdd.xml')) {
$xml = simplexml_load_file('bdd.xml');
for ($i = 0; $i < 100000; $i++)
{
$vid = $i;
echo ... | true |
fb20eb9b937c5183edbdb1b37a82051da6cca97c | PHP | argee23/hrone | /application/views/app/reports/training_seminar_request/generate_report_trainings_seminars_attendees.php | UTF-8 | 3,365 | 2.515625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive |
<table class="col-md-12 table table-hover" id="crystal_reports">
<thead>
<tr class="danger">
<?php foreach($crystal as $c){?>
<th><?php echo $c->udf_label;?></th>
<?php } ?>
</tr>
</thead>
<tbody>
<?php foreach($reports as ... | true |
37ccd3a1ce6af31cfe56ad5acbeae9868d0b04e3 | PHP | BolotinAlexey/amulet-review | /game/f_say.inc | UTF-8 | 1,711 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @global login
* @global loc
* @global loc_i
* @global loc_t
* @global loc_tt
* @global game
* @global sid
* @global PHP_SELF
* @global char
* @global to
* @global locai
*/
// сказать текст всем
use MaxDark\Amulet\OldCode\WordFilter;
if (strpos($say, "?sid=") !== false) {
$say = substr($say... | true |
73dcddfaefa34325b5724663bf2a27e4b723d58f | PHP | alimadeoliveiranatalia/taberna | /cadastro_fornecedor/conexao.php | UTF-8 | 778 | 2.890625 | 3 | [] | no_license | <?php
class Conexao {
public $conn;
public function configura(){ /* Recebe como parâmetros o acesso ao servidor */
$ini = parse_ini_file('login.ini');
$this->host=$ini['host'];
$this->user=$ini['user'];
$this->db=$ini['db'];
//$this->pass=$ini['pass'];
}
public ... | true |
aff4c73d98782b1fca33f70afdd37bceed66c6db | PHP | chenpingchao/dm | /myshop/admin/category/categoryAction.php | UTF-8 | 5,362 | 2.59375 | 3 | [] | no_license | <?php
require_once "../../conf.inc.php";
if(empty($_SESSION['aid'])){
header("location:../index.php");
}
$act = $_GET['act'];
$act();
//添加商品分类
function add(){
$catename = trim($_POST['catename']);
$pid = explode('-',$_POST['pid'])[0];
$path = explode('-',$_POST['pid'])[1];
/* echo $catename;
ec... | true |
23351cf2a78a9e30c88d9598b687cd34f853e637 | PHP | packetcode/php-crash-course | /practice.php | UTF-8 | 1,166 | 4.09375 | 4 | [] | no_license | <?php
echo "Hey, This is kamal";
// This is a Comment
/*
This is multiline comment
Got it?
*/
$a = 10;
$b = 20;
echo $a;
echo "<hr/>";
echo "<br/>";
$r = $a + $b;
$r = $a - $b;
$r = $a * $b;
$r = $a / $b;
$r = $a % $b;
echo "The resu... | true |
8ad0fdc88c627081d42df42fda32b4579f2fbfa8 | PHP | eiensatya7/redshift | /app/crap/college.php | UTF-8 | 350 | 2.875 | 3 | [] | no_license | <?php
class College extends Eloquent{
protected $table = 'colleges';
protected $primaryKey = 'id';
protected $id;
protected $name;
protected $alias;
public function __construct($id,$name,$alias){
this->$id = $id;
this->$name = $name;
this->$alias = $alias;
}
public function students(){
$this->bel... | true |
689690ee5c2ae3c6551e444eb3b0f8e9ae17af09 | PHP | Batlasaleh/Maintenance-Request-Website | /Maintenance Request Website/problemlist.php | UTF-8 | 4,410 | 2.546875 | 3 | [] | no_license | <?php
$title="Problem List Page";
include 'adminheader.php';
include 'connect.php';
if(!isset($_SESSION['name'])){
header('Location:error.php');
}
$query="SELECT * FROM problems";
$result=mysqli_query($con,$query);
$prob_list = array();
while($row = mysqli_fetch_assoc($resul... | true |
f296f0c4b7a70a3182147d541817c48b7e0ff9ec | PHP | kaleemshoukat/fyp-lifesaviour | /admin/deleteuser.php | UTF-8 | 2,735 | 2.625 | 3 | [] | no_license | <?php
session_start();
// if(!isset($session['$email'])){ //without login user cannot see home page
// header('location:login.php');
// }
$con = mysqli_connect('localhost', 'root', '12345678', 'lifesaviour');
//if (isset($_POST['regbtn'])) {
$emailErr= $email="";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
i... | true |
746621b0115013170db58fae0fd6d56a571a6d5e | PHP | senopatika/SenopatikaRepo | /mahasiswa.form.php | UTF-8 | 3,676 | 2.8125 | 3 | [] | no_license | <?php
// panggil file koneksi.php
require 'koneksi.php';
// buat koneksi ke database mysql
koneksi_buka();
// tangkap variabel kd_mhs
$kd = $_POST['id'];
// query untuk menampilkan mahasiswa berdasarkan kd_mhs
$data = mysql_fetch_array(mysql_query("SELECT * FROM destinasi d, kategori k where d.kategori_id=k.id_kateg... | true |
8c40e459e73c9f0fdad35ffe1b5b801a1e5a520a | PHP | WorldL/user | /src/Controller/DocumentController.php | UTF-8 | 8,443 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\College;
use App\Entity\Document;
use Doctrine\ORM\EntityManagerInterface;
use JMS\Serializer\SerializerInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotatio... | true |
90cb869d03978ad6f9f4cc0e80de9d70a4ef67c0 | PHP | patoattie/ProgramacionIII | /clase1/ejer7.php | UTF-8 | 686 | 3.140625 | 3 | [] | no_license | <?php
/*Obtenga la fecha actual del servidor (función date) y luego imprímala dentro de la página con
distintos formatos (seleccione los formatos que más le guste). Además indicar que estación del
año es. Utilizar una estructura selectiva múltiple.*/
$fecha = date("d/m/Y");
$mes = date("m");
$estacion = "";
sw... | true |
a489f458a2ccc8e63c56131d58b143bfd5d5631f | PHP | olml89/Vreasy-test | /core/Libraries/ErrorHandling/Exceptions/InvalidFileException.php | UTF-8 | 527 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace System\Libraries\ErrorHandling\Exceptions;
final class InvalidFileException extends \Exception {
public static function unReadable(string $filePath) : InvalidFileException {
throw new InvalidFileException($filePath.' does not exist and cannot be loaded');
}
public s... | true |
d4006839e7faa8e26597464b538cea4995c28a7c | PHP | yvescleuder/desafio-backend | /application/app/Http/Controllers/API/UserController.php | UTF-8 | 9,812 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\API;
use App\Http\Controllers\Controller;
use App\Http\Requests\AmountInitialUserRequest;
use App\Http\Requests\StoreUserRequest;
use App\Services\UserService;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Http\JsonResponse;
use Throwable;
class UserCont... | true |
6fb3e284a530ebf87b553ea95799e913a6715d0a | PHP | phOnion/interfaces | /src/Router/Interfaces/RouteInterface.php | UTF-8 | 725 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Onion\Framework\Router\Interfaces;
use Closure;
use Psr\Http\Server\MiddlewareInterface;
interface RouteInterface
{
public function getName(): string;
public function getMethods(): array;
public function getPattern(): string;
public function getAction(): Clos... | true |
4439226020ce7d5a03cf186464b2283897684d3e | PHP | jezZu13/inventario | /Php_proyecto/html/alta_dispositivo.php | UTF-8 | 4,160 | 2.734375 | 3 | [] | no_license | <?php
require("conexion.php");
$sw=1; //Interruptor(switch) utilizado para salir del bucle de "comparar" en caso de que encuentre el dispositivo en la tabla.
$identificador_disp=$_POST['identificador_disp'];
$sn_disp=$_POST['sn_disp'];
$fecha_alta_disp=$_POST['fecha_alta_disp'];
$fecha_baja_d... | true |
1cf358262fbe53489be160e5d8f3cd76281451f0 | PHP | kavendra/learn | /app/Betta/Foundation/Providers/AbstractViewComposerServiceProvider.php | UTF-8 | 1,973 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Betta\Foundation\Providers;
use Illuminate\Support\ServiceProvider;
class AbstractViewComposerServiceProvider extends ServiceProvider
{
/**
* Shared Namespace for the Composers
*
* @var string
*/
protected $namespace;
/**
* List Composers to use
*
* @s... | true |