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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
1a1a71dbe8b66eae106187f5f43a2bb6c33b3c06 | PHP | graspsoftwaresolutions/ums | /app/User.php | UTF-8 | 1,122 | 2.640625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use App\Permissions\HasPermissionsTrait;
use App\Notifications\ResetPassword;
class User extends Authenticatable
{
use Notifiable, HasPermissionsTrait;
/**
* The attributes that are mas... | true |
06281cc923a5abaebf20bd91654e402ebd29d721 | PHP | fuadhs88/ladmin | /src/Repositories/Repository.php | UTF-8 | 212 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories;
class Repository {
protected $model;
public function __construct($model) {
$this->model = $model;
}
public function getModel() {
return $this->model;
}
} | true |
a0f83627beebcf98c90c45bbcd9df31e916ddf53 | PHP | webninjataylor/iatricdata | /contactSent.php | UTF-8 | 7,603 | 2.546875 | 3 | [] | no_license | <?php require_once('../../Connections/conn_iatricdata.php'); ?>
<?php
mysql_select_db($database_conn_iatricdata, $conn_iatricdata);
//Get existing contacts to check against
$query_rsContacts = "SELECT contactID, email FROM tblContacts";
$rsContacts = mysql_query($query_rsContacts, $conn_iatricdata) or die(mysql_error()... | true |
b54ac89aa50da717d6551d4eef2d9bb5da395723 | PHP | kurtmoser/aoc2019 | /tests/Day06/Day06Test.php | UTF-8 | 983 | 3.140625 | 3 | [] | no_license | <?php
namespace Aoc2019\Day06;
use PHPUnit\Framework\TestCase;
class Day06Test extends TestCase
{
/** @test */
public function orbitMapCountsCumulativeOrbits()
{
$orbits = explode("\n", 'COM)B
B)C
C)D
D)E
E)F
B)G
G)H
D)I
E)J
J)K
K)L');
$orbitMap = new OrbitMap;
foreach ($orbits ... | true |
ad98f1ab56c99b9c51ddbecf071502d012da5bad | PHP | mrFleshka/nswitcher | /builder/builder.php | UTF-8 | 1,017 | 2.703125 | 3 | [] | no_license | <?php
function addDir($path){
if(!is_dir($path)){
mkdir($path);
}
}
function process($pathFrom, $pathTo, $config){
foreach($config as $suffix => $params){
ob_start();
include $pathFrom."/test.php";
$fileTo = $pathTo."/test_".$suffix.".html";
file_put_contents($fileT... | true |
0d7beeb4cda8978b8b089b5af0d897547a8553be | PHP | diegopau/chattyhive-blog | /config/public/wp-content/themes/chattyhive/lib/theme-widgets/widget-randomposts.php | UTF-8 | 3,640 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
function ft_load_randomposts_widget()
{
register_widget( 'FT_Randomposts' );
}
add_action('widgets_init', 'ft_load_randomposts_widget');
/* == Widget ==============================*/
class FT_Randomposts extends WP_Widget {
/* == Widget Setup ==============================*/
function FT_Randomposts() ... | true |
f33aabe9c55699fd24dcc4bb8d16c7464ff1b875 | PHP | weejames/geotools | /tests/GeopointTest.php | UTF-8 | 4,082 | 2.84375 | 3 | [] | no_license | <?php
namespace WeeJames\Geotools\Tests;
class GeopointTest extends \PHPUnit_Framework_TestCase
{
// Glasgow
private $startLatitude = 55.8580;
private $startLongitude = 4.2590;
// NewYork
private $targetLatitude = 40.7127;
private $targetLongitude = 74.0059;
public function setUp()
... | true |
34f0288a4e6cf9f8d3fcb66e2d781fdd4f2c649b | PHP | Rubendelafuent/prueba | /serie/index.php | UTF-8 | 136 | 3.421875 | 3 | [] | no_license | <?php
$max = 22;
$a = 0;
$b = 1;
$c = 0;
echo "F = ";
while(($a+$b) <= $max){
echo $c.", ";
$a = $b;
$b = $c;
$c = $a + $b;
}
| true |
390f5f114673a5d24da6d8cb7d6ac0edb20fd875 | PHP | kukode/learn-php | /constant.php | UTF-8 | 596 | 3.078125 | 3 | [] | no_license | <?php
/**
*
* Pada PHP kita dapat mendefinisikan nilai konstanta
* Nilai konstanta sendiri dapat kita artikan sebagai pemberian nilai default yang tidak dapat diganti
* apabila sudah kita deklarasikan
* Berikut cara penulisan nilai konstanta di PHP menggunakan define(string,vakue,boolean) ini adalah parameter da... | true |
dd6156742b8a412aabd12696dbb419e3d416d6b8 | PHP | alena641022/trpo | /AV/MyLog.php | UTF-8 | 598 | 2.796875 | 3 | [] | no_license | <?php
//MyLog �����
namespace av;
class MyLog extends \core\LogAbstract implements \core\LogInterface {
public static function log($str) {
self::Instance()->log[] = $str;
}
public function _write(){
if (mkdir("log\\", 0700))
{
$date = new \DateTime();
$resdate = $date -> format('Y-m-d\TH-i-s.u').".... | true |
8dce9620f17a626fa6f4305dbef561abc47ca98d | PHP | NgocTo/imm-news-network | /index.php | UTF-8 | 8,531 | 2.75 | 3 | [] | no_license | <?php
session_start();
include_once("header.php");
include_once("database.php");
$stmt = $pdo->prepare("SELECT a.`id`, `title`, `authorId`, `preview`, `content`, `category`, `image`, `url`, `isFeatured`, `firstName`, `lastName` FROM `articles` a
JOIN `users` u ON a.`a... | true |
30ed33fa5d477e91031401fcf5c7d23670d02da6 | PHP | celestriode/nbt-utils | /src/Nbt/Path/CompoundChildNode.php | UTF-8 | 242 | 2.75 | 3 | [
"MIT"
] | permissive | <?php namespace Celestriode\NbtUtils\Nbt\Path;
class CompoundChildNode implements NodeInterface
{
/**
* @var string
*/
private $name;
public function __construct(string $name)
{
$this->name = $name;
}
} | true |
aeb6397a87ca46f64249e2ee2935bf12e32d74a4 | PHP | denisnerborac/img_resize_crop | /Image.class.php | UTF-8 | 5,121 | 3.125 | 3 | [] | no_license | <?php
class Image{
public static $useGD = true; // GD native extension
/**
*
* Resize an image with options
*
* @param string $source_path Image source path, relative to the script that calls the function
* @param string $dest_path Image destination path, relative to the script that calls the... | true |
6f5ace1a824bdf983b56eb67595314cdc7693264 | PHP | arcohen/camagru | /public/gallery.php | UTF-8 | 6,669 | 2.640625 | 3 | [] | no_license | <?php
include "./templates/header.php";
?>
<body>
<div id="gallery-container" class="container">
<?php
if (isset($_GET['delete'])) {
if ($_GET['delete'] == 'yes')
$message = 'Photo Deleted';
else
$... | true |
4e0b613a762a52e7beccb20a4dbcc95abfd99e89 | PHP | triplemaxou/bii_plugin | /plugins/bii_calculatrices/class/bii_taille_vetements.class.php | UTF-8 | 8,006 | 2.84375 | 3 | [] | no_license | <?php
class bii_taille_vetements extends bii_calc {
protected $sexe;
protected $taille;
protected $unit;
protected $id;
public static function getListeProprietesFormEdit() {
$array = [
"sexe" => "sexe",
"taille" => "taille",
"unit" => "unit"
];
return $array;
}
public stat... | true |
9f5846040285614e20d19d1cc8baff10dd27111d | PHP | esmaydodon/matriz | /incawasi/catalogo.php | ISO-8859-1 | 2,911 | 2.609375 | 3 | [] | no_license | <?php
#modificado x www.kuraka.net - mmq
ob_start("ob_gzhandler");
//Las funciones ob_start y
//ob_end_flush te permiten
//escojer en qu momento
//enviar el resultado de un
//script al navegador. Si
//no las utilizamos estamos
//obligados a que nuestra
//primera lnea de cdigo
//sea session_start() u
//o... | true |
217e947d06ab4ab1e56b750dd8cd845d75ce3f5e | PHP | andrewwwwtran/Fall18-school-projects | /comp484/practice/php/helloworld.php | UTF-8 | 325 | 3.265625 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<h1>My First PHP Page</h1>
<?php
$first = array("zero", "one", "two");
$second[0] = "hello";
$second[1] = "bye";
$second[] = "csun";
var_dump($first);
var_dump($second);
?>
</body>
</h... | true |
a3644ff1b070949da853f4f6f5972410f0b55c16 | PHP | Thaotb02/du-an-tot-nghiep | /app/Http/Controllers/Auth/AuthController.php | UTF-8 | 1,207 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class AuthController extends Controller
{
public function loginForm()
{
return view('client.auth.login');
}
public function chanelogin( Request $request){
$reques... | true |
c8a0910e3f9216cc3b00ef14d0719bf0de50d0e1 | PHP | alphasider/ewallet-server | /app/Ewallet/Luhn.php | UTF-8 | 2,014 | 3.140625 | 3 | [] | no_license | <?php
namespace Ewallet;
use Tdely\Luhn\Luhn as LuhnAlgorithm;
require "{$_SERVER['DOCUMENT_ROOT']}/vendor/autoload.php";
class Luhn {
/**
* @var int
*/
private static int $eWalletNumberPrefix = 999;
/**
* @var int
*/
private static int $eWalletNumberLengthWithoutPrefix ... | true |
9b56d830de14072b20f31a4a81c7a1f60240d480 | PHP | acfreitas/phpunit-selenium2-pageobjects | /PHPUnit/Extensions/Selenium2PageObject/Model.php | UTF-8 | 3,200 | 3.234375 | 3 | [
"MIT"
] | permissive | <?php
abstract class PHPUnit_Extensions_Selenium2PageObject_Model extends PHPUnit_Extensions_Selenium2PageObject
{
/**
* An array of mappings that do not directly translate to the model with
* getter and setters. These should be implemented manually in setFromModel
* and assertEqualsModel
*
* @var array
... | true |
98ce907dff0d9505cb1b15c6194d878ebb378aff | PHP | moffe42/johannes | /status/useragentstat2.php | UTF-8 | 5,363 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
// conf
$path = "/rpc/rpcxml.php";
$host = "user-agent-string.info";
$port = "80";
$access_key = "free"; //"free" or Your key
// view source this file and exit
if ($_GET['source'] == "y") { show_source(__FILE__); exit; }
// header page
scriptheader();
// form
echo "<form method... | true |
16d2536be76faf8eef76b8055d70fce556e439e6 | PHP | fcblittle/canben | /merchant/tags/0.1.0/application/Module/Merchant/Model/Restaurant.php | UTF-8 | 1,397 | 2.84375 | 3 | [] | no_license | <?php
namespace Module\Merchant\Model;
use System\Model;
class Restaurant extends Model {
public function __construct() {
parent::__construct();
$this->table = '`foodcar_store`';
}
/**
* 获取单条记录
*
* @param int $id
* @param string $fields
*/
public f... | true |
741f49f1bf6cbcf4ec0acf3ba142f415b7a0b957 | PHP | amdyDiop/QCM_Amdy-Diop | /src/controller/fonction.php | UTF-8 | 1,739 | 2.921875 | 3 | [] | no_license | <?php
//fonction pour tester l'existence d'un user
function connex( $login, $password)
{
$files = './assets/json/user.json';
$db = file_get_contents($files);
$db = json_decode($db);
$teste = 0;
for ($i = 0; $i < count($db); $i++) {
if (strcmp($db[$i]->login, $login) == 0 && strcmp($db[$i]->p... | true |
e5dbc031ef0403e2204b8ea25055a8b13d5def32 | PHP | NegishiAkio/PHP_MySQL | /0426/index.php | UTF-8 | 825 | 2.890625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<!--link rel="stylesheet" type="text/css" href="style.css"-->
<meta charset="UTF-8" />
<!-- ページタイトル -->
<title>タイトル</title>
</head>
<body>
<!-- ここにプログラムを記述します -->
<?php
$db = mysqli_connect('localhost','root','','mydb') or die(mysqli_connect_error());
//echo "データベースに接続しました";
mysqli_s... | true |
f79957659dfae4a978d93f8ac67206a70c204e09 | PHP | MaCroTux/SimplePDO | /src/Infrastructure/PdoConnection.php | UTF-8 | 2,049 | 2.9375 | 3 | [] | no_license | <?php
namespace MaCroTux\SimplePdo\Infrastructure;
use MaCroTux\SimplePdo\Domain\Connection;
use MaCroTux\SimplePdo\Domain\Parameter;
use MaCroTux\SimplePdo\Domain\Parameters;
use MaCroTux\SimplePdo\Domain\Query;
use PDO;
class PdoConnection implements Connection
{
private string $dns;
private string $user;
... | true |
f48c0e20bdfa569b2ca8bbcd7e6a00986d1de557 | PHP | loojas/helpers | /src/loojas/helpers/GuidProvider.php | UTF-8 | 928 | 3.0625 | 3 | [] | no_license | <?php
namespace Loojas\Helpers;
class GuidProvider
{
/**
* @type string
*/
private $uuid;
public function __construct()
{
$uuid = $this->getGUID();
$this->uuid = $uuid;
return $uuid;
}
public function __toString()
{
return $this->uuid;
}
... | true |
f97fe7ad6a808d43d2dc471686dfa1695b59bfc5 | PHP | pradeep-rajapaksha/sales-representative-management | /app/SalesRepresentative.php | UTF-8 | 1,055 | 2.640625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class SalesRepresentative extends Model
{
/**
* The attributes that define table name.
*
* @var array
*/
protected $table = 'users';
/**
* The attributes that are mass assignable.
*
* @var array
*/
p... | true |
071f0dd87817c01759537082d4712f4c0647c545 | PHP | VytauteVita/HomeworkGitExample | /MagicTutorials/MagicSubtutorial/Animal.php | UTF-8 | 701 | 3.4375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Vita
* Date: 10/15/17
* Time: 18:40
*/
class Animal {
public $alive = true;
public $color = '';
public $size = '';
public $name = 'Do';
public $nickname = 'Plum';
public function __call($name, $nickname)
{
print "The animal is called ... | true |
ba0d8d1a2bf10d2b967f639e0911316473ee21db | PHP | open-source-contributions/PHP-Exceptions | /src/OutOfRangeException.php | UTF-8 | 477 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php namespace Exceptions {
/**
* OutOfRangeException class
*
* This exception is thrown when an illegal index was requested.
*
* @package Exceptions
*
* @author Jason Napolitano <https://github.com/jason-napolitano>
* @version 0.0.1
* @since 0.0.1
* @license M... | true |
c08305eb396dadee04dd1ac1c1d6244d267594dd | PHP | harshithatnbr/LGMVIPAUG21 | /task3/login.php | UTF-8 | 2,167 | 2.625 | 3 | [] | no_license | <?php
require('connection.inc.php');
require('functions.inc.php');
if(isset($_POST['submit']))
{
$email=get_safe_value($con,$_POST['email']);
$password=get_safe_value($con,$_POST['password']);
$query="select * from students where email='$email' and password= '$password'";
... | true |
6feebea76135f2bb45a83b60f981f2bc6c81ad49 | PHP | ParalelniPolis/TMS2 | /controllers/PayInvoiceController.php | UTF-8 | 4,791 | 2.515625 | 3 | [] | no_license | <?php
class PayInvoiceController extends Controller {
function process($parameters) {
$bitcoinPay = new Bitcoinpay();
$case = $parameters[0];
//exception for bitcoinpay notices
if (!$bitcoinPay->checkLogin() && $case != 'notify')
$this->redirect('error');
$paymentId = false;
if (is_nu... | true |
e478f46d678935d7b3de11877d7dd4fcea26320a | PHP | Nudzi/PHP | /Basics/PhpProjectNo1/Objects and Classes/Intro.php | UTF-8 | 1,200 | 4.09375 | 4 | [] | no_license | <?php
class Person{
//constants
const AVG_YEAR_LIFE = 80; //all capital, ccan be used for equations
// //but no use members of class
//properties
public $firstName;
public $lastName;
public $yearOfBirth;
//methods
function __construct($tempFirst = "", $te... | true |
46f9234ee862662111a93f617443a59413c0ab74 | PHP | eliasnvarghese/svjsoc | /cmsapp/classes/adminuserservice_class.php | UTF-8 | 16,156 | 2.859375 | 3 | [] | no_license | <?php
/****************************************
* @Project : St Stephen Church
* @Version : 1.0.0
* @Author by : Antony Joseph
* @Created Date : 18/11/2018
* @modified by :
* @modified date:
****************************************/
?>
<?php
/*
* UserService
*
*/
class AdminUserService
{
private ... | true |
89b3ffca24ee93bb8501f5779f4e14346a375229 | PHP | slavavitrenko/vikonda | /models/Products.php | UTF-8 | 2,226 | 2.640625 | 3 | [] | no_license | <?php
namespace app\models;
use Yii;
use app\models\Categories;
use app\models\Pictures;
/**
* This is the model class for table "products".
*
* @property integer $id
* @property integer $category_id
* @property string $name
* @property string $description
* @property integer $created_at
*/
class Products ex... | true |
c084caedad4a09e804767ded1b5e21d01464cf8b | PHP | Antinio/study_php | /less04/calculator/calc.php | UTF-8 | 802 | 3.03125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Anton
* Date: 22.09.2016
* Time: 22:04
*/
if (@preg_match("|^[-0-9\.A-F]{1,12}$|i", $_POST['firstInput'])) {
if (preg_match("|^[-0-9\.A-F]{1,12}$|i", $_POST['secondInput'])) {
}
}
$o = $_POST['operation'];
$a = $_POST['firstInput'];
$b = $_POST['secondInput'];
$result =... | true |
c12d24beb8fa262ad6f8e9d4418f157cf1f994ea | PHP | g4code/russian-doll | /src/G4/RussianDoll/Digestor.php | UTF-8 | 2,702 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace G4\RussianDoll;
use \G4\RussianDoll\Key;
use \G4\Mcache\Mcache;
class Digestor
{
const DELIMITER = '|';
/**
* @var \G4\RussianDoll\Key
*/
private $key;
/**
* @var \G4\Mcache\Mcache
*/
private $mcache;
/**
* unix timestamp with microseconds
* @v... | true |
9abf2ee67aa9282c33f277d0e770e86f0658b40e | PHP | achernov/motl | /dbCity.inc | UTF-8 | 822 | 2.546875 | 3 | [] | no_license | <?php
//=====================
require_once "subjectUtils.inc";
//=====================
class DbCityProducerFull extends DbCityProducer {
public function produceFull() {
$id = $this->row->id;
$s = "";
//===== Show Common Data
$title = $this->row->name;
$s .= "<h1>База данных: город $tit... | true |
492553b786f899ef7c6f935dd76ed5216f820f8d | PHP | DarkArtek/xivdb-v3 | /xivdb-v3-sync/src/Service/Characters/Tracking/TrackGrandCompany.php | UTF-8 | 1,875 | 2.796875 | 3 | [] | no_license | <?php
namespace App\Service\Characters\Tracking;
use App\Entity\GrandCompanyEvent;
/**
* Grand company tracking
*/
trait TrackGrandCompany
{
private $currentGrandCompanyId;
/**
* Records various data about the caracter
*/
private function recordGrandCompanyChanges()
{
$this->io->... | true |
b27cf28fe5da8d02137595e64ffa1f32493bbb06 | PHP | Colmbus72/node-php | /src/Chain/BlockIndexInterface.php | UTF-8 | 618 | 2.703125 | 3 | [] | no_license | <?php
namespace BitWasp\Bitcoin\Node\Chain;
use BitWasp\Bitcoin\Block\BlockHeaderInterface;
use BitWasp\Buffertools\BufferInterface;
interface BlockIndexInterface
{
/**
* @return BufferInterface
*/
public function getHash();
/**
* @return int|string
*/
public function getHeight()... | true |
31a80ebe66eb5b48c0d2605440f62d1720c270f2 | PHP | abhishekp906/eCommerce | /core/helpers/bind.php | UTF-8 | 2,667 | 2.875 | 3 | [] | no_license | <?php
/**
* Bind callback to an event.
*
* Usage example:
* bind('products', 'get', function ($event)
* {
* if ($event['data']['search'])
* {
* return my_custom_search($event['data']['search']);
* }
* });
*/
function bind ($target, $event, $callback = null, $level = 1)
{
global $__event_... | true |
b492b416691076e314b2fed44e494f48ee5a9ffe | PHP | piotzkhider/IDDD_Samples_PHP | /src/IdentityAccess/Domain/Model/Identity/GroupGroupAdded.php | UTF-8 | 992 | 2.609375 | 3 | [] | no_license | <?php
namespace SaasOvation\IdentityAccess\Domain\Model\Identity;
use DateTimeImmutable;
use SaasOvation\Common\Domain\Model\DomainEvent;
use SaasOvation\Common\Domain\Model\ImplementsDomainEvent;
class GroupGroupAdded implements DomainEvent
{
use ImplementsDomainEvent;
/**
* @var string
*/
pr... | true |
cf8e6c9b837041373dc8d25b17a74da49305cb8d | PHP | potaesm/PHPSimpleGET | /getter.php | UTF-8 | 405 | 2.65625 | 3 | [] | no_license | <html>
<body>
<?php
require_once("db.php");
$query = "SELECT * FROM table1";
$rows = array();
$result = mysqli_query($connection, $query);
while($r = mysqli_fetch_assoc($result)) {
$rows[] = $r;
}
$json = json_encode($rows);
if (!$result) {
die('Query FAIL... | true |
479f25c320dad1a20bd572db216fe438c1e09a9d | PHP | mrli834668690/swoole-tcp | /Test/swoole-tcp.php | UTF-8 | 2,560 | 2.703125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Admin
* Date: 2021/7/2
* Time: 11:06
* php swoole-tcp.php
*
*/
use Swoole\Coroutine\Client;
use function Swoole\Coroutine\run;
run(function () {
$hexstr = '7e 35 00 00 3c 00 00 00 00 00 03 31 31 31 1f e2 7f';
$begin = hex2bin('7e');
$end = hex2bin('7f');
... | true |
71f839a4ef8e27983fc3369d303e92b16d02161f | PHP | svvpro/test2.ua | /components/Router.php | UTF-8 | 1,437 | 2.71875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: SVV
* Date: 24.10.2016
* Time: 12:03
*/
class Router
{
private $routs;
public function __construct()
{
$routsPath = ROOT.'/../config/routs.php';
$this->routs = include ($routsPath);
}
private function getURI()
{
if(!empty($... | true |
40c6a5cd86151b499bf8838fc635069914aa7220 | PHP | rashmi8105/Synapse | /src/Synapse/RestBundle/Entity/BlockDto.php | UTF-8 | 2,584 | 2.640625 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace Synapse\RestBundle\Entity;
use JMS\Serializer\Annotation as JMS;
use Symfony\Component\Validator\Constraints as Assert;
class BlockDto implements DtoInterface
{
/**
* Block Id
*
* @JMS\Type("integer")
* @Assert\NotBlank()
*/
private $blockId;
/**
* Block Nam... | true |
555b192e00658726145a942ff22e6cdd582a6101 | PHP | s9e/SimpleDOM | /tests/sortChildrenTest.php | UTF-8 | 1,728 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package s9e\SimpleDOM
* @copyright Copyright (c) 2009 The SimpleDOM authors
* @copyright Copyright (c) 2010-2011 The s9e Authors
* @license http://www.opensource.org/licenses/mit-license.php The MIT License
*/
namespace s9e\SimpleDOM\Tests;
use s9e\SimpleDOM\SimpleDOM;
include_once __DIR__ . '/../src... | true |
91816b76cc717176bb676974d9694b9752914529 | PHP | mscharley/colourist | /lib/SaturatableColour.php | UTF-8 | 870 | 3.375 | 3 | [
"MIT"
] | permissive | <?php
namespace Colourist;
abstract class SaturatableColour extends Colour
{
/** @var float */
protected $saturation;
/**
* Saturate this colour by a certain amount.
*
* @param $amount
* A percentage to saturate this colour by.
*
* @return Colour
* This colour saturated by a given amou... | true |
1ab9e2fd301356af7d67903a3924460ac7613dd5 | PHP | tomcode/ci-_application | /errors/common_error_template.php | UTF-8 | 1,280 | 3.109375 | 3 | [] | no_license | <?php
// Normailze the different variables passed
$title = isset($title) ? $title : '';
$heading = isset($heading) ? $heading : '';
$message = isset($message) ? strip_tags($message) : '';
if(isset($severity) && $severity) $severity = $severity;
if(isset($filepath) && $filepath) $filepath = $filepath;
if(isse... | true |
ca87cd33d10f71615c7fa316ecd1639827033d4c | PHP | fathur/Arisan | /app/controllers/ImportController.php | UTF-8 | 2,069 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use \Carbon\Carbon;
use \PHPExcel;
use \PHPExcel_IOFactory as IO_Factory;
use \PHPExcel_Cell as Cell;
use \PHPExcel_Cell_DataType as DataType;
class ImportController extends \BaseController {
function __construct()
{
$this->beforeFilter('login');
}
public function getUpload()
{
return View::make('imp... | true |
68685cae2bce2c5f31159c4f3beecca62bedc746 | PHP | kuangggg/php_lesson | /php_design_parttern/behavior/chain/demo.php | UTF-8 | 1,067 | 3.765625 | 4 | [] | no_license | <?php
abstract class Handler
{
/**
* @var null Handler
*/
public $successor = null;
public function setSuccessor(Handler $successor)
{
$this->successor = $successor;
}
abstract public function handleRequest($request);
}
class ConcreteHandler1 extends Handler
{
public fu... | true |
60dde2256ebc175f50107c17311198017843d9cc | PHP | runningjack/RobertJohnson | /models/departments_model.php | UTF-8 | 1,565 | 2.671875 | 3 | [] | no_license | <?php
class Departments_Model extends Model
{
function __construct()
{
parent::__construct();
}
public function getList(){
$departments = Department::find_all();
return $departments;
}
public function getById($id){
$mydepartment = Department::find_by_id($id);
return $mydepartment;
}
public function... | true |
8a024e3d188329de51f3b4830bab14b21871e3b4 | PHP | Vivinonato/Dashboard | /Dashboard-Arquivos/frontend/adminlte-generator/app/Http/Controllers/InvoiceedpointController.php | UTF-8 | 3,933 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Requests\CreateInvoiceedpointRequest;
use App\Http\Requests\UpdateInvoiceedpointRequest;
use App\Repositories\InvoiceedpointRepository;
use App\Http\Controllers\AppBaseController;
use Illuminate\Http\Request;
use Flash;
use Response;
class InvoiceedpointController e... | true |
4fde804cfaf547204a701dd2920e526892b3011d | PHP | scastellotec/IAW_Ejercicios_2021-2022 | /UD1_EjerciciosCorregidos/ejercicio8.php | UTF-8 | 610 | 3.40625 | 3 | [] | no_license | <!--
Ejercicio 8
Escribe un programa que dado una altura dibuje el numero de pisos de *. Tendrás que
utilizar bucles anidados.
-->
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-s... | true |
1dfcd2f7cb687c93f5db18682cafc64e55d3748b | PHP | marscore/hhvm | /hphp/test/slow/ext_string/htmlentities_specialchars.php | UTF-8 | 1,172 | 2.890625 | 3 | [
"Zend-2.0",
"PHP-3.01",
"MIT"
] | permissive | <?php
<<__EntryPoint>>
function main_htmlentities_specialchars() {
$s = chr(0xAE); // this is an ISO-8859-1 circle R
var_dump(htmlentities( $s, ENT_QUOTES | ENT_IGNORE, 'ISO-8859-1'));
var_dump(htmlentities( $s, ENT_QUOTES | ENT_IGNORE)); // UTF-8
$s = chr(0xFF); // this is an ISO-8859-1 umlaut
var_dump(htmlentities( ... | true |
69db7b4cba5de6966418cfb1f5a0fa2f15e1c146 | PHP | Lezas/AutoShare | /src/StackExchangeBundle/Model/FormFactory.php | UTF-8 | 1,255 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by Lezas.
* Date: 2017-06-28
* Time: 21:02
*/
namespace StackExchangeBundle\Model;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormFactoryInterface;
use Symfony\Component\Form\FormInterface;
abstract class FormFactory extends AbstractType
{
/**
* @var FormFac... | true |
bb41881d98e051144356fdd576e458291dac6c31 | PHP | delturge/Polyglot | /PHP/PreValidators/AaljFilesPreValidator.php | UTF-8 | 1,737 | 2.515625 | 3 | [] | no_license | <?php
namespace Isaac\PreValidators;
use Isaac\Encoders\Encoder as Encoder;
/**
* A class that manages cleaning $_FILES input data for the AALJ submit page.
*/
class AaljFilesPreValidator extends FilesPreValidator
{
/* Properties */
/* Constructor */
public function __construct(array $... | true |
ade87319290865afafed69514d8b91f3f82ec86d | PHP | VakinduPhilliam/PHP_Numerical_Classification | /PHP_Catalan_Number.php | UTF-8 | 566 | 3.8125 | 4 | [] | no_license | <?php
// PHP Program for nth
// Catalan Number
// A recursive function to
// find nth catalan number
function catalan($n)
{
// Base case
if ($n <= 1)
return 1;
// catalan(n) is sum of
// catalan(i)*catalan(n-i-1)
$res = 0;
for($i = 0; $i < $n; ... | true |
7f024648cfe0bd1be51bd15fab726a1e3f737f13 | PHP | cherish-noe/travella | /issue_list.php | UTF-8 | 1,859 | 2.78125 | 3 | [] | no_license | <?php
session_start();
include('includes/connect.php');
if(!isset($_SESSION['USERID']))
{
echo "<script>window.alert('Please Login First to Continue.')</script>";
echo "<script>window.location='user_login.php'</script>";
}
//Delete
if(isset($_POST['btndelete']))
{
$ID=$_POST['txtid'];
$Delete="DELETE FROM feedb... | true |
a3a9e2e3835f9275deaef47e8fa4347b46b32e6a | PHP | SokunSovisal/bss_clinic_hy_dara | /app/Http/Controllers/UsageController.php | UTF-8 | 1,787 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Usage;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Requests\UsageRequest;
use App\Repositories\UsageRepository;
use Auth;
class UsageController extends Controller
{
protected $usages;
public function __construct(UsageReposito... | true |
441c7ad1271e90e746d2a59359cfce121e972a58 | PHP | zetacomponents/Template | /src/syntax_trees/ast/nodes/dynamic_block.php | UTF-8 | 1,896 | 2.703125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* File containing the ezcTemplateDynamicBlockAstNode class
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
*... | true |
cc4611ef0eeb77a2f29034a8d0b488bb81835e3e | PHP | Feeligo/plugin-socialengine-4.0-feeligo | /application/modules/Feeligo/Model/Selector/UserSentGiftToUserActions.php | UTF-8 | 2,709 | 2.78125 | 3 | [] | no_license | <?php
/**
* Feeligo
*
* @category Feeligo
* @package Feeligo_Api
* @copyright Copyright 2012 Feeligo
* @license
* @author Davide Bonapersona <tech@feeligo.com>
*/
/**
* @category Feeligo
* @package Feeligo_Model_Selector_UserSentGiftToUserActions
* @copyright Copyright 2012 Feeligo
* @l... | true |
f3fe7d8247d327570105b25e1a6e8036b4a3c68a | PHP | silverstripe/silverstripe-framework | /src/ORM/Filters/StartsWithFilter.php | UTF-8 | 414 | 2.8125 | 3 | [
"CC-BY-3.0",
"BSD-3-Clause"
] | permissive | <?php
namespace SilverStripe\ORM\Filters;
/**
* Matches textual content with a substring match from the beginning
* of the string.
*
* <code>
* "abcdefg" => "defg" # false
* "abcdefg" => "abcd" # true
* </code>
*/
class StartsWithFilter extends PartialMatchFilter
{
protected static $matchesStartsWith = ... | true |
afceec8a2cd8bc9fefbb26018efbe4fc9c36d961 | PHP | um-flint/html | /tests/InputTest.php | UTF-8 | 11,619 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
use UMFlint\Html\Form\Input\Input;
class InputTest extends \PHPUnit\Framework\TestCase
{
/**
* Testing the base input class.
*
* @author Tyler Elton <telton@umflint.edu>
*/
public function testInput()
{
// General.
$input = new Input('name');
$this->assert... | true |
55a6e7133898e676cd739a5c14c50002c57b601a | PHP | Trismegiste/iinano | /src/Trismegiste/SocialBundle/Repository/StorageQuota.php | UTF-8 | 1,975 | 2.515625 | 3 | [] | no_license | <?php
/*
* iinano
*/
namespace Trismegiste\SocialBundle\Repository;
/**
* StorageQuota is a monitoring for storage quota
*/
class StorageQuota
{
/** @var \MongoCollection */
protected $collection;
protected $alias;
protected $storage;
public function __construct(\MongoCollection $coll, $pic... | true |
8b118e1bcef0582a22e911d5a69b2d46a9626bfa | PHP | THCCOINS/supply-tracking-demo | /app/Models/Transaction.php | UTF-8 | 1,112 | 2.625 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Transaction extends Model
{
/**
* executed tx, but in pending process
*/
const TX_EXEC_PENDING = 0;
/**
* executed and confirmed (exists in blockchain)
*/
const TX_EXEC_SUCCESS = 1;
/**
* executed,... | true |
a05d3a0f9de250f9a079ae2e01f09af3c14e0f58 | PHP | AliRock86/SooQuick_back_end_api | /database/seeders/DeliveryCompaniesTableSeeder.php | UTF-8 | 907 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Database\Seeders;
use App\Models\DeliveryCompany;
use Illuminate\Database\Seeder;
class DeliveryCompaniesTableSeeder extends Seeder
{
private $numberOfDeliveryCompanies = 10;
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$this->... | true |
d51ea8d0623590838048b4ee2c77f376e7555ba4 | PHP | kedweber/com_makundi | /packages/component/components/com_makundi/models/nodes.php | UTF-8 | 5,441 | 2.5625 | 3 | [] | no_license | <?php
class ComMakundiModelNodes extends ComDefaultModelDefault
{
/**
* @param KConfig $config
*/
public function __construct(KConfig $config)
{
parent::__construct($config);
$this->_state
->remove('sort')->insert('sort', 'cmd', 'custom')
->insert('parent_... | true |
161ff87dcb9c7a0d9285ceb7605b2afcfcf21014 | PHP | Diego024/ninety-seven_hearts_PRUEBA | /app/models/categorias.php | UTF-8 | 5,982 | 2.921875 | 3 | [] | no_license | <?php
/*
* Clase para manejar la tabla categorias de la base de datos. Es clase hija de Validator.
*/
class Categorias extends Validator
{
// Declaración de atributos (propiedades).
private $id_categoria = null;
private $categoria = null;
private $descripcion_categoria = null;
private $foto_categori... | true |
662192de8fbfa680ddee8126b52ccf5475be514d | PHP | tamalsarker/CyberPanelWordPress | /main/Providers/DigitalOcean.php | UTF-8 | 10,561 | 2.515625 | 3 | [] | no_license | <?php
require_once(CPWP_PLUGIN_DIR . 'main/CommonUtils.php');
require_once(CPWP_PLUGIN_DIR . 'main/WPCPHTTP.php');
class CyberPanelDigitalOcean extends WPCPHTTP
{
function __construct($job, $data, $order_id = null)
{
$this->job = $job;
$this->data = $data;
$this->orderid = $order_id;
... | true |
026f4acd1f625fade258c2b35da860385be0a6b8 | PHP | morenkevin/ecommerce | /lignecommande.php | UTF-8 | 864 | 2.9375 | 3 | [] | no_license | <?php
/**
*
*/
class lignecommande
{
protected $LigneId;
protected $CmdId;
protected $ProdId;
protected $Qte;
function __construct($donne= [])
{
$this->hydrate($donne);
}
public function hydrate($donne)
{
foreach ($donne as $key => $value) {
$methode='Set'.ucfirst($key);
if (method_exists($this,$... | true |
ccaffdf5d3f189cc3f3dd62af935118ec2cacc4f | PHP | onepixeldev/training_module_pg | /models/backup/Training_external_facilitator_model.php | UTF-8 | 6,241 | 2.546875 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Training_external_facilitator_model extends MY_Model {
private $staff_id;
public function __construct() {
$this->load->database();
$this->staff_id = $this->lib->userid();
//$this->staff_id = 'K00825';
}
... | true |
f1bf3da5706e600fd6b220d52336a2985dfe49d2 | PHP | joelarencibia/xmlapi | /src/MessageHandlerBundle/Validator/Constraints/XmlMsgValidator.php | UTF-8 | 1,452 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace MessageHandlerBundle\Validator\Constraints;
use MessageHandlerBundle\Validator\XMLValidator;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\Validator\Constraint;
use Symfony\Component\Validator\ConstraintValidator;
class XmlMsgValidator extends ConstraintValidato... | true |
d195aa98e99fc88db4062067ea613ed0a3103bf9 | PHP | MarinKodKode/CMS-Mocambo | /controlador/ProductoController.php | UTF-8 | 4,748 | 2.59375 | 3 | [] | no_license | <?php
include '../modelo/Producto.php';
$producto = new Producto();
##Buscar y listar todos los productos en la base de datos
if ($_POST['funcion'] == 'buscarProducto') {
$producto->buscar_prod();
$json = array();
foreach ($producto->objetos_prod as $objeto) {
$json[] = array(
'id' => $... | true |
109e8a78a13ff059438b703f10e3a65b3d8b1142 | PHP | aaoliveira/CWB-framework | /CWB/Lib/Session.php | UTF-8 | 2,836 | 3.125 | 3 | [] | no_license | <?php
namespace CWB\Lib;
/**
* class for handle session
*
* @package CWB
*/
class Session
{
/**
* inicia uma sessão
* @return boolean true
*/
public static function start()
{
if(!self::active()) {
session_start();
}
return true;
}
/**
* reton the status of session
* @return boolean stat... | true |
d41c025bfa210871c4e8006216bd9aa1db19bbee | PHP | netzindianer/fine | /src/lib/f/filter/normalizeUriScheme.php | UTF-8 | 1,214 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
class f_filter_normalizeUriScheme extends f_filter_abstract
{
const SCHEME_HTTP = 'http://';
const SCHEME_HTTPS = 'https://';
public static function _()
{
return new self;
}
public function filter($sUri)
{
$sUri = trim($sUri);
if (!$sUri) {
... | true |
f8d8ff3fa72286863d2bc8fc80aef63e92c345fe | PHP | nellytadi/doctors-charity-laravel | /app/Http/Controllers/ProjectController.php | UTF-8 | 4,037 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Project;
use App\File;
use Illuminate\Http\Request;
class ProjectController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
public... | true |
601d2b15378b4312019a1eca8ecaba74ed928831 | PHP | rmasters/divvy | /tests/module/Users/src/Users/Entity/UserTest.php | UTF-8 | 1,633 | 2.640625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
* Divvy
*
* @link https://github.com/rmasters/divvy
* @license https://github.com/rmasters/divvy/blob/master/LICENSE
* @author Ross Masters <ross@rossmasters.com>
*/
namespace Users\Entity;
use PHPUnit_Framework_TestCase;
/**
* Tests Users\Entity\User
*
* @package Tests
*/
class UserTes... | true |
5cd536a6ca38aebdcd94858e7a6c7294c9d04bfe | PHP | mosesnyota/Mpesa-and-Bank-Agents-Management-System | /pdf_staff.php | UTF-8 | 3,739 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
require('fpdf.php');
class PeoplePDF extends FPDF {
//Page header
function Header() {
$num = 0;
$fill = 0;
include('dao/connect.php');
$result = $db->query("select * from institution_details");
while ($de = $result->fetch_assoc()) {
$name = $de['instit... | true |
033c7d58b77f5d8cc9dcc641c5cbd5ea0e1996b1 | PHP | etaroza/smartbusiness-api2-php | /src/Endpoints/Receivables/Configuration/IsrsEndpoint.php | UTF-8 | 1,960 | 2.796875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace smartbusiness\api2\Receivables\Configuration;
use LourensSystems\ApiWrapper\Endpoints\Parameters\GetParameters;
use LourensSystems\ApiWrapper\Endpoints\Parameters\ListParameters;
use LourensSystems\ApiWrapper\Exception\LSException;
use LourensSystems\Ap... | true |
1f8759f8dc56c3e7fe55f26e619d5010ef174824 | PHP | ByronMorley/test_template | /userforms/code/model/editableformfields/EditableEmailField.php | UTF-8 | 1,020 | 2.75 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
/**
* EditableEmailField
*
* Allow users to define a validating editable email field for a UserDefinedForm
*
* @package userforms
*/
class EditableEmailField extends EditableFormField
{
private static $singular_name = 'Email Field';
private static $plural_name = 'Email Fields';
private stati... | true |
63eadd4e175fdbd560e071fe4f1fc90e054ca5b3 | PHP | franklinjua7/appmvc | /model/users.php | UTF-8 | 2,898 | 3.0625 | 3 | [] | no_license | <?php
require_once 'profesor.php';
require_once 'alumno.php';
Class User{
private $pdo;
private $profesor;
private $password;
private $emailid;
private $users_tipos_id;
public function __construct(){
//var_dump($this->pdo = Database::StartUp());
try {
$this->pdo = Database::StartUp();
} catch (Excep... | true |
29610c7e65089110df75d4b689b2991bb8429730 | PHP | Alex950808/flowManageSys | /service/app/Modules/ParamsSet.php | UTF-8 | 2,884 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Modules;
/**
* Class ParamsSet
* description 统一参数设置文件
* notice 1 final_本类不可被继承,不可被重写
* 2 本类中不可写入数据量比较大的变量
* 3 考虑到代码可读性,当函数的某个参数需要传递三次以上才会被用到时该参数可写入本类
* 4 一个函数需要许多参数建议使用数组传递
* 5 本类会降低代码可读性,使用时请考虑清楚
* author zhangdong
* date 2019.12.12
* @package App\Modules
*/
... | true |
1fbed6684c59233efe06032de8c5da56ba5debf0 | PHP | anjalipatel2317/WCMS | /Admin/Model/AboutManager.class.php | UTF-8 | 707 | 3 | 3 | [] | no_license | <?php
class AboutManager extends DBManager
{
public function updateAbout(About $about){
$query = $this->db->prepare( "UPDATE `about` SET `about_img`=:about_img , `about_title`=:about_title , `about_text`=:about_text WHERE `about_id`=:about_id " );
return $query->execute( array(
"... | true |
8d50f2e8194f36360d7c46c47b560a3c30f3e266 | PHP | mikkoaf/pilot-configurator | /lib/helpers-ajax.php | UTF-8 | 6,870 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
if ( ! defined( 'ABSPATH' ) ) {
die('Access Denied!');
}
/*
* Function that lists the companies that have answered the questionaires and echos out their user_nicename (subject to change)
*/
function list_active_companies() {
global $wpdb;
$companies = $wpdb->get_results('SELECT DISTINCT company_id FROM ... | true |
153c9dfc2376ed7f2a867d1291540b13bda193f9 | PHP | ozgurkaracam/srotify | /app/Listeners/StoryCreatedListener.php | UTF-8 | 569 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Listeners;
use App\Events\StoryCreated;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Support\Facades\Log;
class StoryCreatedListener
{
/**
* Create the event listener.
*
* @return void
*/
public function __construc... | true |
6b1902f3676bc6221e77024876d694b7a1964fed | PHP | ChadSikorra/ldaptools | /spec/LdapTools/BatchModify/BatchCollectionSpec.php | UTF-8 | 3,323 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the LdapTools package.
*
* (c) Chad Sikorra <Chad.Sikorra@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace spec\LdapTools\BatchModify;
use LdapTools\BatchModify\Batch;
use Ldap... | true |
113e34ba31efd733909a990c860775e607c40f8e | PHP | slavkovl/chessable | /app/models/QueryBuilder.php | UTF-8 | 1,549 | 3.0625 | 3 | [] | no_license | <?php
namespace App\Models;
class QueryBuilder {
protected $pdo;
public function __construct($pdo) {
$this->pdo = $pdo;
}
public function selectAll($table) {
$statement = $this->pdo->prepare("select * from {$table}");
$statement->execute();
return $statement->fet... | true |
1efde09dff0ff10b3d4da737e11785aeee217f12 | PHP | RobinChen95/Backup-ThinkPHP | /application/manager/controller/FirstTrial.php | UTF-8 | 4,580 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\manager\controller;
use think\View;
use think\Controller;
use think\Request;
class FirstTrial extends Controller
{
//初审列表界面的访问函数
public function index()
{
//通过session获取用户名
$user_name = session('user_name');
//验证登录状态
if(empty($user_name)){
... | true |
6cb95655f5caa81138cfc840afc972475db67f2e | PHP | Luqheltod/PHP-Ejercicios | /Medios/Formularios/Ejercicio1/ejercicio1.php | UTF-8 | 946 | 3.359375 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title> No title yet </title>
</head>
<body>
<?php
$numero = $_POST["numeropar"];
echo "Sumamos ";
if($numero%2 == 0 ){
//es par
$resultado= $numero - 2;
for ($i=$resultado; $i >= 0; $i-=2) {
... | true |
61f70f468e78f4bea6e8f5cb3b282541246e953b | PHP | B1ll7/site_annonce | /dao/mysqlrubriquedao.php | UTF-8 | 3,351 | 3.046875 | 3 | [] | no_license | <?php
class MySQLRubriqueDAO
{
private $cnx;
public function __construct()
{
$this -> cnx = ConnexionBdd::getConnexion();
}
/**
* function permettant l'insertion de la rubrique r dans la table des rubriques
*
* @param Rubrique $r ob... | true |
10795f6b061f33009ff5b526f3da376a69d51048 | PHP | dayana010304/APICRUDRESTAURANTEPHP | /platos.php | UTF-8 | 2,803 | 2.90625 | 3 | [] | no_license | <?php
date_default_timezone_set('America/Bogota');
class Plato
{
private $db;
private $db_table = "plato";
public $IdPlato;
public $Nombre;
public $Descripcion;
public $Precio;
public $Creado;
public $result;
public function __construct($db)
{
$this->db = $db;
... | true |
0f3b5aa33b22b36b23b92712880d9341af5689b1 | PHP | bretznerR/mvc_todolist | /models/todos.php | UTF-8 | 2,325 | 2.734375 | 3 | [] | no_license | <?php
class TodoModel extends Model{
private $order;
private $table_name = "todo";
public $todoID;
public function order($order)
{
$this->order = $order;
}
public function Index($id)
{
$this->query("SELECT * FROM " . $this->table_name
. " WHERE id=:id"
... | true |
bbe347ee844b012025fc2e47ea84619de3edeef7 | PHP | ars265/sn-wp-plugin-base | /includes/common/result/Operation_Result.php | UTF-8 | 2,581 | 3.171875 | 3 | [] | no_license | <?php
namespace sn\base\result;
/**
* A implementation of the operation result interface.
*
* @implements \sn\base\result\I_Operation_Result
*/
class Operation_Result implements \sn\base\result\I_Operation_Result {
/**
* Whether the operation was successful.
*
* (default value: false)
... | true |
41fef2ac899dbf73eab05cca9a99fbd2da907294 | PHP | EmmaFrz/api-example | /app/Http/Controllers/AuthController.php | UTF-8 | 2,511 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\User;
use App\Notifications\SignupActivate;
use Carbon\Carbon;
use Illuminate\Http\Request;
use App\Http\Requests\CreateUserRequest;
use App\Http\Requests\CreateLoginRequest;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Auth;
class AuthController ... | true |
bee018c805bca4659c95ea65502675990049ea52 | PHP | taguchi-57/php_webtest | /phpmail/210.php | UTF-8 | 1,028 | 2.96875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="ja" dir="ltr">
<head>
<meta charset="utf-8">
<title>メールアドレスの形式をチェックしたい</title>
</head>
<body>
<div>
<?php
//libを読み込む
require_once ('../lib/util.php');
if (isset($_POST['email'])) {
$email = $_POST['email'];
$pattern = '/¥A([a-z0-9_¥-... | true |
5129944dad0075593acf2f339c4eccb80fd7d4a7 | PHP | BKorenek/gherkin-cs-fixer | /src/Fixers/PyStringsFixer.php | UTF-8 | 1,082 | 3 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Medology\GherkinCsFixer\Fixers;
use Medology\GherkinCsFixer\Dto\PyStringsDto;
/**
* Fixes the multiple line text formatting.
*/
class PyStringsFixer
{
/** @var int Padding value from left */
private const PADDING = 10;
/** @var PyStringsDto PyStrings Data Obje... | true |
7df339ed3975f6804568f078f3aafc31650c6da2 | PHP | andtherand/Svs | /Json/GData/Column.php | UTF-8 | 3,815 | 3.234375 | 3 | [] | no_license | <?php
class Svs_Json_Gdata_Column
{
//-------------------------------------------------------------------------
// - VARS
const NUMBER = 'number';
const STRING = 'string';
private $_data = array(
'id' => '',
'type' => '',
'label' => ''
);
//------------------------------------------------------... | true |
decfde20eaad207adce8753c4e312844484bd551 | PHP | nemein/com_meego_devprogram | /apputils.php | UTF-8 | 9,704 | 2.671875 | 3 | [] | no_license | <?php
/**
* @package com_meego_devprogram
* @author Ferenc Szekely, http://www.nemein.com
* @copyright The Midgard Project, http://www.midgard-project.org
* @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License
*/
class com_meego_devprogram_apputils extends com_meego_devprogram_utils
{
... | true |
6af881e01547fd2242e3de11ebc7f4eb026d9d12 | PHP | ixibei/91dy | /app/models/Keyword.php | GB18030 | 534 | 2.734375 | 3 | [] | no_license | <?php
class Keyword extends Eloquent {
/*public static $rules = array(
'username'=>'required|alpha|min:2',
'password'=>'required|alpha_num|between:6,12|confirmed',
);*/
public $timestamps = false;//create_at update_atֶ
protected $table = 'keyword';
public static function getKeywords($keywords){
if(!$ke... | true |
54a5a28353cf7d21033e1ebbf09f197552f72a09 | PHP | dattx0109/samacom | /app/Repository/Rac/JobRepository.php | UTF-8 | 2,117 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repository;
use Exception;
use Illuminate\Support\Facades\DB;
class JobRepository
{
const TABLE_NAME = 'jobs';
public function insert($dataInsert)
{
return DB::table(self::TABLE_NAME)->insertGetId([
"crawler_job_id" => $dataInsert['id'],
"title" => $dat... | true |