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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
a4a98559e4c80065c9b2a17314472625bde4ee4d | PHP | danilogv/aix | /app/Http/Controllers/LoginController.php | UTF-8 | 739 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Login;
use Illuminate\Http\Request;
class LoginController extends Controller
{
public function index() {
return view ("index");
}
public function cadastro() {
return view ("cadastro");
}
public function login(Request $requisicao) {
... | true |
118c7bb2c04caf82842ecf229377b66775b7a0d5 | PHP | pigortekids/Notas3 | /BackEnd/projeto1/app/model/ClienteDAO.php | UTF-8 | 2,632 | 2.984375 | 3 | [] | no_license | <?php
namespace app\model;
use app\classes\Cliente;
use app\model\DAO;
class ClienteDAO
{
public function getClientes ()
{
$conn = new DAO();
$stmt = $conn->con->prepare("SELECT * FROM tbl_cliente");
$stmt->execute();
$result = $stmt->fetchAll(\PDO::FETCH_ASSOC);
$ar... | true |
6f2eda6334ede23ba14720cba1be94b3bcdbbafd | PHP | vektorprogrammet/vektorprogrammet | /src/AppBundle/Twig/Extension/TeamPositionSortExtension.php | UTF-8 | 1,715 | 2.84375 | 3 | [] | no_license | <?php
namespace AppBundle\Twig\Extension;
use AppBundle\Entity\TeamInterface;
use AppBundle\Entity\User;
use AppBundle\Service\FilterService;
use AppBundle\Service\Sorter;
use Twig\Extension\AbstractExtension;
use Twig\TwigFilter;
class TeamPositionSortExtension extends AbstractExtension
{
private $sorter;
p... | true |
807b64f59fbe7dac7d7d7c4cc62434c4eba918d8 | PHP | hogejiro/study_books | /an_introduction_to_design_pattern_by_java/php/07_builder/HTMLBuilder.php | UTF-8 | 814 | 3.578125 | 4 | [] | no_license | <?php
class HTMLBuilder extends Builder
{
private $filename;
private $writer;
public function __construct()
{
$this->buffer = [];
}
public function makeTitle($title)
{
$this->buffer[] = "<html><head><title>$title</title></head><body>\n";
$this->buffer[] = "<h1>$tit... | true |
120aadc965781234caaaf22b0387e447ecdd87b3 | PHP | schlessera/as-speaking | /src/Assets/Asset.php | UTF-8 | 799 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/**
* AlainSchlesser.com Speaking Page Plugin.
*
* @package AlainSchlesser\Speaking
* @author Alain Schlesser <alain.schlesser@gmail.com>
* @license MIT
* @link https://www.alainschlesser.com/
* @copyright 2017 Alain Schlesser
*/
namespace AlainSchlesser\Speaking\Assets;
use AlainSchlesser\S... | true |
24dde9f5ab23671908db7ec5a6d8b12f3aa78901 | PHP | MalronWall/OC_Fo-Back_P6 | /src/UI/Actions/Interfaces/TricksDetailsActionInterface.php | UTF-8 | 1,684 | 2.53125 | 3 | [] | no_license | <?php
declare(strict_types=1);
/**
* (c) Thibaut Tourte <thibaut.tourte17@gmail.com>
*/
namespace App\UI\Actions\Interfaces;
use App\Application\Handlers\Forms\Interfaces\CreateCommentHandlerInterface;
use App\Application\Helpers\Interfaces\PaginatorHelperInterface;
use App\UI\Responders\Interfaces\TricksDetailsR... | true |
f1917d9d0c15f969597002f8bd919ec1da6c90c4 | PHP | stefanofago73/php_dsl | /Fago/Samples/Cars/Impl/CarProducerImpl.php | UTF-8 | 2,244 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Fago\Samples\Cars\Impl;
use Fago\Samples\Cars\CarProducer;
use Fago\Samples\Cars\CarProduct;
use Fago\Samples\Cars\Process\Preset;
class CarProducerImpl implements CarProducer
{
public function Produce(): CarProduct
{
return CarProduct::Default();
}
public final static functio... | true |
c49756516893bb5137b1154ba14bc06e28bc5f2e | PHP | m2epro/magento2-extension | /Model/Exception.php | UTF-8 | 742 | 2.671875 | 3 | [] | no_license | <?php
/**
* @author M2E Pro Developers Team
* @copyright M2E LTD
* @license Commercial use is forbidden
*/
namespace Ess\M2ePro\Model;
class Exception extends \Exception
{
/** @var array */
private $additionalData;
/**
* @param string $message
* @param array $additionalData
* ... | true |
03eba4ed30363c8a602a677ee572ea51be0d1d31 | PHP | teclone/php-handler | /src/Util.php | UTF-8 | 3,378 | 3.390625 | 3 | [
"MIT"
] | permissive | <?php
/**
* provides utility methods
*/
declare(strict_types = 1);
namespace Forensic\Handler;
class Util
{
/**
* returns true if the given key is not set or if the key is set and it is truthy
*
*@param string $key - the array key
*@param array $arr - the array
*@return bool
*/
p... | true |
3cf7670cf6db6b827582ac750f14ae31e9713d95 | PHP | petersnoek/calendar | /db.php | UTF-8 | 772 | 3.078125 | 3 | [] | no_license | <?php
// maak verbinding, of stop met foutbericht
function ConnectDB() {
// connect with servername, username, password, databasename
$connection = new mysqli('localhost','root','','calendar');
if( ! $connection = mysqli_connect() ) {
die('No connection: ' . mysqli_connect_error());
}
$connection->select... | true |
e5ea8aaf02ab33adf4c9cecab4a4156abc6c587a | PHP | Mariusz11/PHP-SDK | /src/Model/ChannelList.php | UTF-8 | 5,168 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright (c) 2018 Dotpay sp. z o.o. <tech@dotpay.pl>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to us... | true |
b0aabc1ccadaad12af77d2ae245b5d8076467bf3 | PHP | sandervdwnl/ajax_product_filters | /inc/db.inc.php | UTF-8 | 589 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is the PDO database connection
*
* This file is imported in each other file, that queries the database
*/
// DB user info, adjust for your database
$user = 'root';
$pass = 'pass';
// Try and catch to connect to the database
try {
// Adjust dbname to your own database name and host when... | true |
08400796f921d9078482270c40b01a75b2901cba | PHP | nathanrmair/ancestry | /database/migrations/2016_07_28_111957_create_transfers_table.php | UTF-8 | 1,046 | 2.578125 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateTransfersTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('transfers', function (Blueprint $table) {
... | true |
775589513c8aac66a3c612256753609fc556ba8c | PHP | sunnysideup/silverstripe-cloud-flare-geoip | /src/Api/CloudFlareGeoIP.php | UTF-8 | 3,611 | 2.765625 | 3 | [] | no_license | <?php
namespace Sunnysideup\CloudFlare\Api;
use SilverStripe\Control\Controller;
use SilverStripe\Control\Director;
use SilverStripe\Core\Config\Config;
use Sunnysideup\Geoip\Geoip;
class CloudFlareGeoIP extends Geoip
{
private static $debug_email = '';
/**
* Find the country for an IP address.
*
... | true |
5e1fe96c2966eee869137fad3415981d72df975e | PHP | 13140438775/yii_loan_market | /apiapp/controllers/RepayController.php | UTF-8 | 1,805 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\controllers;
use app\services\RepayService;
use common\services\CommonMethodsService;
/**
* Class BaseController
* @package api\controllers
*/
class RepayController extends BaseController
{
// 判断订单是否满足还款的条件
public function actionRepayOrders()
{
$repay_plan_id = \Yii::$app-... | true |
8cb7a5c8d813871f149d2ad4daad226db6601b49 | PHP | 97Afolabi/Twenty-20-Vision | /prescription.php | UTF-8 | 4,798 | 2.78125 | 3 | [] | no_license | <?php include "functions.php";
echo "<div id='main'>";
//make sure a patient is selected (otherwise, return to patients' list) and retrieve info about that patient
if (isset($_REQUEST["p"])) {
$patientId = $_REQUEST["p"];
$patient_details = "SELECT patientid, p_title, p_name, p_sex, p_occupation, p_num1, p_num2, p_n... | true |
10866487366e8ffcab813540e35c18703f4d6379 | PHP | Mataniko/scummvm-web | /include/Objects/Compatibility.php | UTF-8 | 2,765 | 2.953125 | 3 | [] | no_license | <?php
namespace ScummVM\Objects;
use Erusev\Parsedown;
/**
* The Compatibility object represents a game on the compatibility charts on the
* website.
*/
class Compatibility extends DataObject
{
private $game;
private $supportLevel;
private $notes;
private $sinceVersion;
private $stablePlatforms... | true |
ad201e51cd1f5f33d83716d6b05fdc2614f9e201 | PHP | teagana/ampe-pdo | /index.php | UTF-8 | 2,306 | 3.015625 | 3 | [] | no_license | <?php
//CTRL + ~ to open terminal
//command to run on browser: php -S localhost:3000
$pdo = new PDO('sqlite:chinook.db');
$sql = 'SELECT InvoiceId, InvoiceDate, Total, customers.FirstName AS CustomerFirstName,
customers.LastName AS CustomerLastName
FROM invoices
INNER JOIN customers
ON customers.Customer... | true |
8eb15975c1ec08f2b93e8aa92ed9326628629cc6 | PHP | miradsanjaya/latihan-php | /fungsi01.php | UTF-8 | 255 | 2.609375 | 3 | [] | no_license | <?php
function cetak_ganjil(){
for($i= 0; $i<100; $i++ ){
if($i % 2 == 1){
echo"$i";
}
}
}
//pemanggulan funsi
cetak_ganjil();
//Program sederhana mendefinisikan dan memanggil fungsi tanpa
//parameter dan tanpa return value
?>
| true |
afda3fd1be7d77ac2478dde03b1a8e55012dd432 | PHP | bavix/wp-phpixie | /src/Project/ORM/Image/Image.php | UTF-8 | 1,028 | 2.625 | 3 | [] | no_license | <?php
namespace Project\ORM\Image;
use Project\App\Builder;
use Project\ORM\Entity;
use Project\ORM\EntityImage;
class Image extends Entity
{
use EntityImage;
/**
* @var $builder Builder
*/
protected $builder;
/**
* @return string
*/
public function thumbs($type)
{
... | true |
42f5a27cd648147f41d1c595d14a757f9ed1e5c7 | PHP | FreeUKGen/FreeUKGenealogy | /craft/plugins/sproutforms/controllers/SproutForms_SettingsController.php | UTF-8 | 1,236 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Craft;
class SproutForms_SettingsController extends BaseController
{
/**
* Save Settings to the Database
*
* @return mixed Return to Page
*/
public function actionSettingsIndexTemplate()
{
$settingsModel = new SproutForms_SettingsModel;
$settings = craft()->db->createCommand()
->sele... | true |
e1ead4d8e71a2544a078e2056394e307089fa89d | PHP | thomasLeMeur/00-piscine-php | /j06/ex03/Matrix.class.php | UTF-8 | 8,309 | 2.84375 | 3 | [] | no_license | <?php
require_once 'Vertex.class.php';
require_once 'Vector.class.php';
Class Matrix
{
public static $verbose = False;
const IDENTITY = 1;
const SCALE = 2;
const RX = 4;
const RY = 8;
const RZ = 16;
const TRANSLATION = 32;
const PROJECTION = 64;
private $_mat = NULL;
private $_type = 0;
public static funct... | true |
f92b4c367e66532005df13b121f1024fa7a92721 | PHP | dancras/tic-tac-toe | /test/unit/Dancras/TicTacToe/Line/EmptyLineTest.php | UTF-8 | 2,401 | 2.53125 | 3 | [] | no_license | <?php
namespace test\unit\Dancras\TicTacToe\Line;
use Dancras\Common\Exception\GuardException;
use Dancras\TicTacToe\Line\EmptyLine;
use Dancras\TicTacToe\LineFactory\WinningLineFactory;
use Dancras\TicTacToe\ValueObject\Coordinate;
use Dancras\TicTacToe\ValueObject\Symbol;
use Doubles\Doubles;
use PHPUnit_Framework... | true |
41046235edfcfa1304f1f9c8bed21add7948f94c | PHP | amalel12/TP_Assurance | /views/app/accueil.php | UTF-8 | 3,001 | 2.609375 | 3 | [] | no_license | <?php
$connexion= mysql_connect("localhost","root","");
mysql_select_db("assurance",$connexion);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<p>
<strong>Afficher clients :</strong>
<?php
require_once '../... | true |
029b1175db7ce01633150a3723c11e4a4970589b | PHP | alchemy-fr/phraseanet-bundle | /src/Component/Query/RecordQueryBuilder.php | UTF-8 | 13,972 | 2.78125 | 3 | [] | no_license | <?php
namespace Alchemy\Phraseanet\Query;
use Alchemy\Phraseanet\Predicate\PredicateBuilder;
use PhraseanetSDK\Entity\DataboxCollection;
class RecordQueryBuilder
{
const RECORD_TYPE_AUDIO = 'audio';
const RECORD_TYPE_VIDEO = 'video';
const RECORD_TYPE_IMAGE = 'image';
const RECORD_TYPE_DOCUMENT =... | true |
0394cb97613641943da1a66e9a28c00da1ef1f6a | PHP | Sneezemeat/flowchartapp | /src/Serializer/DiagramNormalizer.php | UTF-8 | 1,347 | 2.8125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Serializer;
use App\Entity\Diagram;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
/**
* Class DiagramNormalizer.
*/
class DiagramNormalizer implements NormalizerInterface
{
/**
* DiagramNormalizer constructor.
*/
public function __c... | true |
96b8f94f54418563148f1f996c972b717cb3ebeb | PHP | AdeliyaG/42lab_php | /5/index.php | UTF-8 | 782 | 2.953125 | 3 | [] | no_license | <?php
if (isset($_POST["send"])) {
$password = $_POST['password'];
$length = "/.{10,}/";
$symbols = "/(?=..*[a-z])(?=..*[A-Z])(?=.*[0-9])(?=..*[%$#_*])/";
$moreThanThree = "";
if (!(preg_match($length, $password))) {
print ("Your password contains less than 10 characters");
} else if ... | true |
143189e7602e62becfa92a71e864d8df240f6ecf | PHP | adamin1990/kebenxiaoming | /sunny/Router.php | UTF-8 | 1,657 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by sunny.
* User: sunny
* For Darling
* Date: 2016/11/24
* Time: 16:14
*/
namespace sunny;
class Router
{
//请求类
protected $request;
//整个路由路径
public static $module;
public static $controller;
public static $action;
public function __construct()
{
$this->... | true |
4473d27f5e61834c0bf2f1ed6f41cb84f0177d54 | PHP | NaraTouch/infinity-api | /src/Model/Table/PermissionsTable.php | UTF-8 | 1,643 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Model\Table;
use Cake\ORM\Table;
use Cake\Validation\Validator;
class PermissionsTable extends Table {
public function initialize(array $config) {
$this->setPrimaryKey('id');
$this->addBehavior('Timestamp');
$this->belongsTo('Roles')
->setForeignKey('role_id');
$this->belongsTo('Meth... | true |
df5d03f5ab4726e02d69681f9356a335eb694156 | PHP | vhoangbk/kimshop123 | /app/Repositories/Promotion/PromotionRepository.php | UTF-8 | 1,157 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Promotion;
use App\Helpers\Utils;
use App\Repositories\EloquentRepository;
class PromotionRepository extends EloquentRepository implements PromotionRepositoryInterface
{
/**
* get model
* @return string
*/
public function getModel()
{
return \App\Mo... | true |
b915baa8937d2c167a3599e6ed9458c6ea053014 | PHP | prashantmaskar/ethio_project | /application/controllers/Contact.php | UTF-8 | 2,150 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Contact extends CI_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* -... | true |
148aacf8391abafdf35bd879c8939ddcd8c6e531 | PHP | WalterMalone/Brume | /fog/packages/web/lib/fog/clientupdatermanager.class.php | UTF-8 | 1,860 | 2.546875 | 3 | [
"GPL-3.0-only",
"LicenseRef-scancode-free-unknown",
"MIT"
] | permissive | <?php
/**
* Client Update Manager handles the mass client update stuff.
*
* PHP version 5
*
* @category ClientUpdaterManager
* @package FOGProject
* @author Tom Elliott <tommygunsster@gmail.com>
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
* @link https://fogproject.org
*/
/**
* Client Upd... | true |
346ad02cb5815f03fa1297584087e78bd9be3cdf | PHP | azahrani/queueManage | /includes/pages/web/WebTdSelection.php | UTF-8 | 3,501 | 2.734375 | 3 | [] | no_license | <?php
/**
* Description of WebTdSelection
*
* @author sergio
*/
class WebTdSelection extends Page {
private $tdList = array();
private $redirect = null;
private $message = '';
public function canUse( $userLevel ) {
return true;
}
public function execute() {
global $gvPat... | true |
74832b5acaa3ca804abe6149325c56935063bef9 | PHP | harrysoer/cup.edu.ph | /application/controllers/Portal.php | UTF-8 | 1,802 | 2.515625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Portal extends CI_Controller{
public function __construct()
{
parent::__construct();
$this->load->library('form_validation');
$this->load->model('portal_student_model', 'student');
$this->load->model('Ion_auth_model');
$th... | true |
611ea3a7850fc6d32aca9d77483d9f688fac0b22 | PHP | nicksagona/mock-api | /app/src/Http/Event/Auth.php | UTF-8 | 669 | 2.671875 | 3 | [] | no_license | <?php
namespace Mock\Api\Http\Event;
use Pop\Application;
class Auth
{
/**
* Method to check auth
*
* @param Application $application
* @return void
*/
public static function authenticate(Application $application)
{
$authHeader = $application->router()->getController()->... | true |
06585aa72cab99bca247c137bf1b0d5b954d06db | PHP | TalnUPF/TENSOR-dialogSimulation | /annotationWeb/chatEval/evaluation.php | UTF-8 | 2,398 | 2.75 | 3 | [] | no_license | <?php
require_once("header.php");
$chatId = explode("_", $_GET['chatId'])[0];
$txtRaw = file_get_contents("resources/topicsPerUser/".$_GET['chatId']);
$pieces = explode("\n",$txtRaw);
$textList = array();
$catList = array();
foreach ($pieces as $msg) {
$pieceLine = explode("\t",$msg);
$txt = $pieceLine[0... | true |
f8679c1e94ed333705500874d61d22ca96474157 | PHP | deepika537/myproject | /importcsv.php | UTF-8 | 14,787 | 2.625 | 3 | [] | no_license | <?php
/*
* iTech Empires: How to Import Data from CSV File to MySQL Using PHP Script
* Version: 1.0.0
* Page: Import.PHP
*/
ini_set("auto_detect_line_endings", true);
// Database Connection
ob_start();
session_start();
require_once 'dbconnect.php';
if( !isset($_SESSION['user']) ) {
header("Location: login.php");... | true |
8b92387562498ba568676de1e27edd6083108c6d | PHP | SimeonRaykov/Software-Technologies | /PHP Basic Syntax - Exercises/OddNumbersFromNto1.php | UTF-8 | 629 | 3.296875 | 3 | [
"MIT"
] | permissive | <html>
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Odd Numbers From N to 1</title>
</head>
<body>
<form>
<... | true |
9e83e32e7193c24ed30648df8dd1ca2ded23d70e | PHP | Smartel1/strikecom | /app/Http/Resources/ClientVersion/ClientVersionResource.php | UTF-8 | 1,109 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Resources\ClientVersion;
use App\Entities\ClientVersion;
use Illuminate\Http\Resources\Json\Resource;
class ClientVersionResource extends Resource
{
/**
* Структура ответа на запрос версии клиентского приложения
*
* @param \Illuminate\Http\Request $request
* @return a... | true |
6df6d5380d5447e27fe619a8a3334b76e5b04942 | PHP | rkrx/php-ioc-contract | /src/MethodInvoker.php | UTF-8 | 1,666 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
namespace Ioc;
use Ioc\Exceptions\DefinitionNotFoundException;
use Ioc\Exceptions\MissingParameterException;
interface MethodInvoker {
/**
* Invokes the callable $callable with the arguments $arguments. If arguments were missing in $arguments, the
* method-invoker tries to fill the missing arguments by its... | true |
1c4035fb673d7f7e6583ccd2706057e6db364e0c | PHP | FuelRats/RatShip | /src/Services/RoyalMail/Dto/CreateOrderResponse.php | UTF-8 | 501 | 2.546875 | 3 | [] | no_license | <?php
namespace FuelRats\Prestashop\RoyalMailClickAndDrop\Services\RoyalMail\Dto;
class CreateOrderResponse
{
private $rawArray;
private $orderIdentifier;
public function __construct($rawArray, $orderIdentifier)
{
$this->rawArray = $rawArray;
$this->orderIdentifier = $orderIdentifier;... | true |
9981fef157bcf6d298b2b55470bbc0998d258cf1 | PHP | pablo-puga/NightFramework | /src/Night/Component/Bootstrap/Exception/InvalidEnvironment.php | UTF-8 | 718 | 2.859375 | 3 | [] | no_license | <?php
namespace Night\Component\Bootstrap\Exception;
use Exception;
use InvalidArgumentException;
use Night\Component\Bootstrap\Bootstrap;
class InvalidEnvironment extends InvalidArgumentException
{
public function __construct($message, $code, Exception $previous = null)
{
parent::__construct($messa... | true |
5c69418675a87f96c1eac5d7596625f1ad6f16f2 | PHP | fbsoftware/alberi-1.4.2 | /classi/DB_sel_table.php | UTF-8 | 1,470 | 2.640625 | 3 | [] | no_license | <?php
/*** Fausto Bresciani fbsoftware@libero.it www.fbsoftware.altervista.org
* package FB open template
* versione 2.0
* copyright Copyright (C) 2012 - 2013 FB. All rights reserved.
* license GNU/GPL
* Si concede licenza gratuita e NON si risponde di qualsiasi cosa dovuta
* all'uso anche improp... | true |
deed9fa3571214c933925b1e47e1cb727d207024 | PHP | Sirius-tcc/Etec-Help-api | /classes/custom/UploadImage.php | UTF-8 | 2,591 | 2.96875 | 3 | [] | no_license | <?php
class UploadImage {
private $id;
private $file;
private $filePath;
private $fileName;
private $fileTmpName;
private $fileSize;
private $fileError;
private $fileType;
private $con;
private $fileExt;
private ... | true |
ef6f920f9b0b4db85d414626d110b4316fb70c8b | PHP | lux-net/lux-server | /Data/Temporary/Development/Cache/Code/Flow_Object_Classes/Neos_Flow_ResourceManagement_Storage_WritableFileSystemStorage.php | UTF-8 | 11,803 | 2.796875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Neos\Flow\ResourceManagement\Storage;
/*
* This file is part of the Neos.Flow package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
* This package is Open Source Software. For the full copyright and license
* information, please view the LICENSE file which was distributed with this
... | true |
668358c715578dd266541294f2161339450436e8 | PHP | jskvara/NetCMS | /app/AdminModule/presenters/ContactPresenter.php | UTF-8 | 1,504 | 2.625 | 3 | [] | no_license | <?php
final class Admin_ContactPresenter extends Admin_BasePresenter {
public function __construct() {
parent::__construct();
}
public function renderDefault() {
}
protected function createComponentContactForm() {
$config = Environment::getConfig('admin');
$form = new AppForm();
$form->setRendere... | true |
7fe82908a81a22427695c0bc5d74ac42e1265f79 | PHP | recca0120/Payum | /src/Payum/Core/Model/GatewayConfig.php | UTF-8 | 1,139 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Payum\Core\Model;
class GatewayConfig implements GatewayConfigInterface
{
/**
* @var string
*/
protected $factoryName;
/**
* @var string
*/
protected $gatewayName;
/**
* @var array
*/
protected $config;
public function __construct()
{
... | true |
ad9ad9e580218faf9384f65102f3c4f03affdb40 | PHP | alpho07/Sure | /app/Http/ViewComposers/TermsComposer.php | UTF-8 | 390 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\ViewComposers;
use App\Repositories\AdminMenuRepository;
use Illuminate\View\View;
class TermsComposer
{
protected $menu;
public function __construct(AdminMenuRepository $menu)
{
$this->menu = $menu;
}
public function compose(View $view)
{
$terms= $t... | true |
31e3390ac8307f1856a3e2b6794ee4fd02206c97 | PHP | yoshifumi0521/cannes | /plugins/sfRedisPlugin/test/unit/.svn/text-base/sfRedisZsetPagerTest.php.svn-base | UTF-8 | 3,058 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* sfRedis tests.
*/
include dirname(__FILE__).'/../bootstrap/unit.php';
$t = new lime_test(26, new lime_output_color());
// setup
sfConfig::set('sf_logging_enabled', false);
// ->initialize()
$t->diag('->initialize()');
$kname = 'sfredistestpager';
$client = sfRedis::getClient();
$client->del($kname)... | true |
709e52d652c6cd1e9e835cbe713e4a894c676bcb | PHP | ekpliska/dev.management-company | /modules/api/v1/models/request/SendAnswers.php | UTF-8 | 1,746 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\api\v1\models\request;
use app\models\RequestAnswers;
use app\models\Requests;
use app\models\StatusRequest;
/**
* Отправка ответов
*/
class SendAnswers extends RequestAnswers {
/*
* Отправка оценки
*/
public static function send($data_answers) {
... | true |
0bfbd05ae656d4591ad4efc5fe9dcd44797d36b9 | PHP | evandrogdn/laravel | /app/Http/Controllers/RegiaoController.php | UTF-8 | 1,943 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Support\Facades\DB;
class RegiaoController extends BaseController
{
public function formulario()
{
return view("regiao.formulario");
}
/**
* @return arra... | true |
d48eba6af821cb81b5ec83542486a59d2714d4f3 | PHP | ssamoylov/remote-edu | /private/app/Controller/Assignment.php | UTF-8 | 2,748 | 2.546875 | 3 | [] | no_license | <?php
class Controller_Assignment extends Mvc_Controller_Abstract {
public function action_student_curator() {
$users = Model_User::create();
$request = $this->getRequest ();
$method = 'post';
if (empty($request->$method)) {
$this->set('teache... | true |
2dca426fa091914733e96ba5668161b978c52b23 | PHP | RiskyFeryansyahP/percetakan | /app/model/BarangMasukModel.php | UTF-8 | 1,197 | 2.875 | 3 | [] | no_license | <?php
class BarangMasukModel
{
private $db;
public function __construct()
{
$this->db = new Database;
}
public function getAllBarangMasuk()
{
$this->db->query("SELECT barang.nama_barang, supplier.nama_supplier, barang_masuk.stock, barang_masuk.tgl_masuk
... | true |
963e7423cef550e89806a1cc08d6b9ebd5770acb | PHP | Smoren/mushroom-framework | /vendor/MushroomFramework/InputOutput/Response.php | UTF-8 | 2,235 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace MushroomFramework\InputOutput;
use \Exception;
use \Closure;
class Response {
protected static $globalData = array();
protected $callback;
protected $data=array();
function __construct(Closure $callback) {
$this->callback = $callback;
foreach(static::$globalData as $name => $val)... | true |
706973b7ed7ae53a4bdc3497198281eaac3c9402 | PHP | phamlinh0208/linh | /protected/models/Staff.php | UTF-8 | 5,497 | 2.515625 | 3 | [] | no_license | <?php
/**
* This is the model class for table "staff".
*
* The followings are the available columns in table 'staff':
* @property integer $staff_id
* @property string $staff_code
* @property string $staff_name
* @property string $staff_level
* @property string $staff_member
* @property string $email
* @prope... | true |
e0b926fe6bea15eb07b7d1a1515cc2cac44b88be | PHP | nishimura/phpstan-namespace-dependency-sample | /src/Domain/Product/ExtraProduct.php | UTF-8 | 387 | 2.703125 | 3 | [] | no_license | <?php
namespace App\Domain\Product;
class ExtraProduct
{
/** @var ProductId */
private $id;
/** @var InternalAttributes */
private $attributes;
public function __construct(ProductId $id, InternalAttributes $attrs)
{
$this->id = $id;
$this->attributes = $attrs;
}
publi... | true |
d03f902c122d51839901b252c79b0445fc8b445d | PHP | mandroulakis/projects | /login.php | UTF-8 | 4,134 | 3.015625 | 3 | [] | no_license | <?php
// Initialize the session
session_start();
if(isset($_SESSION["loggedin"]) && $_SESSION["loggedin"] === true){
if($_SESSION["type"] === 'admin'){
header("location:./admin/admin_page.php");
}
else{
header("location: welcome.php");
}
exit;
}
require_once "./databa... | true |
17ca78588252f65de91ba197f07e21d6d624943b | PHP | elplaza/mypsr | /src/MyPSR/Tests/Arrays/MultiLineUnitTest.inc | UTF-8 | 1,311 | 2.8125 | 3 | [] | no_license | <?php
$a = array(5//ciao
);
$a = array(
6);
$a = array( 7,
// comment,, ,
);
$a = array( 9,
/* comment , ,,,*/
);
$a = array( 2,
// comment
// ,
#comment
/*comment */
);
$a = array(substr("array", 2)
);
$a = array(
#comment ,
array(3,4)
#comment
);
$a = array(
1, 2
);
$a = array(
1, a... | true |
2dcb6590288cdef7e635e18e5f2eb69e12d51cca | PHP | lyangner/test | /task9-2.php | UTF-8 | 387 | 3.3125 | 3 | [] | no_license | <?php
/* Task 9 - 2 by Helen Lianhner */
function aaa($znach,$kolvo)
{
for ($i=0;$i<=$kolvo-1;$i++)
{
$arr[$i]="$znach";
}
pre($arr);
}
function pre ($arr){
echo '<pre>';
print_r($arr);
echo '</pre>';
}
$kolvo=3; /*размерность массива*/
$znach= "2"; /*значение, которым надо заполнить массив*/
... | true |
a60f9517dcde400ed8e4da0ed7e23305ac85fc80 | PHP | evilmtv/JoelNoobo | /newtable.php | UTF-8 | 2,553 | 3.078125 | 3 | [] | no_license | <HTML>
<head>
<Title>New ariving product form!</title>
</head>
<body>
<h2>New ariving product form.</h2>
<form method="get">
<table>
<tr><td>Product code: (Optional) </td><td> <input type ="number" name="PRODUCT_ID"> </td></tr>
<tr><td>Product name: </td><td> <input type ="text" name="PRODUCT... | true |
41f5fb29e4b9f82d5c5dcb6032f3df78f6bcc86d | PHP | WangCong522/dfy | /ys/util.php | UTF-8 | 5,051 | 2.546875 | 3 | [] | no_license | <?php
error_reporting(0);
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
date_default_timezone_set('Asia/Shanghai');
$db_host = "localhost";
$db_user = "kk";
$db_pass = "a123456";
$db_name = "kk";
$dbh = mysql_connect($db_host,$db_user,$db_pass) or die ('连接失败 : ' . mysql... | true |
7cfb603ae550d16a93755b9e939ce54f43b55802 | PHP | selirah/welfare-server | /app/Http/Controllers/UtilityController.php | UTF-8 | 2,127 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\UtilityModel;
use Illuminate\Http\Request;
class UtilityController extends Controller
{
private $_utilityModel;
public function __construct(UtilityModel $utilityModel)
{
$this->_utilityModel = $utilityModel;
}
// @route GET api/v1/ut... | true |
9b4d4be95133b01cc48086b117f0f14ee24be0b1 | PHP | basketofsoftkittens/abb-zc-homework | /main.php | UTF-8 | 2,218 | 2.578125 | 3 | [] | no_license | <?php
require_once "common.php";
use Psr\Http\Message\ServerRequestInterface as Request;
$cache = new MyMemcache("db.cache");
$Router->add("get", "/", function (Request $request) use ($cache) {
echo "Nothing to see here. Move along sir.";
});
$Router->add("all", "/api/set", function (Request $request) use ($cache... | true |
00bf3ced0df200d1a410f77886c1979d9f1a1586 | PHP | EunsookShin/Full-Stack-Web-Dev-Course_HTML-JS-PHP_08.2019 | /final_project/signout.php | UTF-8 | 670 | 2.703125 | 3 | [] | no_license | <?php
session_start();
// If user is logged in, don't let them see this page. Kick them out. Otherwise, continue with the validation/authentication stuff
if( isset($_SESSION["logged_in"]) && $_SESSION["logged_in"] == true ) {
// Redirect the user to the home page
$_SESSION["logged_in"] = false;
... | true |
c7921aa7d2522bba9fc15ef0e72e04b38e83c5dc | PHP | Jessica-Caraballo/practica-ajax-datatables | /app/php/borrar_doctor.php | UTF-8 | 1,913 | 2.984375 | 3 | [] | no_license | <?php
/* Informacion de la base de datos */
include("mysql.php" );
/* Funcion para recoger errores */
function fatal_error($sErrorMessage = '') {
header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error');
die($sErrorMessage);
}
/* Conexion MYSQL */
if (!$gaSql['link'] = mysql_pconnect($gaSql['server... | true |
17ed78ae213c753937f9f5621ef8e7091c07d32d | PHP | kalashnikov/synologylyric | /tests/FujirouMusixMatchTest.php | UTF-8 | 1,350 | 2.5625 | 3 | [] | no_license | <?php
declare (strict_types = 1);
require_once 'LyricsTestCase.php';
final class FujirouMusixMatchTest extends LyricsTestCase
{
protected $module = 'FujirouMusixMatch';
public function testSearch()
{
$artist = 'live forever';
$title = 'oasis';
$answer = array(
'artist'... | true |
6532bdbeb97429cf3fcfa411d11ed4988bdc58dd | PHP | claytongit/PHP8-CRUD-MVC-OO | /controller/ControllerPesquisa.php | UTF-8 | 1,125 | 2.640625 | 3 | [] | no_license | <?php
require '../service/ServiceLivro.php';
class ControllerPesquisa{
private $pesquisa;
public function __construct($id)
{
$this->pesquisa = new ServiceLivro();
$this->search($id);
}
private function search($id)
{
$linha = $this->pesquisa->getLivroId($id);
if($linha > 1)
... | true |
837b32785f2540f5d6cca1360fd80a2b1011e5d9 | PHP | QuiterHe/project | /DP/ObserverDP.php | UTF-8 | 1,566 | 3.203125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: hezhang
* Date: 16-9-8
* Time: 下午5:59
* brief: 观察者模式
*/
interface IObserver
{
function onChanged( $sender, $args );
}
interface IObservable
{
function addObserver( $observer );
}
class UserList implements IObservable {
private $_observer = [];
public fu... | true |
76bd44c88898c4e2a4ed9b995640593429a93ace | PHP | vallauri-ict/tpsi-playground-Pelissero-Luca | /PHP/Es 002 - maggiore fra tre numeri/pagina2.php | UTF-8 | 1,418 | 2.734375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="it">
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title> PHP </title>
<script> src="https://code.jqeury.com/jquery-3.6.0.js"
integrity="sha256-H+K7U5CnX"
crossorigin="anonymus"</script>
<link rel="stylesheet" href="index.cs... | true |
139ae5f12a439d0cd3a05be48de8d538cb48effb | PHP | Momo-Vi/Projet2-v2 | /modeles/reply_comment.php | UTF-8 | 916 | 2.671875 | 3 | [] | no_license | <?php
require_once('modele.php');
class ReplyComment extends Modele
{
public function getReplyCommentsFromIDComm($id_comment)
{
$sql = "SELECT *
FROM reply_comment C
JOIN user U ON C.id_user = U.id
WHERE id_comment = $id_comment
ORDER ... | true |
9f67e0242137a095b81d3ae84d5ce34498daf751 | PHP | Respect/ValidationLocale | /Rules/CountrySubdivision/KpCountrySubdivision.php | UTF-8 | 783 | 2.546875 | 3 | [
"MIT",
"CC-BY-3.0"
] | permissive | <?php
namespace Respect\Validation\Rules\CountrySubdivision;
use Respect\Validation\Rules\AbstractSearcher;
/**
* Validator for North Korea country subdivision.
*
* ISO 3166-1 alpha-2: KP
*
* @link http://www.geonames.org/KP/administrative-division-north-korea.html
*/
class KpCountrySubdivision extends Abstrac... | true |
363fa9c85853aa878030a71ccf958203b2d39576 | PHP | dzmann/ObligatorioPHP | /controllers/AlumnosController.php | UTF-8 | 1,185 | 2.765625 | 3 | [] | no_license | <?php
require_once("../database/DataBaseOperations.php");
class AlumnosController
{
public function getAlumnos()
{
$dbOperation = new DataBaseOperations();
$alumnos = $dbOperation->select("alumnos", "STATUS=1");
return $alumnos;
}
public function getAlumno($id){
$dbOp... | true |
0827c77dc981e19d55d75e3727f86ddd1b6ea79f | PHP | Enzoic/enzoic-php-client | /src/Hashing.php | UTF-8 | 11,325 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace Enzoic;
class Hashing
{
public static function md5($toHash)
{
return md5($toHash);
}
public static function md5Binary($toHash)
{
return md5($toHash, TRUE);
}
public static function sha1($toHash)
{
return sha1($toHash);
}
public static ... | true |
a7292e2dbef13c42ad6a8baf2205c1053838407f | PHP | sviiiter/oop-practice-description | /patterns/Structural/DecoratorCase.php | UTF-8 | 5,319 | 3.09375 | 3 | [] | no_license | <?php
//
// простой пример оборачивания(декорирования) класса для построения запроса sql (без валидации исходных данных)
// Декораторы - фильтры сортировки/условия и т.д.
interface iDecor
{
public function getProvider(): Provider;
}
class Provider implements iDecor// decorated
{
/** @var array... | true |
2fefa2cd35f76c53ac954423fc02f391f9de3ad0 | PHP | jetfirephp/jetbuilder | /src/Blocks/AdminBlock/Requests/ProfessionRequest.php | UTF-8 | 588 | 2.71875 | 3 | [] | no_license | <?php
namespace Jet\AdminBlock\Requests;
use JetFire\Framework\System\Request;
class ProfessionRequest extends Request
{
public static $messages = [
'required' => 'Tous les champs sont requis',
'alnum' => 'Le nom doit contenir uniquement des lettres ou des chiffres',
'noWhite... | true |
b28a66deb9181a56ae35abf56a051c5a7bfa02b2 | PHP | argentumua/ArgentumFeedBundle | /Renderer/RssRenderer.php | UTF-8 | 1,062 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Argentum\FeedBundle\Renderer;
use Argentum\FeedBundle\Feed\FeedInterface;
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
/**
* RssRenderer
*
* RSS 2.0 Specification: http://cyber.law.harvard.edu/rss/rss.html
*
* @author Vadim Borodavko <javer@argentum.ua>
* @copyright Argen... | true |
d725ce898b5908e16f75a08df7a8343e7ec4eb96 | PHP | EugeneErg/TelegramBotApiClient | /src/ValueObject/Dice.php | UTF-8 | 291 | 2.546875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace EugeneErg\TelegramBotApiClient\ValueObject;
class Dice
{
public const EMOJI_DICE = '🎲';
public const EMOJI_DARTS = '🎯';
public const EMOJI_BALL = '🏀';
public function __construct(string $emoji, int $value)
{
}
}
| true |
1b9f765b93b2ffc979dd80739ced581b98a9b7a1 | PHP | ivkeapp/cinema | /app/Views/movies/search_result.php | UTF-8 | 449 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
if($page > 1):?>
<button class="btn btn-primary" onclick="search(<?=$page-1?>)">
Pervious
</button>
<?php endif; ?>
<button class="btn btn-primary" disabled>
Page
</button>
<button class="btn btn-primary" onclick="search(<?=$page+1?>)">
... | true |
02c9fb2ac239e4d6f96d2551f0ad81b54df25003 | PHP | contributte/rabbitmq | /tests/Mocks/Helper/RabbitMQMessageHelper.php | UTF-8 | 2,753 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Contributte\RabbitMQ\Tests\Mocks\Helper;
final class RabbitMQMessageHelper
{
/**
* @var RabbitMQMessageHelper
*/
private static $self;
/**
* @var string[][]
*/
private $queueMessages = [];
/**
* @var array
*/
private $config;
private function __constru... | true |
861e4bd96ecb9830d326ccb95dfa77e24951489b | PHP | tienpham2009/php-Datastruc-Reverse_Stack | /index.php | UTF-8 | 341 | 3.1875 | 3 | [] | no_license | <?php
include_once "Stack.php";
$array = [1,2,3,4,5,6,7];
$newArray = [];
$stack = new Stack();
$arrayStack = $stack->show();
for ($i = 0 ; $i < count($array) ; $i++ ){
$stack->push($array[$i]);
}
for ($i = 0 ; $i < count($array) ; $i++){
$element = $stack->pop();
array_push($newArray, $element);
}
var_... | true |
3c9ad7199e9c9f15af8e19e4122bbecaf08d55cd | PHP | ahasofta/Mon-Super-Site | /src/Controller/UserController.php | UTF-8 | 2,405 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\User;
use App\Form\UserType;
use App\Repository\UserRepository;
use Symfony\Component\HttpFoundation\Request;
use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symf... | true |
2f2055df09c67b1b394a6928383eca8d9d8cf764 | PHP | satriajidam/jajanan-pasar-id | /includes/admin/pages/class-jpid-admin-page-customer-edit.php | UTF-8 | 1,688 | 2.609375 | 3 | [] | no_license | <?php
/**
* Handle creation of customer edit page.
*
* @since 1.0.0
* @package jajanan-pasar-id/includes/admin/pages
* @author Agastyo Satriaji Idam <play.satriajidam@gmail.com>
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;
class JPID_Admin_Page_Customer_Edit {
/**
* @sinc... | true |
35ae43052ff7eabb39ee207a20bfc19f0b23d7c0 | PHP | tjgazel/scs-game | /app/Observers/ManufacturerObserver.php | UTF-8 | 768 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Observers;
use App\Models\Manufacturer;
use App\Models\ManufacturerWeek;
/**
* Class ManufacturerObserver
* @package App\Observers
*/
class ManufacturerObserver
{
/**
* Listen to the Manufacturer created event.
*
* @param Manufacturer $manufacturer
*/
public function created(Manufac... | true |
4cdb263bb7f9ee60f2ce490edcc724977d3c2ede | PHP | Fryday80/SRzA | /module/Media/src/Media/Model/Tables/FileTable.php | UTF-8 | 3,135 | 2.515625 | 3 | [] | no_license | <?php
namespace Media\Model\Tables;
use Zend\Db\TableGateway\AbstractTableGateway;
use Zend\Db\Adapter\Adapter;
use Zend\Db\ResultSet\ResultSet;
class FileTable extends AbstractTableGateway
{
public $table = 'files';
public function __construct(Adapter $dbAdapter) {
$this->adapter = $dbAdapter;
... | true |
cc473ab99f2d58659d4fb4a8141ac74185e54b9e | PHP | nawrasg/tvguide | /src/Domora/TvGuide/Service/Serializer.php | UTF-8 | 2,325 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Domora\TvGuide\Service;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use JMS\Serializer\SerializationContext;
use Domora\TvGuide\Response\Error;
class Serializer
{
const FORMAT_JSON = 'json';
const FORMAT_XML = 'xml';
private $contentTypes... | true |
fd162a923d4c0e5d5e80d5f85bfe9547771a6cd7 | PHP | AlexDateDev/Factory-PHP | /Url/GetQueryString.php | WINDOWS-1250 | 413 | 2.90625 | 3 | [] | no_license |
<?php
/**
* Devielve el query string de la url
*
* @param string_url $sUrl
* @return string
*
* @version 3.1a => 25-03-2009 => Obtener la posicin de '?'
* @version 3.0 => 19-06-2008
*/
function get_query_string( $sUrl )
{
$ret = strpos( $sUrl, '?' );
if( false === $ret )
{
... | true |
fe4f5c6501542c5e95bb115fd46b51be90e6d257 | PHP | cleomarcamposwebthomaz/asa | /app/View/Components/Slideshow.php | UTF-8 | 666 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\View\Components;
use App\Models\Banner;
use Illuminate\View\Component;
class Slideshow extends Component
{
var $banner;
/**
* Create a new component instance.
*
* @return void
*/
public function __construct(Banner $banner)
{
$this->banner = $banner;
... | true |
91c8d23103c6fc72a958029bf8174f73c75d3f1f | PHP | kelvinninja1/PHP-Classified-ads | /OPAS/application/controllers/Comments.php | UTF-8 | 937 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Comments extends CI_Controller {
public function create($post_id)
{
$slug = $this->input->post('p_slug');
$data['post'] = $this->Post_model->get_posts($slug);
$this->form_validation->set_rules('message', 'Message', 'trim|required|min... | true |
01d7146bbbc4678a0635d7f07dfa511292649b69 | PHP | nekuno/brain | /src/Model/Parser/LinkedinParser.php | UTF-8 | 4,948 | 2.671875 | 3 | [] | no_license | <?php
namespace Model\Parser;
use Psr\Log\LoggerInterface;
use Symfony\Component\DomCrawler\Crawler;
class LinkedinParser extends BaseParser
{
public function parse($profileUrl, LoggerInterface $logger = null)
{
//$this->client->setHeader('cookie', 'bcookie="...');
//$proxy = '124.232.165.98:... | true |
a977a673fb9e84f48d924c44e57be8cd8b355d06 | PHP | dnfltkxkd123/F_Laravel | /php/180717-문제1~2.php | UTF-8 | 942 | 3.28125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<?php
try{
$db = new PDO("mysql:host=localhost;dbname=php2","root","");
$db ->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
$db -> exec("set names utf8");
/*
$table = "create table test... | true |
aef141ead7d060fe8e2d26d48792a805aa5bff1a | PHP | SebastienLecerf/API_FMP | /fmi-test/API Examples/listLayouts.php | UTF-8 | 2,244 | 2.8125 | 3 | [] | no_license | <html>
<head>
<!-- declare charset as UTF-8 -->
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<?php
/**
* listLayouts.php
*
* Copyright © 2005-2006, FileMaker, Inc. All rights reserved.
* NOTE: Use of this source code is subject to the terms of the FileMaker
* Software License... | true |
05627556f8f8b7453c5067161c4c3b7663c8d616 | PHP | PESPESPES/troyworks | /AS3/examples/SaveImage/PostReceiver/functions.php | UTF-8 | 3,273 | 3.1875 | 3 | [] | no_license | <?php
function errorMessage($msg)
{
header("HTTP/1.1 500 $msg");
exit;
}
function getParam($key)
{
static $params = null;
if ($params === null) {
$query = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?') + 1);
$params = array();
parse_str($query, $params);
... | true |
807711615a8f581672c03c215628dfba9ddd3224 | PHP | DSD-BookEasy/BookEasy | /models/Parameter.php | UTF-8 | 1,619 | 3.015625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "Parameter".
* It stores parameters of the system that can be changed by the customer
*
* @property string $id
* @property string $value
* @property string $name
* @property string $description
* @property string $last_update
*/
cl... | true |
41a101a46474e76436626d6ea16cc82282b99911 | PHP | dionyziz/zino | /phoenix/elements/developer/memcache/view.php | UTF-8 | 1,370 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
class ElementDeveloperMemcacheView extends Element {
public function Render( tText $key ) {
global $mc;
global $user;
if ( !$user->HasPermission( PERMISSION_MEMCACHE_VIEW ) ) {
?>Access denied<?php
return;
}
... | true |
e46ecd918da669693b03b5179f6b4b29ebf4e306 | PHP | fxaps/XMPie-WSDL-Wrapper | /src/XMPie/uProduce/v_9_2_1/OtherServices/GeneralUtils_SSP/GetHeliconSupportedVersionResponse.php | UTF-8 | 1,064 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace XMPieWsdlClient\XMPie\uProduce\v_9_2_1\OtherServices\GeneralUtils_SSP;
class GetHeliconSupportedVersionResponse
{
/**
* @var string $GetHeliconSupportedVersionResult
*/
protected $GetHeliconSupportedVersionResult = null;
/**
* @param string $GetHeliconSupportedVersionResul... | true |
7bff5c4b970d1fc1b41b4956d34499200c66e876 | PHP | SergiRoge/ServerSide | /Chat/Chat.php | UTF-8 | 324 | 2.640625 | 3 | [] | no_license | <?php
class Chat extends SQLObject
{
public $UserID;
public $OtherUserID;
public $UserEmail;
public $UserUserName;
public $OtherUserEmail;
public $OtherUserUserName;
function __construct($pUserID, $pOtherUserID)
{
$this->UserID = $pUserID;
$this->OtherUserID = $pOtherUserID;
}
}
... | true |
dcec3ecdc340c24032272ade32f49de087d2f6e1 | PHP | GlobalSiteDev/IABS-IT-Academy | /Game/gameover.php | UTF-8 | 380 | 2.65625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Game</title>
</head>
<body>
<div>
<?php
session_start();
if ($_SESSION['comp'] < 1) {
echo "YOU WIN!";
}
elseif ($_SESSION['player'] < 1) {
echo "YOU LOOSE!";
}
session_unset();
?>
<a href="game.php">Попроб... | true |
feff963d25dabe66a48171aed08513be94ceaba0 | PHP | LubaRo/test-box-storage | /Box/AbstractBox.php | UTF-8 | 751 | 3.171875 | 3 | [] | no_license | <?php
namespace Box;
/**
* Box storage abstract class
*/
abstract class AbstractBox implements BoxInterface
{
use Singleton;
protected $storage = [];
/**
* Get value by key from box
*
* @param mixed $key
* @return mixed
*/
public function getData($key)
{
retur... | true |
322d242c896e043dc5ee003c8657b023d998de5b | PHP | ricardokenji/madeira-madeira | /src/Classes/Auth.php | UTF-8 | 754 | 2.921875 | 3 | [] | no_license | <?php
namespace MadeiraMadeira\Classes;
class Auth{
protected $user = null;
public function __construct()
{
if(!empty($_SESSION['user'])){
$this->user = $_SESSION['user'];
}
}
public function user()
{
return $this->user;
}
public ... | true |
2c7c82d7e361e97c966e217ea66262b7eacb9ad2 | PHP | booklet/utils | /tests/ObjectUntilsTest.php | UTF-8 | 2,415 | 2.515625 | 3 | [] | no_license | <?php
class ObjectUntilsTest extends \CustomPHPUnitTestCase
{
public function objectForTest()
{
$obj = new stdClass();
$obj->attrib1 = 'value1';
$obj->attrib2 = 'value2';
return $obj;
}
public function testMysqlParameters()
{
$obj = $this->objectForTest();
... | true |