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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
b7640032423637159100c89a992e90ad4b3fab28 | PHP | EwenVig/STAGE | /Inscription-AP-main/siteAP/src/verificationEleve.php | UTF-8 | 2,113 | 2.609375 | 3 | [] | no_license | <?php @session_start();
require 'Gen/AccesDonnees.php';
require 'Model/ELEVE.php';
require 'DAO/eleveManager.php';
if(isset($_POST['login']) && isset($_POST['pwd']))
{
// connexion � la base de donn�es
$db = connexion();
// on applique les deux fonctions mysqli_real_escape_string et htmlspec... | true |
f6df8000326c08c3a8136e314d2920017a65b1c3 | PHP | legalweb/cosmic-calendar-php-library | /src/Models/TaskRequest.php | UTF-8 | 632 | 2.921875 | 3 | [] | no_license | <?php
namespace Legalweb\CosmicCalendarClient\Models;
class TaskRequest implements \JsonSerializable
{
/**
* @var string
*/
var $title;
/**
* @var \DateTime
*/
var $due;
/**
* TaskRequest constructor.
*
* @param string $title
* @param \DateTime $due
... | true |
0c34851bfa30f7a88104f1deb5f1872ef2788b29 | PHP | pablojc12/Dog | /assets/user/consultaDatosUser.php | UTF-8 | 11,150 | 2.734375 | 3 | [] | no_license | <?php
require_once 'conection.php';
/**
* Funcion principal para la recoleccion de datos
* @return array coleccion de datos recolectados
*/
function main()
{
if (/*isset($_SESSION["tokenSession"])*/ true)
{
$sesion = $_SESSION["tokenSession"];
$data = array();
$arregloAuxiliar = nu... | true |
5e3175a694a6214ba60bd8fe7edea012fa5cd70e | PHP | sajjadalis/laravel-app | /database/migrations/2018_10_16_014523_add_profile_fields_to_user.php | UTF-8 | 1,385 | 2.578125 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddProfileFieldsToUser extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('users', func... | true |
ff5144c27e07712b0ad8b6f808e4e1e3b9ad8cfe | PHP | thomasFoglia/dashboard_recherche_emploi | /model/BDD.php | UTF-8 | 8,315 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
class BDD {
public $db;
public $id;
public $entreprise;
public $type;
public $adresse;
public $dateDemande;
public $telephone;
public $mail;
public $dateRappel;
public $lien_annonce;
public $commentaire;
public $reponse;
function __construct(
$id = null,
$entreprise = null,... | true |
549900b1d00cc7b2309707a5be3dfb275584b14e | PHP | vophison/XDPMW-Nhom9-Thu3-5-Ca3 | /LODYSHOP2/app/User.php | UTF-8 | 1,184 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use Notifiable;
protected $primaryKey = "email"; // truyền để biết ... | true |
cae003b372bd551a4d798d913d032f447a033c64 | PHP | imCaps/some-things | /Comment Form/src/core/App.php | UTF-8 | 930 | 2.984375 | 3 | [] | no_license | <?php
/**
* App class
* @author alexandrshumilow
*/
namespace Core;
class App
{
public $request;
public $response;
public $container;
public function __construct()
{
$this->request = new Request();
$this->response = new Response();
}
/**
* Prepares and sends respo... | true |
1f2e77aec5133c3d6c695c194245e2ee97edab3c | PHP | onefiter/PHPStudy | /day003/20.object_serialize.php | UTF-8 | 183 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
include './Object_serialize.php';
$obj1 = new Object_serialize();
echo "<pre>";
var_dump($obj1);
echo "</pre>";
$s1 = serialize($obj1);
file_put_contents('./obj1.txt', $s1);
| true |
7ee3c5134b0619fe7c285486b16939fac9518358 | PHP | ArtemPakhomov/project | /table.php | UTF-8 | 1,858 | 2.671875 | 3 | [] | no_license | <?php
include 'model.php'
?>
<html>
<head>
<meta charset="UTF-8">
<title>Table</title>
</head>
<style>
.shops{
background: rgba(184, 245, 206, 0.5);;
padding: 10px;
margin: 15px;
border: 1px solid black;
border-radius: 10px;
display: inline-bloc... | true |
86626e5426b71caa11d4969c2e5f48d3226a500f | PHP | TrustlabTech/ecd-platform | /app/Repositories/Implementations/EloquentAdminRepository.php | UTF-8 | 2,011 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Implementations;
use App\Repositories\Interfaces\AdminRepositoryInterface;
use App\Models\Admin;
use App\Models\User;
use App\Models\Role;
class EloquentAdminRepository extends AbstractEloquentRepository implements AdminRepositoryInterface
{
protected $model;
public function... | true |
4ab33a2a8032dd37d132f615487f427c84758862 | PHP | manuel-cole/Inventory-Project | /Inventory/handler/addItem1.php | UTF-8 | 1,195 | 2.671875 | 3 | [] | no_license | <?php
/**
* Created by Emmanuel.
*/
$msg="";
error_reporting(E_ALL ^ E_DEPRECATED);
error_reporting(0);
ini_set('session.bug_compat_warn', 0);
ini_set('session.bug_compat_42', 0);
if (isset($_POST["addItem"])) {
$con=mysqli_connect("localhost","inventory","inventory","inventory");
// Check connection
if... | true |
99dfd8c99b6f54bbafa6ab0ea1cbe390090bfc2b | PHP | fdbatista/cellar | /migrations/m180829_201108_create_product_table.php | UTF-8 | 1,662 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Handles the creation of table `product`.
*/
class m180829_201108_create_product_table extends Migration {
/**
* {@inheritdoc}
*/
public function safeUp() {
$this->createTable('product', [
'id' => $this->primaryKey(),
'description' ... | true |
137e69898beecac3a1980dad2a18b177f6d23e03 | PHP | jonas-balius/php-redis-sentinel | /docs/test-phpredis.php | UTF-8 | 3,122 | 2.546875 | 3 | [] | no_license | <?php
use Redis\ClientSentinel\Adapter\PredisClientAdapter;
use Redis\ClientSentinel\Adapter\SocketClientAdapter;
use Redis\ClientSentinel\Adapter\NullClientAdapter;
use Redis\ClientSentinel\Adapter\Predis\ClientCreator as SentinelCreator;
use Redis\Client\Adapter\Predis\ClientCreator as RedisCreator;
use Redis\Clien... | true |
d86bce39dd8d3aec74da474e954ca9419198aa12 | PHP | JuanEsquiviasO/poo-php-18 | /05-App/models/crud.php | UTF-8 | 2,739 | 3.109375 | 3 | [] | no_license | <?php
#extension of Classes
require_once "conexion.php";
class Datos extends Conexion{
#users register
#--------------------------------------------
public function registroUsuarioModel($datosModel, $tabla) {
#prepare
$stmt = Conexion::conectar()->prepare("INSERT INTO $tabla(usuario, password, email) VALUES (... | true |
f825138f95baf3ad4daa49d7876d0b7c0748c9c6 | PHP | koddd/mvc | /system/benchmark.php | UTF-8 | 351 | 2.578125 | 3 | [] | no_license | <?php
if(!defined('__FULLPATH__')) { die(header('HTTP/1.0 404 Not Found')); }
class Benchmark {
public $begin_time;
public $end_time;
public $total_execution_time;
public function __construct() {
$this->begin_time = microtime(true);
$this->end_time = microtime(true);
}
pub... | true |
0d3641347d887848d32b37667ccdbc9a068fb725 | PHP | hucongyang/pink | /models/Appstore.php | UTF-8 | 4,583 | 2.640625 | 3 | [] | no_license | <?php
/**
* This is the model class for table "appstore".
*
* The followings are the available columns in table 'appstore':
* @property string $id
* @property string $uid
* @property string $certificate
* @property string $coins
* @property string $money
* @property integer $status
* @property string $dateti... | true |
1f2679cc392b8efd4ca9bbe26a1759c89aab9e68 | PHP | RomainPct/eosecurite | /admin/php/administration/CandideCollectionItemAdministrator.class.php | UTF-8 | 3,401 | 2.6875 | 3 | [] | no_license | <?php
class CandideCollectionItemAdministrator extends CandideCollectionItem {
use Administrator;
private $_collectionAdministrator;
private $_fullStructure;
private $_fullData = [];
private $_newItem = false;
public function __construct(String $page, $id) {
$this->_collectionAdmini... | true |
8e8e985c61e42f864e94a92abbd27d5d3d541d8c | PHP | DK-codeur/MISOUA | /_classes/User.php | UTF-8 | 5,950 | 2.796875 | 3 | [] | no_license | <?php
class User
{
public $id;
public $nom;
public $prenoms;
public $naissance;
public $email;
public $telephone;
public $commune;
public $pass;
public $regAt;
public $isAdmin;
... | true |
3db846b7bcb221fbe4185fecaca41bd1d00bca7f | PHP | kenichi0126/laravel_clean_arch | /packages/switch-m/smart-api-components/tests/Setting/Save/UseCases/InputDataTest.php | UTF-8 | 1,098 | 2.515625 | 3 | [] | no_license | <?php
namespace Switchm\SmartApi\Components\Tests\Setting\Save\UseCases;
use Switchm\SmartApi\Components\Setting\Save\UseCases\InputData;
use Switchm\SmartApi\Components\Tests\TestCase;
/**
* Class InputDataTest.
*/
class InputDataTest extends TestCase
{
private $target;
public function setUp(): void
... | true |
9d637580a11a45b6ab6850d34613685914d27d54 | PHP | shuff/Hector | /pusher/foundation.php | UTF-8 | 4,433 | 3.03125 | 3 | [] | no_license | <?php
class Error
{
// CATCHABLE ERRORS
public static function captureNormal( $number, $message, $file, $line )
{
$error = array();
// Insert all in one table
$error = array( 'type' => $number, 'message' => $message, 'file' => $file, 'line' => $line );
$server_respon... | true |
f7db01df3dec3e7c0d0165bbd486990997dbf23a | PHP | christopherbarton/Student-Assessment-manager | /studentDashboard.html.php | UTF-8 | 17,550 | 3.0625 | 3 | [] | no_license | <?php
// Initialize the session
session_start();
$studentId = $_SESSION["studentId"];
$firstName = $_SESSION["firstName"];
$lastName = $_SESSION["lastName"];
// Check if the user is logged in, if not then redirect him to login page
/*if (!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true) {
header("l... | true |
87a168bcf169c9ed33b46b62b9886743b3667dc6 | PHP | AlexandrDvoretsky/1.6 | /1.6.php | UTF-8 | 601 | 3.5625 | 4 | [] | no_license | <?php
// 1.6 Получить все четырехзначные числа, в записи которых встречаются только цифры 0,2,3,7.
for($i=1000; $i<10000; $i++)
{
$fourth = floor(($i%100)%10);
$third = floor(($i%100)/10);
$second = floor(($i%1000)/100);
$first = floor($i/1000);
if(($first==2 || $first==3 || $first==7) && ($... | true |
f614f7992b7183ea585905baf21c2df10eb0892c | PHP | Mirfozil-dev/yiiForm | /models/ApplicantDetails.php | UTF-8 | 2,486 | 2.6875 | 3 | [] | no_license | <?php
namespace app\models;
use Yii;
use yii\helpers\Html;
use yii\helpers\Url;
/**
* This is the model class for table "applicant_details".
*
* @property int $id
* @property string $full_name
* @property string $sex
* @property string $birth_date
* @property string $marital_status
* @property string $pinfl_... | true |
94146f8deaf3863c4e77da443becbf0663733cef | PHP | Arcoz/Register-Validate | /registration.php | UTF-8 | 573 | 2.53125 | 3 | [] | no_license | <?php
include('dbconnect.php');
$email = $_POST['email'];
$registration_id = rand(1000000, 2400000000);
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-Type: text/html; charset=utf8\r\n";
//Change to your email
$headers .= "From: email@yourdomain.com\r\n";
//Change to your link
$message = '<a href="http:/... | true |
bafad063370d36ba248377cca78e23aadf7e890c | PHP | 1075437930/- | /includes/lib_category_model.php | UTF-8 | 2,459 | 2.84375 | 3 | [] | no_license | <?php
/**
* 淘玉 商品分类数据模型
* ============================================================================
* * 版权所有 2015-2025 淘玉商城,并保留所有权利。 * 网站地址: http://www.taoyumall.com;发布。
* ============================================================================
* $Author: 萤火虫 $
* 商品分类信息增删改查
* $Id: lib_category_model.php 1... | true |
58ebf163c877615a727a3984453bd85317883ca8 | PHP | smister/deluxcms | /vendor/deluxcms/slideshow/models/Slideshow.php | UTF-8 | 1,704 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace deluxcms\slideshow\models;
use yii\db\ActiveRecord;
use yii\behaviors\TimestampBehavior;
use common\behaviors\IntegerNullBehavior;
class Slideshow extends ActiveRecord
{
public static function tableName()
{
return '{{%slideshow}}';
}
public function behaviors()
{
... | true |
9d62c8fda104f43cb91db25a57aa6d988dd3a04b | PHP | Traian-GAlex/restaurantapp | /app/Http/Controllers/Management/TableController.php | UTF-8 | 4,501 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Management;
use App\Data\Models\Table;
use App\Http\Controllers\Controller;
use App\Http\Controllers\CustomController;
use Illuminate\Http\Request;
class TableController extends CustomController
{
/**
* Display a listing of the resource.
*
* @return \Illuminate... | true |
3fd25bd10c5c6f45a8421f5cedb8df3d8eabed3e | PHP | MadeByIcarus/StaticParameters | /src/StaticParameters/StaticParameters.php | UTF-8 | 1,477 | 2.921875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
declare(strict_types=1);
namespace Icarus\StaticParameters;
use Nette\InvalidArgumentException;
use Nette\StaticClass;
abstract class StaticParameters
{
use StaticClass;
protected static $locked = [];
protected static $values = [];
/**
* @param $name
* @param $value
* @i... | true |
5838e2a6fb31052f08a4ec2028639af8482775da | PHP | dbojdo/soap-api | /tests/Util/Dumper/StdOutDumperTest.php | UTF-8 | 995 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Webit\SoapApi\Tests\Util\Dumper;
use Webit\SoapApi\Tests\AbstractTestCase;
use Webit\SoapApi\Util\Dumper\StdOutDumper;
class StdOutDumperTest extends AbstractTestCase
{
/**
* @var StdOutDumper
*/
private $dumper;
protected function setUp(): void
{
$this->dumper = ne... | true |
7543fd4e16df35ea8aac8da4df903a0fdc8d66a1 | PHP | joshuajlai/appfuel | /package/Appfuel/Html/Resource/ResourceTreeWriter.php | UTF-8 | 2,425 | 2.921875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Appfuel
* PHP 5.3+ object oriented MVC framework supporting domain driven design.
*
* @package Appfuel
* @author Robert Scott-Buccleuch <rsb.code@gmail.com>
* @copyright 2009-2010 Robert Scott-Buccleuch <rsb.code@gmail.com>
* @license http://www.apache.org/licenses/LICENSE-2.0
*/
namesp... | true |
2588efc788860690a5353b47e9cd4bbca48f894d | PHP | Lpu8er/voidfield | /src/Entity/ResearchSkill.php | UTF-8 | 1,310 | 2.8125 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Description of ResearchSkill
*
* @author lpu8er
* @ORM\Entity()
* @ORM\Table(name="researchskills")
*/
class ResearchSkill {
/**
*
* @var Research
* @ORM\Id
* @ORM\ManyToOne(targetEntity="Research")
* @ORM\JoinColum... | true |
5acfc36c5dc7370d4458f0831141833d1f5bb61f | PHP | brenoroosevelt/php-validation | /src/Exception/ValidateOrFail.php | UTF-8 | 578 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace BrenoRoosevelt\Validation\Exception;
use BrenoRoosevelt\Validation\Contracts\Rule;
trait ValidateOrFail
{
use Guard;
/**
* @throws ValidationExceptionInterface
*/
public function validateOrFail(
mixed $input,
array $context = [],
... | true |
ad936734ebefbbd8cbf720c9f84210b64f2f7753 | PHP | mycone/fangyuan | /app/core/View.php | UTF-8 | 1,467 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\core;
use yii\web\View as BaseView;
use app\core\CommonTrait;
use app\widgets\LoopData;
/**
* 视图组件
* @author chenhao <dzswchenhao@126.com>
* @property \app\modules\rbac\RbacService $rbacService
* @property \app\modules\post\PostService $postService
* @property \app\modules\modular... | true |
28a19b7661a990dfbcc8b3a5c02442866c7a43f8 | PHP | tgloeggl/lis | /app/models/map.php | UTF-8 | 623 | 3.015625 | 3 | [] | no_license | <?php
/**
* Map
*
* GPL
*/
class Map {
static function getData($x, $y, $spread = 20) {
$db = DBManager::get()->query("SELECT * FROM lis_planets
WHERE x > $x - $spread AND x < $x + $spread
AND y > $y - $spread AND y < $y + $spread");
while ($data = $db->fetch(PDO::FETCH_ASSOC)) {
$ret[$data['x']][$... | true |
70942b626fb80132af9870a4ca8ad677a3255d2b | PHP | windawake/laravel-repository-pratice | /app/Fakers/Backend/UserFaker.php | UTF-8 | 1,198 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Fakers\Backend;
class UserFaker {
public function getList(){
$faker = \Faker\Factory::create();
$list = [];
for ($i = 0; $i < 20; $i++) {
$info = [
'admin_id' => $faker->unique()->randomNumber(),
'email' => $faker->companyEma... | true |
040387ef828982ab142668af001187d8e40a5be0 | PHP | ace411/fp-php-book | /chap-02/referential-transparency.php | UTF-8 | 155 | 3 | 3 | [
"Apache-2.0"
] | permissive | <?php
$insertUnderscores = fn (string $text): string => implode('_', explode(' ', $text));
var_dump($insertUnderscores('hello world') == 'hello_world');
| true |
d1e650488ca14900ef424d1cec6ff3c0daabdda0 | PHP | harrypurmanta/butcher | /app/Models/Imagesmodel.php | UTF-8 | 1,202 | 2.5625 | 3 | [] | no_license | <?php namespace App\Models;
use CodeIgniter\Model;
class Imagesmodel extends Model
{
protected $table = 'image';
protected $primaryKey = 'image_id';
protected $foreignKey = 'kategori_id';
protected $allowedFields = ['kategori_id','image_nm','image_path','status_cd', 'created_dttm','created_user',... | true |
9aa468c5ee314fa65391fbda4e626420bb3d6bcf | PHP | AhmedRashwan/laravelAPI | /app/Http/Controllers/meetingController.php | UTF-8 | 4,047 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Meeting;
use Illuminate\Http\Request;
use Validator;
class meetingController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$meeting = Meeting::all()... | true |
39a8c7cea07ee4d3b3bd654f3da50c69b60c034a | PHP | hxss/Authorization | /Orm/Fields/RouteField.php | UTF-8 | 1,045 | 2.578125 | 3 | [] | no_license | <?php
namespace Modules\Authorization\Orm\Fields;
use Modules\Authorization\Forms\Fields\RouteField as FormsRouteField;
use Modules\Authorization\Helpers\RouterHelper;
use Modules\Authorization\Orm\Fields\CachedForeignField;
use Phact\Form\Fields\DropDownField;
use Phact\Orm\Fields\Field;
class RouteField extends Ca... | true |
aab3e0e7ae6645653685249fee8543636ef8a57c | PHP | xLeDocteurx/MVC-Zend | /module/Movies/src/Form/MoviesForm.php | UTF-8 | 2,305 | 2.578125 | 3 | [] | no_license | <?php
namespace Movies\Form;
use Zend\Form\Form;
class MoviesForm extends Form
{
public function __construct($name = null)
{
// We will ignore the name provided to the constructor
parent::__construct('movies');
$this->add([
'name' => 'id',
'type' => 'hidden',
... | true |
e0db74102cf2d491217e0bd0da7b585538da8cd2 | PHP | ys0/Pulse | /doc/pages/update.php | UTF-8 | 382 | 2.96875 | 3 | [] | no_license | <h3>Updating a Record</h3>
The updating is easier than the creation of a record, you have only to load the object, change the data array and call the update method.
<pre>
$myPulse->load(10);
$myPuse->data['age'] = rand(1, 100);
$myPulse->update();
</pre>
In this way i update the age of the record with ... | true |
cbd02b236ce8f4ab1d92877735adddc008d82945 | PHP | mac8905/exercises | /dinamicForm/index.php | UTF-8 | 1,240 | 2.890625 | 3 | [] | no_license | <?php
class Persona
{
function __construct($data)
{
switch($data["action"])
{
case "agregar":
$this->agregar($data["data"]);
break;
default:
$this->pintar();
... | true |
43c2539ae1e475f3e5d811159ac38d7714b77862 | PHP | lucascassiano/lesshomeless | /php/user.php | UTF-8 | 7,584 | 2.828125 | 3 | [] | no_license | <?php
if(session_id() == '' || !isset($_SESSION)) {
// session isn't started
session_start();
}
//To handle data that comes from FORMS through POST method
if(isset($_POST['exec'])){
$exec=$_POST['exec'];
if($exec=="sign")
sign($_POST['name'],$_POST['facebook_id'],$_POST... | true |
842ff3454a6caea276b6a5b0ef87a6acdb4ecb26 | PHP | seladon/example | /src/Architecture/Infrastructure/Shared/Exception/InternalException.php | UTF-8 | 585 | 2.609375 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace Architecture\Infrastructure\Shared\Exception;
use Symfony\Component\HttpKernel\Exception\HttpException;
class InternalException extends HttpException
{
/* @param string $message The internal exception message
* @param \Throwable $previous The previous exception
... | true |
2ddbe28d36562ff28c3df2b2e724519046b0bcdc | PHP | Thong38676/PHP-Core | /ql_maytinh/Models/ChuyenMucModel.php | UTF-8 | 1,846 | 2.71875 | 3 | [] | no_license | <?php
/**
*
*/
include_once('DB_Model.php');
class ChuyenMucModel extends DB_Model
{
private $id_chuyenmuc;
private $ten_chuyenmuc;
private $mota;
private $db_model;
function __construct()
{
$this->db_model = new DB_Model();
if($this->db_model->checkDBConnection()){
return true;
}else{... | true |
9626fa17a6f5fb9ddcb0acd434db4121b22b56e7 | PHP | svadhis/FightOrDie | /htdocs/partials/character.php | UTF-8 | 2,111 | 3.484375 | 3 | [] | no_license | <?php
class Character
{
protected $name;
protected $healthPoints;
protected $strength;
protected $defense;
protected $critical = 5;
protected $totalStrength;
protected $lucky = false;
public function attack(Character $target)
{
$this->totalStrength = 0;
$random = ra... | true |
493c0202c7158115636b59f30af22ddc4de66b66 | PHP | juanjolainez/SearchEngineScraper | /Clients/HTMLSearchClient.php | UTF-8 | 775 | 3.203125 | 3 | [] | no_license | <?php
namespace Clients;
use Models\GoogleResult;
use Utils\MultiCurl;
/**
* Class HTMLSearchClient
* @package Clients
*/
abstract class HTMLSearchClient implements ISearchClient
{
/**
* @param String $word Word to search
* @return GoogleResult[]
*/
public function search(string $word, int ... | true |
cf0a2750ed9a677230fba289ea23fc121f089706 | PHP | ykl1001/weishop | /app/Http/Controllers/Api/Sellerweb/V1/ArticleController.php | UTF-8 | 1,302 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace YiZan\Http\Controllers\Api\Sellerweb;
use YiZan\Services\Sellerweb\ArticleService;
use Lang, Validator;
/**
* 公告
*/
class ArticleController extends BaseController
{
//获取公告列表
public function lists(){
$result = ArticleService::getList(
$this->sellerId,
$this->request('title'),
... | true |
c1f880ac76e815aa69cad9ce50263426835ac58f | PHP | aditiakusuma/covid | /app/Http/Controllers/CovidController.php | UTF-8 | 1,810 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
//butuh use HTTP
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use App\Charts\IndonesiaProvinsiChart;
class CovidController extends Controller
{
public function provinsi()
{
//fung... | true |
28d2a6e8bb8450cb7cb8942d1dfca9ce0694d7ec | PHP | Vitalyablya/botBooks | /parseBok.php | UTF-8 | 1,086 | 2.71875 | 3 | [] | no_license | <?php
require_once "sendCurlFlibusta.php";
// в идеале возвращает список книг где [название книги - автор, ссылка на книгу]; если ничего не найдено возвращает false
// $namebook - имя книги;
function getBooksUponReq($namebook){
$page = 0;
$res = [];
do{
$url = HOSTSCRAPING . "/booksearch?page=$pa... | true |
0fa4cb731515a5b414f450a6a778791e20a83eae | PHP | donatasbartkus/qafoo | /src/Damage.php | UTF-8 | 370 | 3.015625 | 3 | [] | no_license | <?php
/**
* #PHPHEADER_OXID_LICENSE_INFORMATION#
*/
namespace OXID;
class Damage
{
/** @var int */
private $damage = 0;
/**
* @return int
*/
public function getDamage()
{
return $this->damage;
}
/**
* @param int $damage
*/
public function setDamage($dama... | true |
b1f219cec8c6be293a03cdf084d9abb9d9b2b11b | PHP | DekodeInteraktiv/learndash-demo | /web/app/plugins/sfwd-lms/includes/classes/answer-types/class-ldlms-sort-answer-type.php | UTF-8 | 3,647 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Class for getting answers and student nodes for `sort` type questions.
*
* This class will be used to part answers for `sort` and `matrix_sort` type
* question's answers.
*
* @package Learndash
*/
if ( ! class_exists( 'LDLMS_Sort_Answer' ) ) {
/**
* Class LDLMS_Sort_Answer
*
* @package Learn... | true |
b3c42f6dc13eaf19e34d1232f17c2b1d5ee7d2a0 | PHP | michaelalbinson/332-term-project | /htdocs/attendees/display_room.php | UTF-8 | 2,028 | 2.671875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<link href="../css/bootstrap.min.css" type="text/css" rel="stylesheet" >
<link href="../css/style.css" type="text/css" rel="stylesheet" >
<title>Conference Intake</title>
</head>
<body>
<?php
// Loads in database connection, called $connection and some helper functions
include_once... | true |
58012f1474a9b4a10eb7145707abcac5b23d596f | PHP | llidaming/yii2xm | /backend/models/Brand.php | UTF-8 | 991 | 2.734375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: asus
* Date: 2017/11/3
* Time: 17:13
*/
namespace backend\models;
use yii\db\ActiveRecord;
class Brand extends ActiveRecord
{
// public $imgFile;
public static $statusarr=['1'=>'显示','0'=>'隐藏'];
public function rules()
{
return [
[['nam... | true |
724e93a859a41fcdc77212bb6ccb4ce971573631 | PHP | SamsonPHP/fs | /src/IFileSystem.php | UTF-8 | 3,400 | 3.21875 | 3 | [] | no_license | <?php
namespace samsonphp\fs;
/**
* Generic file system adapter interface for writing/reading
* data to a particular file system.
*
* @package samson\upload
*/
interface IFileSystem
{
/**
* Write data to a specific relative location
*
* @param string $data Data to be written
* @param strin... | true |
de3dd71b27c6a647044e471eff18e967d4eb896f | PHP | no0n3/fun_project | /models/BaseModel.php | UTF-8 | 6,373 | 2.875 | 3 | [] | no_license | <?php
namespace models;
use components\helpers\ImageHelper;
/**
* @author Velizar Ivanov <zivanof@gmail.com>
*/
abstract class BaseModel extends \classes\Objectv {
const TYPE_IMAGE = 'image';
private $propertyErrors = [];
public function getAttributeLabels() {
return [];
}
public fun... | true |
92d6b7bdde6b4a371e8cb216dd078d7b45064456 | PHP | GonzaloLavecchia/Cine | /models/Comprado.php | UTF-8 | 1,082 | 2.65625 | 3 | [] | no_license | <?php
class Comprado extends Model{
public function InsertarPago($usuario,$forma_pago,$total){
if(!ctype_digit($usuario)) throw Exception;
if($usuario < 1) throw Exception;
if(!ctype_digit($forma_pago)) throw Exception;
if($forma_pago < 1 || $forma_pago > 3) throw Exception;
if(!ctype_digit($total))... | true |
dd5eea845873aafb807559caca1a9010217096f7 | PHP | interfaceslivres/editora-universitaria | /classes/payment/omp/OMPQueuedPayment.inc.php | UTF-8 | 2,451 | 2.671875 | 3 | [] | no_license | <?php
/**
* @file classes/payment/omp/OMPQueuedPayment.inc.php
*
* Copyright (c) 2003-2013 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @class OMPQueuedPayment
* @ingroup payment
*
* @brief Queued payment data structure for OMP
*
*/
import('lib.pkp.classe... | true |
1fdec4a6dc7be4803c25188fc56e303bb34a1c42 | PHP | phynex/core | /src/Entities/ChatPermissions.php | UTF-8 | 2,720 | 2.515625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* This file is part of the TelegramBot package.
*
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Longman\TelegramBot\Entities;
/**
* Class ChatPer... | true |
2a1b1283be58468b6e9f03106e1664fcfbc21266 | PHP | Caizhan777/ecsite | /src/Model/Table/UsersTable.php | UTF-8 | 2,085 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Model\Table;
use Cake\ORM\Query;
use Cake\ORM\RulesChecker;
use Cake\ORM\Table;
use Cake\Validation\Validator;
class UsersTable extends Table
{
/**
* Initialize method
*
* @param array $config The configuration for the Table.
* @return void
*/
public function init... | true |
403086088ba0bae0505e9f4177ef84e1d8467255 | PHP | chemitaxis/Testing | /database/seeds/ArticlesTableSeeder.php | UTF-8 | 570 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use Faker\Factory as Faker;
use Illuminate\Support\Facades\DB;
class ArticlesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//
$faker = Faker::create();
foreach (range(... | true |
410ded84abda86b6d44eaa69e7f5edc396b35a49 | PHP | waynegraham/uvasci | /includes/body_class.inc.php | UTF-8 | 533 | 2.609375 | 3 | [] | no_license | <?php
{
$url = $_SERVER['REQUEST_URI'];
$url = split('/|\?|&', $url);
for($i = 0; $i < count($url); $i++) {
$element = $url[$i];
if(strpos($element,'=') !== false) {
list($field, $value) = split('=', $element);
if($value && !in_array($field, $ignore_fields)) {
$classes[] = $field;
unset($el... | true |
865451d62e31d12a8626eb02e8632061a0eed39d | PHP | blackdurian/simple-loan-managing-system-php | /class/balance_record.php | UTF-8 | 2,261 | 2.796875 | 3 | [] | no_license | <?php
require_once "class/DBController.php";
class balance_record{
private $db_handle;
function __construct() {
$this->db_handle = new DBController();
}
function add($balance, $account_type, $account_id){
$query = " INSERT INTO balance_r... | true |
bbc14be7c564df077b662957fd3b4a5395cf0521 | PHP | dzungnv02/intern-ems | /app/Classes/ClassesTimeTable.php | UTF-8 | 3,297 | 2.75 | 3 | [
"Apache-2.0",
"MIT"
] | permissive | <?php
namespace App\Classes;
use Illuminate\Support\Facades\Log;
class ClassesTimeTable
{
protected $_time_table = [];
protected $_holidays = [];
protected $_schedule = [];
protected $_date_range = ['start_date' => '', 'end_date' => ''];
protected $_ary_days = [];
protected $_total_appoiment = ... | true |
5e04d92e6b5ddecb299a74ed51a7bcd3b5c8c8a6 | PHP | alanhugo/intersms | /app/Controller/CommandsController.php | UTF-8 | 4,354 | 2.5625 | 3 | [] | no_license | <?php
class CommandsController extends AppController{
public $name = 'Commands';
public function beforeFilter(){
$this->layout = "default";
parent::beforeFilter();
}
/**
* Lista de comandos
* @author Alan Hugo
* @version 23 Abril 2015
*/
public function index() {
$arr_commands = $this->Command->f... | true |
5cebd5c3596b9d85939037eeba0c90d27b2c83ff | PHP | morrisonlevi/Algorithm | /test/MaxTest.php | UTF-8 | 317 | 2.765625 | 3 | [] | no_license | <?php
namespace morrisonlevi\Algorithm;
class MaxTest extends \PHPUnit\Framework\TestCase {
function test() {
$input = range(0, 2);
$maxer = max(-1);
$maxer = $maxer();
$expect = 2;
$actual = $maxer($input);
$this->assertEquals($expect, $actual);
}
}
| true |
63f2076b185d1d82ad13b103dc8f7709c333f65b | PHP | macagua/examples.php7 | /oop/interface_demo.php | UTF-8 | 499 | 3.578125 | 4 | [] | no_license | <?php
// Include Person Interface
include __DIR__ . '/interfaces/Person.php';
/**
* User Class
*/
class Admin implements Person
{
// Class attributes
public $nickName;
// Class constructor method
public function __construct($nickName)
{
$this->nickName = $nickName;
}
public fun... | true |
2972a746ec37700e26e22b5243b67c0f92e523e7 | PHP | hisorange/browser-detect | /tests/Stages/DeviceDetectorTest.php | UTF-8 | 2,185 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace hisorange\BrowserDetect\Test\Stages;
use hisorange\BrowserDetect\Payload;
use hisorange\BrowserDetect\Test\TestCase;
use hisorange\BrowserDetect\Stages\DeviceDetector;
/**
* Test the DeviceDetector stage.
*
* @package hisorange\BrowserDetect\Test\Stages
* @coversDefaultClass hisorange\B... | true |
1add6837d13e59acd3dd0d545f70e92e7cd88376 | PHP | pashgunn/first_project | /main.php | UTF-8 | 720 | 4.0625 | 4 | [] | no_license | <?php
function printMenu(){
echo "MENU\n";
echo "1. +\n";
echo "2. -\n";
echo "3. *\n";
echo "4. /\n";
echo "5. exit\n";
echo "Choose operation: ";
}
echo "Write 2 numbers:\n";
echo "a = ";
$a = readline();
echo "b = ";
$b = readline();
do {
printMenu();
$menu = readline();
swi... | true |
3f90f56f45c982e9f32563664bd12c5aebce8df1 | PHP | maxkirchoff/file-intersect-plus | /do_work.php | UTF-8 | 3,828 | 3.265625 | 3 | [] | no_license | <?php
// We need all three arguments and when running `php file.php` in command line, the file.php counts as an arg
if($argc < 4)
{
// Tell them how to use the script
usage();
}
try
{
// Load our dirs into an array
$dirs = load_dirs($argv);
// Grab our source files arr
$src_files = get_files_a... | true |
53466518f3d0c0bede573bb03e1499fd1b7f445c | PHP | egorka-pom1dorka/PHP_courses | /hw6/CUD/UpdateDelete.php | UTF-8 | 1,203 | 2.734375 | 3 | [] | no_license | <?php header("Content-Type: text/html;charset=UTF-8"); ?>
<?php
$id=intval($_GET['id']);
$link=mysqli_connect("localhost","user","hedogo51","databuse");
$data=mysqli_query($link,"SELECT * FROM items");
$res = array();
while ($temp = mysqli_fetch_assoc($data)) {
$res[]=$temp;
}
for($i=0; $i<count($res); $i++)... | true |
8b422220af087e7ad4b3b6c820bc1c208924a1b9 | PHP | JuanDavidVJ/SCES | /app/Http/Requests/StoreFichasRequest.php | UTF-8 | 1,157 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class StoreFichasRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Ge... | true |
dfdf1ace8462764f6fd46e991c6b2e3d1a1c64c5 | PHP | shinya-jp/Study | /PHP/basic/choice_tr1.php | UTF-8 | 142 | 3.046875 | 3 | [] | no_license | <?php
$score = $argv[1];
if ($score >= 80) {
echo "$score : A";
} elseif ($score >= 60) {
echo "$score : B";
} else {
echo "$score : C";
} | true |
75b82fce141b76adcc532e135503bebee96035d3 | PHP | mfazio26/ns-pressive-child-theme | /src/php/notsalmon/widgets/ns-widget-post-selections.php | UTF-8 | 8,277 | 2.78125 | 3 | [] | no_license | <?php
/**
* This class creates a custom widget that allows an author to select/choose posts to be included
* in a sidebar listing. The intention is – Thrive Themes has "related posts" widget that renders
* a listing, but you have no control over which specific posts gets rendered. So, this custom
* widget... | true |
9fc48716a4c1d071e0bd25d220bd312359b8b4a9 | PHP | harisspace/galerydakwah | /app/models/Sirah_model.php | UTF-8 | 1,522 | 2.84375 | 3 | [] | no_license | <?php
class Sirah_model
{
private $db;
private $table = 'sirah';
public function __construct()
{
$this->db = new Database;
}
public function getAllSirah()
{
$query = "SELECT * FROM {$this->table}";
$this->db->query($query);
return $this->db->resultSet();
... | true |
94c4315429c17c3e5b870cdc264ebbc652efdee8 | PHP | poloey/in_house_job_board | /database/migrations/2017_08_17_075115_create_job_posts_table.php | UTF-8 | 1,313 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateJobPostsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('job_posts', fu... | true |
1767eafecca2ace496022cd4a364d183eec079c8 | PHP | Azimaet/3wa_restaurant | /application/models/UserModel.class.php | UTF-8 | 3,256 | 3.234375 | 3 | [] | no_license | <?php
class UserModel
{
// vérifie si l'email passé en paramètre est déjà utilisé par un compte en base
//Dans la fonction seule, $email représente juste l'argument, il sera remplacé par
//$this->isEmailAvailable($data["email"]) des qu'on l'appelle grâce a inscription(data) juste en dessous
public function... | true |
b9de52e2ac23064f82da310198057b537c558b8a | PHP | deegitalbe/trustup-pro-admin-common | /src/Models/_Abstract/PersistableMongoModel.php | UTF-8 | 1,660 | 2.71875 | 3 | [] | no_license | <?php
namespace Deegitalbe\TrustupProAdminCommon\Models\_Abstract;
use Deegitalbe\TrustupProAdminCommon\Contracts\PersistableContract;
use Deegitalbe\TrustupProAdminCommon\Models\_Abstract\_Private\MongoModel;
use Deegitalbe\TrustupProAdminCommon\Models\_Abstract\EmbeddableMongoModel;
/**
* Model that can be persist... | true |
6fbfc4817d6816b2c8e28fa8f4f88dc8fdb0383d | PHP | igormenin/phpsgf | /admin/criamenu.php | UTF-8 | 2,531 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
require_once('../cliente/seguranca.php');
function montaMenu($idPai = null, $nivel = 0)
{
try {
$menuMontado = '';
$listMenu = array();
if (is_null($idPai)==true) {
$listMenu = getMenus();
} else {
$listMenu = getMenus($idPai);
}
fore... | true |
30f7d6cf6baa1c90620e59b60ff4fb2abcfda65f | PHP | gertvdb/entity_field_helper | /src/Plugin/EntityFieldHelperInterface.php | UTF-8 | 959 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Drupal\entity_field_helper\Plugin;
use Drupal\Component\Plugin\PluginInspectionInterface;
use Drupal\Core\Entity\ContentEntityInterface;
/**
* Defines an interface for Entity Field Helper plugins.
*/
interface EntityFieldHelperInterface extends PluginInspectionInterface {
/**
* Get a single f... | true |
b530950a5dc54993c56efa57338905fba2ca40af | PHP | alu0100885453/celery_restaurant | /priv.php | UTF-8 | 3,831 | 2.75 | 3 | [] | no_license | <?php
include "conexion.php";
session_start();
$Conexion = CrearConexion();
echo '<meta charset="UTF-8">';
echo '<title>info celery</title>';
echo '<html>
<head>
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 80%;
}
td, th {
border: 1px solid #dddddd;
te... | true |
dcb7a796e487e3b7bce5642ca2af9ec553ca45ef | PHP | pcnudde/material-scala-1205 | /Twitter/Finagle/example-6-php/example-get.php | UTF-8 | 1,312 | 2.65625 | 3 | [] | no_license | <?php
// Setup the path to the thrift library folder
$GLOBALS['THRIFT_ROOT'] = 'thrift';
// Load up all the thrift stuff
require_once $GLOBALS['THRIFT_ROOT'].'/Thrift.php';
require_once $GLOBALS['THRIFT_ROOT'].'/protocol/TBinaryProtocol.php';
require_once $GLOBALS['THRIFT_ROOT'].'/transport/TSocket.php';
require_once... | true |
127aaa272516b32f30b074ca4615ba98718cf9b7 | PHP | anuwas/TMX_TMT | /models/Contact.php | UTF-8 | 1,493 | 2.671875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "contact".
*
* @property integer $contact_id
* @property string $contact_name
* @property string $phone
* @property string $email
* @property string $subject
* @property string $message
* @property integer $active
* @property str... | true |
42b844136d798b44d6918068e43d99e35d1f5afc | PHP | aleasweb/points | /src/Entity/DirectionPool.php | UTF-8 | 1,450 | 3.109375 | 3 | [] | no_license | <?php
namespace App\Entity;
class DirectionPool
{
/**
* @var array of Direction
*/
private $pool = [];
/**
* @param Direction $direction
*/
public function set(Direction $direction) {
$this->pool[] = $direction;
}
public function clear() {
$this->pool = []... | true |
bf6613a0eb3f2772b2ff46096baa1f5500867359 | PHP | vanclei/mvc | /core/router/Router.php | UTF-8 | 637 | 3 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: vancleipicolli
* Date: 15/01/2016
* Time: 13:24
*/
class Router{
private $routes = [];
private $notFound;
public function __construct(){
$this->notFound = function($url){
echo "404 - $url was not found!";
};
}
public function add($url, $action){
$this->rou... | true |
1933f774966a900a7f85a330ce2e20b6749143af | PHP | edusgroup/FlameCore | /engine/core/classes/seo/blog/weblogUpdates.php | UTF-8 | 3,655 | 2.90625 | 3 | [] | no_license | <?php
namespace core\classes\seo\blog;
/**
* Description of weblogUpdates
* @see Протокол Weblogs.Com XML-RPC interface
*
* @see http://api.yandex.ru/blogs/doc/indexation/appendices/weblogping-sample.xml
* Каждый раз при появлении новой записи на блогохостинге нужно посылать Яндексу специальное сообщени... | true |
8b4dd5bfb53494e5df403601a5a7a265cf523d7f | PHP | aphiria/aphiria | /src/Console/src/Output/Compilers/Elements/Element.php | UTF-8 | 532 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Aphiria
*
* @link https://www.aphiria.com
* @copyright Copyright (C) 2023 David Young
* @license https://github.com/aphiria/aphiria/blob/1.x/LICENSE.md
*/
declare(strict_types=1);
namespace Aphiria\Console\Output\Compilers\Elements;
/**
* Defines an output element
*/
final readonly class ... | true |
52f44f75e3ac830548bee5635861e4f963a47545 | PHP | hamakou108/leetcode | /php/src/ContainsDuplicate/Solution.php | UTF-8 | 451 | 3.3125 | 3 | [] | no_license | <?php
namespace ContainsDuplicate;
use phpDocumentor\Reflection\Types\Integer;
class Solution
{
/**
* @param Integer[] $nums
* @return Boolean
*/
function containsDuplicate($nums) {
sort($nums);
$tmp = NULL;
foreach ($nums as $num) {
if ($tmp !== NULL && ... | true |
746e3ce529ee23f927211329c9ff5fe9ef967e9d | PHP | wander2k/elle_mag_test | /webapp/tests/acceptance/ElleMobileMainPage.php | UTF-8 | 2,279 | 2.53125 | 3 | [] | no_license | <?php
class ElleMobileMainPage
{
private $baseUrl = "";
private $I = null;
public function __construct($baseUrl, $I)
{
$this->baseUrl = $baseUrl;
$this->I = $I;
}
public function registerMailOnElle() {
$I = $this->I;
$I->wantTo("Elleトップページへ。");
$I->amOn... | true |
ec2e91ff91c75c3c5187eacf616f1445c3927df4 | PHP | 145212/file_upload | /grading_check.php | UTF-8 | 2,060 | 2.515625 | 3 | [] | no_license | <?php
session_start();
session_regenerate_id(true);
if(isset($_SESSION['login'])==false){
print'ログインされていません。<br />';
print'<a href="student_login.html">ログイン画面へ</a>';
exit();
}
require_once('common.php');
$post=sanitize($_POST);
$dsn='mysql:dbname=file_upload;host=localhost';
$user='root';
$password='t... | true |
2334f3da0c4af1ac874ff73a737b84f262a4fd3e | PHP | ldLirn/CMS | /Application/Admin/Model/MemberModel.class.php | UTF-8 | 6,229 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: YG
* Date: 2017/3/2
* Time: 16:17
*/
namespace Admin\Model;
use Think\Model;
class MemberModel extends Model{
protected $tableName = 'admin' ; //指定表名
const KEY = 'srHfW%0${.,x=r(<}pVz!bRJ9Om?]-5)oAwdB[X&#'; //加密KEY
/* 用户模型自动验证 */
protected $_validate = a... | true |
19e3d1bca19b5ff979aeb8af21a4e1eb8e85ada9 | PHP | stel89/mathematic-test | /app/Http/Controllers/MainController.php | UTF-8 | 4,569 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Country;
use App\Language;
use App\City;
class MainController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index(Request $request)
{
... | true |
682963da45f5796fbedb0cf51502f322cb59cd76 | PHP | alex77520/CI3RABC | /application/libraries/User.php | UTF-8 | 2,269 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php defined('BASEPATH') OR exit('No direct script access allowed');
/**
* user class
*
* Manage logged user information.
*
* @package CodeIgniter
* @subpackage Library
* @category Library
* @author Charles(xiezhenjiang@foxmail.com)
* @license http://www.gnu.org/licenses/gpl.h... | true |
481fd69df6f87c62bf3debcb6d501f8bbb43c252 | PHP | j-lindb73/ramverk1 | /src/Weather/WeatherGeoLocation.php | UTF-8 | 1,772 | 2.671875 | 3 | [] | no_license | <?php
namespace Lefty\Weather;
use Anax\Commons\ContainerInjectableInterface;
use Anax\Commons\ContainerInjectableTrait;
// use Anax\Route\Exception\ForbiddenException;
// use Anax\Route\Exception\NotFoundException;
// use Anax\Route\Exception\InternalErrorException;
/**
*
*
*/
class WeatherGeoLocation implements... | true |
d46300445abef561c827acb7a5f61f3d7bcb9fea | PHP | vjssodhi/acc_v1 | /module/Application/src/Application/Model/Interfaces/TimeLoggerInterface.php | UTF-8 | 330 | 2.765625 | 3 | [] | no_license | <?php
namespace Application\Model\Interfaces;
interface TimeLoggerInterface
{
public function getUpdatedOn();
public function setUpdatedOn($updatedOn);
public function getCreatedOn();
public function setCreatedOn($createdOn);
public function logDatesOnCreate();
public function logDatesOnU... | true |
d1afcb2faa9b61631f00750f228915695231c17c | PHP | Morning-Train/wp-database | /src/Cli/view-components/Task.php | UTF-8 | 499 | 2.65625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Illuminate\Console\View\Components;
use Symfony\Component\Console\Output\OutputInterface;
use Throwable;
class Task
{
public function __construct(public $message)
{
}
public function render($description, $task = null)
{
try {
... | true |
cf23dd6f2f94a2bb7c5cb12ca0452a74afe72458 | PHP | strangerAshik/AIMS | /app/database/migrations/2015_02_11_193321_qualification_training_ojt.php | UTF-8 | 1,073 | 2.53125 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class QualificationTrainingOjt extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('qualification_training_ojt',function($table){
//Training/Workshop
$... | true |
02a17c352c8d7db0233f596e6a82123b932adf19 | PHP | TimeOfDying/WebTask | /models/Users.php | UTF-8 | 1,457 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use yii\web\IdentityInterface;
/**
* This is the model class for table "Users".
*
* @property int $id
* @property string $username
* @property string $password
* @property string $First_name
* @property string $Second_name
* @property string $Last_name
* @property string $Status
... | true |
6820d55d6355de40848c96bb8c00cbdc2169b2eb | PHP | adonnelly759/dylansicecream | /app/Controllers/AdminSprinkles.php | UTF-8 | 2,863 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Controllers;
use App\Models\Item;
use App\Models\User;
use CodeIgniter\Controller;
class AdminSprinkles extends BaseController {
public function manage(){
$user = new User();
$data['isLogged'] = ($user->user_exists($this->session->email) && !empty($this->session->email)) ? true... | true |
3ed41a316f7bcb07a108620e2b353153e83edad9 | PHP | HrishikeshKarale/Neyon-Schap | /guest.php | UTF-8 | 1,301 | 2.5625 | 3 | [] | no_license | <?php
include 'functions.php';
$errors =array();
if(isset($_POST['gbname']) && isset($_POST['gbemail']) && isset($_POST['gbmessage']))
{
$gbname = mysql_real_escape_string(htmlentities($_POST['gbname']));
$gbemail = mysql_real_escape_string(htmlentities(... | true |