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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
1eb954294e2d4125005dab2f9ae0fdc9a3f089cb | PHP | LuizFelipe99/AcademiaTcc | /personal/personalLista.php | UTF-8 | 3,200 | 2.859375 | 3 | [] | no_license |
<!-- ** IMPORTANTE ** -->
<!-- caso precise listar todos alunos esta aqui uma parte separada -->
<!-- ** IMPORTANTE ** -->
<table class="table table-hover">
<thead class="thead-dark">
<tr>
<th scope="col">Matricula</th>
<th scope="col">Nome</th>
<th scope="col">Idade</th>
<th scope="col">Con... | true |
b9471306e4a98712fd8c34947a372eb94059a1cd | PHP | saidmaster/Semantic | /WordnetQuery.php | UTF-8 | 4,914 | 2.9375 | 3 | [] | no_license | <?php
include_once('Wordnet.php');
abstract class WordnetQuery implements WordNet
{
/**
* @param string $metadata
* @return array
*/
public function getSynonymes(string $metadata){
$myRes=array();
$res1 = '"'.WordnetPath.'" "'.$metadata.'" "-synsn"';
$output1=shell_ex... | true |
dd408e31e6ef4eca25afe938fbb063badb9f203d | PHP | zhangjingpu/crossphp | /src/Cache/RequestCache.php | UTF-8 | 956 | 2.640625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Cross - a micro PHP 5 framework
*
* @link http://www.crossphp.com
* @license http://www.crossphp.com/license
* @version 1.0.5
*/
namespace Cross\Cache;
use Cross\Exception\CoreException;
/**
* @Auth: wonli <wonli@live.com>
* Class RequestCache
* @package Cross\Cache
*/
class Reque... | true |
328533843dc641b281cb9e531a92d1661f2cd50b | PHP | andela/buggy-php | /index.php | UTF-8 | 667 | 3.34375 | 3 | [] | no_license | <?php
/**
* Entry point to the snippet
* Attempts to fetch a file and gets its contents display in a tabular way
*
* Perfoms basic math operation from a created math class.
*/
import_once ('functions//Files.php');
require_now('functions/math.php.ini');
$file = $file->Files("assets/file.txt");
while(!feof($file... | true |
dbf0f7ad3fa5bdefc00b05f26ca67316a442a320 | PHP | Kyoto-Engineering/kyoto.keal.com.bd | /classes/admin_assign.php | UTF-8 | 8,502 | 2.734375 | 3 | [] | no_license | <?php include_once "../lib/Database.php"; ?>
<?php include_once "../lib/Session.php";
?>
<?php include_once "../helpers/Format.php"; ?>
<?php
class Adminassign
{
private $db;
private $fm;
public function __construct()
{
$this->db = new Database();
$this->fm = new Format();
}
public function viewCourse()... | true |
97906961eb59a1cc586d99873ecea112e9385777 | PHP | laravel-auto-presenter/laravel-auto-presenter | /src/Decorators/ArrayDecorator.php | UTF-8 | 1,685 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* This file is part of Laravel Auto Presenter.
*
* (c) Shawn McCool <shawn@heybigname.com>
* (c) Graham Campbell <hello@gjcampbell.co.uk>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespa... | true |
2389cc5ba42ec63eaaa59afd3059e369fd734ca1 | PHP | sounboul/helpee-sf | /src/Repository/Ad/AdRepository.php | UTF-8 | 4,167 | 2.625 | 3 | [] | no_license | <?php
declare(strict_types=1);
/**
* This file is a part of Helpee.
*
* @author Kevin Allard <contact@allard-kevin.fr>
*
* @license 2018-2019 - Helpee
*/
namespace App\Repository\Ad;
use App\Entity\Ad\Ad;
use App\Entity\Community;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doc... | true |
60b8c9e2a63aa6d444f2074e2b99b4b4107c5bd1 | PHP | riddlestone/brokkr-acl | /src/Acl.php | UTF-8 | 7,437 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Riddlestone\Brokkr\Acl;
use Laminas\Permissions\Acl\Acl as LaminasAcl;
use Laminas\Permissions\Acl\AclInterface;
use Laminas\Permissions\Acl\Resource\ResourceInterface as LaminasResourceInterface;
use Laminas\Permissions\Acl\Role\RoleInterface as LaminasRoleInterface;
use Riddlestone\Brokkr\Acl\Except... | true |
ebb393b2213178c4e5f4c37f44ceb4f26f1420db | PHP | Damonen/IntProg2018 | /pages/logIn.php | UTF-8 | 1,046 | 2.625 | 3 | [] | no_license | <?php
include_once("DataBase.php");
$errors = "";
$login = "";
$pass = "";
if($_POST['reg'] == 0) {
$login = htmlspecialchars($_POST["login"]);
$pass = htmlspecialchars($_POST["pass"]);
$db = DataBase::getDB();
if(empty($login)) {
$errors .= "Введите Логин <br>";
}
if(empty($pass)) {
... | true |
da46efe557a1f9cb8fe5766bf7e6e63568ff8901 | PHP | cosminwebdinasty/php-cms | /post.php | UTF-8 | 9,526 | 2.921875 | 3 | [] | no_license | <?php include "includes/header.php";
include "includes/db.php";?>
<!-- Navigation -->
<?php include "includes/navigation.php"; ?>
<?php
if(isset($_POST['liked'])){
$thepost_id = $_POST['post_id'];
$theuser_id = $_POST['user_id'];
$searchPost = "SEL... | true |
11fb990a1d1a6a392a4b1693942ed251f1216e5c | PHP | ixnode/php-branch-diagram-builder | /src/Branch.php | UTF-8 | 6,218 | 3.046875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* MIT License
*
* Copyright (c) 2021 Björn Hempel <bjoern@hempel.li>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, includi... | true |
bede2fc5bd407791e4922875d69d299edb3e205a | PHP | febriantho/laravel-form-builder | /src/Gustiawan/FormBuilder/Commands/CreateForm.php | UTF-8 | 1,961 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Gustiawan\FormBuilder\Commands;
use Illuminate\Support\Str;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
class CreateForm extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = '... | true |
374c0201a3c829e0db80d28e68d95c05637bc83f | PHP | MotanyaIsaack/Fashion-and-Design | /application/modules/website/views/sections/cards.php | UTF-8 | 4,879 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
if (count($cards) > 0) {
switch ($folder) {
case "event":
showEventCards($folder, $cards);
break;
case "collection":
showCollectionCards($folder, $cards);
break;
}
} else {
displayNone($folder);
}
function displayNone($folder)
{
echo... | true |
7a910ac8c16d90773ea62de17add9b2f33dbd71a | PHP | Dario19999/Proyecto-de-titulacion | /php/mailer.php | UTF-8 | 1,670 | 2.625 | 3 | [] | no_license | <?php
require __DIR__ . '/../vendor/autoload.php';
include 'conexion.php';
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\Exception;
function mailer ($correo, $nombre_usuario_receta, $asunto, $cuerpo)
{
$mail = new PHPMailer(true);
//Server settings
// $mail->SMTPDebug ... | true |
92b9ff31cae1468065461b7c762d05e7b603abd7 | PHP | SpencerBelleau/DOC_HardwareServiceRequestDatabase | /DOC/ajax/saveTimeSheet.php | UTF-8 | 917 | 2.546875 | 3 | [] | no_license | <?php
require "../snippets/dbConn.php";
require "../snippets/SQLTools.php";
require "../snippets/utils.php";
session_start();
$com0 = "UPDATE DOC_Timestamps SET timeOut = :timeOut WHERE timestampId=:id";
executeSQL_Safe_U($com0, $dbConn, ":timeOut", date("Y-m-d H:i:s"), ":id", $_SESSION['sessionId']);
$com1 = "S... | true |
b2643420b8c616e133d9ca320de90c04023c7210 | PHP | HyeonsikCho/front | /com/nexmotion/html/common/MakeCommonHtml.php | UTF-8 | 3,125 | 2.703125 | 3 | [] | no_license | <?
/**
* @brief option html 공통사용함수
*
* @param $val = option 실제 값
* @param $dvs = option 화면 출력값
* @param $attr = option에 추가로 입력할 attribute
*
* @return option html
*/
function option($val, $dvs, $attr = '') {
$option_form = "<option %s value=\"%s\">%s</option>";
$ret = sprintf($option_form, $attr, $val... | true |
8e1913bc3f287e820d6af63949158c0ab10a4c73 | PHP | rifkyalamsyah/PHP-OOP | /C5/20.php | UTF-8 | 1,373 | 4.03125 | 4 | [] | no_license | <?php
// Type Check & Casts
// data/Programmer.php
// Example
class Programmer
{
public string $name;
public function __construct(string $name)
{
$this->name = $name;
}
}
class BackendProgrammer extends Programmer
{
}
class FrontendProgrammer extends Programmer
{
}
... | true |
6d5aadd5b6cfffa9d449a7579262245e9f3d6133 | PHP | sam-lopata/epgimporter | /src/Tests/XMLStreamFileLoaderTest.php | UTF-8 | 2,273 | 2.59375 | 3 | [] | no_license | <?php
namespace EPGImporter\Tests;
use EPGImporter\Loader\LoaderException;
use EPGImporter\Loader\XMLStreamFileLoader;
use PHPUnit\Framework\TestCase;
class XMLStreamFileLoaderTest extends TestCase
{
private const SOURCE = "src/Tests/data/test_data.xml";
private const BROKEN_SOURCE = "src/Tests/data/test_dat... | true |
9f2bb74bcf3c360fb63e1aba5ae769ebfc9ff2e7 | PHP | ekyna/Commerce | /Shipment/Entity/AbstractShipmentItem.php | UTF-8 | 2,850 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
namespace Ekyna\Component\Commerce\Shipment\Entity;
use Doctrine\Common\Collections\ArrayCollection;
use Ekyna\Component\Commerce\Shipment\Model;
/**
* Class ShipmentItem
* @package Ekyna\Component\Commerce\Shipment\Entity
* @author Etienne Dauvergne <contact@ekyna.com>
*/
abstract class AbstractShipmentI... | true |
9ebf1f77b229c3457190032f110b925dd5ec8f78 | PHP | tingren/php_test_pro | /app/base/querybuilder.php | UTF-8 | 5,652 | 2.734375 | 3 | [] | no_license | <?php
class QueryBuilder {
protected $conn;
protected $select;
protected $update;
protected $from;
protected $cond;
protected $cond_not = array();
protected $cond_and = array();
protected $cond_or = array();
protected $cond_in = array();
protected $cond_not_in = array();
protected $groupby;
protected $joind... | true |
f3841a3c44e6337a0b9ec11dccf5be96fd1cb434 | PHP | khakanali/OpenMAll | /master3/app/Http/Controllers/DirectoryController.php | UTF-8 | 4,407 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use App\Http\Repository\DirectoryRepo;
use App\Http\Repository\OccupationRepo;
use App\Http\Requests\DirectoryRequest;
use Illuminate\Http\Request;
use Validator;
class DirectoryController extends Controller {
protected $repo;
protected $o... | true |
93d9f7608b85100d6169b1d0cf361bc8537b642c | PHP | PatrickMurphy/EAF-Auction | /classes/eaf_error_exception.php | UTF-8 | 899 | 3.109375 | 3 | [] | no_license | <?php // This class handles page errors, can be passed as an array to show multiple errors at once.
class eaf_error_exception extends eaf_exception {
private $errors = Array();
private $array = true;
public function __construct($messages){
if(is_array($messages)){
$this->errors = $m... | true |
433c578cbded733d6a547b2c38abd5268ebc1290 | PHP | yttiktak/SharedPano | /redirector.php | UTF-8 | 1,512 | 2.640625 | 3 | [] | no_license | <?php
$trigger = "ready/";
//session_start();
//$sesNonce = $_SESSION['nonce'];
//if (strlen($sesNonce)!=6) {
// echo "NONCE ERROR"; // lazy lazy. Just, ok, so I got a session, must be my user calling, right?
// exit(); not while testing. 'sides, tests are not via page, so errereror allways.
//}
//$skinBase = $_SES... | true |
8d58ea09908f74ae9ed9f0b7b18a475e912fc93c | PHP | artsites/nova-seo | /src/Rules/NovaSeoRule.php | UTF-8 | 803 | 2.765625 | 3 | [] | no_license | <?php
namespace Artsites\NovaSeo\Rules;
use Illuminate\Contracts\Validation\Rule;
class NovaSeoRule implements Rule
{
private string $message;
public function __construct()
{
//
}
public function passes($attribute, $value)
{
$data = json_decode($value);
if(mb_strlen... | true |
cc8d9d45be11f37d88eb76a89f037f2744633070 | PHP | dicrtarasov/yii2-telegram | /src/entity/Voice.php | UTF-8 | 972 | 2.765625 | 3 | [] | no_license | <?php
/*
* @copyright 2019-2022 Dicr http://dicr.org
* @author Igor A Tarasov <develop@dicr.org>
* @license MIT
* @version 23.01.22 04:16:54
*/
declare(strict_types=1);
namespace dicr\telegram\entity;
use dicr\telegram\TelegramEntity;
/**
* This object represents a voice note.
*
* @link https://core.telegra... | true |
6e828c9ebc4174d14e1272d758e19a32b3dd2453 | PHP | MohannadElemary2/fleet-management | /app/Services/ReservationService.php | UTF-8 | 1,607 | 2.75 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Repositories\ReservationRepository;
use App\Repositories\TripRepository;
use App\Resources\Base\FailureResource;
use App\Services\Base\BaseService;
use Illuminate\Http\Response;
class ReservationService extends BaseService
{
public function __construct(ReservationRepository ... | true |
4a552d0dd708a7112ce99d429032fa586de8cd3b | PHP | rostiknaz/magento2-modules | /Training/Repository/Controller/Repository/Example.php | UTF-8 | 2,739 | 2.53125 | 3 | [] | no_license | <?php
namespace Training\Repository\Controller\Repository;
use Magento\Framework\Api\FilterBuilder;
use Magento\Framework\Api\Search\FilterGroupBuilder;
use Magento\Framework\Api\SearchCriteriaBuilder;
use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
use Training\Repository\Api\Exampl... | true |
f591243e56c23b4c61112ecddb07d302d59d1151 | PHP | oleksiyserb/comfort-heat | /models/Project.php | UTF-8 | 1,841 | 2.765625 | 3 | [] | no_license | <?php
namespace app\models;
use Yii;
use yii\data\Pagination;
/**
* This is the model class for table "project".
*
* @property int $id
* @property string $title
* @property string|null $picture
* @property string|null $text
*/
class Project extends \yii\db\ActiveRecord
{
const SHOW_LIMIT_PROJECT = 8;
... | true |
9ef04ba38da97fbafe1ff56dd2ebd240a0fa252e | PHP | temilolakutelu/Smartpropertyhub-website | /cron_jobs/property_alert.php | UTF-8 | 2,721 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
function config()
{
$servername = "propertyhub.com.ng";
$username = "property_user";
$password = "H8iml16@";
$database = "propertyhub_db";
$conn = mysqli_connect($servername, $username, $password, $database);
if (!$conn) {
echo 'error in conection';
}
return $conn;
}
funct... | true |
4fa6f588b1bfd416e5892ed973ccd8a287332232 | PHP | donataskriauciunas/Palanga | /solid/OpenClose/Objects/Triangle.php | UTF-8 | 1,118 | 3.671875 | 4 | [] | no_license | <?php
namespace solid\OpenClose\Objects;
class Triangle implements FigureInterface
{
/** @var float */
private $lenght1, $length2, $length3;
/**
* Triangle constructor.
* @param float $length1
* @param float $length2
* @param float $length3
*/
public function __construct($le... | true |
23b2f448cce4d47dbc059c5af17d088ef24542f6 | PHP | rabiulkhan/news_graphics | /live_on_v2.php | UTF-8 | 1,141 | 2.5625 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
/* Allow the script to hang around waiting for connections. */
set_time_limit(0);
/* Turn on implicit output flushing so we see what we're getting
* as it comes in. */
ob_implicit_flush();
$address = 'localhost';
$port = 5250;
if (($sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP))... | true |
cf7528715596bdf98acc2d5373bae565474e4c14 | PHP | adawongframework/project | /system/classes/Ada/Database/Driver/Mysqli.php | UTF-8 | 4,851 | 2.734375 | 3 | [] | no_license | <?php if (!defined('ADAPATH')) die ('Access failure');
/**
* Mysqli扩展实现类
*+--------------------------
* @package Core
* @category Base
* @author zjie 2014/01/05
*/
class Ada_Database_Driver_Mysqli extends Ada_Database_Driver {
/**
* 数据库配置信息
* @var Array
*/
private $config;
/**
* 链接句柄
* @var Object
*/
pri... | true |
c2881a69c72dd8be9bd3e3cced63e0f7858944bb | PHP | satpreetsingh/183project | /NoteShare/htdocs/model/dbcon.php | UTF-8 | 2,461 | 2.890625 | 3 | [] | no_license | <?php
// Author: Joseph Trapani
// Date: 10/27/2009
// General concept found on: http://www.killersites.com/forums/topic/1843/oops-mysql-connecting-and-fetching-data/
// Base class which acts as an ancestor class.
// Instanciation example: include '/var/www/localhost/htdocs/model/dbcon.php';
// ... | true |
8dc8d7a682f19273f9ecf0d51e6c9ed7e622b387 | PHP | neosumit/demo | /assignment_3/test/delete.php | UTF-8 | 584 | 2.703125 | 3 | [] | no_license | <?php
$_GET['id'];
$ids=$_GET['id'];
echo $ids;
$servername = "localhost";
$username = "root";
$password = "root";
$dbname = "training";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error)
{
die("Connection failed: " . $conn->connect_... | true |
50b23373b0e8f816d73e7a27b046177482cd8fae | PHP | evalor/ClickTask | /Core/Curl/Cookie.php | UTF-8 | 2,420 | 3.09375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace eValor\cronTask\Core\Curl;
/**
* HTTP Cookie Class
* Class Cookie
* @author : evalor <master@evalor.cn>
* @package eValor\cronTask\Core\Curl
*/
class Cookie
{
private $name;
private $value;
private $expire = 0;
private $path = '/';
private $domain = null;
private ... | true |
876d1630a513f89a49dccd737924946df133722c | PHP | JKetelaar/Switchboo | /src/Controller/SwitchController.php | UTF-8 | 6,784 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\API\Supplier;
use App\Entity\PersonalInformation;
use App\Entity\Quote;
use App\Form\QuoteStepFourType;
use App\Service\SwitchException;
use App\Service\SwitchManager;
use NumberFormatter;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Comp... | true |
83c7a4125658498af4acfab3df56826518abab6f | PHP | awaiskhalil/PHP-and-mysql | /server.php | UTF-8 | 3,601 | 2.796875 | 3 | [] | no_license | <?php
SESSION_start();
$name = "";
$email = "";
$errors = array();
$Name = "";
$phone_no="";
//connect to the database
$db = mysqli_connect('localhost', 'root', '', 'mydb');
// Check connection
if (mysqli_connect_errno()) {
echo "Failed to connect to MySQL: "... | true |
bd8b64b0bc1d5dca67912c9b99c04dae12940439 | PHP | baconwaffles/ukfn | /app/User.php | UTF-8 | 11,376 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use DB;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'surname', 'email', 'password', 'title_id', 'group_id',
... | true |
220067a5789ec1d65192121e06018343db22d47d | PHP | eltortuganegra/medieval-jousting-tournaments | /application/protected/models/SigninForm.php | UTF-8 | 1,322 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/**
* SigninForm class.
* LoginForm is the data structure for keeping
* user login form data. It is used by the 'login' action of 'SiteController'.
*/
class SiginForm extends CFormModel
{
public $email;
public $password;
public $knight_name;
private $_identity;
/**
* Declares the validation rules.
... | true |
4590c0153c6bf6b9fa737d3fdf262654dfc1ad31 | PHP | Victorien95/phpoo | /bibliotheque/App/Cnx.php | UTF-8 | 817 | 3.078125 | 3 | [] | no_license | <?php
namespace App;
class Cnx
{
/**
* @var \PDO
*/
private static $instance;
/**
* Constructeur privé pour êmpecher d'instancier la classe
*/
private function __construct()
{
}
/**
* @return \PDO
*/
public static function getInstance(): \PDO
{
... | true |
e83f9ca7b114bea2b7034772811ced65f2f0d7d7 | PHP | ai310/codecamp | /htdocs/home/codecamp_18989/htdocs/php/07/if.php | UTF-8 | 321 | 3.296875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="ja">
<head>
<title></title>
<meta charset="utf-8">
</head>
<body>
<?php
// 0〜1のランダムな数字を取得
$rand = mt_rand(1, 10);
// 6以上の場合
if ($rand >= 6) {
print '当たり';
// 6未満の場合
} else {
print 'はずれ';
}
?>
</body>
</html> | true |
92fc87ad58c1440f2588539353a230a2d0b9c915 | PHP | fgaudenzi/webERP-bootstrap | /Z_ImportPriceList.php | UTF-8 | 6,327 | 2.65625 | 3 | [] | no_license | <?php
include('includes/session.inc');
$Title = _('Import Sales Price List');
include('includes/header.inc');
echo '<p class="page_title_text"><img alt="" src="' . $RootPath . '/css/' . $Theme .
'/images/maintenance.png" title="' .
_('Import Price List from CSV file') . '" />' . ' ' .
_('Import Price List fro... | true |
3191570264558ed25763cee191415b2c216dd08c | PHP | ooglek/php-bandwidth-iris | /tests/OtherTest.php | UTF-8 | 2,599 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use GuzzleHttp\Handler\MockHandler;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Response;
use GuzzleHttp\Middleware;
class OtherTest extends PHPUnit_Framework_TestCase {
public static $container;
public static $client;
public static $index = 0;
public static function setUpBeforeClass() {
... | true |
020c53a2bcf5e4f2ac049e801a061b1bf820f229 | PHP | ebuildy/ebuildy | /src/eBuildy/DataBinder/Form.php | UTF-8 | 2,301 | 2.8125 | 3 | [] | no_license | <?php
namespace eBuildy\DataBinder;
class Form extends DataBinder
{
protected $children = array();
public function __construct($name = '', $options = array())
{
parent::__construct($name, $options);
$this->preTransforms = array();
}
public function addChild(... | true |
8dce80647b7cf7de232efbe0e321285af31b90d1 | PHP | HectorGlez4/FaceMOOC | /php/model/MComment.php | UTF-8 | 2,023 | 2.6875 | 3 | [] | no_license | <?php
require_once("Model.php");
class MComment extends Model
{
function SelectComment($idFormation)
{
$this->Connect();
$sql = "SELECT * FROM comment WHERE id_formation = :idFormation";
$stmt = $this->PDO->prepare($sql);
$stmt->bindParam(":idFormation", $idFormation, PDO::PARAM_INT);
return $this... | true |
b54e12add6ac80e23cfa9af06d69f608758c34d8 | PHP | AlexeyKonstantinov78/apfy-All-Presents-For-You | /basic/models/Users.Old.php | UTF-8 | 5,625 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use yii\web\IdentityInterface;
/**
* This is the model class for table "users".
*
* @property integer $id
* @property string $user_name
* @property string $user_password
* @property string $domain
* @property double $balance
*/
class Users extends \yii\db\Ac... | true |
0a3153efa5bf27a711b3eb1a0c23106a8321db47 | PHP | charmonds/Cascadeo | /LRMDS/process_registration.php | UTF-8 | 4,185 | 2.640625 | 3 | [] | no_license | <?php
require_once("db_connect.g");
$myConnection = mysql_connect("$db", "$db_user", "$db_password");
$connection = mysql_select_db("$database", $myConnection);
if (!$myConnection)
{
die("Failed to connect: ". mysql_error());
}
else
{
function newSalt()
{
return chr(rand(0,255)).chr(rand(0,255)).ch... | true |
0b1a6b59ca9124f6653088bfd16cfb7fe3760ced | PHP | Sumit-Sahu/StudentPortal | /user-verification/students_info.php | UTF-8 | 1,299 | 2.578125 | 3 | [] | no_license |
<?php
//Start the session to see if the user is authencticated user.
session_start();
//Check if the user is authenticated first. Or else redirect to login page
//if(isset($_SESSION['IS_AUTHENTICATED']) && $_SESSION['IS_AUTHENTICATED'] == 1){
//require('menu.php');
/*Connect to mysql server*/
// ... | true |
09781d8eb3832e17359697f8cb4f9cd48d55aeb8 | PHP | wolflingorg/Simple-Silex-Blog-Backend | /src/Blog/CommandBus/Middleware/Validation/CommandValidationMiddleware.php | UTF-8 | 1,340 | 2.625 | 3 | [] | no_license | <?php
namespace Blog\CommandBus\Middleware\Validation;
use Blog\Exception\ValidationException;
use SimpleBus\Message\Bus\Middleware\MessageBusMiddleware;
use Symfony\Component\Validator\ConstraintViolationList;
use Symfony\Component\Validator\Validator\ValidatorInterface;
class CommandValidationMiddleware implements... | true |
4db43c5c9f75d2eed1bb279d3e8713fd237e480e | PHP | DungBuiDeveloper/laravel_new_blog | /app/Repositories/Backend/TagRepository.php | UTF-8 | 5,180 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Repositories\Backend;
use Cache;
use DataTables;
use App\Models\BackEnd\Tag;
use App\Repositories\BaseRepository;
/**
* Class PermissionRepository.
*/
class TagRepository extends BaseRepository
{
/**
* UserRepository constructor.
*
* @param Tag $model
*/
public fun... | true |
789a84db0a2375d82c3581df792e32876ce3bee3 | PHP | prack/php-rack | /lib/prack/cascade.php | UTF-8 | 1,684 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
// TODO: Document!
# Rack::Cascade tries an request on several middleware_apps, and returns the
# first response that is not 404 (or in a list of configurable
# status codes).
class Prack_Cascade
implements Prack_I_MiddlewareApp
{
private $middleware_apps;
private $has_app;
private $catch;
// TODO: Docum... | true |
4bf6cd4d16c1f9196653391c91994b6b902e1c1d | PHP | ccook5/Coombe_registration | /admin/functions.inc.php | UTF-8 | 1,375 | 2.875 | 3 | [] | no_license | <?php
/*** print a complete error page in html.
*
* @param $msg The error message as a text string
* @paran $redirect_to Specify a url to redirect to automatically.
* @param $redirect_time How long to wait before redirecting (in seconds).
*/
function error_page($msg, $redirect_to = "", $redirect_... | true |
e6154f72949202d308a4fe53b3b388212fd2a6fd | PHP | zjjzjw/web_fangquan | /fangquan/core/app/Src/Brand/Domain/Model/BrandCustomProductEntity.php | UTF-8 | 1,001 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Src\Brand\Domain\Model;
use App\Foundation\Domain\Entity;
class BrandCustomProductEntity extends Entity
{
public $identity_key = 'id';
/**
* @var int
*/
public $id;
/**
* @var int
*/
public $brand_id;
/**
* @var int
*/
public $loupan_... | true |
67253c4cebd2776b1fe3f41251a639795f2469d3 | PHP | dreboard/design_patterns | /singleton/classes/SingletonChild.php | UTF-8 | 226 | 2.65625 | 3 | [] | no_license | <?php
namespace Design_Patterns\Singleton;
/**
* Class SingletonChild
* @package Design_Patterns\Singleton
*/
class SingletonChild extends Singleton {
/**
* @var $instance
*/
protected static $instance;
} | true |
6644d917384e47b9370def34be6af88b4b538573 | PHP | comeonly/rakuten_gold_ssl | /run.php | UTF-8 | 5,243 | 2.59375 | 3 | [] | no_license | #!/usr/local/bin/php
<?php
require __DIR__ . '/vendor/autoload.php';
use Touki\FTP\FTP;
use Touki\FTP\Model\Directory;
use Touki\FTP\Model\File;
use Touki\FTP\Connection\Connection;
use Touki\FTP\FTPWrapper;
use Touki\FTP\PermissionsFactory;
use Touki\FTP\FilesystemFactory;
use Touki\FTP\WindowsFilesystemFactory;
use... | true |
01ec7c4acd189b2577037c7ac9e20f3dcc4126a1 | PHP | ludoliv/projet_olympiadeSI1A12B | /BD/Classe/Heure.php | UTF-8 | 449 | 2.9375 | 3 | [] | no_license | <?php
class Heure{
private $_ID;
private $_hDeb;
private $_hFin;
public function __construct($id,$deb,$fin)
{
$this->_ID = $id;
$this->_hDeb = $deb;
$this->_hFin = $fin;
}
public function getID(){
return $this->_ID;
}
public functio... | true |
4e2143388f0578bb9b41fef5f143f767e3dc4fda | PHP | douyin-tools/game_admin | /app/Admincenter/Common/function.php | UTF-8 | 1,417 | 2.515625 | 3 | [] | no_license | <?PHP
function islogin(){
$admin_sessionid = session('admin_sessionid');
if (!$admin_sessionid) {
return false;
}
$admin_auth_id = session('admin_auth_id');
if(!$admin_sessionid || !$admin_auth_id){
return 0;
}
if(session('backup_list')){//如果是还原数据库则暂时不验证
}else{
$sessioninfo = M('Adminsession')... | true |
51dfdff3a2c94d1cf3fe58d2d3d2e2d51b58bf56 | PHP | lundborgm/picture-this-1 | /app/users/edit-profile.php | UTF-8 | 3,925 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
// Back-end
// Linked to in edit-profile.php (front-end)
declare(strict_types=1);
require __DIR__ . '/../autoload.php';
// In this file we edit users account email, password and biography.
$_SESSION['messages'] = [];
if (isset($_FILES['avatar'])) {
//die(var_dump($_FILES['avatar']));
// array(5) {
... | true |
8ba8222e3f8b9a4c881dd6a92be2ce914f261121 | PHP | DSWD-CFMS/kce | /app/Http/Controllers/Auth/LoginController.php | UTF-8 | 2,427 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Auth;
include("../vendor/autoload.php");
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;
/* for Socket */
use ElephantIO\Client;
use ElephantIO\Engine\SocketIO\Version2X;
/* for Socket */
use App\Users;
clas... | true |
c487c7e1e259558ea6114375ab0c7554c66d8645 | PHP | MukulEd/LaravelVue | /app/Services/TodoService.php | UTF-8 | 1,623 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Models\TodoList;
use App\Exceptions\ServiceException;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
class TodoService
{
public function storeListData(Request $request)
{
if(auth()->user()){
$data=$this->computeListData($requ... | true |
8e8e8b0441178b12f6fc1b36385122906b600928 | PHP | AmmarKust/school | /app/Http/Controllers/NewsLetterController.php | UTF-8 | 514 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Models\Newsletter;
class NewsLetterController extends Controller
{
public function store(Request $request)
{
$this->validate($request, [
'email' => 'required',
], [
... | true |
a996fb7b3e11c1066f5ea8d07831f1a5f6f91c33 | PHP | sync667/Steam-Web-API2 | /src/sync667/SteamWebApi/api/ISteamAppsAPI.php | UTF-8 | 2,652 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace sync667\SteamWebApi\Api;
use sync667\SteamWebApi\Api\AbstractSteamAPI;
use sync667\SteamWebApi\Util\SteamApiUtil;
use sync667\SteamWebApi\Constants\ApiModules;
use sync667\SteamWebApi\Constants\ApiMethods;
use sync667\SteamWebApi\Config\ApiConfiguration;
use sync667\SteamWebApi\Http\HTTPMethod;
/**
... | true |
5a242892f719bf2458660f1958d63a386f58b16d | PHP | glennfriend/ydin-ydin | /src/ThirdParty/Laravel/Console/Concerns/CsvUtility.php | UTF-8 | 4,604 | 2.921875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Ydin\ThirdParty\Laravel\Console\Concerns;
use Exception;
use Generator;
use League\Csv\AbstractCsv;
use League\Csv\Exception as CsvException;
use League\Csv\Reader;
use Ydin\Csv\Convert as CsvConvert;
/**
* dependency Illuminate\Console\Command
* dependency composer League\... | true |
704256e01fa467de6bd7fdadeaaa64d97e4fc34d | PHP | emiliopedrollo/hackathon2019 | /app/Support/helpers.php | UTF-8 | 1,225 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
function cpf( $base = null, $dotted = false ) {
if (strlen($base) == 9 and is_numeric($base))
{
$base = str_split($base);
} else {
$base = [];
$base[0] = rand( 0, 9 );
$base[1] = rand( 0, 9 );
$base[2] = rand( 0, 9 );
$base[3] = rand( 0, 9 );
$b... | true |
cb4f7457aa2c0be2ba2c544bd0e43d180c2f42c8 | PHP | chunchunchundashui/invert | /application/common.php | UTF-8 | 1,734 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +-------------------------------------------------... | true |
1a45403c921af8278a04cdf0ce2d2126f0a8ee8b | PHP | coolpankaj/reminder | /mail.php | UTF-8 | 2,227 | 2.53125 | 3 | [] | no_license | <?php
session_start();
error_reporting(4);
$msg='';
if(isset($_POST["submit"]))
{
$r_mail=$_POST["r_mail"];
$subject=$_POST["sub"];
$body=$_POST["body"];
$date2=$_POST["date"];
$hour=$_POST["hr"];
$min=$_POST["min"];
function gap($date2)
{
$time = new DateTime("$date");
$date1 = $time->format('Y-n... | true |
c42031e59426b5e0a41384e591496afa8b1539bf | PHP | jcarlosj/Aquila-WordPress-Theme | /inc/classes/class-block-patterns.php | UTF-8 | 2,645 | 2.828125 | 3 | [] | no_license | <?php
/** Gutenberg: Block Patterns
* @package Aquila
*/
namespace AQUILA_THEME\Inc;
use AQUILA_THEME\Inc\Traits\Singleton;
class Block_Patterns {
use Singleton;
protected function __construct() {
// wp_die( 'Class Assets' );
// Cargamos Clases.
$this -> setup_hooks();
}
... | true |
780148b32aa7a9fbbe91d97ea53161d2d84825cb | PHP | benjaminkott/ext-iconset-bootstrap | /Classes/Icons/IconProvider.php | UTF-8 | 1,855 | 2.515625 | 3 | [] | no_license | <?php
declare(strict_types = 1);
/*
* This file is part of the package bk2k/iconset-bootstrap.
*
* For the full copyright and license information, please read the
* LICENSE file that was distributed with this source code.
*/
namespace BK2K\IconsetBootstrap\Icons;
use BK2K\BootstrapPackage\Icons\IconList;
use BK... | true |
cb95aec74ae51fca22ac2a7d4a592f73caa5e4ab | PHP | sarrouuna/ranimjeux | /app/View/Factures/imprimerachat11.ctp | UTF-8 | 10,541 | 2.640625 | 3 | [] | no_license | <?php
if ($pointdeventeachat != 0) {
$pontdevente = ClassRegistry::init('Pointdevente')->find('first',array('conditions'=>array('Pointdevente.id'=>$pointdeventeachat)));
$soc = ClassRegistry::init('Societe')->find('first',array('conditions'=>array('Societe.id'=>$pontdevente['Pointdevente']['societe_id'])));
}else{
... | true |
2081eb0536ece459e10234fe4b9e58372ef09aa5 | PHP | hajime-matsumoto/seaf | /lib/Base/Event/interface/ObservableIF.php | UTF-8 | 464 | 2.84375 | 3 | [] | no_license | <?php // vim: set ft=php ts=4 sts=4 sw=4 et:
/**
* Seaf Project
*/
namespace Seaf\Base\Event;
/**
* Eventオブザーブできるオブジェクト
*/
interface ObservableIF extends ObserverIF
{
public function addObserver(ObserverIF $observer);
public function fireEvent($type, $args = []);
public function once($type, callable $... | true |
2e32b5d00eddeb43208b1d57cda826884b45bfb1 | PHP | techart/object | /src/Object/Wrapper.php | UTF-8 | 4,637 | 3.109375 | 3 | [] | no_license | <?php
namespace Techart\Object;
/**
* Враппер над объектом
*
* @package Object
*/
class Wrapper
implements \Techart\Core\PropertyAccessInterface, \Techart\Core\CallInterface
{
/**
* Расширяемый объект
*/
protected $object;
/**
* массив атрибутов, с помощью которых и происходит ра... | true |
4bd06609834ff1ddd8ce1ea1385d56baa7ac3edc | PHP | xeoscript/phorms | /tests/FieldTest.php | UTF-8 | 1,380 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
abstract class FieldTest extends PHPUnit_Framework_TestCase {
protected $field = null;
protected $defaults = array();
public $require = array('validators' => array('required'));
/**
* @return array ($input, $result, [$constructor_args])
*/
abstract function validation_data();
function getField... | true |
7aaea8b752bdfdffdb33d160c3c8e5ac51166a50 | PHP | alexgl/tripal | /base/tripal_core/jobs.php | UTF-8 | 14,485 | 2.515625 | 3 | [] | no_license | <?php
/**
* @defgroup tripal_jobs_api Core Module Jobs API
* @{
* Tripal offers a job management subsystem for managing tasks that may require an extended period of time for
* completion. Drupal uses a UNIX-based cron job to handle tasks such as checking the availability of updates,
* indexing new nodes fo... | true |
40aff6e2a9705cc2bb56cf6f8d4adccec8c0393d | PHP | EdsonDiegoQuispeRodriguez/Semana13 | /index.php | UTF-8 | 647 | 3.9375 | 4 | [] | no_license | <?php
#sin parámetro
function coste_hotel1(){
return 90;
}
#con parametro
function coste_hotel2($numNoches){
$resp = $numNoches*90;
echo $resp;
}
#con retorno
function coste_hotel3($numNoches){
$resp = $numNoches*90;
return $resp;
}
... | true |
624b386e939683bf6fc83bf6ba3e5a2711da6b7a | PHP | aciden/genPass | /backend/src/Infrastructure/Persistence/Doctrine/Application/DoctrineApplicationRepository.php | UTF-8 | 1,411 | 2.703125 | 3 | [] | no_license | <?php
namespace Generator\Infrastructure\Persistence\Doctrine\Application;
use Doctrine\ORM\EntityRepository;
use Generator\Entity\Application\Application;
use Generator\Entity\Application\ApplicationRepositoryInterface;
use Generator\Entity\User\User;
class DoctrineApplicationRepository extends EntityRepository imp... | true |
ab7cb86af67c76b2235a900c3ccd0e74cf7d32a0 | PHP | wecodedoctor/CodeDoctorFlash | /CodedoctorFlashCore/RegisterPostType/AbstractRegisterPostType.php | UTF-8 | 2,073 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace CodedoctorWordpressFlashCore\RegisterPostType;
use CodedoctorWordpressFlashCore\Loader\AbstractClassLoader;
use function Symfony\Component\String\u;
abstract class AbstractRegisterPostType extends AbstractClassLoader
{
/**
* @var string $post_type
*/
protected string $post_type;
... | true |
0574b65d96d721e3c8067210566716218cf7aa1c | PHP | wangkaikai12345/edu | /app/Observers/TopicObserver.php | UTF-8 | 856 | 2.625 | 3 | [] | no_license | <?php
namespace App\Observers;
use App\Models\Follow;
use App\Models\Topic;
use App\Notifications\NewTopicNotification;
class TopicObserver
{
/**
* TODO 为粉丝发送消息通知可以移入队列之中
* 话题创建
*
* @param Topic $topic
*/
public function created(Topic $topic)
{
$topic->plan()->increment('... | true |
964673a60e09ce597bd5b19711071ab94d9f88b1 | PHP | jlpetelot/vineapolis | /database/seeds/RegionvinicolesTableSeeder.php | UTF-8 | 3,328 | 2.53125 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
class RegionvinicolesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// On remet la table à zéro
DB::table('regionvinicoles... | true |
c391f459bd50e23bd488a0760e011277595020c4 | PHP | dockent/backend | /src/app/models/BuildImageByDockerfilePath.php | UTF-8 | 1,104 | 2.796875 | 3 | [] | no_license | <?php
namespace Dockent\models;
use Dockent\components\FormModel;
use Phalcon\Validation\Validator\Callback;
use Phalcon\Validation\Validator\PresenceOf;
/**
* Class BuildImageByDockerfilePath
* @package Dockent\models
*/
class BuildImageByDockerfilePath extends FormModel
{
/**
* @var string
*/
... | true |
18d222fbaa5e628c8f85fe4853ba9a1e71c08996 | PHP | nuriakman/acadam | /musteri.kayit.formu.php | UTF-8 | 6,023 | 2.625 | 3 | [] | no_license | <?php
// FORM Kayıt için gönderilmişse gerekli işlemi yapalım
if(isset( $_POST["adi_soyadi"] )) {
// Hata mesajları için bir dizi tanımlayalım
$MESAJ = array();
if($_POST["parola"] <> $_POST["parola2"]) {
$MESAJ[] = "Parola ve tekrarı aynı değil";
}
if($_POST["ilce_kodu"] == 0) {
... | true |
6383d1e7c8572da3b5b0f283b5aaff2bba5355c4 | PHP | yukofksm/WebDevelopmenPortfolio_YukoDec2019 | /action/roomAction.php | UTF-8 | 3,022 | 2.703125 | 3 | [
"CC-BY-4.0",
"CC-BY-3.0"
] | permissive | <?php
require_once '../class/room.php';
$room = new Room();
session_start();
//ADD ROOM
if(isset($_POST['add'])){
$number = $_POST['number'];
$type = $_POST['type'];
$view = $_POST['view'];
$price = $_POST['price'];
$cap_adult = $_POST['cap_adult'];
... | true |
1181a998fd09589cb807e1454f1578243d559ad9 | PHP | Thoronir42/paf | /extensions/SeStep/GeneralSettingsInMemory/src/Model/InMemoryNode.php | UTF-8 | 1,401 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace SeStep\GeneralSettingsInMemory\Model;
use SeStep\GeneralSettings\DomainLocator;
use SeStep\GeneralSettings\Model\INode;
use SeStep\GeneralSettingsInMemory\InMemoryOptionsAdapter;
abstract class InMemoryNode implements INode
{
/** @var array */
protected $data;
/*... | true |
7b41e8168c3e29575e9ced68d57462bd0b117b1c | PHP | albert2lyu/wechat-yii | /actions/ActionBase.php | UTF-8 | 510 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* 所有action都需要继承的父类
* ActionBase.php
* User: wlq
* CreateTime: 16-3-18 上午11:07
*/
namespace app\actions;
use yii\base\Action;
abstract class ActionBase extends Action{
//子类处理逻辑
abstract protected function invoke();
//Action 必须实现的run方法
public function run(){
$res = $this->invo... | true |
113ce135adc95fd306cdd7a1dbedbae0a1dac059 | PHP | tatelucas/growpro | /app/code/local/metrof/MadeToOrder/Model/Product.php | UTF-8 | 11,076 | 2.71875 | 3 | [] | no_license | <?php
/**
* FGI
*/
/**
* Catalog product
*
* @category Metrof
* @package Metrof_MadeToOrder
*/
class Metrof_MadeToOrder_Model_Product extends Mage_Catalog_Model_Product
{
/**
* Product Types
*/
const STATUS_ENABLED = 1;
const STATUS_DISABLED = 2;
const TYPE_S... | true |
78cf89f301ad0e2e7d6abdbb1f79d757101e940c | PHP | exgamer/yii2-account-module | /src/services/AccountOperationService.php | UTF-8 | 4,805 | 2.53125 | 3 | [] | no_license | <?php
namespace concepture\yii2account\services;
use concepture\yii2account\models\Account;
use concepture\yii2logic\models\ActiveRecord;
use concepture\yii2logic\services\Service;
use concepture\yii2logic\services\traits\StatusTrait;
use concepture\yii2account\enum\AccountOperationTypeEnum;
use concepture\yii2account... | true |
b67cf5bd2f2d1ab0db120a5beee882c9a8fd1970 | PHP | victorblanco/fCAB | /i18n/Language.class.php | UTF-8 | 541 | 3.203125 | 3 | [] | no_license | <?php
class Language extends LanguageFactory {
/**
* Default Number Format Instance
*/
protected static $default = null;
/**
* Array of language names
*/
protected $names = array();
/**
* Returns a language name
*
* @param string $language
* @return string
*/
public fun... | true |
cf86370ba4f9c4cfc2d249d450d299d845b92d30 | PHP | orchestra-io/sample-symfony2 | /vendor/monolog/tests/Monolog/LoggerTest.php | UTF-8 | 1,760 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Monolog package.
*
* (c) Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Monolog;
class LoggerTest extends \PHPUnit_Framework_TestCase
{
publi... | true |
c966bd3dc927dde559a0a4c3bcaf4bfddf4466af | PHP | LubaRo/test-box-storage | /Box/DbBox.php | UTF-8 | 1,671 | 3.265625 | 3 | [] | no_license | <?php
namespace Box;
/**
* DbBox
*
* Allows to save and load box data from database
*/
class DbBox extends AbstractBox
{
private $dbTable = 'storage';
private $dbName = '';
private $dbHost = '';
private $dbUser = '';
private $dbPwd = '';
/**
* Prepare multiple values for sql que... | true |
7e6a13793312f68a574eabd802cbcacd85bd2d53 | PHP | Light-orochi/E-commerce-website | /newad.php | UTF-8 | 6,180 | 2.796875 | 3 | [] | no_license | <?php
session_start();
$pagetitle='NEW ADD';
include'init.php';
if (isset($_SESSION['user'])) {
if ($_SERVER['REQUEST_METHOD']=="POST") {
$formerror=array();
$name=filter_var($_POST['name'],FILTER_SANITIZE_STRING);
$desc=filter_var($_POST['descrp'],FILTER_SANITIZE_STRING);
$price=filter_var($_POST['pr... | true |
ae24209e544ca397f1439f3b2931b7fd42d6b3d6 | PHP | drovot/rocketlaunches-api | /app/Http/Middleware/TrackingMiddleware.php | UTF-8 | 703 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use App\Http\Response\Response;
use App\Tracking\TrackingManager;
use Closure;
use Illuminate\Http\Request;
class TrackingMiddleware
{
/** @var TrackingManager */
private TrackingManager $trackingManager;
/**
* TrackingMiddleware constructor.
*/
public... | true |
0f53814e970d5c63a7f312ebf6c88ac2a42ffdaa | PHP | AlThunder/Practical_tasks | /Practical_tasks_PHP/1_Language_basics_PHP/19/HomeWork/index.php | UTF-8 | 973 | 3.515625 | 4 | [] | no_license | <?php
/*$a = function($x, $y){
$sum = $x + $y;
echo $sum.'<br/>';
};
$a(2, 3);
function koD($arr, $func){
$i = 0;
foreach ($arr as $value) {
echo $value.$func;
$i++;
if (is_numeric($value) !== true){
echo "Значение $value не числовое";
}
}
if (is_int($i/2) == false){
echo 'Массив ... | true |
f162edfd0c9a4d2af8984defd9979b99adf2d04f | PHP | adrelliott/leadfarm_v1 | /application/controllers/_to_delete/22222/_delet_me/booking_all_dates.php | UTF-8 | 9,504 | 2.734375 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Booking extends T_Booking {
public function __construct() {
parent::__construct();
}
public function index($view_file = 'index') {
parent::index($view_file);
// Generate the view!
... | true |
4670ac857ad8cb00aeee8469ecb8f4118e0f5699 | PHP | webuni/srazy-api-client | /src/Model/Event.php | UTF-8 | 4,096 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This is part of the webuni/srazy-api-client.
*
* (c) Martin Hasoň <martin.hason@gmail.com>
* (c) Webuni s.r.o. <info@webuni.cz>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Webuni\Srazy\Model;
use Doctri... | true |
c8b68173dcd3114150c3b6b9e2bfdeaaaf7bfe7a | PHP | BGCX261/zinventory-svn-to-git | /branches/modules/helpers/classes/functionsphpmailer.php | UTF-8 | 3,373 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive |
<?php defined('SYSPATH') or die('No direct script access.');
/**
* Funciones especiales para uso domestico
*
* @author Hardlick
*/
class Helper_functionsphpmailer {
/**
*
* Funcion Send Email
* Sirve para enviar correos electronicos a un destinatario
* parametros Aceptados: fro... | true |
1cf2caccea2ba83a04492001901d175224f0d649 | PHP | pedrosinderbarroso/HelpingHands | /HelpingHands/php/nurseView.php | UTF-8 | 544 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
require_once "db_connect.php";
//$nid = $_SESSION["nid"];
$result = $db->query("SELECT nurse.nid, nurse.name, nurse.last_name, nurse.city, nurse.state, nurse.price, nurse.photos AS pic, description_skills.description FROM nurse INNER JOIN description_skills ON nurse.nid = description_skills.d_nid");
//In... | true |
7486dee545e85b22725b091ba06ca58bedbbbee3 | PHP | 547358880/myFirstFramework | /lib/Log/Log.php | UTF-8 | 1,353 | 2.84375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: xujing
* Date: 2016/6/17
* Time: 13:09
* Description
*/
namespace Cake\Log;
class Log
{
protected static $dsnClassMap = array(
'console' => 'Cake\Log\Engine\ConsoleLog',
'file' => 'Cake\Log\Engine\FileLog',
'syslog' => 'Cake\Log\Engine\SyslogLo... | true |
53f1a422437f6533ead02699e07d59389a7cfbd8 | PHP | e-novinfo/csvparsertohtml | /app/Helpers/TemplateHelper.php | UTF-8 | 4,464 | 3.28125 | 3 | [] | no_license | <?php
/**
* CSVParserToHTML - TemplateHelper
*
* @since 26.04.2017
*
* @version 1.0.0.0
*
* @author e-novinfo
* @copyright e-novinfo 2017
*/
namespace enovinfo\CSVParserToHTML\Helpers;
class TemplateHelper
{
/********************************/
/********** PROPERTIES **********/
... | true |
ffd0c5c6b5a5495e26c94170e14a59cf54394d16 | PHP | webdevgods/WdgImageGallery | /src/WdgImageGallery/Options/ModuleOptionsInterface.php | UTF-8 | 462 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace WdgImageGallery\Options;
interface ModuleOptionsInterface
{
public function setImageListElements(array $listElements);
public function getImageListElements();
public function setAlbumListElements(array $listElements);
public function getAlbumListElements();
public functi... | true |
9a17697de491caff6538f2e1de43f10807a47948 | PHP | wells5609/wp-http-api-extension | /WP_HTTP_Response.php | UTF-8 | 1,917 | 2.875 | 3 | [] | no_license | <?php
/**
* class WP_HTTP_Response
*
* Object representation of HTTP response.
*/
class WP_HTTP_Response extends ArrayObject {
public function __construct( $response ){
parent::__construct( $response, ArrayObject::ARRAY_AS_PROPS );
if ( isset( $this->_start_time ) ){
$this->offsetSet( 'request_time', ... | true |
46579b9046087500a6d8be6b5197311da2d094ad | PHP | GraffNaStyk/wikipedia | /app/facades/dotter/Has.php | UTF-8 | 1,073 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Facades\Dotter;
class Has
{
public static function check($method, $item = [])
{
if (isset($item[3])) {
if (isset($method[$item[0]][$item[1]][$item[2]][$item[3]]) && !empty($method[$item[0]][$item[1]][$item[2]][$item[3]])) {
return true;
... | true |