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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
9a83502db5b08989b309c2d767721f71c6ed786b | PHP | HavilahOG/test-work | /app/Imports/ImportPrices.php | UTF-8 | 1,159 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Imports;
use App\Models\Price;
use App\Models\User;
use App\Models\Product;
use App\Models\Account;
use Maatwebsite\Excel\Concerns\ToModel;
use Maatwebsite\Excel\Concerns\WithChunkReading;
use Maatwebsite\Excel\Concerns\WithBatchInserts;
use Maatwebsite\Excel\Concerns\WithStartRow;
class ImportPr... | true |
564970cc45078de545e7bf2a76c020b0e1d34cb4 | PHP | rezasaddat/nakertrans_api | /public/index.php | UTF-8 | 14,728 | 2.59375 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin: *");
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use \Firebase\JWT\JWT;
require '../vendor/autoload.php';
require './config/database.php';
require './config/helper.php'... | true |
f4b3098e3732b13eaa8096e42a5199ccf62b2aa4 | PHP | lzielonka/symfony-boilerplate | /tests/PrivateAccessTestCase.php | UTF-8 | 2,026 | 2.765625 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace Tests;
class PrivateAccessTestCase extends \PHPUnit_Framework_TestCase
{
/**
* @param mixed $object
* @param string $methodName
* @param array $arguments
* @return mixed
* @throws \ReflectionException
*/
public static function executePrivateMethod($object, $method... | true |
344d743283068fefb3c3fa496a54357e48d7eb35 | PHP | SunflowerFuchs/discord-bot | /src/Api/Objects/AuditLogChange.php | UTF-8 | 1,395 | 3.015625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace SunflowerFuchs\DiscordBot\Api\Objects;
class AuditLogChange
{
/**
* new value of the key
*
* If new_value is not present in the change object, while old_value is,
* that means the property that was changed has been reset, or set to null
* @var mix... | true |
a797e5f96680d2457c69f0bd4655bc4193a8aa29 | PHP | omnithoper/projects | /class/class1.php | UTF-8 | 722 | 3.25 | 3 | [] | no_license | <?php
include 'product.php';
$book = new Product('book', 12.99); // this work if you have class method construct
$food = new Product('', '');
echo $book->getProductValue(), $book->getProductPrice(), '<br>'; // this is for method construct
$food->setProductValue('Food');
// echo $food->type, '<br>'; this will work if ... | true |
4deb786360a21b05874a910b100b68233be56e66 | PHP | DataviewTI/intranetone | /src/assets/src/io/vendors/tinymce/moxiemanager/classes/Http/HttpClientResponse.php | UTF-8 | 9,740 | 2.890625 | 3 | [] | no_license | <?php
/**
* HttpClientResponse.php
*
* Copyright 2003-2013, Moxiecode Systems AB, All rights reserved.
*/
/**
* This class represents the HTTP response from a MOXMAN_Http_HttpClient instance.
*
* @package MOXMAN_Http
*/
class MOXMAN_Http_HttpClientResponse {
/** @ignore */
private $client, $req, $stream, $ch... | true |
f12d0189bff1bef68e15558e267b8fc576f4c7e8 | PHP | skysbird/celery-php | /unittest.php | UTF-8 | 4,360 | 2.515625 | 3 | [] | no_license | <?php
/*
* LICENSE: beerware
* GDR! wrote this file. As long as you retain this notice you can do whatever you want with this stuff.
* If we meet some day, and you think this stuff is worth it, you can buy GDR! a beer in return.
*
* http://massivescale.net/
* http://gdr.geekhood.net/
* gdr@go2.pl
*/
/*
* IN... | true |
2a3953620091b65a97f0e603fef551ce7541bdce | PHP | sopheaknova/poptea | /framework/shortcodes/shortcodes.php | UTF-8 | 104,157 | 2.75 | 3 | [] | no_license | <?php
/*
*****************************************************
* 1) ACTIONS AND FILTERS
*****************************************************
*/
//FILTERS
//Allows "[shortcode][/shortcode]" in RAW/PRE shortcode output
add_filter( 'the_content', 'sp_preprocess_shortcode', 7 );
add_filter( 'sp_default_content_fi... | true |
d8182b9384a514d8f846bda61b81a5c9eaf38e8e | PHP | mangixs/php | /class/RabbitMQ.php | UTF-8 | 7,468 | 3.0625 | 3 | [] | no_license | <?php
class RabbitMQ
{
//类实例
private static $_instance = null;
//MQ连接对象
private static $rabbitClient = null;
/**
* 构造方法私有化
*/
private function __construct()
{
$conn_args = ['host' => MQ_HOST, 'port' => MQ_PORT, 'login' => MQ_LOGIN, 'password' => MQ_PASSWORD];
... | true |
4837965ae2af3bbefa94507362de3dc08e487ee3 | PHP | phelandhu/fsc-bb | /pagecontent/LeadProvider_fscbb.php | UTF-8 | 6,284 | 2.546875 | 3 | [] | no_license | <?php
include('bootstrap.php');
include("common/classes/leadProvider.class.php");
$leadProvider = new LeadProvider($dbDataArr);
if(isset($_GET["leadProvider"]))
{
$result = $leadProvider->getOneByUsernameAndId($mysqli->real_escape_string($_GET['leadProvider']), $_GET['id']);
if($result->num_rows > 0) {
$row = $r... | true |
de761f25d00802bd5eb71d1ee951fb455fee4ef6 | PHP | drnasin/psr7-middleware-collection | /src/App/Middleware/RequestHeadersValidation.php | UTF-8 | 4,420 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/*********************************************************************************
* Created by Ante Drnasin - http://www.drnasin.com *
* Copyright (c) 2017. All rights reserved. *
* ... | true |
18bb4ff64242278c1f234c79548d9d6cb360a571 | PHP | euiyulsong/NBA | /search.php | UTF-8 | 743 | 2.71875 | 3 | [] | no_license | <?php
if (isset($_REQUEST['text'])) {
$result = $_REQUEST['text'];
$username = "info344user";
$password = "<password>";
try {
$conn = new PDO('mysql:host=euiyulsong.cwhmbr4rrjkt.us-east-2.rds.amazonaws.com;dbname=CSV_DB', $username, $password);
$conn->setAttribute(PDO::ATTR_ERRMODE, PD... | true |
2d24837810aedd10133ebb3a93dc0407f7e76a92 | PHP | unikent/online-tours-backend | /tests/Requests/ContentRelationshipRequestTest.php | UTF-8 | 3,280 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use App\Models\Content;
use Faker\Factory as Faker;
use App\Http\Requests\ContentRelationshipRequest;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ContentRelationshipRequestTest extends TestCase {
use DatabaseTransactions;
protected function setupRequest(){
$request = new ContentRelations... | true |
9692d239e4b7ad387e70863ede5f9f61e69178d8 | PHP | VictorGeorgesEly/Sportsaloon | /évènement.php | UTF-8 | 8,565 | 2.6875 | 3 | [] | no_license | <?php
session_start();
require_once("fonctions/fonction.php");
require_once("fonctions/fonctionSQL.php");
require_once("Calendrier(JavaScript).php");
if(isset($_GET['nom_groupe']) AND !empty($_GET['nom_groupe'])) {
$nom_groupe=htmlspecialchars($_GET['nom_groupe']);
$groupes = array();
$req_groupes = connectBDD(... | true |
a96e0374f3dff4e1e9a526a2668cbff1df1befdf | PHP | BBMindlin/bdcon | /funcoes/IBGE.php | UTF-8 | 2,521 | 2.640625 | 3 | [] | no_license | <?php
class IBGE
{
//Função para gravar cidade - DB IBGE.
//**************************************************************************************
function MiCadCidadeInsert($_idEstado,
$_siglaEstado,
$_nome,
$_codIBGE,
$_data)
{
$strRetorno = false;
//$idContadorUniversal = ContadorUniversa... | true |
8d4055cd55fc52e331a0a1905d6b96c629108fba | PHP | yunzhiclub/tute | /Application/UserDepartmentPost/Logic/UserDepartmentPostLogic.class.php | UTF-8 | 855 | 2.625 | 3 | [] | no_license | <?php
/**
* 用户部门岗位 L
*/
namespace UserDepartmentPost\Logic;
use UserDepartmentPost\Model\UserDepartmentPostModel;
class UserDepartmentPostLogic extends UserDepartmentPostModel
{
public function getListByUserIdDepartmentPostId($userId , $departmentPostId)
{
$map['user_id'] = $userId;
$map['department_post_id'] =... | true |
3c05178436902ef85eae8872f2a26912ba903c87 | PHP | MordorDie/vk-bot-schedule | /bot.php | UTF-8 | 108,718 | 2.515625 | 3 | [] | no_license | <?php
ini_set('date.timezone', 'Europe/Samara');
if (!isset($_REQUEST)) {
return;
}
//
//if (isset($_GET['secret']) && !isset($_COOKIE['auth'])){
// echo "error";
//}
// load config
require 'config.php';
$config = new config();
//Строка для подтверждения адреса сервера из настроек Callback API
$confirmati... | true |
68be71c3cb8533f4488608ef238de0e599c4966f | PHP | One-Tec-Group/old.pcasa.info | /builder/database/seeds/BillingPlansSeeder.php | UTF-8 | 3,064 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
use Common\Billing\BillingPlan;
use Illuminate\Database\Seeder;
class BillingPlansSeeder extends Seeder
{
/**
* @var BillingPlan
*/
private $plan;
/**
* BillingPlansSeeder constructor.
* @param BillingPlan
*/
public function __construct(BillingPlan $plan)
{
... | true |
50989dac4cf69e98c5cb303afac42957487de588 | PHP | mwangiwambui/Intro | /array.php | UTF-8 | 156 | 3.125 | 3 | [] | no_license | <?php
$numbers=array("16","92","83","42","35","23","63","132","55","76");
$sum=0;
for ($i=0; $i < 10 ; $i++) {
$sum=$sum+$numbers[$i];
}
echo "$sum";
?> | true |
24911cef464ef66a377082fbf5bd50b060a6db73 | PHP | gfike19/213-PHP | /Unit5/IT213_Fike_Unit5_Exercise1_PHP.php | UTF-8 | 132 | 2.546875 | 3 | [] | no_license | <html>
<body>
<?php
$grade = (int)$_POST['grade'];
if ($grade >= 60) {
echo "Pass";
}
else {
echo "FAIL";
}
?>
</body>
</html>
| true |
d0afa9df9bef00aa88632fa3030b5ca5b2c1b70a | PHP | OlgaRunge/php1 | /lesson2/basicLogicoperator4.php | UTF-8 | 1,386 | 2.71875 | 3 | [] | no_license | <?php
define('MIN_AGE', 18);
define('SEX_MALE', 1);
define('SEX_FEMALE', 2);
?>
<h1>Здравствуй чувак!</h1>
<?php
$age = 19;
$sex = SEX_MALE;
$emailIsSuccess = true;
$emailNotification = false;
$phoneisSuccess = true;
if ($age < MIN_AGE) {
?>
<p>Ваш возраст <?= $age ?>, вы еще не можете посещать наш пор... | true |
ebe53f60fd1a9e62b05d37f548d1b59692fb27a9 | PHP | anjalikrishnan26/Airline | /application/controllers/main.php | UTF-8 | 3,366 | 2.53125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class main 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
* - or -
* Since this controlle... | true |
7ea40ff327153973230658fe83ef12b941b4f15b | PHP | SIU-Toba/framework | /php/lib/toba_xml.php | ISO-8859-3 | 1,289 | 3.25 | 3 | [] | no_license | <?php
/**
* Clase que ayuda a la construccin de nuevos archivos xml
* @package Varios
*/
class toba_xml {
const indent_string = ' ';
protected $xml;
function __construct($path)
{
$this->xml = new XMLWriter();
$this->xml->openUri($path);
$this->xml->startDocument('1.0', 'ISO-8859-1');
$this->xml->setInd... | true |
822a3cab2dd80d5b0fd2e36d30445fa3a82f4a41 | PHP | cheshirec7/lunchordering2018 | /app/Repositories/LunchDateMenuItemRepository.php | UTF-8 | 1,284 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Repositories;
use App\Models\LunchDateMenuItem;
/**
* Class LunchDateMenuItemRepository.
*/
class LunchDateMenuItemRepository extends BaseRepository
{
/**
* Associated Repository Model.
*/
const MODEL = LunchDateMenuItem::class;
/**
* @param integer $lunchdate_id
... | true |
082aaac670ea34349946bdb674c9d042dcd6636f | PHP | leiviton/projects | /app/Services/AddressService.php | UTF-8 | 2,462 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: leiviton.silva
* Date: 13/03/2019
* Time: 10:21
*/
namespace ApiWebPsp\Services;
use ApiWebPsp\Repositories\AddressRepository;
use ApiWebPsp\Repositories\ReceiverRepository;
use Illuminate\Support\Facades\DB;
class AddressService
{
/**
* @var AddressRepository
... | true |
495d8649bac6468183795eb8f8aa1328e25e6ced | PHP | GucciSnack/Docster | /app/Template.php | UTF-8 | 1,964 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Template extends Model
{
protected $guarded = ['id'];
/**
* @return \Illuminate\Database\Eloquent\Relations\HasMany|mixed
*/
public function variables()
{
return $this->hasMany(Variable::class);
}
/**
... | true |
cd7449b9d71c36f2f79577afd9300c062e1d53cd | PHP | jiejunf/calendar | /src/Components/Alarm.php | UTF-8 | 858 | 2.828125 | 3 | [] | no_license | <?php
namespace Jiejunf\Calendar\Components;
use Jiejunf\Calendar\Calendaring;
use Jiejunf\Calendar\Property;
/**
* @method $this action(string $action)
* @method $this description(string $desc)
* @method $this trigger(string $trigger)
* @method $this attach(Property $attach)
*/
class Alarm extends Calendaring
... | true |
2a3238fc39bb301d2b24e008cafe449af1dde63c | PHP | alvinau0427/COMPS356F-Assignment | /src/localhost_version/shoes-bid/refresh.php | UTF-8 | 1,319 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
require_once('conn.php');
extract($_POST);
include_once('heading.php');
$sql = "select * from product where productName like '%".$_POST['search']."%' or type like '%".$_POST['search']."%'";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
while ($row = mys... | true |
cc3d950bf1d1e2745777bf2960879796f2b3845e | PHP | avatec/framework | /src/core/fakturownia.php | UTF-8 | 4,167 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php namespace Core;
use Core\Logs;
/**
* Klasa obsługuje połączenie z API fakturownia.pl
* @author Grzegorz Miśkiewicz <biuro@avatec.pl>
* @version 1.9
* @copyright Avatec.pl
*/
class Fakturownia
{
protected $url = null;
protected $api_token = null;
protected $username = null;
protected $pa... | true |
9860c834e85c7ed253059222354d74b27e80743a | PHP | kalaiarsi/video-CDN-cakePHP2-S3 | /Video_CDN/Model/Contact.php | UTF-8 | 4,768 | 2.71875 | 3 | [] | no_license | <?php
/**
* Contact Model
* @author James Fairhurst <info@jamesfairhurst.co.uk>
*/
class Contact extends AppModel {
/**
* Model Class name
* @param string
*/
public $name = 'Contact';
/**
* Validation Rules
* @param array
*/
public $validate = array(
'name' => 'notBlank',
'filename' => array(
... | true |
72a3315d7034440f03661f1450934a8ddfb01083 | PHP | cabbagerun/php-stats-sdk | /src/ClickHouse/SelectBuilder.php | UTF-8 | 7,609 | 2.640625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Jianzhi\Stats\ClickHouse;
use Jianzhi\Stats\ClickHouse\Clause\GroupBy;
use Jianzhi\Stats\ClickHouse\Clause\Having;
use Jianzhi\Stats\ClickHouse\Clause\Limit;
use Jianzhi\Stats\ClickHouse\Clause\OrderBy;
use Jianzhi\Stats\ClickHouse\Components\From;
use Jianzhi\Stats\ClickHous... | true |
423c37f63af0e9e9bd5b925ea63484ccb164ced9 | PHP | samhol/SPHP-framework | /sphp/php/Sphp/Bootstrap/Components/Navigation/Menus/Menu.php | UTF-8 | 1,617 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* SPHPlayground Framework (http://playgound.samiholck.com/)
*
* @link https://github.com/samhol/SPHP-framework for the source repository
* @copyright Copyright (c) 2007-2022 Sami Holck <sami.holck@gmail.com>
* @license https://opensource.org/licenses/MIT The MIT License
... | true |
f046814bd8652b11a173f1383a10fcba4e8c6201 | PHP | undercloud/xpc | /consoler/function/inline.xpc.php | UTF-8 | 745 | 2.671875 | 3 | [] | no_license | <?php
if (false === function_exists('xpc_inline')) {
/**
* @param $msg
* @param int $padlength
* @param bool $firstline
* @return string
*/
function xpc_inline ($msg, $padlength = 0, $firstline = true)
{
$lines = wordwrap($msg, XPC_TERM_SIZE - $padlength, XPC_PHP_EOL, true);
$lines =... | true |
fb2039a61b245f5b24aa49d075fbd45d78c980d3 | PHP | frederic-boyer/atelier | /models/WorkshopDelete.php | UTF-8 | 1,043 | 2.78125 | 3 | [] | no_license | <?php
namespace Models;
use PDO;
// include_once('models/Config/Connect');
//
// /**
// *
// */
class workshopDelete
{
private $connection;
protected function getConnection()
{
try {
$this->connection = new PDO('mysql:host=localhost;dbname=atelier','root','');
$this->connection->setAttribute(PD... | true |
a67c98ae23258f33e2fc009bee47a890cec42f0b | PHP | danielsGrietins/cmsify | /src/Components/FormElements/AbstractInput.php | UTF-8 | 3,598 | 2.796875 | 3 | [] | no_license | <?php
namespace Cmsify\Cmsify\Components\FormElements;
use Cmsify\Cmsify\Components\Componentable;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Arr;
abstract class AbstractInput implements Componentable
{
/**
* @var string
*/
protected $inputName;
/**
* @var string
... | true |
43c9fe6ae06902794bcfdc6286fa87500017d2e8 | PHP | jimmy-wynendaele/CRUD2 | /index.php | UTF-8 | 3,612 | 2.953125 | 3 | [] | no_license |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>crud 2</title>
</head>
<body>
<?php
try {
$bdd = new PDO('mysql:host=localhost;dbname=colyseum', 'root', 'root');
//foreach($bdd->query('SELECT * from clients') as $row) {
//print_r($row);
//}
}
catch (PDOException $e) {
print "Erreur !:... | true |
489647bc14306ce6dfadd2e58728c00d020ba701 | PHP | kanneg881/modern-php | /10-testing/src/Whovian.php | UTF-8 | 1,185 | 3.65625 | 4 | [] | no_license | <?php
class Whovian
{
/** @var string 最愛的醫生 */
protected $favoriteDoctor;
/**
* 建構子
*
* @param string $favoriteDoctor 最愛的醫生
*/
public function __construct($favoriteDoctor)
{
$this->favoriteDoctor = (string)$favoriteDoctor;
}
/**
* 説
*
* @return s... | true |
331a447a35a02677260dee9e447afe0ed18f31be | PHP | metalikium/bookmarks | /app/controllers/SessionsController.php | UTF-8 | 1,667 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
class SessionsController extends \BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
* When hiting the login route
*
* @return Response
*/
public function create()
{
retu... | true |
b232f6b4d26b88c277712306d1aa1b8c8336e009 | PHP | dms-org/core | /src/Module/Mapping/StagedFormDtoMapping.php | UTF-8 | 1,265 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace Dms\Core\Module\Mapping;
use Dms\Core\Form;
use Dms\Core\Form\IStagedForm;
use Dms\Core\Module\IStagedFormDtoMapping;
/**
* The form dto mapping base class.
*
* @author Elliot Levin <elliot@aanet.com.au>
*/
abstract class StagedFormDtoMapping implements IStagedFormDtoMa... | true |
8bdf891c69213d9830f19307d3d17e24c629fb0e | PHP | aljem-mark/AssignmentCrud | /app/User.php | UTF-8 | 1,771 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Storage;
use App\Notifications\MailResetPasswordToken;
use Illuminate\Http\Request;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authe... | true |
6ba658d5d060f16cafa41828b3702f3f5a82df46 | PHP | dieze/DzTaskModule | /src/DzTaskModule/View/Helper/Factory/ListWidgetFactory.php | UTF-8 | 1,755 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Fichier source pour le ListWidgetFactory.
*
* PHP version 5.3.0
*
* @category Source
* @package DzTaskModule\View\Helper\Factory
* @author Adrien Desfourneaux (aka Dieze) <dieze51@gmail.com>
* @license http://www.opensource.org/licenses/mit-license.html MIT License
* @link https://github.... | true |
c39ce1d35bcd0fe7214db016456a2d8a8640bfe3 | PHP | wesleyromualdo/PIM | /emenda/classes/ValidacaoReformulacaoPTA.class.inc | UTF-8 | 17,220 | 2.625 | 3 | [] | no_license | <?php
// Classe de validação das informações cadastradas no
// Plano de Trabalho do sistema de Emendas.
class ValidacaoReformulacaoPTA {
// variável de conexão com o banco
private $db;
// chave primária do PTA. Recebida obrigatoriamente por parâmetro
private $ptrid;
// dados da view 'v_planotrabalho'
priv... | true |
738b5b03f457c22ae6320387b041c27f2f61016f | PHP | mhmdnz/devolon | /app/Services/Interfaces/CheckoutServiceInterface.php | UTF-8 | 202 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Services\Interfaces;
use App\Http\DTO\CheckoutDTOInterface;
interface CheckoutServiceInterface
{
public function calculateCheckout(array $productIds): CheckoutDTOInterface;
}
| true |
f9d3fe1f198406e85085d657dd8a3c111730d36e | PHP | francois80/PHP_partie9 | /exo6.php | UTF-8 | 566 | 2.96875 | 3 | [] | no_license | <?php
$exercice = "Exercice6";
include "header.php";
$timestampt = time() ;
$dateFev2016 = mktime(0,0,0,2,1,2016); // secondes depuis le 1er février 2016
$datemars2016 = mktime(0,0,0,3,1,2016);//secondes depuis le 1er mars 2016
$nbjoursFevrier2016 = round($datemars2016 -$dateFev2016 )/3600/24 //nb de jours entre févrie... | true |
e6c75db9fd3f560783fa21028701fed56b33f0a9 | PHP | hi-noikiy/PHPStudy | /Lonicera/library/render/PhpRender.php | UTF-8 | 589 | 2.96875 | 3 | [] | no_license | <?php
namespace library\render;
use Lonicera\core\Render;
class PhpRender implements Render
{
// 赋值变量
private $value = [];
public function init()
{
}
/**
* 变量赋值
*
* @param string $key
* @param mixed $value
* @return void
*/
public function assign($key, $va... | true |
df5af3b0188711049857f1845c80f333180c86fc | PHP | IFPB-PRPIPG/editora-ifpb | /classes/monograph/MonographDAO.inc.php | UTF-8 | 13,858 | 2.546875 | 3 | [] | no_license | <?php
/**
* @file classes/monograph/MonographDAO.inc.php
*
* Copyright (c) 2014 Simon Fraser University Library
* Copyright (c) 2003-2014 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class MonographDAO
* @ingroup monograph
* @see Monograph
*
* @brief Oper... | true |
068e87a8438990e63a5be32eba079e767a8ed4c1 | PHP | arindam009/ci_medikolo | /admin/application/modules/advertise/views/Recipe.php | UTF-8 | 31,223 | 2.6875 | 3 | [] | no_license | <?php if (! defined('BASEPATH')) {
exit('No direct script access allowed');
}
class Recipe extends MX_Controller
{
public function __construct()
{
parent::__construct();
is_logged_in(); //common function for session checking.
$this->load->library('form_validation');
... | true |
20747b9e2f1e7593fe2e930f55570cfe92003f91 | PHP | Talesoft/ion-framework | /packages/http/src/Http/Request.php | UTF-8 | 3,477 | 2.953125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Ion\Http;
use InvalidArgumentException;
use Psr\Http\Message\{RequestInterface, StreamInterface, UriInterface};
class Request extends AbstractMessage implements RequestInterface
{
private $method;
private $uri;
private $requestTarget;
public function __const... | true |
c3a7e048b3cb1d44bb9a0803a929fb8eea103e81 | PHP | Livemy/base-of-php | /learn-php/Article/paging/test.php | UTF-8 | 1,991 | 3.296875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>页面的简单显示-显示总页数</title>
</head>
<body>
<?php
/**1.传入页面**/
$page=$_GET['p'];
/**2.根据页面取出数据:php->mysql**/
$host="127.0.0.1";
$username="root";
$password="357159";
$db="paging";
$pagesize=5;
//连接数据库
$conn=mysqli_connect($host,... | true |
56475854be08d3e71cf4ad72240ee245edf972d9 | PHP | didit103/UKOM_Rekam-medis | /source code/rekam_medis/app/controllers/DokterController.php | UTF-8 | 2,006 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
class DokterController extends \BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$dokters = Dokter::all();
return View::make('dokter.index')->with('datadokter', $dokters);
}
/**
* Show the form for creating a new resource.
*
... | true |
7ddd6b7e105729a26e0711f4f80b9c3b2d4f8b8c | PHP | henriqueboaventura/TCControl | /lib/validator/loginValidator.class.php | UTF-8 | 1,411 | 2.703125 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of swLoginValidatorclass
*
* @author hboaventura
*/
class loginValidator extends sfValidatorBase
{
public function configure($options = array(), $messages = array())
{
$this-... | true |
9343805bcff255f2c8a909e388ca882b5cf15dea | PHP | marcqualie/mongominify | /src/MongoMinify/Query.php | UTF-8 | 5,213 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace MongoMinify;
class Query
{
public $state = 'normal';
public $data = array();
public $compressed = array();
protected $collection = array();
protected $nonNumericIdentifier = '[:]';
public function __construct(array $data = array(), $collection = null)
{
$this->col... | true |
44717de339c87bc762eccd7cde0f01fd7f4b1406 | PHP | ovaxio/easy-fight | /inc/Turn.class.php | UTF-8 | 545 | 3.8125 | 4 | [
"MIT"
] | permissive | <?php
class Turn {
private $Players;
function __construct($players){
$this->Players = $players;
}
public function start(){
echo "\n<br/>".$this->Players[0]->getName().' is attacking '.$this->Players[1]->getName().'.';
$attackForce = $this->Players[0]->punch();
$this->Players[1]->defen... | true |
8b3160f1d440656f8d64da9c8bfdab3b179e5b6b | PHP | Luckum/car-sharing | /models/BrigadeStatus.php | UTF-8 | 1,780 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "brigade_status".
*
* @property int $id
* @property int $brigade_id
* @property string $status
* @property string $started_at
* @property string $finished_at
*
* @property Brigade $brigade
*/
class BrigadeStatus extends \yii\db\Ac... | true |
f68b923b3a2baf9c1a1e796ca742be56bece8b50 | PHP | dheluxe/cornerstone | /inc_files/inc_col_right_project.php | UTF-8 | 3,095 | 2.703125 | 3 | [] | no_license | <?php
$maxnum = 5;
// First print the blog entries if there are any
$sql = "SELECT * FROM intranet_projects_blog where blog_proj = $_GET[proj_id] ORDER BY blog_date DESC LIMIT $maxnum";
$sql2 = "SELECT blog_id FROM intranet_projects_blog where blog_proj = $_GET[proj_id] ORDER BY blog_date DESC";
$result = mysql_quer... | true |
85d2da44024accd5489cb50b945fa885fca8f334 | PHP | EmpyG/kanban | /src/ConfigLoader.php | UTF-8 | 1,260 | 2.859375 | 3 | [] | no_license | <?php declare (strict_types=1);
namespace App;
class ConfigLoader implements LoaderInterface
{
public $err;
private $type;
private $name;
private $server;
private $username;
private $password;
private $charset;
public function __construct(array $cfg)
{
$this->err = false;
... | true |
83b51584f341cd16d038b496bda4288ec8780df1 | PHP | kukalote/library | /public/library/Array.class.php | UTF-8 | 2,032 | 3.203125 | 3 | [] | no_license | <?php
//取多维数据中某[些]字段的值
if ( ! function_exists('array_muliti_field'))
{
function array_muliti_field($array, $fields)
{
$resp = array();
foreach($array as $val) {
if(is_array($fields)) {
foreach($fields as $field) {
if(isset($val[$field]) && $val[$field] !== null) {
$resp[$field][$val[$field]] = ... | true |
fa60206d72aeee1577e0b11a2b19d4b8aa672d61 | PHP | AugustBurnsRed/laravel-test | /app/Http/Controllers/TorrentsController.php | UTF-8 | 5,438 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Movie;
use App\Serie;
use App\Torrent;
use App\Http\Requests\TorrentRequest;
use App\Tag;
use Auth;
use Illuminate\Http\Request;
class TorrentsController extends Controller
{
/**
* Create a new torrents controller instance.
*/
public function __construc... | true |
75da08351b25543fda35f04df435942dad645ef5 | PHP | nextnill/teste_next | /www/sys/Util.class.php | UTF-8 | 9,859 | 3.203125 | 3 | [] | no_license | <?php
namespace Sys;
use PDO;
class Util
{
static function DateNow() {
$dt_now = new \DateTime('now');
return $dt_now->format('Y-m-d H:i:s');
}
static function FilesArray($arquivos)
{
$ret = array();
if (isset($arquivos) && is_array... | true |
7980436c14a10158ee41a05990eab01acd847d0b | PHP | helen0910/tp-cms | /ThinkPHP/Extend/Driver/TagLib/TagLibTags.class.php | UTF-8 | 2,339 | 2.546875 | 3 | [] | no_license | <?php
class TagLibTags extends TagLibResolve {
protected $tags = array(
'tags'=>array('attr'=>'limit','level'=>1),
);
/**
* Tag标签调用
*limit 解析的行数 0为取出全部
* 公共标签
*
* return 返回的数据值标记
* order 排序
* cache 是否缓存,0(false)或1(true)
* style 0(false)或1(true) 标题是否添加样式 默认有样式
* 注:Tag... | true |
1ea12063224db6142e52b3b7617759e757d25f86 | PHP | salvobertoncini/salvobertoncini.com | /controller/login_controller.php | UTF-8 | 1,676 | 3.03125 | 3 | [] | no_license | <?php
include_once __DIR__ . "/". "../config.php";
include_once __DIR__ . "/". "../model/user.php";
if(!isset($_POST["email"]) || !isset($_POST["password"]))
echo "fill all the fields";
else
{
$resp = loginUser($_POST["email"], $_POST["password"]);
if($resp["response"])
{
echo "Minchia ".$resp["u... | true |
5982ec6473b1c6c794b90fe2958f0627eb42d455 | PHP | kshtompel/command-chain | /src/ChainCommandBundle/ChainCollection/ChainCommandItem.php | UTF-8 | 1,368 | 3.265625 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace ChainCommandBundle\ChainCollection;
/**
* Class ChainCommandItem
*
* It is used by ChainCommandCollectionInterface.
* Store all necessary data about command.
*
* @package ChainCommandBundle\ChainCollection
*/
class ChainCommandItem
{
/**
* Command name.
*
* @var string
... | true |
1bbeb4c9a006b0fc0aa27d0a222e521e99b9345e | PHP | grylls1025/resume-php---- | /include/global.func.php | UTF-8 | 2,279 | 2.9375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: 禹轩1025
* Date: 2016/8/29
* Time: 22:29
*/
//code()函数是验证码函数
//@access public
//@param int $_width 表示验证码的宽度,默认为75
//@param int $_height 表示验证码的高度,默认为25
//@param int $_sjm_num 表示验证码的个数,默认为4
//@return void 函数执行后产生一个验证码
function code($_width=75,$_height=25,$_sjm_num=4){
//生成随机数
... | true |
50c1eab26d4a48cdce771b9899045bc521a8eb19 | PHP | EvgenyiK/EvgenyiK.github.io | /mvc/App/Controller.php | UTF-8 | 1,339 | 2.796875 | 3 | [] | no_license | <?php
/**
* Ещё нам нужно создать базовый класс для наших контроллеров, чтобы потом наследоваться от него.
* Наследовать методы нужно для того, чтобы вы могли рендерить (сформировать вывод) виды.
* Методы рендеринга поддерживают использование лэйаутов — шаблонов,
* которые содержат общие для всех видов компоненты, ... | true |
ac69e5206fc183308322af84787d23851d767d3b | PHP | kirillwebdeveloper/Agent | /src/Service/Manager/AbstractManager.php | UTF-8 | 2,018 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Service\Manager;
use App\Entity\AbstractEntity;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\UsageTrackingTokenStorage;
use Symfony\Component\Security\Core\User\UserInterface;
/**
* Class AbstractManager
* @package App\Service\Manager... | true |
962d84d2ea9d7f31cf2a286ce644498b4447ea8b | PHP | oretanegi/face_api_sample | /application/libraries/FaceApiLib/FaceApiLib.php | UTF-8 | 3,051 | 2.65625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
// This sample uses the Apache HTTP client from HTTP Components (http://hc.apache.org/httpcomponents-client-ga/)
require_once ('HTTP/Request2.php');
/**
* Class FaceApiLib
*/
class FaceApiLib
{
/**
* FaceApiLib constructor.
*/
p... | true |
b6a64c79bb800d5a6b155b093fae114c8c3a1498 | PHP | Npradheepan/PHP-programming | /index.php | UTF-8 | 2,129 | 2.96875 | 3 | [] | no_license | <?php
session_start();
include_once 'dbh.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<?php
$sql ="SELECT * FROM users";
$result = mysqli_query($conn, $sql);
... | true |
1ef9f4014154b157694126287f2d0952043444cf | PHP | nimeso/silverstripe-shop | /code/modifiers/shipping/PickupShippingModifier.php | UTF-8 | 432 | 2.53125 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
/**
* Pickup the order from the store.
* @package shop
* @subpackage shipping
*/
class PickupShippingModifier extends ShippingModifier{
static $defaults = array(
'Type' => 'Ignored'
);
static $casting = array(
'TableValue' => 'CanBeFreeCurrency'
);
public static $singular_name = "Pick Up Shippi... | true |
d46791a77b9f37b826e1fd4a0f5b816aecd916fa | PHP | SoaringPhoenix/php_practice | /algorithm/search/binary.php | UTF-8 | 1,131 | 3.640625 | 4 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: jason
* Date: 2019/4/21
* Time: 20:27
*/
class binary {
function searchSplit($arr, $target) {
list($low, $high) = [0, count($arr) - 1];
while ($low <= $high) {
$mid = floor(($low + $high) / 2);
if ($arr[$mid] == $target) {
... | true |
9fd8600118caf0811de993730bf8e7cf024ce233 | PHP | kuba-end/wine-pairing | /src/Model/DbSelect/GetTable.php | UTF-8 | 1,045 | 2.90625 | 3 | [] | no_license | <?php
namespace KubaEnd\Model\DbSelect;
use Exception;
use KubaEnd\Model\UniversalConnect;
use PDO;
class GetTable
{
const RED='red';
const WHITE='white';
public string $sql;
public string $type;
public object $hookup;
public array $result;
public function __construct(){
try ... | true |
41eea5cacb6738766e3bc840054cab35f905a727 | PHP | aktanb/brainer | /Brainer/Playground/games/say_my_name/TextVerbalTask.php | UTF-8 | 2,229 | 2.96875 | 3 | [] | no_license | <?php
class TextVerbalTask extends VerbalTask {
public $taskWord;
public $variants = array();
public function build() {
$taskSection = new TextVerbalSection($this->taskWord);
$taskSection->additionalClasses = "task-section fadable";
$variants = new TextVerbalTaskVariants($this->va... | true |
10205d89c1330daa943b3a13d65d06833ff42646 | PHP | tekku-taro/php-ormapper | /tests/RelationBuilderTest.php | UTF-8 | 4,098 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use PHPUnit\Framework\TestCase;
use ORM\Model\Adapter\RDBAdapter;
use ORM\Model\DB\RDB;
use ORM\Model\Post;
use ORM\Model\User;
class RelationBuilderTest extends TestCase
{
protected $adapter;
public function setUp():void
{
$dbName = 'mysql';
$this->adapter = RDBAdapter::init($dbNam... | true |
17c41389fc858b114faf94f1e10819fcdfaaabd8 | PHP | ramyaprabha/Hackathon | /processrange.php | UTF-8 | 5,203 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
$connect=mysqli_connect('localhost','root','rameena123','test');
if(mysqli_connect_errno($connect))
{
echo 'Failed to connect';
}
//Execute the query
if(!empty($_POST['year1'])) $year1=$_POST['year1'];
else $year1="NULL";
if(!em... | true |
38cb730a70202ef6805f75270107f6daa32d3685 | PHP | ahmed-hassan-sadek/courses | /backend/course.php | UTF-8 | 7,830 | 2.890625 | 3 | [] | no_license | <?php
include("connect.php");
include("imageTrait.php");
class Courses
{
use imageTrait;
/**
* get data value
* check if the user is script or not
* get image value
* use image triat
* check if the image is found or not
* save image and upload it at file courses
* i... | true |
629ba54b524ac2c4325ff555ae30288469e36fd9 | PHP | achie27/csv-importer | /php/controllers/csv_upload.php | UTF-8 | 2,433 | 2.765625 | 3 | [] | no_license | <?php
require_once('./DatabaseHandler.php');
require_once('../models/Student.php');
require_once('./StudentRead.php');
require_once('./StudentUpdate.php');
try{
if(isset($_FILES['csv'])){
// Checking if the file really is a CSV
$mimes = array('application/vnd.ms-excel','text/plain','text/c... | true |
6ec2b08bf844491ea9e8890ae23c251879a378ca | PHP | timothymarois/basephp-alerts-api | /app/Models/Activity.php | UTF-8 | 1,829 | 2.671875 | 3 | [] | no_license | <?php namespace App\Models;
use Base\Support\System\DB;
use App\Models\Alerts as AlertModel;
class Activity
{
const TABLE = 'BaseActivity';
public static function get($id)
{
return DB::table(static::TABLE)->where('id',$id)->first();
}
public static function getAll($alertId, $dismissed... | true |
fe0645afc1db4c597a89192c47d0ec096da9a87e | PHP | gabrieltenachous/Commit_ate_2022 | /PHP/problem/Problema_3.php | UTF-8 | 679 | 3.15625 | 3 | [] | no_license | <?php
// "#Good morning! Here's your coding interview problem for today.
// This problem was asked by Google.
// Given the root to a binary tree, implement serialize(root), which serializes the tree into a string, and deserialize(s), which deserializes the string back into the tree.
// For example, given the following... | true |
8811050033f049607240b0b00fe0e2ee8c1c4254 | PHP | wjy862/ecocitoyennete | /Admin/Controller/TypesAfficheController.class.php | UTF-8 | 2,795 | 2.53125 | 3 | [] | no_license | <?php
namespace Admin\Controller;
use \Frame\Libs\BaseController;
use \Admin\Model\TypesAfficheModel;
class TypesAfficheController extends BaseController
{
//afficher inde
public function index()
{
//obetenir donnes
$typesAffiches =TypesAfficheModel::getInstance()->fetchAll("order by idTypeAffiche asc");
//s... | true |
bb5ea1e9a2885dd6bb95ab8520a0eb677fc8737c | PHP | pohy/vchquotes | /src/Pohy/QuoteBundle/Entity/Role.php~ | UTF-8 | 1,552 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Pohy\QuoteBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\Role\RoleInterface;
/**
* @ORM\Entity
* @ORM\Table(name="role")
*/
class Role implements RoleInterface
{
/**
* @ORM\Id
* @ORM\Column(type="integer")
* @ORM\GeneratedValue(strategy="AUTO")
*/
pr... | true |
2735058bc4e991650ecd92ba1765b93f2f55e221 | PHP | easyconn/RedisPlugin | /src/mvc/model/Criteria.php | UTF-8 | 7,511 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace RedisPlugin\Mvc\Model;
class Criteria implements CriteriaInterface, OperatorInterface
{
/**
* @var array
*/
protected $conditions = array("query" => array());
/**
* @var \Phalcon\Mvc\Model
*/
protected $model = null;
/**
* @var int
*/
protected ... | true |
779d6ddef9de2cf6c153eb6a1e1124571503592d | PHP | suncheck1988/etp_test | /application/classes/Helper/Index.php | UTF-8 | 927 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php defined('SYSPATH') or die('No direct script access.');
/**
* Класс помощник для генерации представления постраничной навигации
*/
class Helper_Index
{
/**
* @param integer $page Текущая страница навигации
* @param integer $per_page Кол-во записей, выводимых на странице
* @param integer $... | true |
2db79b4876c0201c19dbb21f3b7396fc9d22d812 | PHP | zsmynl/zsmwx | /home/model/commonModel.php | GB18030 | 369 | 2.515625 | 3 | [] | no_license | <?php
class commonModel extends Model{
function useradd($add){
return $this->db ->insert($add);//mysqlеķ
}
function query($que){//ִsql
return $this -> db ->query($que); //ִв뷵ء
}
function fetch_array($fet){
return $this ->db ->fetch_array($fet);
}
}
| true |
08aa4a70941e419d4a56616700907011d50000b3 | PHP | Derek-Bearman/portfolio | /brittanyelainaphotography.com/config/gallery.php | UTF-8 | 538 | 3.1875 | 3 | [] | no_license | <?php
class Gallery {
private $db;
public function __construct(){
$this->db = new Database;
}
public function getAllPhotos(){
$this->db->query("SELECT * FROM photos");
$results = $this->db->resultSet();
return $results;
}
public function getPhotosByCategory... | true |
d349b4554267ded2db91413b672224808fd693c9 | PHP | icmsnow/InstantGame | /plugins/p_game_stat/plugin.php | UTF-8 | 4,929 | 2.53125 | 3 | [] | no_license | <?php
class p_game_stat extends cmsPlugin {
// ==================================================================== //
public function __construct(){
parent::__construct();
// Информация о плагине
$this->info['plugin'] = 'p_game_stat';
$this->info['title'] ... | true |
c53687781467995626a01a00df6516301e8bd554 | PHP | mzimhle/willowvine | /public_admin/jobs/scrape/datafin/datafinHtml.php | UTF-8 | 5,023 | 2.609375 | 3 | [] | no_license | <?php
/* Add this on all pages on top. */
set_include_path($_SERVER['DOCUMENT_ROOT'].'/'.PATH_SEPARATOR.$_SERVER['DOCUMENT_ROOT'].'/library/classes/');
/**
* Standard includes
*/
require_once 'config/setup.php';
require_once 'admin/includes/auth.php';
require_once 'scrape/simple_html_dom.php';
require_once 'functions... | true |
9f02cb997f4cafada7164ed1666a4efb58b5ddf6 | PHP | veka-server/config | /src/Config.php | UTF-8 | 1,791 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: nvanhaezebrouck
* Date: 19/10/2017
* Time: 20:52
*/
namespace VekaServer\Config;
class Config
{
private $settings = [];
private static $_instance = null;
/**
* Retourne une instance singleton du fichier de config
* @param null $path_config_file Ch... | true |
3d9ebddd4295f1c7a88ecef33238d34385e61ecc | PHP | P79N6A/kaiminclan_com | /app/Service/Workflow/WorkflowProcessService.php | UTF-8 | 3,331 | 2.578125 | 3 | [] | no_license | <?php
/**
*
* 工作流
* 流程
*/
class WorkflowProcessService extends Service{
/**
*
* 事件列表
*
* @return array $where 条件;
* @return int $start 当前页;
* @return int $perpage 单页数量;
* @return string $orderby 排序;
*
* @return array 订购列表;
*/
public function getProcessList($where = array(),$start = 0,$pe... | true |
e5ccd4d81a6f0bfe4c7bdbf62abdd8f100e93c5d | PHP | Raven3419/SmartDataAdmin | /module/SmartQuestions/src/SmartQuestions/Service/SubjectsService.php | UTF-8 | 6,295 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/* vim: set expandtab tabstop=4 shiftwidth=4 */
/*
* SmartQuestions
*
* PHP version 5.5
*
* @category Zend
* @package SmartQuestions
* @subpackage Service
* @author Raven Sampson <rsampson@thesmartdata.com>
* @license http://opensource.org/licenses/BSD-3-Clause BSD 3-Clause
* @version GIT... | true |
99ea38ae02d999229237e984bab45dd756e677c4 | PHP | matkozikowski/task-loft | /app/Factory/JourneyFactory.php | UTF-8 | 593 | 2.875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Factory;
use App\Collections\Collection;
use App\Model\JourneyDTO;
/**
* @author matkozikowski@gmail.com
*/
class JourneyFactory
{
/**
* @param array $items
*/
public function process(array $items): Collection
{
$collection = new Collectio... | true |
11f8f0ab1eab43a803472cbfc1cbe5d1e7fe4ab1 | PHP | slambert/Why-They-Hate-Us | /wthu.php | UTF-8 | 2,465 | 2.890625 | 3 | [
"CC-PDDC",
"LicenseRef-scancode-public-domain"
] | permissive | <?
//////////////////////////////////////////////////////////
// wthu.php
// Author: Steve Calderon (steve@damndirtyape.net)
//
// Simple helper proxy to get a bunch of photos from
// Flickr matching a particular tag. Includes some
// ghetto caching!
//////////////////////////////////////////////////////////
... | true |
11c4f5e460a0e3fed9e6f14cb46647b83adca493 | PHP | arcquars/titi | /php/dao/beans/Selkis.php | UTF-8 | 4,961 | 2.734375 | 3 | [] | no_license | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Selkis
*
* @author edwin
*/
class Selkis implements Beans {
private $seguridad = "_esc_";
pri... | true |
beac2d84b765122d19279cb07073afca0a00e987 | PHP | nzbs/board2nzb | /api/index.php | UTF-8 | 3,045 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Board2NZB;
require_once __DIR__ . '/../vendor/autoload.php';
require_once __DIR__ . '/../config.php';
Logger::log("New request: " . json_encode($_GET));
// Output is either json or xml.
$outputXML = (isset($_GET['o']) && ($_GET['o'] == 'json' || $_GET['o'] == 'JSON') ? false : true);
// Read apikey... | true |
ec923e6ce2b5724238d1d2289ed3d80e54478239 | PHP | SaraMeb/Validation-PHP-Sessions | /dataBase.php | UTF-8 | 1,333 | 2.78125 | 3 | [] | no_license | <?php
function getAllShoes(){
$connec = new PDO("mysql:dbname=Shop-DB", 'root', '1234');
$connec->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$request = $connec->prepare("SELECT shoes.id, shoes.name, types.type, quantity FROM shoes INNER JOIN types ON shoes.type_id=types.id;");
$request->execute();... | true |
c1307d8aca662ab2d4b0fab99bd690ca84a0e170 | PHP | ghostcodelover/ApiBundle | /Form/Factory/ApiFormFactory.php | UTF-8 | 1,203 | 2.78125 | 3 | [] | no_license | <?php
namespace ZND\SIM\ApiBundle\Form\Factory;
use JMS\DiExtraBundle\Annotation as DI;
use Symfony\Component\Form\FormFactoryInterface;
/**
* User Manager implementation which can be used as base class for your
* concrete manager.
* @DI\Service("events_api.api_form_factory")
* @author Mukendi emmanuel <mukendie... | true |
c2965b29c9a69ee5863db16be48c4673e5f8e1da | PHP | yesigye/medixa | /application/modules/products/models/Flexi_cart_model.php | UTF-8 | 167,557 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Name: flexi cart standard model
*
* Author:
* Rob Hussey
* flexicart@haseydesign.com
* haseydesign.com/flexicart
*
* Copyright 2012 Rob Hussey
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not... | true |
b09b73177b08c4f91b5ccc5f7770634f4e75fc59 | PHP | Sirsirious/SPDMap | /ConnectionFactory.php | UTF-8 | 366 | 2.859375 | 3 | [] | no_license | <?php
class ConnectionFactory {
public $server = 'localhost';
public $database = 'db_campo_estr';
public $username = 'root';
public $password = 'root';
function connect() {
$connection = new PDO("mysql:host=" . $this->server . ";dbname=" . $this->database, $this->username, $this->password... | true |
b599d3beccac57144090911b2dc8b176dfb2b585 | PHP | matts2cant/sfHfLan | /plugins/sfTwitterBootstrapPlugin/modules/propel_behaviors/templates/_versionable_version_list.php | UTF-8 | 1,503 | 2.59375 | 3 | [] | no_license | <?php
use_helper('I18N');
$object = $form->getObject();
$is_first = true;
?>
<section id="versions">
<h3><?php echo __('History') ?></h3>
<dl class="versions">
<?php foreach($object->getLastVersions(10) as $version): ?>
<dt class="item-record version-title<?php echo !$is_first ? ' other' : ' first' ?... | true |
8d4bd717024c719c8a302d9ff3e38f22574430c2 | PHP | tzyganu/7-wonders-score-v2 | /src/Score/Calculator/Military.php | UTF-8 | 946 | 3.484375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Score\Calculator;
class Military implements CalculatorInterface
{
const FIVE = 'five';
const THREE = 'three';
const ONE = 'one';
const MINUS_ONE = 'minus_one';
/**
* @param $input
* @return int
*/
public function calculate($input)
{
$score = 0;
... | true |
a35744ce99a6f7af5d0d455ee8ed8d9b12071f99 | PHP | kmo0215/ideaRecommend_modify | /main/mvc/main_Controller/main_controller.php | UTF-8 | 928 | 2.65625 | 3 | [] | no_license | <?php
include '../main_Model/main_model.php'; // model클래스를 사용하기위해 호출
class Controller
{
public $_ideaList; //model.php의 ideaList클래스 호출
private $_conn;
public function __construct()
{
$this->_ideaList = new IdeaList();
$this->_conn = mysqli_connect("localhost", "root", "123456","idead... | true |
79ddcd0f1bd14d672e5e4598281fe3af164f8e66 | PHP | anthonyleplay/PHP-partie7 | /exercice7/index.php | UTF-8 | 1,637 | 2.640625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>exo7</title>
</head>
<body>
<h1>Exercice 7</h1>
<p>Au formulaire de l'exercice 5, ajouter un champ d'envoi de fichier. Afficher en plus de ce qui est demandé... | true |