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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
5bbc7ddec3f46960a2f84a7c2456a06939f9839b | PHP | hakuna18/php-projekt | /src/AppBundle/Repository/LoanRepository.php | UTF-8 | 1,884 | 2.828125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
/**
* LoanRepository.
*/
namespace AppBundle\Repository;
use Pagerfanta\Pagerfanta;
use Pagerfanta\Adapter\ArrayAdapter;
use AppBundle\Entity\Loan;
/**
* LoanRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class LoanRepository extends \Doctr... | true |
bb5f697403d9867df3a0df07729bc99056acf86a | PHP | leonardfischer/faktura | /application/classes/Widgets/FullYear.php | UTF-8 | 1,415 | 2.53125 | 3 | [] | no_license | <?php defined('SYSPATH') or die('No direct script access.');
/**
* Widget class "Full Year"
*
* @category Widgets
* @package Faktura
* @author Leonard Fischer <post@leonardfischer.de>
* @copyrights 2014 Leonard Fischer
* @version 1.0
* @since 1.2
*/
class Widgets_FullYear extends Widget... | true |
ad45002bf4f35b511f4d15cc88d6f5ee37c0ec4e | PHP | mattkatz/6d | /app/resources/TablesResource.php | UTF-8 | 1,760 | 2.546875 | 3 | [] | no_license | <?php
class_exists('AppResource') || require('AppResource.php');
class_exists('DataStorage') || require('lib/DataStorage/DataStorage.php');
class_exists('UserResource') || require('UserResource.php');
class TablesResource extends AppResource{
public function __construct($attributes = null){
if(! AuthController::isAu... | true |
87615927d9394d0dc36e032df7e4dbb70d75f736 | PHP | Shashika6/Musicfy | /application/models/ContactDetails.php | UTF-8 | 1,353 | 3.015625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class ContactDetails {
public $contactID;
public $firstName;
public $lastName;
public $email;
public $contactNo;
public $tag;
function __construct($contactID, $firstName, $lastName, $email, $contactNo,$tag) {
$this->contactID = $contactID;
$this->firstName = ... | true |
4786b0e09319275a67dbac5393bab31ee7aeb69d | PHP | MarkGorelov/diploma | /controllers/AdminWorkExperienceController.php | UTF-8 | 3,523 | 2.59375 | 3 | [] | no_license | <?php
class AdminWorkExperienceController extends UserBase
{
public function actionIndex()
{
self::checkAdmin();
$listOfWorkExperiences = AdminWorkExperience::getListOfWorkExperiences();
require_once(ROOT . '/views/admin_work_experience/index.php');
return true;
}
pub... | true |
fb843b4973c8236b47d5ab25e2c60d6ccf83c69f | PHP | chargeover/chargeover_php | /docs/example_login_user.php | UTF-8 | 660 | 2.734375 | 3 | [] | no_license | <?php
/**
* Example of automatically logging a user into the customer portal
*
*
*/
header('Content-Type: text/plain');
require '../ChargeOverAPI.php';
require 'config.php';
$API = new ChargeOverAPI($url, $authmode, $username, $password);
// This is the user/contact you want to log in
$user_i... | true |
4f9cb3506eb3cf650433d4382076c8bd736cbf6a | PHP | leendogh/MovieCrudApplication | /controllers/addmoviecontroller.php | UTF-8 | 820 | 2.671875 | 3 | [] | no_license | <?php
require_once "../model/config.php";
require_once "../boostrap/plu.php";
if($_SERVER["REQUEST_METHOD"] == "POST") {
// Cleaining/Sanitizing the data
$title = mysqli_real_escape_string($mysqli,$_POST['title']);
$duration = mysqli_real_escape_string($mysqli,$_POST['duration']);
$rating = mysqli_re... | true |
19c8eb7b7959f655160fdeb952e25c7f63b89674 | PHP | includeDaniel/curso-PHP | /db.php | UTF-8 | 546 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
$dsn ="mysql:dbname=conta-bancaria;host=localhost";
$dbuser ="root";
$dbpass = "";
try {
$pdo = new PDO($dsn, $dbuser, $dbpass);
$sql ="SELECT * FROM contas";
$sql = $pdo -> query($sql);
if($sql -> rowCount() > 0 ) {
foreach($sql-> fetchALL() as $contas ) {
... | true |
39aa8b8dd9cfb46f71a233a1010fc8e14f8cfb41 | PHP | RPG111/dbatu-intranet-2018-19 | /resources/getResources.php | UTF-8 | 1,059 | 2.59375 | 3 | [] | no_license | <?php
ob_start();
$q = intval($_REQUEST['q']);
echo $q;
include 'connect.php';
$query = "SELECT v_name,v_url,v_thumb FROM v_playlist WHERE album_name = '$q'";
$retval = mysqli_query($conn,$query);
if( mysqli_num_rows($retval)==0 )
{echo "<strong>0</strong> resources in this album.";}
else i... | true |
c093261a342984ccd5d4a6358f20a5706740b910 | PHP | barkalovys/MerkleTree | /tests/Tree/MerkleTreeTest.php | UTF-8 | 405 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Merkle\Tree;
use PHPUnit\Framework\TestCase;
/**
* Class MerkleTreeTest
* @package Merkle\Tree
*/
class MerkleTreeTest extends TestCase
{
public function testTreeDepthIsCorrect()
{
$data = range(1,9);
$tree = new MerkleTree($data, function(string $val){
return ... | true |
75e3dbcaa8bfd4e280325043e685bd178fae77a7 | PHP | Magein/render-data-ext | /library/render/UploadRender.php | UTF-8 | 533 | 2.546875 | 3 | [] | no_license | <?php
namespace Magein\renderDataExt\library\render;
use Magein\renderData\library\render\FormRender;
class UploadRender extends FormRender
{
/**
* 上传插件的容器
* @var string
*/
protected $container = '';
/**
* 设置上传插件的容器
* @param $container
* @return $this
*/
public fun... | true |
6d7776d771a81ceb990ea3fac9158d6c7f032f04 | PHP | nguyentienlong/convertTitleCase-2-slug-case | /convertString.php | UTF-8 | 1,551 | 3.625 | 4 | [] | no_license | <?php
/**
* Convert from Title Case to Slug String.
*
* For eg:
*
* array (
* 'firstKey' => 'Value of key',
* 'secondKey' => 'Value of key',
* 'firstKey' => array(
* 'subFirstKey' =>'Value of key',
* 'subSecondKey' => array (
* 'subSubFirstKey' = > ' Value of key ',
* ),... | true |
f37d595ef88e60f923d22c2b6d59cad8cb3432b5 | PHP | willianxz/cursos | /ajaxComJqueryLivro/cap_01/requisicao-php.php | UTF-8 | 794 | 2.5625 | 3 | [] | no_license | <?php
$gmtDate = gmdate("D, d M Y H:i:s");
header("Expires: {$gmtDate} GMT");
header("Last-Modified: {$gmtDate} GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Content-Type: text/html; charset=utf-8");
if(isset($_GET["insere"])) {
sleep(4); /* Nota imp... | true |
60ab612c00634abf980b8bf404efe953e63bb7b1 | PHP | candrasetiadi/nvjvnjsdnnvdvdw | /app/Http/Controllers/Auth/AuthController.php | UTF-8 | 4,914 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Auth;
use App\User;
use App\Customer;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ThrottlesLogins;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
use Illuminate\Http\Request;
use Auth;
use Mail;
class AuthController extends ... | true |
2ba3d3e33f1a0cbd5a666f5f4d07c00ca6d7405f | PHP | Muss124/nn | /function.php | UTF-8 | 304 | 3 | 3 | [] | no_license | <?php
function fun($num){
return pow(cosh($num), 2);
}
$result = array();
for ($i = -10; $i <= 10; $i += 0.1){
//array_push($result, array($i, pow($i,2), pow($i,4), fun($i)));
array_push($result, array($i,1, fun($i)));
}
$result = json_encode($result);
file_put_contents("data",$result);
?> | true |
84cc134e1b7535bbfe90a2482418365075cd7000 | PHP | canelasa/sibcyclineClone | /listing.php | UTF-8 | 962 | 2.640625 | 3 | [] | no_license | <?php
include_once("pdo.php");
if( isset( $_GET["homeid"] ) == false ){
header("Location:http://www.marcc.club/realestate");
exit();
}
$homeID = $_GET["homeid"];
$query = "
SELECT
homeid,
address,
city,
state,
images
FROM user_listings
WHERE
homeid = ?
";
// If the query failed
... | true |
3f8660b625a324641a3194332daad91abb8974d6 | PHP | aduardito/feed_updates | /includes/Connection.php | UTF-8 | 1,601 | 3.203125 | 3 | [] | no_license | <?php
class Connection
{
// this data suppose to be store in the database, but I want to make thing easy.
// other security function to consider will be to encode the password in javascript to send it
// through the website, and keep it more safety than send it in plain text
... | true |
2dbfb09fed81f74525308a440f8d14685e21e7ca | PHP | SvyaznoyMarket/front | /lib/EnterMobile/Model/Form/User/EditProfileForm.php | UTF-8 | 1,846 | 2.703125 | 3 | [] | no_license | <?php
namespace EnterMobile\Model\Form\User;
class EditProfileForm {
/** @var string */
public $url;
/** @var string */
public $redirectUrl;
/** @var string */
public $firstName;
/** @var string */
public $lastName;
/** @var string */
public $middleName;
/** @var string */
... | true |
5f745754f7c2615e878a9d772b56462ce7c30f26 | PHP | krionari/WCS_retour_vers_le_futur | /TimeTravel.php | UTF-8 | 1,336 | 3.234375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Krionari
* Date: 10/05/2019
* Time: 16:05
*/
class TimeTravel
{
private $start;
private $end;
public function __construct(DateTime $start, DateTime $end)
{
$this->start = $start;
$this->end = $end;
}
public function getTravelInfo()... | true |
b6114c3dccabb8631c2fcc059836a1c831749a50 | PHP | snegprog/tasks-manager | /web/api/src/Exceptions/AppException.php | UTF-8 | 889 | 2.703125 | 3 | [] | no_license | <?php
/**
* Исключение выбрасываемое приложением в ситуациях когда не определено иное исключение приложения
* Так же является базовым для других исключений приложения.
* PHP version 7.4.1.
*
* @category Application
*
* @author sanerrus <username@example.com>
* @license MIT http://www.example.com/License.txt
*... | true |
0bee7750dc3ac4872af74f891c27d7419cdbcfde | PHP | twinkleroot/change_pay_module | /Repositories/Alimtalk/LegacyUserRepository.php | UTF-8 | 963 | 2.625 | 3 | [] | no_license | <?php
namespace App\Repositories\Alimtalk;
use App\Common\Util;
use App\Common\LogLevel;
use App\Models\Alimtalk\LegacyUserModel;
use App\Repositories\Alimtalk\Interfaces\LegacyUserRepositoryInterface;
use App\Repositories\Alimtalk\BaseRepository;
class LegacyUserRepository extends BaseRepository implements LegacyUse... | true |
a49cf830c87e4cc79be5a5739a818cb7a25cd24d | PHP | ostark/DrupalConsole | /src/Command/Router/DebugCommand.php | UTF-8 | 3,263 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @file
* Contains \Drupal\Console\Command\RouterDebugCommand.
*/
namespace Drupal\Console\Command\Router;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use Symfony\Component\Console\Helper\Tab... | true |
6be9a3e3c27fe2dd0838e5e61c24d3a0a0f05305 | PHP | TalAdivi/localhost | /tirgolLast/index.php | UTF-8 | 1,583 | 2.6875 | 3 | [] | no_license | <?php
include 'db.php';
include 'config.php';
session_start();
if (!empty($_POST['loginMail'])) {
//echo 'Form sent ';
$query = "SELECT * FROM tbl_users_202 WHERE email='" . $_POST["loginMail"]
. "' and password ='"
. $_POST["loginPass"]
. "'";
//echo $query;
$result = m... | true |
3043e3a98be795c9f21759c31f4875b8f9c64560 | PHP | Tomzdon1/laravel | /app/apiModels/internal/v2/Mappers/PolicyHolderMapper.php | UTF-8 | 1,511 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\apiModels\internal\v2\Mappers;
use App\apiModels\internal\v2\Model\PolicyHolder;
class PolicyHolderMapper
{
public static function fromObjects(array $policyHolders)
{
$mappedPolicyHolders = [];
foreach ($policyHolders as $policyHolder) {
$mappedPolicyHolders[] = self... | true |
367398acbbfc9a8704db28b171b0f0aedb56b94e | PHP | digital-xs/divers | /Vehicle fleet parking management/src/Domain/fleetService.php | UTF-8 | 1,327 | 3.15625 | 3 | [] | no_license | <?php
namespace Domain;
/**
* Ce service permet de gérer les flottes
*
*/
class Fleet
{
public function __construct()
{
}
/**
* Retourne le contenu d'une flotte
*
* @param int $id
* @return array
*/
public function getFleetInfosByCar($numberplate, $id)
{
r... | true |
405ff374cf3c5021a2bc845551439e641025cabc | PHP | wendy-rose/organization | /application/activity/model/Activity.php | UTF-8 | 3,473 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\activity\model;
use think\Db;
use think\Model;
use app\activity\util\Activity as ActivityUtil;
class Activity extends Model
{
public static function tableName()
{
return 'activity';
}
public static function addActivity($fields)
{
return Db::name(self::tableNam... | true |
d6cca7e2b805a447a422460d2c095e2bb6d2c9c5 | PHP | syhol/boosterpack | /src/Contracts/Resizable/ShrinkableStart.php | UTF-8 | 572 | 2.6875 | 3 | [] | no_license | <?php
namespace Boosterpack\Contracts\Resizable;
use Boosterpack\Contracts\Data\Maybe;
use Boosterpack\Contracts\Data\Vector;
interface ShrinkableStart
{
/**
* @return Maybe[]|static[] [Maybe, static]
*/
public function shift();
/**
* @return Maybe
*/
public function head();
... | true |
bf8867450f3d63d03bd519e99b20f8cf4a88571a | PHP | dbierer/php-i-jan-2019 | /homework/others/DefaultWorkspace/php1/src/ModControlStructures/logic_if.php | UTF-8 | 98 | 3.28125 | 3 | [] | no_license | <?php
$foo = 10;
$bar = 5;
if ( $foo > $bar ) {
echo "Value Foo is greater than Value Bar";
} | true |
6d9a7505c827c9ddbcd6a08f3bdd0193bbbcf190 | PHP | fracz/git-exercises | /backend/hook/verifications/ChangeBranchHistory.php | UTF-8 | 905 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace GitExercises\hook\verifications;
use GitExercises\hook\AbstractVerification;
use GitExercises\hook\utils\GitUtils;
class ChangeBranchHistory extends AbstractVerification
{
protected function doVerify()
{
$commits = $this->ensureCommitsCount(3);
$this->ensure(GitUtils::getCommit... | true |
13dc8cb99daa9b8998635bc66e01c8fe9ad54c39 | PHP | Gorka9898/Evaluacion-1-Bloque-1 | /Ej7.php | UTF-8 | 1,112 | 3.671875 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<meta charset="UTF-8">
<body>
<?php
class NumAsta1 {
private $num;
public function __construct($num) {
$this->num = $num;
}
public function asta1() {
$result=$this->num ;
do {
if ($this... | true |
1e148f11c9cb0161b9f7ba58d4f00e9e1a0d1aff | PHP | jrfadrigalan/Julian_Friends | /Z_Misc/Send_V2.php | UTF-8 | 2,242 | 2.765625 | 3 | [] | no_license | <?php
$db_host = "localhost";
$db_username = "root";
$db_passwd = "2464";
$db_name = "Data";
$db= @mysqli_connect($db_host, $db_username, $db_passwd) or die ("Could not connect!\n");
echo "Connection established.\n";
//These values are from submitted inputs HTU21D
$ID=$_GET[ID];
$Time=$_GET[Timestamp];
$Celsius=$_GET... | true |
36a02492d6384b487102e7dd44eaf162f1c4d2e1 | PHP | kalaGN/shardcachetool | /src/Tool/CacheInfo.php | UTF-8 | 6,339 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by infobird
* User: infobird
* Date: 2019/01/25/
* Time: 10:26:58
* Version: v1.0.0.5
*
*
* 分库分表缓存相关
*/
namespace Infobird\Tool;
class CacheInfo
{
private $_instance_define_key;
private $_db_shard_key;
private $_db_shard_switch_key;
private $_table_shard_key... | true |
88740ac57101b2e532fc5d538485707661209d07 | PHP | pradeeppalaniswamy/GAMESTOP | /loginmodule.php | UTF-8 | 1,774 | 2.515625 | 3 | [] | no_license | <?php
/*session_start();
$email=$_POST['email'];
$pass1=$_POST['pass'];
echo "username ".$email." "."password is".$pass1 ."value";
$host="localhost";
$user="root";
$pass="Asdf@1234";
$db="game";
$con= mysql_connect($host,$user,$pass)or die ("could not connect ");
$dbc=@mysqli_connect($host,$user,$pass,$db)or die ("c... | true |
b57ef849d260c0fcc877a0c93aa1db0f54643abe | PHP | abi30/FE21-CR10-abdulla | /actions/a_update.php | UTF-8 | 3,113 | 2.625 | 3 | [] | no_license | <?php
require_once 'db_connect.php';
require_once 'file_upload.php';
if ($_POST) {
$uploadError = '';
$id = $_POST['id'];
$picture = file_upload($_FILES['picture']);//file_upload() called
$title = htmlspecialchars($_POST['title']);
$media_type = $_POST['media_type'];
$pub_date = $_POST['p... | true |
b3fef5c292205342e8064d278b1e8a971d70a693 | PHP | WLU-WEB/Test_Repository | /alc_online/login/_processes/alternate_format_request/_clean_variables_before_dB.php | UTF-8 | 1,265 | 2.65625 | 3 | [] | no_license | <?PHP
function clean_input_2($data)
{
$data = trim($data);
//$data = stripslashes($data);
$data = addslashes($data);
$data = htmlspecialchars($data);
$data = strtolower($data);
$data = ucwords($data);
return $data;
}
$first_name_fF = clean_input_2($first_name_fF);
$last_name_fF = clean_input_2($last_name_fF)... | true |
e6f7a85d008d8cd7e0c55314fb1f33864005425e | PHP | Przemyslaw-Wrobel/react-workshop | /elevators/src/ClientAware.php | UTF-8 | 828 | 2.9375 | 3 | [] | no_license | <?php
namespace Elevators;
trait ClientAware
{
/** @var Client[] */
private array $clients = [];
public function addClient(Client $client): void
{
$this->clients[] = $client;
}
/**
* @return Client[]
*/
public function getClients(): array
{
return $this->cli... | true |
19600277a158dea2ee1fbffae02b028fd0b6f0f9 | PHP | Carlos-Daniel2002/curso-backend-bitlab | /M01T04/10.php | UTF-8 | 1,277 | 3.25 | 3 | [] | no_license | <?php
$edad1=0;
$edad2=0;
$edad3=0;
$edad4=0;
$edad5=0;
$edad6=0;
$edad7=0;
$edad8=0;
$edad9=0;
$edad10=0;
$ages = [10,10,10,11,11,12,12,12,12,13,14,14,15,16,16,17,17,17,18,18,19,19,19,19,19];
for ($i=0; $i < count($ages); $i++) {
if ($ages[$i]==10)
$edad1++;
else if ($ages[$i]==11)
$edad2++;
if ... | true |
1fcbe93e59116e4e87e58e965e35fca97431de9c | PHP | roysreejan/WT_MID_SUM21 | /lab-4/Form.php | UTF-8 | 10,031 | 2.609375 | 3 | [] | no_license | <?php
$Name="";
$err_Name="";
$Username="";
$err_Username="";
$Password="";
$err_Password="";
$ConfirmPassword="";
$err_ConfirmPassword="";
$Email="";
$err_Email="";
$Phone="";
$err_Phone="";
$PhoneCode="";
$Address="";
$err_Address="";
$City="";
$State="";
$err_CityState="";
$Posta... | true |
95d7c80dea9a2d74e3c5e2133929db3ddd28932f | PHP | artur-gajewski/xi-filelib | /library/Xi/Filelib/Storage/Storage.php | UTF-8 | 1,676 | 2.84375 | 3 | [] | no_license | <?php
/**
* This file is part of the Xi Filelib package.
*
* For copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Xi\Filelib\Storage;
use Xi\Filelib\File\File;
use Xi\Filelib\FilelibException;
/**
* Filelib Storage interface
*
* @auth... | true |
dd6659d13c6b0b4c151466b79d29160bc721d5cd | PHP | dvsa/mot-cpms-shared-reports | /src/SharedReport/Service/ReportService.php | UTF-8 | 4,103 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace SharedReport\Service;
use SharedReport\Adapter\ReportServiceAdapterInterface;
use SharedReport\Adapter\Request\ReportSpecification;
use SharedReport\Adapter\Response\ReportStatus as ReportStatusResponse;
use SharedReport\Entity\AvailableReport;
use SharedReport\Entity\ReportStatus;
use SharedReport\Se... | true |
8b3999e22ab6cf787854e7c018418b8bfc1a280d | PHP | Saroj010/Project-2 | /OOP/Dog.php | UTF-8 | 246 | 3.671875 | 4 | [] | no_license | <?php
class Dog{
public $name, $color;
}
$dog1 = new Dog;
$dog1->name = "Tyson";
$dog1->color = "Black";
$dog2 = new Dog;
$dog2->name = "Bhotey";
$dog2->color = "White";
$Dogs=[$dog1, $dog2];
foreach ($Dogs as $dog ) {
echo $dog->name;
}
| true |
3ec7102fcb91c70ffddefd9a479a32264ddb40fd | PHP | WPSHOPLA/Pureformgolf_WP | /x/woocommerce/single-product/tabs/tabs.php | UTF-8 | 1,744 | 2.53125 | 3 | [] | no_license | <?php
// =============================================================================
// WOOCOMMERCE/SINGLE-PRODUCT/TABS/TABS.PHP
// -----------------------------------------------------------------------------
// @version 2.4.0
// =============================================================================
if ( ! ... | true |
4c7829d686248653deee3f4d2d6da4f8e239312a | PHP | WillZWL/shop | /application/libraries/ServicePSR4/ColourService.php | UTF-8 | 1,801 | 2.5625 | 3 | [] | no_license | <?php
namespace ESG\Panther\Service;
use ESG\Panther\Dao\ColourDao;
use ESG\Panther\Dao\ColourExtendDao;
class ColourService extends BaseService
{
private $colourExtendDao;
public function __construct()
{
parent::__construct();
// $this->setDao(new ColourDao);
// $this->setColourE... | true |
74f1c95fddc20f6a40af05f0c3bdcdac44aa659c | PHP | petrepatrasc/blizzard-starcraft-api | /Service/Parsing/BasicProfileParsingService.php | UTF-8 | 779 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace petrepatrasc\BlizzardApiBundle\Service\Parsing;
use petrepatrasc\BlizzardApiBundle\Entity\Player\Basic;
class BasicProfileParsingService implements ParsingInterfaceStandalone
{
/**
* Extract a basic profile information structure from an array.
*
* @param array $params
* @ret... | true |
cd6dc545f177f58bf7c2bd94ffeb9499c24899bf | PHP | ASiRoS/learning-potato | /src/Framework/Router/RouterInterface.php | UTF-8 | 246 | 2.96875 | 3 | [] | no_license | <?php
namespace Framework\Router;
interface RouterInterface
{
public function add(string $url, array $methods, string $action);
public function get(string $url, string $action);
public function post(string $url, string $action);
} | true |
a4a2361f0a9c7a29bfb3cdbc4b95895eca905273 | PHP | DatabaseAsAService/dfe-console | /lib/Services/Jobs/ManifestJob.php | UTF-8 | 2,329 | 2.734375 | 3 | [] | no_license | <?php namespace DreamFactory\Enterprise\Services\Jobs;
use DreamFactory\Enterprise\Common\Jobs\BaseEnterpriseJob;
class ManifestJob extends BaseEnterpriseJob
{
//******************************************************************************
//* Constants
//*************************************************... | true |
a1dc96dbad46d59fc13edd6b135b8a771efef991 | PHP | zohana/something- | /index.php | UTF-8 | 1,171 | 2.515625 | 3 | [] | no_license | <?php
require_once 'includes/db.php';
//var_dump($db);
//->exec() allows us to perform SQL and not expect results
//->query()allows us to perform SQL and expect results
$results = $db->query('SELECT id,name,longitude,latitude
FROM museums
ORDER BY name ASC'
);
include 'includes... | true |
d7049be97a49562f0c0405399e4fe84fbe8b4caf | PHP | vivek-goyal/kryptos | /application/services/subscriptions/dto/Subscription.php | UTF-8 | 794 | 2.921875 | 3 | [] | no_license | <?php
use Application_Service_Subscription_DTO_Customer as Customer;
use Application_Service_Subscription_DTO_SubscriptionPlan as SubscriptionPlan;
class Application_Service_Subscription_DTO_Subscription
{
/** @var SubscriptionPlan */
protected $plan;
/** @var Customer */
protected $customer;
/*... | true |
3fa7f5297c323f12d884ef65d60bc1ac8e0fb389 | PHP | engrmukul/delllliverydot | /app/Models/Shop.php | UTF-8 | 1,524 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class Attribute
* @package App\Models
*/
class Shop extends Model
{
/**
* @var string
*/
protected $table = 'shops';
public $timestamps = false;
protected $appends = ['... | true |
ae5dab0b36183a239ebe50c618e9e736a3a3ea84 | PHP | butterfly-project/site-examples | /form/version_1_2/src/example_27/index.php | UTF-8 | 990 | 2.84375 | 3 | [] | no_license | <?php
namespace Example;
use Butterfly\Component\Form\ListConstraint;
use Butterfly\Component\Form\Validation\Type;
$rootDir = realpath(__DIR__ . '/../..');
require_once $rootDir . '/vendor/autoload.php';
// Инициализация
$form = ListConstraint::create()
->declareAsScalar()
->addValidator(new Type(Type:... | true |
f355abd16c155bfde01a3d8f08d5f5483733faf8 | PHP | kjbecker/leatherstrap | /components/lsCol.class.php | UTF-8 | 262 | 2.53125 | 3 | [] | no_license | <?php
class lsCol extends lsComponentBase{
public $colWidth;
public function __construct($size = 'xs', $width = 12){
$this->htmlNodeBase = 'div';
$this->colWidth = $width;
$this->addClass('col-' . $size . '-' . $width);
}
}
?>
| true |
7ebb6edb8f3b014bd7dec0734078a6bbd629473e | PHP | TiborUdvari/IdeaBox | /zend/module/User/src/User/Model/UserTable.php | ISO-8859-1 | 2,283 | 2.6875 | 3 | [] | no_license | <?php
namespace User\Model;
use Zend\Db\TableGateway\TableGateway;
use Zend\Session\Container;
class UserTable
{
protected $tableGateway;
public function __construct(TableGateway $tableGateway)
{
$this->tableGateway = $tableGateway;
}
public function fetchAll()
{
$resultSet ... | true |
e1dd1e7a7507fd0733e7e36adcbb6d29dcf65efb | PHP | nikocevicstefan/ampcms | /app/User.php | UTF-8 | 1,136 | 2.546875 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use App\Traits\UploadTrait;
class User extends Authenticatable
{
use Notifiable;
use UploadTrait;
/**
* The attributes that are mass a... | true |
0729bd1fc366d2162d8367929a362d87686c16bd | PHP | Wiuver-Ribeiro/Curso_PHP-B7Web | /Modulos/Metodo Construtor/index.php | UTF-8 | 610 | 4.28125 | 4 | [] | no_license | <?php
class Post {
public int $id;
public int $likes = 0;
public array $comments = [];
public string $author;
public function __construct($like, $authorr) {
$this->likes = $like;
$this->author = $authorr;
}
public function addLike($like) {
echo "ABC";
$this->lik... | true |
e99f24608c8fd3e2520365b16d4f20fb90001915 | PHP | Corneille9/momoapi-php | /lib/models/Payer.php | UTF-8 | 473 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace MomoApi\models;
class Payer implements \JsonSerializable
{
public $partyIdType;
public $partyId;
public function __construct($partyIdType, $partyId)
{
$this->partyIdType = $partyIdType;
$this->partyId = $partyId;
}
public function jsonSerialize()
{
... | true |
4f909e43972692646b0fd122033fbc8901f028d2 | PHP | feliperj97/dadosCamara | /busca.php | UTF-8 | 987 | 2.703125 | 3 | [] | no_license | <?php
/* Script que busca informações de dados abertos
*/
/** Câmara dos Deputados */
$param = "92346";
$url = "https://dadosabertos.camara.leg.br/api/v2/deputados/$param";
$client = curl_init($url);
curl_setopt($client, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($client);
$result = j... | true |
3f75903a704e2e4da120cc82a72e04715182757a | PHP | eiwuert/Myrepo | /condor_www_root/ecash_commercial.real/tests/ECash/VendorAPI/Actions/QualifyTest.php | UTF-8 | 3,174 | 2.609375 | 3 | [] | no_license | <?php
// Qualify.php doesn't get included until after setUp, and LAC needs to
// exist before we mock it (or PHPUnit will declare a dummy class)
require_once ECASH_COMMON_DIR.'/ecash_api/loan_amount_calculator.class.php';
/**
* @author Andrew Minerd <andrew.minerd@sellingsource.com>
*/
class ECash_VendorAPI_Actions... | true |
0d8b5e997e9e88e1a5a73cf7553a47f7806b6fd8 | PHP | whjun/linux | /default/fastphp/fastphp/Views.php | UTF-8 | 704 | 2.65625 | 3 | [] | no_license | <?php
/**
*
*/
class Views
{
public $_config = array();
private $_className;
private $_actionName;
public function __construct($className,$actionName)
{
$this->_className = $className;
$this->_actionName = $actionName;
}
//传值
public function assign($key,$value)
{
$res = $this->_config... | true |
ed5771faab6bb0399f2edd8a6ff5af9428849214 | PHP | idokraicer/DevBlog | /includes/search.inc.php | UTF-8 | 913 | 2.53125 | 3 | [] | no_license | <?php include 'getPosts.inc.php';
include 'dbh.inc.php';
function getSearchResults(){
$Posts = postsArray();
$List = Array();
$query = "";
if (!isset($_GET['query']) || $_GET['query'] == ""){
return $Posts;
} else {
$query = $_GET['query'];
}
$keywords = explode(" "... | true |
c2fee0a5528a5486281e394ff11cebbea42c1c08 | PHP | bunq/sdk_php | /src/Model/Generated/Endpoint/CertificatePinned.php | UTF-8 | 6,063 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace bunq\Model\Generated\Endpoint;
use bunq\Context\ApiContext;
use bunq\Http\ApiClient;
use bunq\Http\BunqResponse;
use bunq\Model\Core\BunqModel;
use bunq\Model\Generated\Object\Certificate;
/**
* This endpoint allow you to pin the certificate chains to your account.
* These certificate chains are use... | true |
62a77937678bfcb1355fe30032de24bce6da6402 | PHP | keradus/phive | /src/shared/file/SymlinkPharActivator.php | UTF-8 | 865 | 2.890625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace PharIo\Phive;
use PharIo\FileSystem\Filename;
class SymlinkPharActivator implements PharActivator {
/**
* @param Filename $pharLocation
* @param Filename $linkDestination
*
* @return Filename
*/
public function activate(Filename $pharLocation, Filename $linkDestinatio... | true |
3461d3ce601ebbd7fba9117aa9481f9d67041f9c | PHP | faisalilhami27/classroom | /app/Http/Requests/TaskRequest.php | UTF-8 | 1,546 | 2.75 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class TaskRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the validation rules that app... | true |
18348956ebc0a2f4618985341764c179c1b6df80 | PHP | youzan/yz-cloud-boot | /src/Log/HostnameProcessor.php | UTF-8 | 521 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace YouzanCloudBoot\Log;
use Monolog\Processor\ProcessorInterface;
class HostnameProcessor implements ProcessorInterface
{
private static $host;
private static $ip;
public function __construct()
{
self::$host = (string) gethostname();
self::$ip = (string) gethostbyname(sel... | true |
7ee3062ce590ef1d4988b989d66b90b6dd2792a8 | PHP | travisdesell/citizen_science_grid | /daemons/match_images.php | UTF-8 | 12,501 | 2.546875 | 3 | [] | no_license | #!/usr/bin/env php
<?php
$cwd[__FILE__] = __FILE__;
if (is_link($cwd[__FILE__])) $cwd[__FILE__] = readlink($cwd[__FILE__]);
$cwd[__FILE__] = dirname(dirname($cwd[__FILE__]));
require_once($cwd[__FILE__] . "/my_query.php");
require_once($cwd[__FILE__] . "/display_badges.php");
require_once($cwd[__FILE__] . "/user.php... | true |
50c9f5dc1809ccab239969a62754c6f9a83d4742 | PHP | JuanmaGlez/CV_Project | /model/m_perfil_consultor.php | UTF-8 | 1,318 | 2.9375 | 3 | [] | no_license | <?php
require_once('Usuarios.php');
class Filtrarlos {
private $tipo_edad;
private $tipo_provincia;
private $desde;
private $hasta;
private $provincia;
private $formacion;
private $profesion;
public $objetoUsuario;
public function __construct() {
$this->objetoUsuario = new Usuarios();
... | true |
4e736a05c3ae6b3e58629ec4a3b43f290fb4e632 | PHP | achrefouali/octa | /src/DataFixtures/ORM/LoadRoleHierarchy.php | UTF-8 | 1,682 | 2.609375 | 3 | [] | no_license | <?php
// src/Application/UserBundle/DataFixtures/ORM/LoadRoleHierarchy.php
namespace App\DataFixtures\ORM;
use App\DataFixtures\AbstractDataFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use App\Entity\Role;
use Symfony\Component\DependencyInjecti... | true |
d54e78540d704f96fc7b0371027e46b5386d05c8 | PHP | lam0re/freelancer | /public/modules/dealer.php | UTF-8 | 1,896 | 2.78125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class dealer
{
public function Body()
{
try
{
$database = mysql_connect( DB_HOST, DB_USER, DB_PASS );
mysql_select_db( DB_NAME, $database );
if( mysql_errno() )
{
throw new Exception( 'Syntax error' );
}
$sqlWhere = "WHERE public = '1'";
if( Head::singleton()->loadModule( 'user' ... | true |
f0bec029f12f3b36cee535785facefc11880b40a | PHP | alamgirweb11/OOP-PHP | /Method_Chaining/static_method_chaining.php | UTF-8 | 558 | 3.734375 | 4 | [] | no_license | <?php
class Math{
public static $val;
public static function init($var){
static::$val=$var;
return new static;
}
public static function add($var){
static::$val+=$var;
return new static; // this line add for static method
}
public static function sub($var){
static::$val-=... | true |
46f8023fcb8a496bfd1e3c55eaef84a93e92cd66 | PHP | vladanpetrovic87/Kodovi-sa-IT-Bootcamp-a | /15_FUNKCIJE/index.php | UTF-8 | 13,412 | 2.96875 | 3 | [] | no_license | <?php
echo "<h3>Funkcije</h3>";
function mojaFunkcija() {
echo "<p>Zdravo svete!</p>";
}
mojaFunkcija();
mojaFunkcija();
mojaFunkcija();
echo "Funkcija Vam poručuje: ";
mojaFunkcija();
// Funcija sa prosledjenim argumentom
echo "<hr>";
function ispisiTek... | true |
0a1f9983822ebbdda52b03caace0163be00477ea | PHP | jamaicv/ftp_project | /app/Http/Controllers/AdminController.php | UTF-8 | 8,957 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use App\User;
class AdminController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
... | true |
cea790ef9523008d9b26b61557e2d8b6a61a22ad | PHP | frne/QualityPimpBundle | /Checks/CheckInterface.php | UTF-8 | 738 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* @project frne/quality-pimp-bundle
* @license MIT
* @author Frank Neff
*/
namespace Frne\Bundle\QualityPimpBundle\Checks;
use Psr\Log\LoggerAwareInterface;
interface CheckInterface extends LoggerAwareInterface
{
/**
* Returns a short description of the check
*
* @return string
... | true |
ce8a405939b699dc2f18172ff44b2074e8fceac2 | PHP | agarwalvipin/testproject | /gittest/listen_sms.php | UTF-8 | 756 | 2.609375 | 3 | [] | no_license | <?php require_once("includes/connection.php"); ?>
<?php require_once("includes/functions.php"); ?>
<?php
//$timeStamp = NULL;
$device = mysql_prep($_GET['device']);
$phone = mysql_prep($_GET['phone']);
$text = mysql_prep($_GET['text']);
$smscenter = mysql_prep($_GET['smscenter']);
?>
<?php
$query = "INSERT INTO ... | true |
ecd0b535d82854e985ac10725f4141bb2c5468ba | PHP | Mazzu90/project_works | /Config/Core/Query/Query.php | UTF-8 | 4,249 | 2.6875 | 3 | [] | no_license | <?
namespace Config\Core\Query;
use Config\ComponentsMap;
use Config\Utils\Connection;
use Config\Utils\Util;
class Query
{
private static function getSelectReadyFields($obj)
{
$formatted_fields = array();
if (isset($obj->show_felds)):
foreach ($obj->show_fields as $prop):
... | true |
e61c2eb3691923fae877023f5aeff16154c77808 | PHP | dushanEranga/cab-rental-Console | /cus-reg.php | UTF-8 | 7,195 | 2.78125 | 3 | [] | no_license | <?php
ob_start();
session_start();
require_once 'dbconnect.php';
// if session is not set this will redirect to login page
if (!isset($_SESSION['user']))
{
header("Location: index.php");
exit;
}
// select loggedin users detail
$res = mysql_query("SELECT * FROM users WHERE userId=" . $_SESSION['user']);
$userRow... | true |
cbcf39307076a70775693b69d17be8e654d04d16 | PHP | KraJacob/gestcourrier | /Nouveau dossier/application/models/UserModel.php | UTF-8 | 8,801 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive |
<?php
class UserModel extends CI_model
{
function __construct()
{
parent::__construct();
}
// vérifer si l'utlisateur existe déjà
public function verifUser($email){
$table = 'user';
return $this->db->selec... | true |
f4bd3e0183e8f2338229e96f7b2d734ee57d60d6 | PHP | lcgwhat/DesignPatterns | /app/Creational/AbstractFactory/Html/Text.php | UTF-8 | 426 | 3.125 | 3 | [] | no_license | <?php
namespace DesignPatterns\Creational\AbstractFactory\Html;
use DesignPatterns\Creational\AbstractFactory\Text as BaseText;
/**
* Text 类
*
* 该类是以 HTML 渲染的具体文本组件类
*/
class Text extends BaseText
{
/**
* HTML 格式输出的文本
*
* @return string
*/
public function render()
{
retu... | true |
c154d0fad7fb853394f4080d1693e61f8da96ff8 | PHP | ajshort/silverstripe-changelog | /code/form/ChangelogTransformation.php | UTF-8 | 5,344 | 2.609375 | 3 | [] | no_license | <?php
/**
* Transforms an existing FieldSet to add changelog support.
*
* @package silverstripe-changelog
*/
class ChangelogTransformation extends FormTransformation {
/**
* @var DataObject
*/
protected $record;
/**
* @var ChangelogConfig
*/
protected $config;
/**
* @var array
*/
protected $fie... | true |
2c7153491164127283fccdf55ad5fa4640f205d9 | PHP | timur-gilauri/aem-game | /app/Models/Locations/Location.php | UTF-8 | 741 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Models\Locations;
use App\Classes\Stapler\StaplerTrait;
use Codesleeve\Stapler\ORM\StaplerableInterface;
use Illuminate\Database\Eloquent\Model;
class Location extends Model implements StaplerableInterface
{
use StaplerTrait;
protected $fillable = ['image'];
public const TYPES = [
... | true |
7539674d2d2589bda174ffeba5326f1c1996c342 | PHP | rrdial/bing-ads-sdk-v9 | /src/BingAds/CampaignManagement/GetTargetsByCampaignIds2Response.php | UTF-8 | 602 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace BingAds\CampaignManagement;
/**
* Retrieves detailed information about the Target2 objects that are associated with the specified campaigns.
*
* @link http://msdn.microsoft.com/en-us/library/dn743778(v=msads.90).aspx GetTargetsByCampaignIds2 Response Object
*
* @uses Target2
* @used-by BingAdsCa... | true |
e94df5089b23d358aebb91e80ec662f026ed27ad | PHP | catchup-forks/PackageEws365 | /src/EnumType/EwsXrmGraphRelationshipEntityType.php | UTF-8 | 1,475 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Ews\EnumType;
/**
* This class stands for XrmGraphRelationshipEntityType EnumType
* @package Ews
* @subpackage Enumerations
* @author WsdlToPhp <contact@wsdltophp.com>
*/
class EwsXrmGraphRelationshipEntityType
{
/**
* Constant for value 'XrmDeal'
* @return string 'XrmDeal'
*/
... | true |
1c37d929deb53111947ac9a8489f0bf1b036e28e | PHP | dawendiguo/html | /PHP/session/sessionRegister.php | UTF-8 | 606 | 2.90625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>session register</title>
</head>
<body>
<?php
session_start();
$userName="dawen";
$userSex="male";
$userAge="60";
$userAddr="chengdu,china";
$action=false;
$_SESSION["username"]=$userName;
$_SESSION["userage"]... | true |
79e8398778a73944e7879eee63cdf80a0b81a1db | PHP | TrueXakeP/automagistre | /src/Manufacturer/View/ManufacturerFormatter.php | UTF-8 | 879 | 2.578125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Manufacturer\View;
use App\Manufacturer\Entity\ManufacturerId;
use App\Shared\Doctrine\Registry;
use App\Shared\Identifier\Identifier;
use App\Shared\Identifier\IdentifierFormatter;
use App\Shared\Identifier\IdentifierFormatterInterface;
final class ManufacturerFormatter... | true |
cf7ec465ca9fff2ca524424977fc314b71cc7b5e | PHP | dyunas/reach-php | /app/Http/Controllers/Auth/RegisterController.php | UTF-8 | 3,871 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Auth;
use App\User;
use App\Customer;
use Twilio\Rest\Client;
use App\EmailVerification;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Hash;
use App\Providers\RouteServiceProvider;
use Illuminate\Support\Facades\Validator;
use Ill... | true |
a58957c3e9ad48d1387b9b371ea23c74403736d9 | PHP | Jhushaw/MusicCataloger | /app/Http/Services/DataServices/PlaylistDataService.php | UTF-8 | 8,076 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
// Jacob Hushaw, Lincoln Magugo
// CST - 323, Professor Mark Reha
// This is our own work.
namespace App\Http\Services\DataServices;
use Exception;
use PDO;
use App\Http\Models\Playlist;
use App\Http\Models\User;
use App\Http\Models\Song;
use App\Http\Services\Utility\MyLogger;
class PlaylistDataService
{
... | true |
c3e81088419e9146f2f0075b4c6a24aa8fb23462 | PHP | qin500/phprdbc | /ViewPermission.php | UTF-8 | 2,435 | 2.65625 | 3 | [] | no_license | <?php
require_once "DB.php";
$uid = $_GET['uid'];
//当前用户
$smpt = conn()->prepare("select * from user where id=:id");
$smpt->execute([':id' => $uid]);
$user = $smpt->fetch();
//查询该用户所有的角色
$smpt = conn()->prepare(" select * from user_role ,role where user_role.uid=:uid and user_role.role_id = role.id");
$smp... | true |
d43b7adb6808a711671309b241c20158dc317266 | PHP | julioMZ/PHP_Development | /DAO_PDO/lib/DAO/CRUD.php | UTF-8 | 1,472 | 3.015625 | 3 | [] | no_license | <?php
/**
*
* Description of the main behaviour for concrete CRUD
* (Create, Read, Update, Delete) objects.
* @author Julio Mora <julio.mora.zamora@gmail.com>
*/
interface DAO_CRUD
{//------------------------->> Interface CRUD
/**
*
* Find a record by its ID.
* @param in... | true |
39c30a02e5eefdd48ac9c78bbf501d5abe691bae | PHP | chkir/flipsite | /src/App/Middleware/SvgMiddleware.php | UTF-8 | 2,689 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace Flipsite\App\Middleware;
use Flipsite\Enviroment;
use Flipsite\Utils\SvgData;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Server\MiddlewareInterface;
use Slim\Psr7\Factory\StreamFactory;
class SvgMi... | true |
95911a4b6d8c8ea159118d559e82bd2a23cc113c | PHP | irenose/skylight | /application/modules/preview/models/preview_model.php | UTF-8 | 1,685 | 2.515625 | 3 | [] | no_license | <?php
class Preview_model extends CI_Model {
function __construct()
{
parent::__construct();
}
/*********************************************************
/* Pulls in page content based on URL string provided
/********************************************************/
function get_page_data($page_id) {
$db_ta... | true |
c53407303dc91fcc66b7164d3283eae0706b1379 | PHP | DamienRiviere/BileMo | /src/Actions/ShowProducts.php | UTF-8 | 2,308 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Actions;
use App\Domain\Common\Exception\PageNotFoundException;
use App\Domain\Helpers\PaginationHelper;
use App\Domain\Services\HttpCache;
use App\Domain\Services\SerializerService;
use App\Entity\Smartphone;
use App\Repository\SmartphoneRepository;
use App\Responder\JsonResponder;
use Symfony\Co... | true |
2ddbf6f39e64119e9a600a6a5694775a470ad8ed | PHP | zawiszaty/cart-api | /src/Module/Cart/Domain/ProductPriceModifier/ProductDiscountModifier.php | UTF-8 | 939 | 2.734375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Module\Cart\Domain\ProductPriceModifier;
use App\Module\Cart\Domain\Product;
use App\Module\Cart\Domain\ProductPrice;
use App\Module\Cart\Domain\ProductPriceModifier;
final class ProductDiscountModifier implements ProductPriceModifier
{
public function modify(array $... | true |
e0455da58b0a327dde8c3044ad611810ce9d7eee | PHP | lucasmarques4linux/501-PHP-12-03-2018 | /aula06/pdo/conexao.php | UTF-8 | 537 | 3.046875 | 3 | [] | no_license | <?php
class Conexao
{
private static $user = 'lucas';
private static $pass = '123';
private static $dsn = 'pgsql:host=localhost;dbname=tarefas';
private static $instance = null;
private function __construct(){}
private function __clone(){}
public static function getInstance(){
if (!self::$instance) {
... | true |
49336e562fdd3d746f20dd0efcedd371534d0fec | PHP | dxguard21/Administrator-Control-Panel | /messages/send.php | UTF-8 | 1,619 | 2.765625 | 3 | [] | no_license | <?php
<?php require '/admin/settings.php'; ?>
/* Check all form inputs using check_input function */
$name= check_input($_POST['name'], "Enter your name");
$email= check_input($_POST['email']);
$message= check_input($_POST['message'], "Write your message");
$subject= "In Response to Your Message to the Team.";
/* If ... | true |
19722f868d8a1d92224d75747f1715c5aa09f0eb | PHP | Ravindu-Ranaweera/seabreeze | /app/Models/Owner.php | UTF-8 | 984 | 2.984375 | 3 | [] | no_license | <?php
class Owner extends Connection{
protected $owner_user_id;
protected $owner_username;
protected $owner_email;
protected $owner_password;
protected $owner_user_level;
private $owner_table = "owner";
public function __construct() {
Connection::__construct();
}
... | true |
59d791443f76c4978862f1d1d41b3d700f8497b3 | PHP | AeShevch/mg-blank | /views/compare.php | UTF-8 | 2,210 | 2.578125 | 3 | [] | no_license | <?php
/**
* Файл представления Compare - выводит сгенерированную движком информацию на странице сайта с сравнением товаров, которые выбрал пользователь.
* В этом файле доступны следующие данные:
* <code>
* $data['compareList'] => ID сравниваемых товаров,
* $data['catalogItems'] => Массив товаров,
* ... | true |
2c573c37f0637837bf46ba71d633fa5607e27cd1 | PHP | julianramirezorozco/CubeSummation_JR | /index.php | UTF-8 | 6,331 | 2.59375 | 3 | [] | no_license | <?php
// Clase Cubo
include "includes/cube.php";
session_name("cubeJulianR");
session_start();
// Respuesta
$msg = '';
// switche Establecer
$sw_E = 0;
// Switche Consulta
$sw_C = 0;
// Valores de los campos Establecer
$val_set = array("set1"=>"","set2"=>"","set3"=>"","set4"=>"");
// Valores d... | true |
aa587e90dc5f0d4b0568d9a2903bb39fee0e9335 | PHP | kerveros12v/sacint5 | /_aplicacion/modelo/clasesphp/Docenciatecnicosuperior.php | UTF-8 | 3,307 | 2.859375 | 3 | [] | no_license | <?php
namespace Clasesphp;
class Docenciatecnicosuperior
{
private $docenciaTecnicoSuperiorId;
private $docenciatecnicosuperiorcodigo;
private $docenciaTecnicoSuperior;
private $docenciatecnicosuperiorOculto;
private $docenciatecnicosuperiorAccion;
private $docenciatecnicosuperiorfecha;
private $docenciatecni... | true |
7ed114840e7a9fc5a0efb20782ec5404ea636501 | PHP | sayyassine9/Daemon | /test/client.php | UTF-8 | 566 | 2.734375 | 3 | [] | no_license | <?php
$socket = null;
define("CODE_START_OF_HEADING", "\u{0001}");
define("CODE_START_OF_TEXT", "\u{0002}");
$streamName = "$argv[1]";
if(isset($argv[2])) {
$socket = stream_socket_client(
"tcp://" . $argv[2],
$errno,
$errstr,
30
);
}
$in = STDIN;
$out = STDOUT;
if($socket) {
$out = $socket;
}
while(!fe... | true |
319cbb2f19180053a7d88566adbdcccaab9da13c | PHP | cfikes/TMGDesk | /configurationWriter.php | UTF-8 | 435 | 2.625 | 3 | [] | no_license | <?php
//session_start();
//if(empty($_SESSION['username'])){
// print '{Error" : "Not Signed In"}';
//} else {
$configFile = fopen("globalSettings.php", "w") or die("Unable to open file!");
$header = "<?php\n";
fwrite($configFile,$header);
foreach($_POST as $key => $value) {
$line = '$setting... | true |
27dbceb36c8aae9b1239524775a73d6a40b0c1e7 | PHP | waldifubu/mp3 | /src/Mp3/Service/ServiceProvider.php | UTF-8 | 3,239 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* MP3 Player
*
* @author Sammie S. Taunton <diemuzi@gmail.com>
* @copyright 2014 Sammie S. Taunton
* @license https://github.com/diemuzi/mp3/blob/master/LICENSE License
* @link https://github.com/diemuzi/mp3 MP3 Player
*/
namespace Mp3\Service;
use Zend\ServiceManager\ServiceManager;
use Ze... | true |
278f0ae4b2443e4e2144e94c12eb97712f7491a2 | PHP | victorhenriquesjf/EconomiC-Analyzer | /system/relatorio/totalBeneficiariosAuxilio_relatorio.php | UTF-8 | 1,485 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
ini_set('display_errors', 0);
require_once "../vendor/mpdf/mpdf.php";
require_once "../dao/reportDAO.php";
require_once "../db/conexao.php";
$reportDAO = new reportDAO();
$listObjs = $reportDAO->sumBeneficiariesHelp();
date_default_timezone_set('America/Sao_Paulo');
$date = date('d-m-Y H:i');
echo $date;
$htm... | true |