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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
385dff0c5387fc36c1a9b35d2be8bb8761bb1a4e | PHP | surflightroy/SwiftriverCore | /Core/DAL/Repositories/ContentRepository.php | UTF-8 | 1,189 | 3.046875 | 3 | [] | no_license | <?php
namespace Swiftriver\Core\DAL\Repositories;
class ContentRepository {
/**
* The fully qualified type of the IContentDataContext implemting
* data context for this repository
* @var \Swiftriver\Core\DAL\DataContextInterfaces\IDataContext
*/
private $dataContext;
/**
* The cons... | true |
15b55e7af45ae52c7d5a2a8f900f79911b92c79c | PHP | PonnyS/leetcode | /swap-nodes-in-pairs.php | UTF-8 | 996 | 3.453125 | 3 | [] | no_license | <?php
require 'list_node.php';
class Solution {
/**
* @param ListNode $head
* @return ListNode
*/
function swapPairs($head)
{
$dummy = new ListNode(0);
$dummy->next = $head;
$pre = $dummy;
$end = $dummy;
$length = 0;
while (!is_null($end) &&... | true |
4a81d3c2c21dbf739ad57aaa360a75b87f418d20 | PHP | wadetheriver/Pendoreille-API-PHP | /podata.php | UTF-8 | 5,866 | 2.8125 | 3 | [] | no_license | <?php
require 'vendor/autoload.php';
require 'vendor/slim/slim/Slim/Slim.php';
\Slim\Slim::registerAutoloader();
use MyFoundationphp\Calculate\Average as Avg ; //filename is Average.php
require_once('src/MyFoundationphp/Average.php');
$app = new \Slim\Slim();
date_default_timezone_set("America/Los_Angele... | true |
e2c72a55968a263e00d1acbf486528a63bfb54c2 | PHP | claraclaire/Productivity | /database/migrations/2016_11_15_034623_create_subjects_table.php | UTF-8 | 1,323 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSubjectsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('subjects', function (Blueprint $table) {
... | true |
c71e147c90a7736469c810173a5e77858284b1c0 | PHP | wookieb/UnitTest-Article-Part-1 | /application/Reader/Tag/Number.php | UTF-8 | 380 | 2.796875 | 3 | [] | no_license | <?php
/**
* @author wookieb
*/
class Reader_Tag_Number extends Reader_Tag {
private $_value;
protected function _parseSpecificEntryData(SimpleXMLElement $entry) {
$this->_value = (string)$entry;
if (!is_numeric($this->_value)) {
throw new Reader_Exception('"'.$this->_value.'" is not numeric value');
}
}
... | true |
07c841d4e01062e4228e3d881b78324f20fb749c | PHP | paulhennell/IGHasher | /app/output/ScreenOutput.php | UTF-8 | 581 | 3.25 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Output;
/**
* Description of ScreenOutput
*
* @author hennell
*/
class ScreenOutput implements output{
public function outputString(String $string) {
echo $string;
}
public function outputHashtags(array $array){
foreach ($array as $hashtag){
echo $hashtag->getTagName(), "\t", ... | true |
ae947fcc69f09dda24136748dfeb548eb0b8030b | PHP | MrLarrimore/AaronCIsaac | /view/form.php | UTF-8 | 1,313 | 2.9375 | 3 | [] | no_license | <!--Below is the code that links to my config.php file-->
<?php
require_once(__DIR__ . "/../model/config.php");
require_once(__DIR__ . "/../controller/login-verify.php");
// Below is the code that causes my page to die once the user has been
// authenticated
if(!authenticateUser()) {
// ... | true |
438130209fd5e959abd19ecb111ae62734cf8a04 | PHP | pfan8/thinkcmf | /thinkcmf-5.0.180626/app/icr/model/RecruitModel.php | UTF-8 | 3,796 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: pfan8
* Date: 2018/8/2
* Time: 19:07
*/
namespace app\icr\model;
use think\Db;
use think\Model;
class RecruitModel extends Model
{
/**
* 添加招聘
* @param $data
* @return
*/
public function insertRecruit($data)
{
$recruit = [
... | true |
e12d9d837482b5ae7e67542ca0dc7c43e656bba9 | PHP | outofboundscommunications/oobtest | /wp-content/themes/oob2016-2016-09-19/content/section.php | UTF-8 | 4,292 | 2.53125 | 3 | [] | no_license | <?php
/**
* The template used for displaying page content in page.php
*
* @package WordPress
* @subpackage Twenty_Twelve
* @since Twenty Twelve 1.0
*/
?>
<?php global $section_id, $section_type;?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header class="entry-header">
<?php
$p... | true |
98087d795da332d16f3b59106da610df172a33f2 | PHP | Joycezhangw/laravelCMS | /app/Utility/CryptoJS.php | UTF-8 | 1,225 | 3.015625 | 3 | [] | no_license | <?php
namespace App\Utility;
/**
* 前端 CryptoJS 密码解密
* Class CryptoJS
* @package App\Utility
*/
class CryptoJS
{
const OPENSSL_KEY = '3OXdRYG3v3neV502Yr0PbObt';
const OPENSSL_IV = 'BKwsl6WGZR8CzV2N';
public static function opensslDecrypt(string $encrypt, string $method = 'AES-192-CBC')
{
... | true |
3fef91ca3dfb550ddb9e0630596e4b6a1eaff00d | PHP | Lamark-Media/reliable-windows | /stal/inc/woocommerce/helper.php | UTF-8 | 11,791 | 2.65625 | 3 | [] | no_license | <?php
if ( ! function_exists( 'stal_is_woo_page' ) ) {
/**
* Function that check WooCommerce pages
*
* @param string $page
*
* @return bool
*/
function stal_is_woo_page( $page ) {
switch ( $page ) {
case 'shop':
return function_exists( 'is_shop' ) && is_shop();
break;
case 'single':
r... | true |
da61b6693ced3429a9c5205edbef7d52cbde328b | PHP | tbz-ayhan/Basic-PHP-MVC | /views/products_all.php | UTF-8 | 478 | 2.671875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Basic PHP MVC Example</title>
<base href="http://<?= $_SERVER['SERVER_NAME'] ?><?= dirname($_SERVER['PHP_SELF']) ?>/" />
</head>
<body>
<table>
<tr>
<th>ID</th>
<th>Name</th>
</tr>
<? foreach ($result as $product): ?>
<tr>
<td><?= $product[... | true |
5d389f2d33daf17fa77802c0038b6020b90d3470 | PHP | mdimai666/predicate | /engine/modules/sendmail/test.php | UTF-8 | 1,645 | 2.640625 | 3 | [
"MIT"
] | permissive | <form action="test.php" method="post">
<input type="text" name="fio" placeholder="Укажите ФИО" required>
<input type="text" name="email" placeholder="Укажите e-mail" required>
<input type="text" name="text" placeholder="Текст" required>
<input type="submit" value="Отправить">
</form>
<?php
if (!empty($_POS... | true |
8af8e556ca17596740ae1275be37630b3cac52f3 | PHP | IsaiasMorochi/Gestiondocumental | /app/Listeners/bitacoras.php | UTF-8 | 2,437 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Listeners;
use App\Bitacora;
use App\Events\llamada;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Contracts\Queue\ShouldQueue;
use Carbon\Carbon;
class bitacoras
{
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
... | true |
8b47fe103ad08da838b2a87596457143fdfed11f | PHP | Azumie/Sistema-baseball | /Controlador/Campos.controlador.php | UTF-8 | 2,277 | 2.71875 | 3 | [] | no_license | <?php
require_once 'Modelo/Temporada.php';
include_once 'Modelo/Campo.php';
require_once 'Modelo/Direccion.php';
require 'Controlador/Table.php';
class CamposControlador{
public $ERROR = "";
private $campo;
private $direccion;
function __construct(){
$this->campo = new Campo();
$this->direccion= new Dir... | true |
a5e1edeca020c2ac7bb218edf5d30688bb859877 | PHP | hubcash/hubcash-php-sdk | /src/Hubcash/Billet.php | UTF-8 | 1,263 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace Hubcash;
/**
* Class Billet
* @package Hubcash
*/
class Billet
{
/**
* @var $BilletId string
*/
public $BilletId;
/**
* @var $OurNumber string
*/
public $OurNumber;
/**
* @var array
*/
public $Instructions = array();
/**
* @var $Exp... | true |
8479ac6a5a5a2c313f477a433dbcd3df382ff547 | PHP | capons/graphs | /src/E2w/GfsOnlineReviewsBundle/Utils/Api/Avvo.php | UTF-8 | 3,597 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace E2w\GfsOnlineReviewsBundle\Utils\Api;
class Avvo {
private $token;
public function __construct($token) {
// this will be obtained by oauth (see oauth.php)
$this->token = $token;
}
public function getInfo($lawyerId) {
// info
$url = "https://api.avvo.c... | true |
5509c22407ad841ff83aacd8ca35ed7f0d70c1d1 | PHP | QualiRetraite/TeamleaderApiClient | /src/Request/CRM/Contacts/ContactsAddRequest.php | UTF-8 | 913 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace QR\TeamleaderApiClient\Request\CRM\Contacts;
use QR\TeamleaderApiClient\Request\MultipleMethodsTrait;
use QR\TeamleaderApiClient\Request\PostRequest;
/**
* Class ContactsAddRequest.
*/
class ContactsAddRequest extends PostRequest
{
use MultipleMethodsTrait;
/**
... | true |
873915587c7cf8e0acc3b1ad1c20379772ff3fd4 | PHP | Chazovs/taskmanager | /tasksmanager.php | UTF-8 | 3,139 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
session_start();
echo "<br>Запрос отправлен обработчику<br>";
require_once 'config.php';
/*добавляем новую задачу*/
if (!empty($_POST['dateNewTaskPost']) && !empty($_POST['FullTasktextPost']) && !empty($_SESSION['userid']) && !empty($_POST['headerTaskPost'])){
echo "Данные доставлены<br>";
$dateNewTaskPost=$_PO... | true |
f8d03971523f7b4231d3c7647f68442bef6d2b2f | PHP | theta-app/theta | /web/lecturerSubjectManagement.php | UTF-8 | 3,488 | 2.546875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
session_start();
if ( !isset ( $_SESSION['lecturerUsername'] ) || !isset ( $_SESSION['lecturerName'] ) )
{
header ( 'Location:indexLecturer.html' );
die ( '' );
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Study Support Services</title>
<link rel='stylesheet' href='css/main.css'>
<script type... | true |
559b7a69d99a86322a60fb8cf4c3db0bf36ef004 | PHP | flaver12/seating | /src/Entity/Seat.php | UTF-8 | 4,418 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\SeatRepository")
*/
class Seat
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type=... | true |
da4a3493a1297680204a41b8b1126d8029bad530 | PHP | rogierpennink/CannoliMVC | /framework/core/context/cliinputmanager.class.php | UTF-8 | 445 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Cannoli\Framework\Core\Context;
class CliInputManager extends InputManager
{
private $request;
private $options = array();
private $longOptions = array();
public function __construct() {
parent::__construct();
$request = CliRequest::getCurrent();
$this->options = $request->getOptions();
... | true |
93f8504783022c4420ae8899d3240001e4dae89f | PHP | Mureithi/UPID | /application/models/Entities/e_security_incidences.php | UTF-8 | 1,826 | 2.75 | 3 | [] | no_license | <?php
namespace models\Entities;
/**
* @Entity
* @Table(name="security_incidencies")
*/
class E_Security_Incidences {
/**
* @Id
* @Column(name="security_incident_id", type="integer", length=50, nullable=false)
* @GeneratedValue(strategy="AUTO")
* */
private $security_incident_id;
/**
* @Column(nam... | true |
10fd276159e942a454c027d340d9a7448a6e938c | PHP | Miyunecadz/client_projects | /midterm/api/update_pattern_request.php | UTF-8 | 608 | 2.578125 | 3 | [] | no_license | <?php
include_once './db.php';
session_start();
$pattern = $_POST['pattern'];
$confirm_pattern = $_POST['confirm_pattern'];
if($pattern !== "0-0-0-0-0-0-0-0-0-0-0-0-0-0-0-0"){
if($pattern === $confirm_pattern){
$DB->query("UPDATE users SET pattern=? WHERE username=? ",array($pattern,$_SESSION['user']));
... | true |
4d8b5822372b8ab12ad4fce7c2150fea9866c82c | PHP | suny-upstate-cwt/php7-cascade-ws-ns | /cascade_ws_ns7_8.8/property_classes/PublishableAssetIdentifier.class.php | UTF-8 | 3,773 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Author: Wing Ming Chan
* Copyright (c) 2018 Wing Ming Chan <chanw@upstate.edu>
* MIT Licensed
* Modification history:
* 7/14/2017 Added call to getXMLFragments.
* 5/28/2015 Added namespaces.
*/
namespace cascade_ws_property;
use cascade_ws_constants as c;
use cascade_ws_AOHS as aohs;
use ... | true |
4ded18ca9ed092cedf806bbb04e33452860d4546 | PHP | tobimichigan/LASUHRM | /symfony/plugins/orangehrmAdminPlugin/lib/form/PayGradeCurrencyForm.php | UTF-8 | 2,367 | 2.65625 | 3 | [] | no_license | <?php
/*** LASUHRM is a comprehensive Human Resource Management (HRM) System that captures
* all the essential functionalities required for the Academic/Non Academic Staff Establishments of Lagos State University respectively . This Software has been tested on a remote server and is capable of encapsulating large inf... | true |
f1e8ede382c756ef88efb6471530555f96848dee | PHP | shiratensei/MyFutsal | /load.php | UTF-8 | 1,232 | 2.515625 | 3 | [] | no_license | <script>
function loadEntry(id, content){
var activecell = document.getElementById(id);
activecell.innerHTML = content;
return;
}
</script>
<?php
$staffID = $_SESSION['staffID'];
//connect to server
$link = mysqli_connect("localhost", "root","");
if(!$link){
die("Connection failed!" . mysqli_connect_error())... | true |
c89959b5f288ee7ad26f936e7e866afea8385959 | PHP | saulcalderon/PTC_Kamiltik | /core/api/dashboard/productos.php | UTF-8 | 17,943 | 2.625 | 3 | [] | no_license | <?php
require_once('../../helpers/database.php');
require_once('../../helpers/validator.php');
require_once('../../models/dashboard/productos.php');
// Se comprueba si existe una acción a realizar, de lo contrario se finaliza el script con un mensaje de error.
if (isset($_GET['action'])) {
// Se crea una sesión o ... | true |
818a8cd82abbe1f2962f4ad3c4c1b294cb85249b | PHP | griha41/Dayz_CC_Basebuilding_Update | /@dayzcc/install/migrate.php | UTF-8 | 4,016 | 2.625 | 3 | [] | no_license | <?php
/**
* Tiny database migration script by Crosire
*/
chdir(dirname(__FILE__));
$args = getopt("", array("host:", "port:", "username:", "password:", "database:", "schema:"));
$path = "schema";
$dbhost = (isset($args['host']) ? $args['host'] : "127.0.0.1");
$dbport = (isset($args['port']) ? $args['port'] : "330... | true |
ef77a2da29f2cb7a7eaaeecf0dc2d414bf227557 | PHP | emjayoh/autobahn | /template-archive.php | UTF-8 | 1,487 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/*
Template Name: Post Archive Page
*/
?>
<?php // Build WP_Query for CPT posts being archived
$archive_post_type = get_field('archive_post_type');
$args = array(
'post_type' => $archive_post_type,
'posts_per_page' => -1,
);
$archive_query = new WP_Query( $args );
?>
<?php // Error message if no ... | true |
74e5e9fda97442c5a405f02f9a198e4f246419ad | PHP | unamu1229/hands_on_laravel_ddd | /src/Application/ReservationService.php | UTF-8 | 744 | 2.6875 | 3 | [] | no_license | <?php
namespace src\Application;
use src\Domain\Model\Service\ParkingService;
use src\Domain\Model\ValueObject\ParkingId;
use src\Domain\Model\ValueObject\UserId;
use Carbon\Carbon;
use src\Domain\Model\Event\ReservationParking;
class ReservationService
{
private $reserveParking;
public function __constr... | true |
7f7298d276d1cba2c832050ca8b52bcd26b2ef2b | PHP | yvan99/emental_backend | /server/validators/managersignupvalidator.php | UTF-8 | 1,687 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/emental/server/core/init.php';
require ($_SERVER['DOCUMENT_ROOT'].'/emental/server/helpers/validationhandler/vendor/autoload.php');
use Respect\Validation\Validator as v;
use Respect\Validation\Exceptions\NestedValidationException;
function managerSignUpValdation($fnam... | true |
d4101da61b8be60232f0fa10e53e348a94603721 | PHP | Krystopher06/PHP-MYSQL | /PHP&SQL/Niveau_2_Exercice_1/Exercice_Nv2_Medoo/signin.php | UTF-8 | 7,665 | 2.953125 | 3 | [] | no_license | <?php require_once 'header.php'; ?>
<body>
<a href='http://localhost/krys/PHP&SQL/Niveau_2_Exercice_1/Exercice_Nv2_Medoo/home.php'>Revenir à la page d'accueil </a>
<hr>
<?php
function str_random($length)
{
$alphabet = "0123456789azertyuiopqsdfghjklmwxcvbnAZERTYUIOPQSDFGHJKLMWXCVBN"... | true |
cf91e1140868b80a17de5fbbbe850f14dafdb4d7 | PHP | netresearch/kite | /src/Task.php | UTF-8 | 7,310 | 2.6875 | 3 | [] | no_license | <?php
/**
* See class comment
*
* PHP Version 5
*
* @category Netresearch
* @package Netresearch\Kite
* @author Christian Opitz <christian.opitz@netresearch.de>
* @license http://www.netresearch.de Netresearch Copyright
* @link http://www.netresearch.de
*/
namespace Netresearch\Kite;
/**
* Base Tas... | true |
f86f11dae4b1546fd21ac2f0fb0ee6ae2be7ac7e | PHP | liuwangdongphp/Yii-personal-blog | /frontend/models/PostsForm.php | UTF-8 | 6,011 | 2.859375 | 3 | [
"BSD-3-Clause"
] | permissive | <?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.
*/
namespace frontend\models;
use yii\base\Model;
//数据模型 继承自 ActiveRecord
//表单模型 继承自 Model
//ActiveRecord ---->Model
class Posts... | true |
1983421efd2b277cfe7f8019a0f4ad50b35eeccc | PHP | Starbugstone/SnowTricks | /src/Pagination/PaginateRepositoryTrait.php | UTF-8 | 396 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Pagination;
use Doctrine\ORM\Tools\Pagination\Paginator;
trait PaginateRepositoryTrait{
public function paginate($dql, int $limit, int $page = 1)
{
$paginator = new Paginator($dql);
$paginator->getQuery()
->setFirstResult($limit * ($page - 1))// Offset
... | true |
1ad3d31f4f1750eb9043be3500161320c7be750e | PHP | flipty/hutch2 | /wp-content/plugins/advanced-sidebar-menu/src/Scripts.php | UTF-8 | 2,011 | 2.578125 | 3 | [] | no_license | <?php
namespace Advanced_Sidebar_Menu;
use Advanced_Sidebar_Menu\Traits\Singleton;
/**
* Scripts and styles.
*
* @author Mat Lipe
* @since 7.7.0
*/
class Scripts {
use Singleton;
/**
* Add various scripts to the cue.
*/
public function hook() {
add_action( 'admin_print_scripts', [ $this, 'admin_scrip... | true |
04e7dc29462d9d3d8edda26e87c65af3cc64a736 | PHP | HackerWand/taobai | /server/application/app/controller/BaseController.php | UTF-8 | 785 | 2.53125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
*
* @authors Hacker丶Wand (578112964@qq.com)
* @date 2017-08-14 17:19:04
* @version $Id$
*/
namespace app\app\controller;
use app\app\model\BaseModel;
use app\app\model\User;
class BaseController {
protected static $user = null;
function __construct(){
$result = auth_check('user',true);
if... | true |
83b9c409e2d8fccd7b33580b09ca358340ac5596 | PHP | Dratejinn/telegrambot | /src/API/Type/ReplyKeyboardMarkup.php | UTF-8 | 1,668 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Telegram\API\Type;
use Telegram\API\Base\Abstracts\ABaseObject;
/**
* Class ReplyKeyboardMarkup
* @package Telegram\API\Type
* @property array $keyboard
* @property null|bool $resizeKeyboard
* @property null|bool $oneTimeKeyboard
* @property null|bool $selective
*/
cl... | true |
ca0b7c3df3d4143f75ba89d790d5d91b4dae985c | PHP | mchellamuthu/dexter-vue | /app/Http/Controllers/bkupAPI/PointsController.php | UTF-8 | 10,848 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\API;
use App\Point;
use App\Skill;
use App\Student;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\User;
use App\Institute;
use App\Teacher;
use App\ClassRoom;
use App\MyClassRoom;
use Validator;
use App\MyInstitute;
use App\StudentGroup;
use App\GroupPo... | true |
d752ecfa4708d4c89f49231f96dac9c08d8ae789 | PHP | ingenerator/form | /field_templates/default/edit/text.php | UTF-8 | 1,114 | 2.609375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Renders a text field - optionally specifying the type of field to render
*
* @var TextField $field
* @var FormElementRenderer $form_renderer
*/
use Ingenerator\Form\Element\Field\TextField;
use Ingenerator\Form\Renderer\FormElementRenderer;
?>
<div class="form-group <?= $field->errors ? 'has-error' :... | true |
d2c6fa6154d8f4d50658529c0ebfb89e6750cc49 | PHP | sigrundev/ceidg-api | /src/Contracts/XmlParserContract.php | UTF-8 | 1,186 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is a part of sigrun/ceidg-api package, a PHP library for to deal
* with the CEIDG (https://datastore.ceidg.gov.pl) SOAP webservice.
*
* @author Marek Kapusta-Ognicki <marek@sigrun.eu>
* @author Sigrun Sp. z o.o. <sigrun@sigrun.eu>
* @copy (C)2019 Sigrun Sp. z o.o. All rights reserved.
*/
n... | true |
10dd4eb9eb935c5a8d6f05fc4c2926e308129f61 | PHP | shofinadhiroh/dumet-store | /application/models/Cart_m.php | UTF-8 | 1,042 | 2.546875 | 3 | [] | no_license | <?php
class Cart_m extends CI_Model {
public function index()
{
echo $this->cart->total();
echo '<pre>';
print_r($this->cart->contents());
}
public function add($data = array())
{
$this->cart->insert($data);
}
public function remove($r... | true |
280db45b80d875590fc492d164148a7dc0a6bd5b | PHP | GenaroHV/sistema-compra-venta | /app/Policies/UserPolicy.php | UTF-8 | 848 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Policies;
use App\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class UserPolicy
{
use HandlesAuthorization;
public function before($user)
{
if( $user->hasRole('Administrador')){
return true;
}
}
public function view(User $authUser, User ... | true |
93e9d78eb5e9b33f00c64ab6d7e28e48fcd007e2 | PHP | ilesar/smart-home | /src/EventListener/FileUploadListener.php | UTF-8 | 484 | 2.65625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\EventListener;
use App\Entity\Image;
use App\Service\FileUploadService;
class FileUploadListener
{
/**
* @var FileUploadService
*/
private $fileUploadService;
public function __construct(FileUploadService $fileUploadService)
{
$this->fi... | true |
0cd879acd4dd468b056d154ec92df8ba85d1d99b | PHP | ei17ringo/friend | /edit.php | UTF-8 | 3,476 | 2.890625 | 3 | [] | no_license | <?php
$friend_id = $_GET['friend_id'];
//接続オブジェクト
$dsn = 'mysql:dbname=CampTest;host=localhost';
$user = 'root';
$password = 'camp2014';
$dbh = new PDO($dsn,$user,$password);
$dbh->query('SET NAMES utf8');
$sql_for_friend = 'select * from friend_table where id ='.$friend_id;
$stmt = $dbh->prep... | true |
1c25f6f31b4e3da98c63449906b71c2e339b58ec | PHP | tghpow/gbaf | /controller/User.php | UTF-8 | 1,554 | 3.359375 | 3 | [] | no_license | <?php
class User{
protected $id;
protected $lastname;
protected $firstname;
protected $username;
protected $pwd;
protected $question;
protected $answer;
public function __construct($data = []){
if(!empty($data)){
$this->hydrate($data);
}
}
public function hydrate($data){
foreach($data as $attribu... | true |
0051a810fa32ec32275f09d55a4df9fde8641334 | PHP | nyankormotti/ToDoList | /app/Http/Requests/SignUpRequest.php | UTF-8 | 1,598 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class SignUpRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
if($this->path() == 'signup'){
... | true |
224320ea3097765a1101e1a88138cd1edfbfc6ac | PHP | AndresK21/tienda-cktes | /cktes/app/models/productos.class.php | UTF-8 | 18,831 | 2.5625 | 3 | [] | no_license | <?php
class Producto extends Validator{
//Declaración de propiedades
private $id_producto = null;
private $nombre = null;
private $imagen = null;
private $descripcion = null;
private $ficha_tecnica = null;
private $cantidad = null;
private $precio = null;
private $tamano = null;
private $id_pre... | true |
bc2f31b4c248257f918f7e270d45dcf9fc282181 | PHP | jfl1616/project3 | /src/Controller/Activation/ActivationController.php | UTF-8 | 2,166 | 2.609375 | 3 | [] | no_license | <?php
namespace Bolzen\Src\Controller\Activation;
use Bolzen\Core\Controller\Controller;
use Bolzen\Src\Model\Account\AccountModel;
use Bolzen\Src\Model\ActivationToken\ActivationTokenModel;
use Bolzen\Src\Traits\AuthenticationTrait;
use Bolzen\Src\Traits\ResponseTrait;
use Symfony\Component\HttpFoundation\Request;... | true |
473d74f448aef70132f07fc94480aebb61ce4928 | PHP | wallaceskt/mini-framework-mvc-php | /app/functions/functions.php | UTF-8 | 625 | 3.34375 | 3 | [] | no_license | <?php
/**
* dd stands for "Dump and Die." Laravel's dd() function can be defined as a helper function, which is used to dump a variable's contents to the browser and prevent the further script execution.
*
* @param mixed $params
* @param mixed $die
* @return void
*/
function dd($params = [], $die = true) {
... | true |
da80847553df44f9b0f847d9abf775fce3490366 | PHP | majo45/eramba_isms | /lib/system_users_lib.php | UTF-8 | 4,197 | 2.828125 | 3 | [] | no_license | <?
# WARNING! This is a TEMPLATE
# IF YOU WANT TO USE, YOU MUST RENAME FUNCTIONS!! :s/system_users/system_users/ - SAMEPLE
include_once("mysql_lib.php");
function list_system_users($arguments) {
# MUST EDIT
$sql = "SELECT * FROM system_users_tbl".$arguments;
$results = runQuery($sql);
return $results;... | true |
f50dab02800dc043ffe5584f925d90151804cecf | PHP | gnl6331/RESTfm | /lib/tonic/examples/helloworld/helloworld.php | UTF-8 | 1,279 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
/**
* The Hello World of Tonic
*
* This example outputs a simple hello world message and the details of the
* request and response as generated by Tonic. It also demonstrates etags and
* "if none match" functionality.
*
* @namespace Tonic\Examples\Helloworld
* @uri /helloworld
*/
class HelloWorldResourc... | true |
9424e48ba508f2058089ef880f67eab9738f1361 | PHP | guojiangclub/common | /src/Platform/Application.php | UTF-8 | 1,015 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace iBrand\Common\Platform;
/**
* Class Application.
* @method Client getOauthUrl($redirectUri, $appid)
* @method Client getUser($appid, $openid)
* @method Client getFans($appid, $openid)
* @method Client createMiniQrcode($appid, $page, $width, $scene, $typ... | true |
e4f2c4bd71317e5d32e21f1db81a6fcc9b8d1e20 | PHP | tedslittlerobot/Documentator | /src/Basic/Chapter.php | UTF-8 | 1,119 | 2.9375 | 3 | [] | no_license | <?php namespace Documentor\Basic;
use Documentor\Contract\ChapterInterface;
use Documentor\Contract\OutputRendererInterface;
class Chapter implements ChapterInterface {
/**
* The Title
* @var string
*/
public $title = 'Title.';
/**
* The Content
* @var string
*/
public $content = ' Intro';
/**
... | true |
9fc38c527faab61bb0ae5b14cf210ac65bfd4c03 | PHP | jelix/composer-module-setup | /lib/SetupJelix16.php | UTF-8 | 16,910 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Jelix\ComposerPlugin;
use Composer\Util\Filesystem;
use Jelix\ComposerPlugin\Ini\IniModifier;
/**
* Setup configuration for a Jelix 1.6 application
*/
class SetupJelix16 {
/**
* @var JelixParameters
*/
protected $parameters;
/**
* @var Filesystem
*/
protected $... | true |
cf255a6283cce813d08ff3fba0f3eee0b66e9aa4 | PHP | Sywooch/smart_hh2 | /common/components/Controller.php | UTF-8 | 4,884 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/* Frontend Special Controller */
namespace common\components;
use Yii;
use yii\web\Controller as native_Controller;
use common\modules\user\models\User;
use yii\helpers\Url;
use common\modules\user\models\Role;
use common\components\Commonhelper;
class Controller extends native_Controller {
// this need f... | true |
e8e25389fb53422a4d425c7155db5a53babfccd8 | PHP | thomasjost/PHP-ESAPI | /src/ValidationErrorList.php | UTF-8 | 2,987 | 2.796875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* OWASP Enterprise Security API (ESAPI).
*
* This file is part of the Open Web Application Security Project (OWASP)
* Enterprise Security API (ESAPI) project.
*
* PHP version 5.2
*
* LICENSE: This source file is subject to the New BSD license. You should read
* and accept the LICENSE before you use,... | true |
2ba4ad7b285b3171e6fb1a2ff0e32e622e385226 | PHP | mongramosjr/value-card | /src/Model/Entity/CustomerUser.php | UTF-8 | 1,457 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Model\Entity;
use Cake\Auth\DefaultPasswordHasher;
use Cake\ORM\Entity;
/**
* CustomerUser Entity
*
* @property string $id
* @property string $full_name
* @property string $email
* @property string $password_crypt
* @property \Cake\I18n\FrozenTime $created
* @property \Cake\I18n\FrozenTim... | true |
497b0a9146f4396eca13dbba29d26bba4647bbef | PHP | VincentPHP/shop | /AQPHP/Libs/WeChat/WeChat.Class.php | UTF-8 | 8,939 | 2.65625 | 3 | [] | no_license | <?php
/* +----------------------------------------------------------------
* | Software: [AQPHP framework]
* | Site: www.aqphp.com
* |----------------------------------------------------------------
* | Author: 赵 港 < admin@gzibm.com | 847623251@qq.com >
* | WeChat: GZIDCW
* | Copyright (C) 2015-2020, www.a... | true |
0644fd3c9d7b3581124fd37acf0ec737e44901f4 | PHP | sarahgosago/Book-Managing-by-Google-Account | /app/models/admin.php | UTF-8 | 958 | 2.890625 | 3 | [] | no_license | <?php
class Admin extends AppModel
{
const TABLE_NAME = 'admin';
public static function checkIfAdmin($username)
{
$con = DB::conn();
$sql = "SELECT username FROM " . self::TABLE_NAME . " WHERE username = ?";
return $con->row($sql, array($username));
}
public static functio... | true |
775e4688c3a76756a5998a4269bbeddbd7fc0e68 | PHP | rivergod5364/phpprogram | /newregister.php | UTF-8 | 1,367 | 2.8125 | 3 | [] | no_license | <html>
<head><title>新規登録</title></head>
<body>
<h1>新規登録</h1><form>
<input type="button" value="ログインページ" onclick="location.href='TOPlogin.php'">
</form>
<form method="post" action="newregister.php">
<p>名前</p>
<input type="text" name="personal_name">
<p>パスワード</p>
<input type="text" name="pas"><br><br>
<inpu... | true |
aacf774ee983c4a24cb5698a6183570726b7de42 | PHP | zaydons/capstone | /adult-directory.php | UTF-8 | 1,632 | 2.53125 | 3 | [] | no_license | <?php include('header.php') ?>
<?php require_once('auth.php');?>
<?php require_once('config.php');?>
<body>
<h1>Adult Directory</h1>
<?php include('nav2.php') ?>
<?php
$con=mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_DATABASE);
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to conn... | true |
846f4ca059aec7b143aad747cfdb3c9ce17a846a | PHP | gabrielvicenteYT/IRC-Bot | /irc2.php | UTF-8 | 9,586 | 2.84375 | 3 | [] | no_license | <?php
/*
* PHP IRC Bot
* Written By Trip-Out for www.TheGeeks.us
*
* You may modify this for your own purposes,
* all I ask is that you drop us off a greet
* at www.TheGeeks.us
*/
set_time_limit(0);
//Open socket to server,port
$socket = fsockopen("irc.freenode.net",6667);
//Sends USER HOSTNAME IDENT :REAL NAME
fputs... | true |
2fe5d928d99ec1cbaa20cc84b08146df8a536336 | PHP | Nyanko-sensei/user_rest_Service | /src/Interfaces/UserRepositoryInterface.php | UTF-8 | 417 | 2.921875 | 3 | [] | no_license | <?php
namespace UserListRest\Interfaces;
use UserListRest\Models\User;
interface UserRepositoryInterface
{
/**
* @param int $id
*
* @return User|null
*/
public function getUserById(int $id);
/**
* @param $limit
* @param $offset
* @param $filter
*
* @return U... | true |
349dd1a77466731db7ce95e7be5168054d622910 | PHP | Drebakare/emoventures | /app/Quote.php | UTF-8 | 581 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Quote extends Model
{
protected $fillable = [
'header', 'body'
];
public static function updateQuoteInfo($request){
$status = Quote::where('id', 1)->update([
"body" => $request->body,
"header" => $... | true |
fbeed0df7c8290c174acbcec1735004a40ccbeca | PHP | sutajiokousagi/cyclone | /util_preferences.php | UTF-8 | 2,158 | 2.890625 | 3 | [] | no_license | <?php
/*
- Created by Torin
- Helper functions to retrieve values in Queues table
*/
require_once("db_config.php");
/*
* Return a single value system-wide preference.
* This provides a simple key-value pair storage mechanism
*/
function func_getSystemPreference($preference_name)
{
$condition = "preferenc... | true |
99660c8ec75139101c85d966ec4a4ed700286e88 | PHP | phpcrazy/wpa25 | /ooframe/wpa25/provider/Hdb.php | UTF-8 | 4,842 | 3.15625 | 3 | [] | no_license | <?php
class HDB extends PDO {
private $engine;
private $host;
private $database;
private $user;
private $pass;
private static $_instance;
private $table_name;
private $select_status;
private $select_sql;
private $insert_sql;
private $delete_sql;
private $where_sql;
private $update_sql;
... | true |
a16280ca62513fff8a87270a67b36cf1328d45fd | PHP | ParkKyoungHun/php | /php/test.php | UTF-8 | 831 | 2.546875 | 3 | [] | no_license | <?
header("Content-Type: text/html; charset=utf-8");
$test = $_REQUEST["test1"];
echo ("test:".$test);
$result = "0";
$num1 = $_REQUEST["num1"];
$num2 = $_REQUEST["num2"];
$op = $_REQUEST["op"];
if(empty($num1)){
echo "1";
}else{
$result = $num1 +$num2;
}
?>
<html>
<head>
<meta charset="utf-8">
<title><?="계... | true |
19d521863b4a514f59995f9ffe23c7006ee86e56 | PHP | psdshow/suning | /src/request/selfmarket/ItemdetailQueryRequest.php | UTF-8 | 1,294 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Justcy\Suning\Request\selfmarket;
/**
* 苏宁开放平台接口 -
*
* @author suning
* @date 2018-3-6
*/
class ItemdetailQueryRequest extends SuningRequest{
/**
*
*/
private $applyCode;
/**
*
*/
private $productCode;
/**
*
*/
private $supplierCodeAsk;
pub... | true |
a186fd8b6ca0b787c60b35138d1e81daa333eb5b | PHP | paolinos/php-orm | /examples/example1.php | UTF-8 | 1,947 | 3.234375 | 3 | [] | no_license | <?php
// Include ORM
//require_once __DIR__ . "/../orm/orm.init.php";
require_once "./../orm/orm.init.php";
// Set DB connection
DBConnector::Inst()->setConn('localhost', 'example-orm', 'user', 'pass');
class User extends DBObject{
// Properties
public $id;
public $firstname;
public $lastname;
public $born_da... | true |
9ca729fa15d4642471c8383a0cd3454c2139ac24 | PHP | wagheajay/codeigniterProject1 | /application/views/users/register_view.php | UTF-8 | 3,340 | 2.578125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive |
<h1>Register Form</h1>
<?php
//this will add attributes to form like id="login_form" class="form_horizontal"
$attributes = array('id' => 'register_form', 'class' => 'form_horizontal');
?>
<?php echo validation_errors("<p class='bg-danger'>");?>
<?php
//createing form using codeigniter
//this will open ... | true |
77197bc6bf08ec8efbb9cd844e9592f9c3c8caf2 | PHP | Ajay-Rajendrakumar/WebService | /backend_php/nthRoot.php | UTF-8 | 1,035 | 3 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: *");
header('Content-type: application/json');
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$number = (int)$_POST['number'];
$place = (int)$_POST['place'];
$list = array();
array_push($list, (nthRoot($number,$p... | true |
df8413af84ab9afcdb18df09beaf6d521193f3ad | PHP | PedjaM/AppZaAlfabet | /login.php | UTF-8 | 2,184 | 2.75 | 3 | [] | no_license | <?php
error_reporting(E_ALL ^ E_NOTICE);
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
</head>
<body>
<?php
$forma = "<form action='lo... | true |
e98019c61e42fbaf578e1e6d523580f586a2b0ef | PHP | autismee/log-parser-php | /Run.php | UTF-8 | 664 | 2.875 | 3 | [] | no_license | <?php
require_once("LogParser.php");
try {
$fileName = $argv[1];
if (!file_exists($fileName)) {
throw new Exception("File \"$fileName\" not found");
}
if (!isset($argv[1])) {
throw new Exception('Filename not specified');
}
//todo: use fopen or fgets and StreamWrapper bufferi... | true |
4af86421b93b0b5633fb2afecbf156ad43a6e891 | PHP | chrizee/parenting-challenge | /app/Http/Controllers/Admin/ParentingQuizzesController.php | UTF-8 | 6,789 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Storage;
use App\ParentingQuiz;
class ParentingQuizzesController extends Controller
{
private $viewPath = "admin.parentingQuiz.";
public function __construct()
{
... | true |
84c26084bdf4665b0055cbefa47f977357fdb254 | PHP | Decicus/Steam | /src/Syntax/SteamApi/Containers/BaseContainer.php | UTF-8 | 2,612 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
namespace Syntax\SteamApi\Containers;
use NukaCode\Database\Collection;
abstract class BaseContainer
{
/**
* @param $app
* @param string $field
* @param mixed $value
*
* @return mixed
*/
protected function checkIsNullField($app, $field, $value = null)
{
... | true |
6113a09bafbd214acfbc3fc627d198bbf6b7269b | PHP | php-carteblanche/bundle-unittest | /src/UnitTest/Lib/Assertion.php | UTF-8 | 2,610 | 2.96875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* This file is part of the CarteBlanche PHP framework.
*
* (c) Pierre Cassat <me@e-piwi.fr> and contributors
*
* License Apache-2.0 <http://github.com/php-carteblanche/carteblanche/blob/master/LICENSE>
* For the full copyright and license information, please view the LICENSE
* file that was distributed... | true |
c2e3642158fd365062709857de1affa709849f8a | PHP | petchzahahayo/Family_herb | /backend/frm_medic_edit.php | UTF-8 | 6,123 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
require 'header_admin.php';
//รับค่า
$medic_id = $_GET['medicine_id'];
//คำสั่ง sql
$sql = "SELECT * FROM medicine WHERE medicine_id='$medic_id'";
$result = pg_query($db, $sql);
$row = pg_fetch_array($result);
//herb_data
... | true |
24952548a80648d7da966868cd2f4d5c955729e8 | PHP | basmilius/Columba | /src/Columba/SSH/SSHPasswordAuthentication.php | UTF-8 | 1,388 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright (c) 2019 - 2020 - Bas Milius <bas@mili.us>
*
* This file is part of the Columba package.
*
* For the full copyright and license information, please view the
* LICENSE file that was distributed with this source code.
*/
declare(strict_types=1);
namespace Columba\SSH;
use Col... | true |
2b82fd05f8636c3abc679af5009b42b01d182cf9 | PHP | kzeng/powerful-form | /backend/models/PformField.php | UTF-8 | 1,238 | 2.609375 | 3 | [] | no_license | <?php
namespace backend\models;
use Yii;
/**
* This is the model class for table "pform_field".
*
* @property integer $id
* @property string $title
* @property integer $type
* @property string $value
* @property string $placeholder
* @property integer $sort
* @property string $pform_uid
*/
class PformField... | true |
a520c1436becf54a6f38bf3968be94039254925b | PHP | ghassani/scrapyard | /spliced-cms-bundle/src/Templating/TemplateBlockHelper.php | UTF-8 | 686 | 2.53125 | 3 | [] | no_license | <?php
/*
* This file is part of the SplicedCmsBundle package.
*
* (c) Spliced Media <http://www.splicedmedia.com/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Spliced\Bundle\CmsBundle\Templating;
class Template... | true |
027346d493a849c5c22b5d370f86872999440717 | PHP | pc-codyh/pongchamp2014 | /stats/right-menu-player-profiles.php | UTF-8 | 646 | 2.6875 | 3 | [] | no_license | <?php
session_start();
require '../database-connect.php';
$query = 'SELECT `name`, `rank` FROM `players` WHERE `id_registrations`="'.$_SESSION['userID'].'" ORDER BY `name` ASC';
$runQuery = mysql_query($query);
?>
<ul>
<?php
for ($i = 0; $i < mysql_num_rows($runQuery); $i++)
{
$name = mysql_result($runQ... | true |
361295048684dd639c6c2fd6e0a6618fa00081a9 | PHP | gconde1974/cursos-php | /codigofacilito/mvc/clases07.php | UTF-8 | 331 | 2.859375 | 3 | [] | no_license | <?php
class Pagina {
//atributos
public $nombre = "Sitio RoyalReservations";
public static $url = "https://royalreservations.com";
//metodos
public function bienvenida(){
echo "bienvenido a <b>".$this->nombre."</b> la pagina es <b>".self::$url."</b>";
}
}
$sitio = new Pagina();
$sitio->bi... | true |
bda84b722d94ad42a4ee2c52fb752180cc6fa389 | PHP | mcfog/litcanvas | /src/Action/Pixel/GetCanvasAction.php | UTF-8 | 621 | 2.53125 | 3 | [] | no_license | <?php namespace Litcanvas\Action\Pixel;
use Lit\Bolt\BoltContainer;
use Litcanvas\Bolt\LCAction;
use Litcanvas\Canvas;
use Psr\Http\Message\ResponseInterface;
class GetCanvasAction extends LCAction
{
const PATH = '/api/canvas';
/**
* @var Canvas
*/
protected $canvas;
public function __cons... | true |
a5f159fd4ac88e2d39641c403d686f73424e76f6 | PHP | josipa-marusic/Web-Development-Exercise | /contact.php | UTF-8 | 4,058 | 2.609375 | 3 | [] | no_license | <?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$name = trim(filter_input(INPUT_POST,"name",FILTER_SANITIZE_STRING));
$email = trim(filter_input(INPUT_POST,"email",FILTER_SANITIZE_EMAIL));
$message = trim(filter_input(INPUT_POST,"message",FILTER_SANITIZE_SPECIAL_CHARS));
if ($name == "" || $email == "" ... | true |
cdb1c4f28e71930e10c53bb9005f01d3e3d725da | PHP | pavelsmolka/flock | /src/Publish/EchoPublisher.php | UTF-8 | 1,171 | 2.65625 | 3 | [] | no_license | <?php
namespace Flock\Publish;
use Flock\Config\AbstractConfigProvider;
use IPublisher;
use Flock\Storage\IPublishStorage;
/**
* This class just writes tweets to the output.
* It is a proper implementation of publisher and might be used for
* integration testing without posting tweets to twitter.
* Although migh... | true |
f92624013b0e1964649c89be66aefbeaac2249df | PHP | Nishakar561/arbor | /add_to_cart.php | UTF-8 | 1,255 | 2.640625 | 3 | [] | no_license | <?php
include("config.php");
$username = $_POST['username'];
$item_id = $_POST['item_id'];
$item_size = $_POST['item_size'];
$item_amount = $_POST['item_amount'];
$price = $_POST['price'];
$output = array();
$check_for_same_item = mysqli_query($con,"SELECT * FROM cart WHERE username='$... | true |
2f78e657cb5f0d3c812fc614849e5ff8f17c70db | PHP | webonyx/graphql-php | /src/Validator/Rules/LoneAnonymousOperation.php | UTF-8 | 1,591 | 2.8125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace GraphQL\Validator\Rules;
use GraphQL\Error\Error;
use GraphQL\Language\AST\DocumentNode;
use GraphQL\Language\AST\NodeKind;
use GraphQL\Language\AST\OperationDefinitionNode;
use GraphQL\Validator\QueryValidationContext;
/**
* Lone anonymous operation.
*
* A GraphQL documen... | true |
741c3edffade0470f5e46e8c657e7c6c564d5a77 | PHP | lcydcl/PHP | /kuangjia+xiangmu/后盾问答系统/Index/Control/CommonControl.class.php | UTF-8 | 3,382 | 2.515625 | 3 | [] | no_license | <?php
/**
* 公共控制器
*/
class CommonControl extends Control{
/**
* 初始化函数
*/
public function __init(){
if(!C('WEB_ON')) {
header('Content-Type:text/html;charset=utf-8');
die("网站正在调整,已经关闭!");
}
}
/**
* 分配数据
* @return [type] [description]
*/
public function assign_data(){
$this->top_cate();
... | true |
540326a4ba410b43fd95a5b8bd00ff0d1cffa2df | PHP | FranciscoFolguera/DWES | /todo/php/POO/Problemas_1.php | UTF-8 | 6,674 | 3.03125 | 3 | [] | no_license | <?php
include '../../inc/headerPOO1.php';
?>
<h1>Francisco Folguera Sánchez</h1>
<?php ?>
<h3>Problema 1</h3>
<?php
class Cabecera {
private $titulo;
private $posicionTitulo;
private $colorFond;
private $colorLetra;
function __construct($titulo, $posicionTitulo, $colorFond, $color... | true |
c53b3720610cea45a3ca6da8075bd980c014febe | PHP | ipking/wework-php-sdk | /src/Model/Message/TextCardMessageContent.php | UTF-8 | 1,128 | 2.84375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace WeWork\Model\Message;
use WeWork\Util\Utils;
class TextCardMessageContent
{
public $msgtype = "textcard";
public $title = null; // string
public $description = null; // string
public $url = null; // string
public $btntxt = null; // string
public function __construct($title=null, $description=... | true |
1a5efefee615da2e3ff9ce6624bb4a6f729c662e | PHP | mkdf/mkdf-datasets | /src/Form/GeospatialForm.php | UTF-8 | 2,480 | 2.6875 | 3 | [] | no_license | <?php
namespace MKDF\Datasets\Form;
use MKDF\Datasets\Repository\MKDFDatasetRepositoryInterface;
use Zend\Form\Form;
use Zend\Form\Element\Hidden;
use Zend\Form\Element\Text;
use Zend\Form\Element\Textarea;
use Zend\Form\Element\Radio;
use Zend\Form\Element\Submit;
class GeospatialForm extends Form
{
private $_re... | true |
b8f04a033a9bbbe5dba8f2dc50cc2c98e7660d54 | PHP | dsp0209/DateDifference | /client.php | UTF-8 | 1,052 | 3.078125 | 3 | [] | no_license | <?php
function validateDate($date, $format = 'Y-m-d')
{
$d = DateTime::createFromFormat($format, $date);
return $d && $d->format($format) == $date;
}
if(!empty($_POST['startDate']) && !empty($_POST['endDate'])){
$startDate = $_POST['startDate'];
$endDate = $_POST['endDate'];
if(validateDate($startDate) == TRUE ... | true |
f59b52339758c548b88acb3c797e6f0e5228ea50 | PHP | grpatter/WoWClassicGuildBank | /api/util/DefaultLogger/DBLogger.php | UTF-8 | 2,152 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace TStuff\Php\Logging\DefaultLogger ;
use TStuff\Php\Logging\ITLogger;
use TStuff\Php\DBMapper\TDBMapper;
use TStuff\Php\Logging\LogLevel;
class DBLogger implements ITLogger {
private $path;
private $fileNameTemplate ="log_{date}.log";
private $currentFileName = "";
... | true |
f09d38bd55d3d16f84e28f21020a67612a844cd2 | PHP | Soulbound/AWSCloudSearchBundle | /Handler/DomainListHandler.php | UTF-8 | 1,235 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace SAWSCS\Handler;
class DomainListHandler {
private $container;
private $domainList = null;
public function __construct($container, $result){
$this->container = $container;
if( is_a($result, "Aws\Result") ){
$this->domainList = $result;
}else{
throw new \Exception('API returned an inv... | true |
a28b128a485910942067d4b5c1b3761f0fca5aa5 | PHP | Oldemar/myprojects | /app/Controller/SearchesController.php | UTF-8 | 1,825 | 2.53125 | 3 | [] | no_license | <?php
App::uses('Sanitize', 'Utility');
class SearchesController extends AppController {
public $name = 'Searches';
private $user_id;
public function beforeFilter(){
parent::beforeFilter();
$this->Auth->allow('add');
if ($this->action == 'edit' || $this->action == 'add') {
$this->Auth->authenti... | true |
68832b148ec28a83582fd0760b05cf7122984df6 | PHP | faparicior/ddd-symfony4-boilerplate | /src/Shared/Domain/Exceptions/InvalidEmailException.php | UTF-8 | 431 | 2.765625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Shared\Domain\Exceptions;
use Throwable;
final class InvalidEmailException extends DomainException
{
public const INVALID_EMAIL_MESSAGE = 'Invalid Email format';
public static function build(string $message = self::INVALID_EMAIL_MESSAGE, int $code = 0, Throwable... | true |
c79637afcd1d3cd3f5307fcad8993e3c1aafedf5 | PHP | arturdoruch/event-logger-bundle | /Log/Driver/Exception/LogNotFoundException.php | UTF-8 | 377 | 2.53125 | 3 | [] | no_license | <?php
namespace ArturDoruch\EventLoggerBundle\Log\Driver\Exception;
/**
* @author Artur Doruch <arturdoruch@interia.pl>
*/
class LogNotFoundException extends \RuntimeException
{
/**
* @param string|int $id The log id.
*/
public function __construct($id)
{
$message = sprintf('Log with i... | true |
c277000a9c38829468a3879c60129b0816e37e9b | PHP | pagantis/orders-api-client | /examples/getOrder.php | UTF-8 | 471 | 2.59375 | 3 | [] | no_license | <?php
require_once('../vendor/autoload.php');
use Pagantis\OrdersApiClient\Client;
const PUBLIC_KEY = ''; //Set your public key
const PRIVATE_KEY = ''; //Set your private key
const ORDER_ID = ''; //Set the order to get
try {
$orderApiClient = new Client(PUBLIC_KEY, PRIVATE_KEY);
$order = $orderApiClient->... | true |