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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
709ab27560835625c0d6aa77f600039536f99373 | PHP | kerules/Online-Reservation-System | /untitled folder/reserved.php | UTF-8 | 1,052 | 2.65625 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<style>
body {
background-color: #D3D3D3;
margin: 0;
}
</style>
<title>Reservation</title>
<!-- Login Page -->
<style>
body {
background-color: #D3D3D3;
margin: 0;
}
</style>
<head>
<?php include('header.php');
?> <... | true |
d5199db9e520906e186c8029a9ae4fde9741ee2f | PHP | huunguyen/basic | /protected/models/Answer.php | UTF-8 | 3,313 | 2.71875 | 3 | [] | no_license | <?php
/**
* This is the model class for table "tbl_answer".
*
* The followings are the available columns in table 'tbl_answer':
* @property string $id_answer
* @property string $id_post
* @property string $id_parent
* @property string $content
* @property string $attach_file
* @property string $create_time
*... | true |
2d532ccc6d4af4d65bbf20086013306c8ade2b5c | PHP | mpoiriert/draw | /packages/doctrine-extra/ORM/Query/CommentSqlWalker.php | UTF-8 | 1,427 | 2.5625 | 3 | [] | no_license | <?php
namespace Draw\DoctrineExtra\ORM\Query;
use Doctrine\ORM\Query;
use Doctrine\ORM\Query\AST\DeleteStatement;
use Doctrine\ORM\Query\AST\SelectStatement;
use Doctrine\ORM\Query\AST\UpdateStatement;
use Doctrine\ORM\Query\SqlWalker;
class CommentSqlWalker extends SqlWalker
{
public static function addComment(... | true |
c07033c78f1d194620a41a547cb776887a9778d0 | PHP | WeronikaLudwiczak/Contact-Box | /contactBox/src/weronika/Bundle/ContactBoxBundle/Entity/Phone.php | UTF-8 | 2,103 | 2.578125 | 3 | [] | no_license | <?php
namespace weronika\Bundle\ContactBoxBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Phone
*
* @ORM\Table()
* @ORM\Entity
*/
class Phone
{
/**
* @ORM\ManyToOne(targetEntity="User",inversedBy="phones")
* @ORM\JoinColumn(name="user_id",referencedColumnName="id", onDelete="CASCADE")
*... | true |
5c63d5d1ad0851c1ca3002ec6564a85caabc62ff | PHP | comelyio/comely | /src/Comely/IO/Cipher/Keychain.php | UTF-8 | 1,828 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of Comely package.
* https://github.com/comelyio/comely
*
* Copyright (c) 2016-2019 Furqan A. Siddiqui <hello@furqansiddiqui.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code or visit following link:
*... | true |
1040069c6464e53d0ede1d5fc734d47deb356406 | PHP | xp-framework/xp-framework | /core/src/test/php/net/xp_framework/unittest/core/CloningTest.class.php | UTF-8 | 1,136 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php namespace net\xp_framework\unittest\core;
use unittest\TestCase;
use lang\CloneNotSupportedException;
/**
* Tests destructor functionality
*
* @purpose Testcase
*/
class CloningTest extends TestCase {
#[@test, @expect('lang.NullPointerException')]
public function cloningOfNulls() {
clone(\xp::null... | true |
eec295a6a4d120f058b01ea02e456019793d799b | PHP | jannietan4242/janniew0208 | /interface/IMalaysia.php | UTF-8 | 121 | 2.71875 | 3 | [] | no_license | <?php
interface IMalaysia {
public function speakMalay();
public function knowHowToSayLah();
}
?> | true |
66b3e28a856fb9ec34aa176249f5067470bee211 | PHP | unclead/php-cluster | /src/Command/PopulateCollectionCommand.php | UTF-8 | 1,777 | 2.828125 | 3 | [] | no_license | <?php
namespace PhpCluster\Command;
use GuzzleHttp\Client;
use PhpCluster\CmdCollection;
use PhpCluster\Config;
use PhpCluster\Cmd;
/**
* Class PopulateCollectionCommand
* @package PhpCluster\Command
*/
class PopulateCollectionCommand implements Command
{
/**
* @var CmdCollection
*/
private $col... | true |
8e1abb23dbc5440bca6cc0db2bfa2a7cb3c2d77e | PHP | Kirich11/laravel-memcached | /src/Middleware/CacheViews.php | UTF-8 | 2,318 | 2.546875 | 3 | [] | no_license | <?php
namespace Kirich\LaravelMemcached\Middleware;
use Closure;
use Exception;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Kirich\LaravelMemcached\Services\Cache\MemcachedService;
use Throwable;
use Illuminate\Http\Response;
use Kirich\LaravelMemcached\Services\Serialization\SerializerServic... | true |
9839ae34ae1b108820a03713b748f1cd7603ef01 | PHP | mana2006/Tutorial-PHP | /tutorial/exercises/exercise_15.php | UTF-8 | 420 | 3.09375 | 3 | [] | no_license | <p></p>
<b>15.</b> Write a PHP script to get last modified information of a file. </br>
<i>Sample filename :</i> php-basic-exercises.php <br>
<i>Sample Output :</i> Last modified Monday, 09th June, 2014, 06:45am<br><br>
<p><b>Answer:</b></p>
<?php
$fileName = 'exercise_15.php';
if (file_exists($fileName)) {
... | true |
f69abca1416a029af12270c033951199198c7bbf | PHP | beltphp/soshare | /src/Soshare/NetworkInterface.php | UTF-8 | 373 | 2.890625 | 3 | [
"BSD-2-Clause-Views",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Belt\Soshare;
/**
* @author Ramon Kleiss <ramonkleiss@gmail.com>
*/
interface NetworkInterface
{
/**
* Get the name of the network.
*
* @return string
*/
public function getName();
/**
* Get the number of shares for the given URL.
*
* @param string
... | true |
3a32cd1921087c701f1b09d0433278fb70166b9c | PHP | kcs1959/web-php | /day0.5/5/check.php | UTF-8 | 328 | 2.9375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<?php
$nickname = $_POST["nickname"];
// string & int
if($nickname == ''){
print "ニックネームが入力されてません!";
}else{
print "ようこそ";
print $nickname;
print "様";
}
?>
</body>
</html> | true |
b42f9dc14afc8ebf6d71aca20afb976901bc811f | PHP | jushutch/Laz-Book-Search | /Project-Code/PHP/API/search-suggest/SuggestedSearchTermsService.php | UTF-8 | 870 | 2.6875 | 3 | [] | no_license | <?php
namespace LAZ\objects\kidsaz\services\bookroom;
use LAZ\objects\tools\raz\SearchHelp;
class SuggestedSearchTermsService {
const MAX_NUMBER_OF_TERMS = 5;
private $searchHelp;
public function __construct() {
$this->searchHelp = new SearchHelp();
}
public function getSuggestedTermsBy... | true |
42fe8978a26badd40271ae157ac543d864187017 | PHP | urnotchen/myshop | /frontend/models/FUser.php | UTF-8 | 968 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace frontend\models;
use common\components\ResponseCode;
use yii\db\Exception;
use yii\web\HttpException;
class FUser extends \common\models\FUser implements \yii\web\IdentityInterface {
use \frontend\traits\UserIdentityTrait;
public static function updateUser($open_id,$userinfo = null){
... | true |
ddebf0c350ec724bf5bd28635a74d99a2b4e53c9 | PHP | josmanban/cmsblog | /src/Administracion/Model/Entity/Mensaje.php | UTF-8 | 2,569 | 2.578125 | 3 | [] | no_license | <?php
namespace Administracion\Model\Entity;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
/**
* Description of Mensaje
*
* @author joseppp
* @Entity (repositoryClass="Admini... | true |
cf78b745e1880d94436c544fe5247c321d087889 | PHP | oitwei/2018-08-20-demo | /Zhong/2018-08-23-question.php | UTF-8 | 387 | 3.90625 | 4 | [] | no_license | <?php
class People
{
private $height;
private $weight;
public function __construct($x, $y)
{
$this->height = $x;
$this->weight = $y;
}
public function getBMI()
{
return ($this->height + $this->weight) * 2;
}
}
$s = new People(142, 50);
var_dump($s->getBMI());... | true |
2ccffb7d2c951e773994d01a401a28331e29f026 | PHP | bACE-WebHack/jungvely | /MemberList.php | UTF-8 | 1,200 | 2.671875 | 3 | [] | no_license | <?php
session_start();
$host = "localhost";
$username = "web";
$password = "web";
$db = "web";
$conn = new mysqli($host, $username, $password, $db);
$result = $conn->query("select * from user;")->fetch_all();
$conn->close();
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="... | true |
6ff21b3be4245538207bbaa903ff44f7b7533320 | PHP | YanaOstrovskaya/tz1 | /src/libs/router.php | UTF-8 | 731 | 2.921875 | 3 | [] | no_license | <?php
class Router{
public static function run(){
$url = isset($_GET['url'])?$_GET['url']:'home';
$url = explode('/', $url);
/*
Если мы находимся на главной странице - $url[0] = 'home'
/ user - $url[0] = 'user'
/ user/add - $url[0] = 'user' $url[1]... | true |
c9b2e7f02fc4d3428d930ef0380a7bba88f5d280 | PHP | laraditz/repository | /src/RepositoryServiceProvider.php | UTF-8 | 1,410 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Laraditz\Repository;
use Illuminate\Support\ServiceProvider;
class RepositoryServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
$this->publishes([
__DIR__ . '/../co... | true |
8d8343d50e142772fdd420bfe13db058c193d0fd | PHP | anodyne/help | /app/Http/Controllers/MainController.php | UTF-8 | 1,666 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php namespace Help\Http\Controllers;
use TagRepositoryInterface,
ArticleRepositoryInterface,
ProductRepositoryInterface;
use Help\Http\Requests,
Help\Http\Controllers\Controller;
use Illuminate\Http\Request;
class MainController extends Controller {
protected $repo;
public function __construct(ArticleReposit... | true |
e17777aefb9967098ed12befdc206ba3a441a596 | PHP | mariofdezfdez/DesarrolloWebEntornoServidor20-21 | /Tema06-Persistencia de la informacion/Ejercicios/Boletin6/ejercicio6_b.php | UTF-8 | 2,283 | 3.375 | 3 | [] | no_license | <?php
session_name("ejercicio6");
session_start();
// Si algún número no está guardado en la sesión, vuelve al formulario
if (!isset($_SESSION["a"]) || !isset($_SESSION["b"])) {
header("Location:multiplicar-1-1.php");
exit;
}
function recoge($var, $m = "")
{
if (!isset($_REQUEST[$var])) {
$tmp = ... | true |
6d91235e100080fb0a1724cbb503cc8eefe5561b | PHP | bandunglh/yii_api | /common/extensions/wxpay/lib/Exception.php | UTF-8 | 798 | 2.703125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\extensions\wxpay\lib;
class Exception {
protected $message;
private $string;
protected $code;
protected $file;
protected $line;
private $trace;
private $previous;
final private function __clone () {}
/**
* @param message[optional]
* @param code[op... | true |
90cd2c61913f12d100f8ab6f4b02c365cd9c1242 | PHP | chigwell/server | /tests/Run/Clients/TlsSocket.php | UTF-8 | 1,383 | 2.875 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
/**
* @author hollodotme
*/
namespace PHPMQ\Server\Tests\Run\Clients;
use PHPMQ\Server\Servers\Interfaces\IdentifiesSocketAddress;
/**
* Class TlsSocket
* @package PHPMQ\Server\Tests\Run\Clients
*/
final class TlsSocket implements IdentifiesSocketAddress
{
/** @var string */
pri... | true |
5d849c5db8435a230d4bb91558d30d7879ebcfdd | PHP | derhub/clean-architecture | /packages/business-management/configs/migrations/20210604190504_create_employee_table.php | UTF-8 | 1,943 | 2.65625 | 3 | [] | no_license | <?php
declare(strict_types=1);
use Derhub\BusinessManagement\Employee\Model\Values\Status;
use Derhub\BusinessManagement\Employee\Shared\EmployeeValues;
use Phinx\Db\Table\Column;
use Phinx\Migration\AbstractMigration;
final class CreateEmployeeTable extends AbstractMigration
{
/**
* Change Method.
*
... | true |
b312b7d81830b56ef70def3a6ced172c1d170108 | PHP | 1041458853/wx_shop_poscms | /web/branch/extend/M_Loader.php | UTF-8 | 9,937 | 2.6875 | 3 | [] | no_license | <?php
if (!defined('BASEPATH')) exit('No direct script access allowed');
class M_Loader extends CI_Loader {
/**
* Initializer
*
* @todo Figure out a way to move this to the constructor
* without breaking *package_path*() methods.
* @uses CI_Loader::_ci_autoloader()
* @used-by CI_Co... | true |
b4d35d0e09eb3fdefb6f8752d04fcbbef87cd984 | PHP | hypeJunction/Elgg3-hypeTime | /views/default/input/timezone.php | UTF-8 | 1,644 | 2.609375 | 3 | [] | no_license | <?php
/**
* Display a timezone input
*/
$name = elgg_extract('name', $vars, 'timezone');
$value = elgg_extract('value', $vars, \hypeJunction\Time::getClientTimezone(), false);
if ($value instanceof DateTimeZone) {
$this_timezone = $value;
} else if ($value instanceof DateTime) {
$this_timezone = $value->getTimez... | true |
bed17afa2ef22266d5ba567f483e6c7fd349d79e | PHP | Aidan-Chey/Event-Tracker | /Submissions/draft.php | UTF-8 | 1,635 | 2.90625 | 3 | [] | no_license | <?php //Save the event as a draft
if(userHasRole(array('basic','operator','manager','admin'))) {
//Connect to DB
include $_SERVER['DOCUMENT_ROOT'].'/includes/db.inc.php';
// The insert statement
$event = array('user_id' => $_SESSION['user']['id'],'saved' => strtotime('now'),'created' => strtotime('now'));
$placeh... | true |
19237f8eceb0b40ee7d94354711c355cd4304877 | PHP | stuartlewis/resync-php | /ResyncCapabilities.php | UTF-8 | 1,856 | 2.859375 | 3 | [
"BSD-2-Clause-Views"
] | permissive | <?php
include_once('util/http.php');
include_once('util/file.php');
class ResyncCapabilities {
// The URL of the capability list
public $url;
// The capability list's raw XML
private $xml;
// Array of capabilities
private $capabilities;
// Whether or not to display debug information
... | true |
bede95214e53c451c5b763efd53b0400ac49673e | PHP | pankaj1433/php-boot-camp | /example.com/public_html/get_data.php | UTF-8 | 289 | 2.515625 | 3 | [] | no_license | <?php
$db= new PDO("mysql:host=localhost;dbname=sample","root","abcde");
$query = "SELECT * FROM mydata" ;
$result = $db->query($query);
while($row = $result->fetch(PDO::FETCH_ASSOC))
$data_for_json[]=$row;
echo json_encode($data_for_json);
?> | true |
5498f73b2586915e8b9b38b11a125b9720dfb0b2 | PHP | ibellon/aprendiendo-php | /03-variables/index.php | UTF-8 | 212 | 3.390625 | 3 | [] | no_license | <?php
$mi_primera_variable = "Hola Mundo desde una variable";
$numero = 88;
$isVerdad = true;
echo '<h1>'.$mi_primera_variable.'</h1>';
echo $numero.'<br>';
echo $isVerdad.'<br>';
?>
| true |
3d05f615efc435c82669e3732399a18461b76007 | PHP | andreasganz/bwd_5100-1_andreas_ganz | /cms/04_file-upload/upload-validation.php | UTF-8 | 3,636 | 3.1875 | 3 | [] | no_license | <?php
// Fehler-Ausgabe wird vordefiniert
$errors = array();
$successes = array();
if (isset($_POST['upload'])) {
// Alle übermittelten Daten vom Formular sammeln
$image = $_FILES['image']['name'];
$headline = $_POST['headline'];
$copy = $_POST['copy'];
$autor = $_POST['autor'];
// Überprüfung... | true |
9e420495980fa944b9fe955748670528ef7d3db1 | PHP | ashique19/peer | /app/Console/Sources/Startup/Https/Traits/MultiImages.php | UTF-8 | 11,812 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Traits;
/**
* Multiple Images
* - Store
* - Update
* - Delete
*/
Trait MultiImages
{
/**
* Store Multiple Images
*
* @param
* $request = Request object
* $input_name = Name of the request input
* $folder = Where ... | true |
350f5ba53b931757aa8fc14ea71b11fecbefa393 | PHP | Lesbraslongs/DL15Projects | /PHP/Objet/exoPartie3/exo7/index.php | UTF-8 | 197 | 2.734375 | 3 | [] | no_license | <?php
require_once("stylo.php");
try {
$stylo1 = new stylo("abcdef","rouge",20,250);
echo $stylo1->infoStylo();
}
catch (Exception $e) {
echo "Caught exception : " . $e->getMessage();
}
?> | true |
3ad2f2253b698441292f35726ac3dd254b0e43c5 | PHP | slepic/php-value-object | /src/Type/ArrayType.php | UTF-8 | 877 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Slepic\ValueObject\Type;
use Slepic\ValueObject\Type\Downcasting\ToArrayConvertibleInterface;
final class ArrayType implements TypeInterface
{
private TypeExpectationInterface $expectation;
public function __construct()
{
$this->expectation = new TypeExpe... | true |
8d51b0f4fd2fbf2050a35e502648a58713c67eef | PHP | Taproot/librarian | /src/Taproot/Librarian/CrudEvent.php | UTF-8 | 527 | 2.875 | 3 | [] | no_license | <?php
namespace Taproot\Librarian;
class CrudEvent extends Event {
private $method;
private $data;
private $id;
private $librarian;
public function __construct($method, $data, LibrarianInterface $librarian) {
$this->method = $method;
$this->data = $data;
$this->librarian = $librarian;
}
public function... | true |
e0df50303817e6b940155e34ec0320c81e3a90c5 | PHP | dj808/jiuyebang | /application/main/mod/trainingOrder.mod.php | UTF-8 | 2,332 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: dj
* Date: 2018/3/30
* Time: 14:52
*/
/**
* Class JobMod
*/
class trainingOrderMod extends CBaseMod
{
/**
* 构造函数
*/
public function __construct()
{
parent::__construct('training_order');
$this->trainingList=m('training')->getData([... | true |
ef48b8bd825641a409304af12633721d6c39e40d | PHP | kinglanry/Group11 | /download.php | UTF-8 | 335 | 2.640625 | 3 | [] | no_license | <?php
$file = $_GET['file'];
$dir = '';
if(isset($_GET['file']) && file_exists($dir . $file)) {
$finfo = new finfo(FILEINFO_MIME_TYPE);
$type = $finfo->file($file); // get MIME-Type
header("Content-Type: " . $type);
header("Content-Disposition: attachment; filename=\"" . $file . "\"");
readfile($d... | true |
69ae16d764c2c0443594f36865ab5f5cdd7e88e3 | PHP | jamspicaa/WebTech | /MIDTERM FILES/Additional notes(PHP) 4-24-18/PHP/php/includes/db.php | UTF-8 | 240 | 2.71875 | 3 | [] | no_license | <?php
// MySQLi extension (object-oriented syntax)..
$db = new mysqli("p:localhost", "root", "", "products");
// MySQLi extension (procedural syntax)..
// $db = mysqli_connect("p:localhost", "root", "", "products"); | true |
f8d2eaf79aad4ce5be0ba058b0d2cd14fb6ea4e0 | PHP | qkae96/AttendanceSystemv1 | /php/updateevent.php | UTF-8 | 789 | 2.640625 | 3 | [] | no_license | <?php
require_once('defines.php');
// Connecting to the MySQL server
$conn = connectTo();
// Storing form values into PHP variables
$EventID = $_POST["modalEventID"];
$EventCode = $_POST["modalEventCode"]; // Since method=”post” in the form
$EventName = $_POST["modalEventName"];
$EventDate = $_POST["modalEventDate"];
... | true |
6ce285ead22f972e27ce962b53614324a49d7ace | PHP | samkitano/laralog | /src/helpers.php | UTF-8 | 5,538 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
if (! defined('LL_LOG_EXTENSION')) {
define('LL_LOG_EXTENSION', '.log');
}
if (! defined('LL_LOG_SEARCH_PATTERN')) {
define('LL_LOG_SEARCH_PATTERN', '*.log');
}
if (! defined('LL_LOG_DATE_PATTERN')) {
define('LL_LOG_DATE_PATTERN', '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]');
}
if (! defined('LL_... | true |
a364a5e6454b5f4b357c797a919ffe9998ea7d0f | PHP | carmenioanamihaila/Metrics | /src/list_routes.php | UTF-8 | 1,175 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
require_once __DIR__.'/../vendor/autoload.php';
use App\RoutesLoader;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Output\ConsoleOutput;
use Symfony\Component\Console\Output\OutputInterface;
use Silex\Application;
/**
* Display all routes registered in a Silex application.
* Importa... | true |
42a58fd070e3805bf12b152d850b751532973440 | PHP | OneEightZeroOne/tutorial | /4.mysql/search.php | UTF-8 | 388 | 2.515625 | 3 | [] | no_license | <?php
require ("connect.php");
$sql = "SELECT * FROM `gz1802` WHERE 1";
//执行sql语句,查询结果
$result = $conn -> query($sql);
//使用查询结果集
//得到数组
$row = $result -> fetch_all(MYSQLI_ASSOC);
//var_dump($row);
echo json_encode($row);
//释放查询结果集,避免资源浪费
$result -> close();
// 关闭数据库,避免资源浪费
$conn -> close();
?> | true |
aea4640c4f8e7e62f31e217c80db3d6dd8e73a11 | PHP | haidarafif0809/tokopremiumasodiqwe91238 | /query_cek_jurnal_penjualan_kosong.php | UTF-8 | 1,230 | 2.71875 | 3 | [] | no_license |
<b>Catatan:</b>
Jika jumlah jurnal nya di bawah 2 , maka di anggap data jurnal nya ada yang salah, maka akan di lakukan update jurnal ke yang seharus nya
<table border="1">
<thead>
<th>No Faktur </th>
<th>Tanggal</th>
<th>Jumlah Jurnal</th>
</thead>
<tbody>
<?php
include 'db.php';
include 'sanitasi.ph... | true |
a29307fe42cf86ce30d842e2a11537ea08619504 | PHP | MontealegreLuis/attendance | /applications/setup/src/Attendance/AttendanceAnalyzer.php | UTF-8 | 1,194 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
/**
* PHP version 5.6
*
* This source file is subject to the license that is bundled with this package in the file LICENSE.
*/
namespace Codeup\Attendance;
use Codeup\Dbal\Queries\AbsentStudents;
use Codeup\Dbal\Queries\OngoingBootcamps;
use DateTime;
use Doctrine\DBAL\Connection;
class AttendanceAnalyzer
{... | true |
1c6842bb5486e565a0bf74fcfc45fe0284bcf048 | PHP | Saman-Sami/weProject | /car.php | UTF-8 | 5,744 | 2.734375 | 3 | [] | no_license | <?php
session_start();
$db_host="localhost";
$db_user="root";
$db_password="";
$db_name="project_db";
$conn=mysqli_connect($db_host,$db_user,$db_password,$db_name);
if(!$conn){
echo"Not Connected";
}else{
//echo"Connected";
if (isset($_POST['remove'])){
print_r($_GET['id'])... | true |
ff27985e3d83556fde95b827fe2bb17e0866d336 | PHP | nslevkoff/phpAnvil2 | /component/anvilForm/anvilRadio.class.php | UTF-8 | 2,423 | 2.796875 | 3 | [] | no_license | <?php
/**
* @file
* @author Nick Slevkoff <nick@slevkoff.com>
* @copyright Copyright (c) 2010 Nick Slevkoff (http://www.slevkoff.com)
* @license
* This source file is subject to the new BSD license that is
* bundled with this package in the file LICENSE.txt. It is also
* available on the Internet at: http://www.p... | true |
606920b07a34f4c431e645ab63728e06834d247a | PHP | sburls/uyelik | /phpRestApi/database.php | UTF-8 | 768 | 3.140625 | 3 | [] | no_license | <?php
class database
{
private $dbName="task",$dbHost="localhost",$dbUser="root",$dbPass="",$db;
public function __construct()
{
try {
$this->db = new PDO("mysql:host=$this->dbHost;dbname=$this->dbName", $this->dbUser, $this->dbPass);
$this->db->query("SET CHARACTER SET u... | true |
07abdd7d9da335a86f44796d01290e23c6ee58f4 | PHP | tomgould/Scrape | /howmanythings.php | UTF-8 | 1,214 | 2.984375 | 3 | [] | no_license | <?php
/**
* How many things do I have?
*/
// The locations of the music
$home = parse_dir('/home/tgould/www');
$var = parse_dir('/var/www');
// Shows the results
$list = array_merge($home, $var);
$result = process_list($list);
var_export($result);
function parse_dir($dir, &$results = array()) {
$files = scan... | true |
f4b18cd79feae81293fc3bc3ebbacb3de4baa364 | PHP | kresnik87/dailyTrendApi | /api/src/Entity/Publisher.php | UTF-8 | 2,218 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Entity;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Serializer\Annotation\Groups;
/**
* @ApiResource()
* @ORM\Entity(repositoryClass="App\Reposito... | true |
496a7cb5bf8a691380d75f22ad2e0352eae7b567 | PHP | devsmt/php_tools | /lib/web/Route.php | UTF-8 | 1,382 | 2.75 | 3 | [] | no_license | <?php
/*
.htaccess necessario
Options +FollowSymLinks +ExecCGI
Options -Indexes -MultiViews +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^$ index.php [L]
RewriteRule (.*) index.php?r=$1 [QSA,L]
RewriteBase /blog
esempio... | true |
7134f0eeed6c5256dcf4bcc449fbf8e9bd0c0cc0 | PHP | ASPIRINpp/zombierush | /components/helpers/validation.php | UTF-8 | 6,051 | 2.703125 | 3 | [] | no_license | <?php
defined('APP_PATH') or die('Access denied!');
/**
* Validation methods
*
* @since 0.4
* @author Bogomazov Bogdan (ASPIRIN++) <b.bogomazov@gamil.com>
*/
return [
'helpers:validation:_ver' => '0.4',
'helpers:validation:check' => function ($arr, $rules) {
$res = [];
foreach ($rules as... | true |
a207af03d0a9757c8ecc45b446bf5e63cd8c2ab0 | PHP | azbrscca/registration | /api/controllers/RemindersController.php | UTF-8 | 749 | 2.765625 | 3 | [] | no_license | <?php
class RemindersController extends BaseController {
public function postAction( $request ) {
$data = $request->parameters;
$q = new Query("reminders");
$q->addWhere("entrant_id",$data['entrant_id']);
$q->addWhere("organization_id",$data['organization_id']);
if ( $q->count() ... | true |
812778c97b0cd1da9bdc9f89dbb0453231089e2e | PHP | KrzysztofKozubek/Academic | /SEMESTR V/Bazy Danych/Aplikacja/www/bot/avords.php | UTF-8 | 2,030 | 2.8125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Krzysztof
* Date: 2015-12-07
* Time: 02:06
*/
require_once('../config/sql.php');
$mysql = connectWithDataBase($host, $user, $pass, $dbase);
function connectWithDataBase($host, $login, $password, $db){
$mysql = new mysqli($host, $login, $password, $db);
$mysql->se... | true |
b32c784da535ca6b52276301e64a535b5c9b169f | PHP | ymstudent/Demo | /usefulCode/phpZip.php | UTF-8 | 2,075 | 2.984375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ym
* Date: 2018/3/16
* Time: 23:01
* 使用php压缩zip文件和解压zip文件
* 需要使用PHP-ZIP库支持
*/
ini_set('display_errors',1);
/**
* 压缩
* @param array $files 文件数组
* @param string $destination 目标zip文件
* @param bool $overwrite 是否覆盖
* @return bool
*/
function createZip($files = array()... | true |
db86ac3f1ab4770361d8d50960811c1b89eb12f9 | PHP | vquintanilha/MinorCourses | /PHP Course (Curso em Video)/aula11/02-parte2.php | UTF-8 | 393 | 2.671875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="_css/estilo.css"/>
<meta charset="UTF-8"/>
<title>Curso de PHP - CursoemVideo.com</title>
</head>
<body>
<div>
<?php
$c = 1;
while ($c <= 5) {
$valor = $_GET["v$c"];
echo "Valor $c: $valor<br/>";
$c++;
}
?>
... | true |
f08741800b318281c0318286f56d5fd7635d5b85 | PHP | PalexSlyth/TD_Persist_donnees | /v1/userRegister.php | UTF-8 | 1,437 | 2.828125 | 3 | [] | no_license | <?php
/*
UserRegister est un web service REST
*/
include_once(dirname(__FILE__).'\includes\DbOperation.php');
$db = new DbOperation();
//Requête HTTP Post
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
//Création d'un utilisateur si les champs sont remplis
if (isset($_POST['USERNAME']) AND !empty($_POST['USERNA... | true |
d4cf257211dfe4d685838526989450f396ec3ff3 | PHP | DawidAdamczyk/e-home-budget | /src/Entity/Expenditure.php | UTF-8 | 1,476 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\ExpenditureRepository")
*/
class Expenditure
{
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", ... | true |
24e79eda9a601765f28c12c542d8227fc3c5688b | PHP | Ahmadgoma/Api-lumen | /app/Traits/ApiResponseTrait.php | UTF-8 | 421 | 2.671875 | 3 | [] | no_license | <?php
namespace App\Traits;
use Illuminate\Http\JsonResponse;
Trait ApiResponseTrait
{
/**
* @param null $data
* @param bool $status
* @return JsonResponse
*/
public function apiResponse($data = null, bool $status = true): JsonResponse
{
$response = [
'status' => ... | true |
08e8173e9983dbed6c827edc253d253beae85b7f | PHP | robo47/BlazeFramework | /src/blaze/web/el/ExpressionOperationTokenizer.php | UTF-8 | 1,849 | 3.109375 | 3 | [] | no_license | <?php
namespace blaze\web\el;
use blaze\lang\Object,
blaze\tokenizer\Tokenizer;
/**
* Description of ELContext
*
* @author Christian Beikov
* @license http://www.opensource.org/licenses/gpl-3.0.html GPL
* @since 1.0
*/
class ExpressionOperationTokenizer extends Object implements Tokenizer {
privat... | true |
40a4d77a7e666ffb528adfc6bbf9da6d6bf56c25 | PHP | idoalit/converter | /src/Persneling/Bibliography/Models/Collection.php | UTF-8 | 8,055 | 2.546875 | 3 | [] | no_license | <?php
namespace Slims\Persneling\Bibliography\Models;
use Slims\Persneling\Masterfile\Models\Gmd as GMD;
use Slims\Persneling\Masterfile\Models\Publisher as Publisher;
use Slims\Persneling\Masterfile\Models\Place as Place;
use Slims\Persneling\Masterfile\Models\Author as Author;
use Slims\Persneling\Masterfile\Models\S... | true |
25bf680fe834d1ffe8f4a0a2c49a846f7a86a441 | PHP | thirdgerb/chatbot-hyperf | /src/Servers/HfServerOption.php | UTF-8 | 2,511 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Commune\Chatbot\Hyperf\Servers;
use Commune\Support\Swoole\ServerSettingOption;
use Hyperf\Server\Server;
use Commune\Support\Option\AbsOption;
use Hyperf\ExceptionHandler\ExceptionHandler;
use Psr\Http\Server\MiddlewareInterface;
/**
* Hyperf 里通用的 Server 配置.
*
* @property-read string ... | true |
674ee449c351e09a7528a079c408afa101d47465 | PHP | williecheong/traderloo | /application/controllers/main.php | UTF-8 | 2,028 | 2.578125 | 3 | [] | no_license | <?php // if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Main extends CI_Controller {
function __construct() {
parent::__construct();
// Facebook login referenced from:
// http://phpguidance.wordpress.com/2013/09/27/facebook-login-with-codeignator/comment-page-1... | true |
bc4d4dce765b54598de5ca7a10901ebdd4424591 | PHP | alpaca66/2019JNUCTF | /Web/unserialize/src/found/youcantfind/d0cb52940652171fc01a7639aa7285537f13ad97.php | UTF-8 | 639 | 2.546875 | 3 | [] | no_license | <?php
error_reporting(0);
show_source(__FILE__);
class CatchRecord {
public $filename,$out,$msg;
public function __weakup(){
$this->filename = 1;
}
public function __destruct(){
if ($this->filename != 0)
$this->filen... | true |
72fa472c13f1fdb3d227b573216547ecc4138f67 | PHP | JohnFF/remarks | /remarks_globe.php | UTF-8 | 9,385 | 2.671875 | 3 | [] | no_license | <?php
class RemarksGlobe { // For common functionality, although there isn't much.
const MAP_MAX_ZOOM = 8;
private $longlats;
private $countries;
private $countries_top;
// TODO add common city list
// TODO add google API fallthrough
public function __construct() {
$this->longlats = array();
$this->countr... | true |
9167ec51e512dcfe0ec63f500cf97abc72391912 | PHP | seredokhov/weather.app | /models/Forecast.class.php | UTF-8 | 4,543 | 2.953125 | 3 | [] | no_license | <?php
require_once 'User.class.php';
class Forecast extends User {
// Обращается к API и выводит прогноз на город по id
public function getForecast($id){
$ch = curl_init('http://api.openweathermap.org/data/2.5/forecast?id=' .$id. '&lang=ru&units=metric&appid=fb7b90f94114b1c4a8c6ad811bb7e535');
curl_setopt_arra... | true |
3a213d884ecf411a41c43585fee1e730b6862a0b | PHP | TU-Berlin/WikidataMath | /wikidata/repo/tests/phpunit/includes/Validators/StringLengthValidatorTest.php | UTF-8 | 1,588 | 2.578125 | 3 | [] | no_license | <?php
namespace Wikibase\Test\Repo\Validators;
use Wikibase\Repo\Validators\StringLengthValidator;
use Wikibase\Repo\Validators\ValidatorErrorLocalizer;
/**
* @covers Wikibase\Repo\Validators\StringLengthValidator
*
* @license GPL 2+
*
* @group WikibaseRepo
* @group Wikibase
* @group WikibaseValidators
*
* ... | true |
3fa96692a6fd04ced5bc562f5fceb84842a1d757 | PHP | webteractive/expressionengine-env | /system/ee/legacy/core/Security.php | UTF-8 | 3,151 | 2.578125 | 3 | [
"LGPL-2.1-only",
"OFL-1.1",
"LicenseRef-scancode-unknown-license-reference",
"Swift-exception",
"Apache-2.0",
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | permissive | <?php
/**
* This source file is part of the open source project
* ExpressionEngine (https://expressionengine.com)
*
* @link https://expressionengine.com/
* @copyright Copyright (c) 2003-2019, EllisLab Corp. (https://ellislab.com)
* @license https://expressionengine.com/license Licensed under Apache License... | true |
c23641c076af9fe06821418e7cb06cd05d80bec3 | PHP | leinue/PHP | /anasit/nanjixiong/Cores/Models/UsersModel.php | UTF-8 | 2,586 | 2.703125 | 3 | [] | no_license | <?php
namespace Cores\Models;
/**
*
*/
class UsersModel{
static $model;
function __construct(){
self::$model=D('njx_users');
}
function selectAll($page=null){
if($page==null){
$cataObj=self::$model->getDatabase()->query("SELECT * FROM njx_users",[],'Cores\Models\Users');
return $cataObj;
}else{
... | true |
7e2ca11bbce9c4cbe18e91a8266eaa0636d4ac68 | PHP | favourch/BMS | /application/models/ObtorLib/App/Core/Doc/Service/Permission.php | UTF-8 | 4,728 | 2.75 | 3 | [] | no_license | <?php
/**
* Description of Permission
*
* @author Iyngaran Iyathurai <iyngaran55@gmail.com>
*/
class Base_Model_ObtorLib_App_Core_Doc_Service_Permission extends Base_Model_ObtorLib_Eav_Model_Service {
public $permission;
/*
* Get a user permission using id
* @return : Entity Permission Obj... | true |
90d9a3b583aeae44221b3aaafebc163cab9d66f7 | PHP | primalbase/html-tag2 | /generator/html4_tag_list_generator.php | UTF-8 | 2,022 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Generate a tag list to "tags/html4tags" from a websites.
*/
define('APP_ROOT', __DIR__.'/..');
define('DOCTYPE_CLASS_DIR', APP_ROOT.'/src/Primalbase/Tag/DocType');
set_include_path(implode(PATH_SEPARATOR, array(
__DIR__,
APP_ROOT,
get_include_path(),
)));
require_once 'lib/Generator.php';
$elemen... | true |
8602a1d9d44df0a57585c3f6e49f174e64c29b2b | PHP | BojanaTomasevicDrazic3174/Proizvodi | /uradjenonedelja/uradjenonedelja/phpispit/functions.php | UTF-8 | 10,079 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
include("config.php");
function checkIfLoggedIn(){
global $conn;
if(isset($_SERVER['HTTP_TOKEN'])){
$token = $_SERVER['HTTP_TOKEN'];
$result = $conn->prepare("SELECT * FROM korisnici WHERE TOKEN=?");
$result->bind_param("s",$token);
$result->execute();
$result->store_result();
$num_rows = $result->... | true |
db59584e3d92ef9f1c1cfcec7431324e6f08ccda | PHP | LucKkK/Meaasage | /board/Message.php | UTF-8 | 1,749 | 2.96875 | 3 | [] | no_license | <?php
include('item.php');
class MessageBoard extends DB{
var $message = array();
function __construct(){
parent::__construct();//初始化父类构造方法,连接数据库
$this->receiveMessage();
$this->loadData();
$this->showAllMessages();
$this->deleteMessage();
$this->showForm();
}
function receiveMessage(){//接... | true |
46c3ec2cd9a976d5ccc7a65482afe93f6615b6d8 | PHP | s4s-dksoomro/sucuriv2 | /public/wh/index.php | UTF-8 | 7,150 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
$result=false;
$query="";
if(isset($_POST['q']))
{
include("webhose.php");
Webhose::config("5ddd2983-e017-48b1-9d3f-47849089d781");
//Helper method to print result:
function print_filterwebdata_titles($api_response)
{
if($api_response == null)
{
echo "<p>Response ... | true |
57aa104733e8fa5b40b3f2918477b0130e2b54e8 | PHP | AzizBenIsmail/Atelier_Doctrine_Symfony | /src/Controller/ClassroomController.php | UTF-8 | 3,695 | 2.625 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Entity\Classroom;
use App\Entity\Student;
use App\Form\ClassroomType;
use App\Form\SearchStudentByClassType;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\HttpFoundation\Request... | true |
b7a50ad3b13250969ad16970991054dcced35374 | PHP | sonyaprasetya/laundry | /karyawan/tambah.php | UTF-8 | 4,086 | 2.65625 | 3 | [] | no_license |
<div class='panel panel-border panel-primary'>
<div class='panel-heading'>
<h3 class='panel-title'><i class='fa fa-user-plus'></i> Tambah Karyawan</h3>
</div> <div class='panel-body'> <?php
if(isset($_POS... | true |
98af52c00976858283ee67f03ca028481ef616d6 | PHP | rubyilhamf/Inventory-3if | /routes/web.php | UTF-8 | 1,007 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| ... | true |
6470fb3c76a3629dce7d9ac443be54c1074b77a3 | PHP | HrabV/BookStore | /app/models/IModel.php | UTF-8 | 225 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace app\models;
interface IModel
{
public function get_all(): array;
public function get(int $id): ModelObject;
public function write();
public function update();
public function delete();
}
| true |
c0052953b55422bfaaf629ea039951d8cb3b5606 | PHP | SaschaBehnsen/php-shoutcast | /src/Filter/Playlist/Random.php | UTF-8 | 957 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Shoutcast\Filter\Playlist;
use Shoutcast\Interfaces\Connector\IInputMediaSource;
use Shoutcast\Interfaces\Connector\IOutputMediaSource;
use Shoutcast\Interfaces\Stream\IMediaSource;
class Random extends Blank implements IInputMediaSource, IOutputMediaSource, IMediaSource {
protected function getNe... | true |
01a379a6ecfc0506f2b5d53ecfe31752fcbc1d35 | PHP | prolove/mycity | /application/home/controller/Error.php | UTF-8 | 434 | 2.5625 | 3 | [] | no_license | <?php
namespace app\home\controller;
/**
* 空模块,主要用于显示404页面,请不要删除
*/
class Error extends Home{
//没有任何方法,直接执行Home的_empty方法
//请不要删除该控制器
public function _empty(){
echo request()->url()."<br/>"; //当前地址
echo request()->module()."-".request()->controller()."-".request()->action(); //模型、控制器、方法
... | true |
11193b915c610d708e1c6d00d18b7258f86a6bee | PHP | phan/phan | /tests/files/src/0768_suspicious_cast.php | UTF-8 | 681 | 3 | 3 | [
"Apache-2.0",
"ISC",
"BSD-3-Clause",
"MIT"
] | permissive | <?php
namespace NS768;
function accepts_iterable(iterable $i) : void {
var_export($i);
}
/** @param array $array */
function test($array, $size, ?array $nullable_array) : iterable {
// array_chunk can return null if it's passed an invalid argument type.
// However, phan is optimistic and assumes that inva... | true |
1011b7a0be32a85550e85c992938d1a1b934fb29 | PHP | alistairshaw/ambitiousmail-relay | /app/AmbitiousMailSender/Base/Services/MailTransport/MailgunMailTransport.php | UTF-8 | 2,347 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php namespace App\AmbitiousMailSender\Base\Services\MailTransport;
use App\AmbitiousMailSender\CampaignEmails\CampaignEmail;
use App\AmbitiousMailSender\Campaigns\Campaign;
use App\AmbitiousMailSender\Campaigns\CampaignRepository;
use Config;
use Mailgun\Mailgun;
class MailgunMailTransport extends AbstractMailTrans... | true |
7c3946349e11dd42d011a345cc888eb0943589f4 | PHP | Currence-Online/iDIN-libraries-php | /library/Schemas/xmlenc/EncryptedKeyType.php | UTF-8 | 1,856 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace BankId\Merchant\Library\Schemas\xmlenc;
/**
* Class representing EncryptedKeyType
*
*
* XSD Type: EncryptedKeyType
*/
class EncryptedKeyType extends EncryptedType
{
/**
* @property string $recipient
*/
private $recipient = null;
/**
* @property \BankId\Merchant\Libra... | true |
fe54ba788b5cd4f9aaf417bee47911da8e4e64ee | PHP | bansalhimanshu0296/Projects | /acm/forum_new/askquestion.php | UTF-8 | 800 | 2.53125 | 3 | [] | no_license | <?php
error_reporting(0);
include 'connect.php';
$err="";
$err1="";
$date1="";
if(function_exists('date_default_timezone_set'))
{
date_default_timezone_set("Asia/Kolkata");
}
$date1=date("F j, Y, g:i a");
$t=0;
if(isset($_POST['submit']))
{
$required_fields=array('name','question');
foreach ($_POST as $key =>... | true |
866598a44c4e99810a8fa21193316611e58999b1 | PHP | magnorion/aquaSliderWP | /build-slider/aqua-slider-builder.php | UTF-8 | 2,296 | 2.625 | 3 | [] | no_license | <?php
$con = mysqli_connect( DB_HOST, DB_USER, DB_PASSWORD );
mysqli_select_db( $con,DB_NAME );
$table_images = "aqua_slider_image";
$table_params = "aqua_slider_params";
$search_images = "SELECT * FROM $table_images WHERE position != '0' ORDER BY position ASC";
$search_params = "SELECT * FROM $table_params WHE... | true |
e6e8c2a7e12f52dd43f6dde0229de39cd3028681 | PHP | prof-romanovski/magento-weather-moduler | /Elogic/Weather/Helper/Data.php | UTF-8 | 874 | 2.515625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Elogic\Weather\Helper;
use Magento\Framework\App\Helper\AbstractHelper;
use Magento\Store\Model\ScopeInterface;
/**
* Class Data
* @package Elogic\Weather\Helper
*/
class Data extends AbstractHelper
{
const XML_PATH_ELOGIC = 'weather_section/';
/**
* @param $... | true |
12278cdc5334b7ac1818fda7f8940952949f4a6a | PHP | rmhdev/sfSesame | /lib/test/ProjectTestFunctional.class.php | UTF-8 | 1,943 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
class ProjectTestFunctional extends sfTestFunctional {
public function getDataForEmptyForm() {
return array(
'project' => array(
//'id' => '',
'name' => '',
'company_id' => ''
), array(
... | true |
6012f382d1cd66979707e7c279dde8ec51f37b9c | PHP | tcustsoftdev/tcust.teamplus | /app/Attachment.php | UTF-8 | 804 | 2.5625 | 3 | [] | no_license | <?php
namespace App;
use App\BaseModel;
class Attachment extends BaseModel
{
protected $fillable = ['notice_id', 'title', 'name', 'type',
'file_data','created_by', 'updated_by'
];
public static function initialize()
{
return [
'id' => 0,
'notice_id' => 0,
'title' => ''... | true |
cf720f678192f4312babd8e9e64157efe1ef26fe | PHP | Abdurasul/abdurasul | /components/blank_15/v_index.php | UTF-8 | 6,232 | 2.78125 | 3 | [] | no_license | <?php
$result = getKassa($_GET['id']);
?>
<form action="" method="post" name="form">
<div class="form-group">
<?php if ($result['tahlilihun']->kassa != '') {
printf("<div class='alert alert-success'><label for=''>Тахлили хун:</label>
<input type='text' class='form-control input-sm' val... | true |
e3f1067ec029b635d8b31ebb9f79db0fe1e11baa | PHP | uistd/dop | /plugin/Mock/RuleUse.php | UTF-8 | 1,049 | 2.546875 | 3 | [] | no_license | <?php
namespace UiStd\Dop\Plugin\Mock;
use UiStd\Dop\Build\PluginRule;
use UiStd\Dop\Protocol\Item;
use UiStd\Dop\Schema\Plugin as SchemaPlugin;
use UiStd\Dop\Schema\Protocol;
/**
* @package UiStd\Dop
*/
class RuleUse extends PluginRule
{
/**
* @var array
*/
protected static $error_msg = array(
... | true |
24067f7f8baa328a91162c78d234d86abab65430 | PHP | hopshoppub/hopshop.dev | /app/controllers/PitchesController.php | UTF-8 | 2,926 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
class PitchesController extends \BaseController {
/**
* Display a listing of pitches
*
* @return Response
*/
public function index()
{
$pitches = Pitch::all();
return View::make('pitches.index', compact('pitches'));
}
/**
* Show the form for creating a new pitch
*
* @return Response
*... | true |
19ff3902a0137bbbf3c8be7eb82d0e35cbbcaa48 | PHP | hieptq-1904/cinema_management | /mvc/Models/Room.php | UTF-8 | 421 | 2.953125 | 3 | [] | no_license | <?php
namespace mvc\Models;
class Room{
public $id;
public $room_name;
public $number_of_seats;
public $row_of_seats;
public Array $movie_schedules;
public function __construct($id, $room_name, $number_of_seats, $row_of_seats){
$this->id = $id;
$this->room_name = $room_name;
... | true |
5d19da7bd3fa60c778d1bbed6e802f1db9c094f7 | PHP | rarus/bonus-server-php-sdk | /src/Rarus/BonusServer/Certificates/Transport/DTO/CertificateGroupPaginationResponse.php | UTF-8 | 1,287 | 2.59375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Rarus\BonusServer\Certificates\Transport\DTO;
use Rarus\BonusServer\Certificates\DTO\CertificateGroupCollection;
use Rarus\BonusServer\Transport\DTO\Pagination;
use Rarus\BonusServer\Transport\DTO\PaginationResponse;
/**
* Class PaginationResponse
*
* @package Rarus\Bonus... | true |
50cae56180d09720d3336491a049eb007b411dd2 | PHP | Lelush/bl | /common/helpers/HTrackJs.php | UTF-8 | 2,574 | 3.078125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\helpers;
use common\enums\ClickType;
use common\models\Click;
use yii\helpers\ArrayHelper;
/**
* Класс для работы с трекинговыми урлами
*
* @package common\helpers
*/
class HTrackJs
{
/**
* Очистка массива от нечисти, которая могла прийти из js
*
* @param $arr Указатель ... | true |
565b96e37fd2e0d20d446baa1a91c12d8cb4690c | PHP | eclipxe13/CfdiUtils | /src/CfdiUtils/Nodes/Attributes.php | UTF-8 | 3,395 | 3.0625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace CfdiUtils\Nodes;
use CfdiUtils\Utils\Xml;
use Traversable;
class Attributes implements \Countable, \IteratorAggregate, \ArrayAccess
{
/** @var array<string, string> */
private $attributes = [];
public function __construct(array $attributes = [])
{
$this->importArray($attribut... | true |
889f002449f5642cbbd3eff4b40587d2b0b7989d | PHP | just-paja/fudjan | /lib/class/system/user/contact.php | UTF-8 | 2,383 | 2.609375 | 3 | [] | no_license | <?php
/** User contacts
* @package system
* @subpackage users
*/
namespace System\User
{
/** User contact model
*/
class Contact extends \System\Model\Perm
{
const ALLOW_RELATION_DELETE = true;
const STD_EMAIL = 1;
const STD_MOBILE = 2;
const STD_WEBSITE = 3;
const STD_PHONE = 4;
const IM_XM... | true |
23120ee24a847cb8cb6a6b7223a45d393419eb23 | PHP | michaelcabello/confiaset2020 | /backend/modelos/blog.modelo.php | UTF-8 | 2,969 | 2.984375 | 3 | [] | no_license | <?php
require_once "conexion.php";
class ModeloBlog{
/*=============================================
MOSTRAR POST DEL BLOG
=============================================*/
static public function mdlMostrarBlog($tabla, $item, $valor){
if($item != null){
$stmt = Conexion::conectar()->prepare("SELECT * FR... | true |
dfa39833bef1dfe8465d2a41002bbd93901ddd42 | PHP | semen1953/framework-kernel | /src/Kernel/Cli/AbstractJob.php | UTF-8 | 573 | 2.8125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Comely\Framework\Kernel\Cli;
use Comely\Framework\Kernel;
/**
* Class AbstractJob
* @package Comely\Framework\Kernel\Cli
*/
abstract class AbstractJob
{
/** @var Kernel */
protected $app;
/** @var Kernel\Cli */
protected $cli;
/**
* AbstractJob co... | true |
8a5761fc9af2288246ecc30cc75c83e0d8dd0ff0 | PHP | funkistz/mynutridiariweb | /protected/models/User.php | UTF-8 | 476 | 2.578125 | 3 | [] | no_license | <?php
class User extends CActiveRecord {
public static function model($className = __CLASS__) {
return parent::model($className);
}
public function tableName() {
return "users";
}
public function rules() {
return array(
array('email', 'required'),
... | true |
28ed51e9f7e0e591a1270c3c3d4c3291ea6bc65c | PHP | marlon-be/test-showcase | /src/Email/ParticipantNameGenerator.php | UTF-8 | 589 | 2.9375 | 3 | [] | no_license | <?php
namespace App\Email;
use App\Repository\Interfaces\ParticipantRepository;
final class ParticipantNameGenerator
{
private $participantRepository;
public function __construct(ParticipantRepository $participantRepository)
{
$this->participantRepository = $participantRepository;
}
pu... | true |
49782e1fbd6e3ac7c3de943adb56e521e5175749 | PHP | whenjonny/before-2017 | /php/phalcon/clover/apps/models/UserLanding.php | UTF-8 | 5,572 | 2.703125 | 3 | [] | no_license | <?php
namespace Psgod\Models;
use Phalcon\Mvc\Model\Resultset\Simple as Resultset;
class UserLanding extends ModelBase
{
const TYPE_WEIXIN = 1;
const TYPE_WEIBO = 2;
const TYPE_QQ = 3;
public function initialize()
{
$this->useDynamicUpdate(true);
$this->hasMany("uid", "Psgod\M... | true |