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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
50e95315f99f75050029dc0e0bef383c836bcf37 | PHP | igormenezes/desafio-cells-grid | /index.php | UTF-8 | 2,205 | 3.328125 | 3 | [] | no_license | <?php
class ConexaoCelulasEmGrade{
private $area;
private $areaRepetida;
private $contador_regioes = [];
private $contador = 0;
public function verificarMatriz(){
$input = fopen("php://stdin", "r");
//$input = fopen('input.txt', "r");
$quantidade_linhas = fgets($input);
... | true |
42f88263b5a5bf1ec3daffd93c75ca0e553d86f5 | PHP | thanhnew2000/du-an-ldtbxh-hn | /app/Http/Requests/RegisterAccount.php | UTF-8 | 2,309 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class RegisterAccount extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get t... | true |
8db2dc0783f3020e2ee76f320938362d01492a21 | PHP | chcarpentier/Projet-velo | /VeloApp/src/Models/Stock.php | UTF-8 | 1,981 | 3 | 3 | [] | no_license | <?php
class Stock
{
private $idstock;
private $quantite_stock;
private $ville_idville;
private $article_idarticle;
public function __construct($idstock, $quantite_stock, $ville_idville, $article_idarticle)
{
$this->idstock = $idstock;
$this->quantite_stock... | true |
23985affd821f0f1bd8cd810e1d4f0bfa9654741 | PHP | humanmade/extendable-aggregator | /inc/syncable/class-term.php | UTF-8 | 12,435 | 2.640625 | 3 | [] | no_license | <?php
namespace EA\Syncable;
use EA;
use EA\CanonicalLookup;
/**
* Class Term
* @package EA\Syncable
*/
class Term extends Base {
/**
* @public string $name name of the syncable
*/
static $name = 'term';
/**
* @public array $sync_hooks The actions/filters uses to trigger syncing of a syncable object
... | true |
ebdded3df5eaeecc074355918abc4b3335de0790 | PHP | sonypiay/client_consultant | /app/Database/EventSchedule.php | UTF-8 | 3,194 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Database;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class EventSchedule extends Model
{
public $timestamps = true;
public $incrementing = false;
protected $table = 'event_schedule';
protected $primaryKey = 'evt_id';
private function generateId()
{
... | true |
17b516de50464ef8ddd55edb391d2286b8dabc94 | PHP | raw34/hfPatterns-php | /factory/pizzaaf/Pepperoni.class.php | UTF-8 | 65 | 2.53125 | 3 | [] | no_license | <?php
interface Pepperoni {
public function __toString ();
}
| true |
e201d82c30fa7d7cdef7a51e9da08672563068c4 | PHP | lucky0137/learnku | /app/Models/User.php | UTF-8 | 2,432 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Support\Facades\Auth;
use Spatie\Permission\Traits\HasRoles;
use Tymon\JWTAuth\Contracts\JWTSubject;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable implements JWTSubject
{
use HasRoles;... | true |
46c222bf7d58806a77ef5f3ea97756552a84a8e1 | PHP | UPTAEB/Investigacion | /ProyectoFinalOscar/Modelos/investigaciones-modelos.php | UTF-8 | 11,852 | 2.703125 | 3 | [] | no_license | <?php
require_once 'conexion.php'; //incluimos el archivo de php de conexion
// heredamos la clase conexion
class Investigaciones extends Conexion
{
//definimo los atributos de nuestra clase
protected $id_investigacion;
protected $id_grupo;
protected $id_linea_investigacion;
protected $nombre;
prote... | true |
dd83868e43d46385678fbd6ed624547c5aff652d | PHP | Hanchengluo/zhcms | /zh/Common/Model/ShopConfigModel.class.php | UTF-8 | 2,927 | 2.625 | 3 | [] | no_license | <?php
/**
* 用户管理模型
* Class UserModel
*/
class ShopConfigModel extends ViewModel {
public $table = "shop_config";
public function __init()
{
include (COMMON_LANGUAGE_PATH . 'Model'.DS.'ShopConfig'.DS.$_SESSION['language'] . '.php');
}
/**
* 获得设置信息
*
* @param arra... | true |
f37d371e923391f86cfed0202e2bbb2a87a91cac | PHP | phanideepthi/online_blood_bank_website | /order.php | UTF-8 | 2,353 | 2.5625 | 3 | [] | no_license | <?php
/*********************************/
/* filename: admin/order.php */
/* infor: order list */
/*********************************/
include "../config.inc.php"; //config file
//include "config.inc.php"; //configure file
include "header.inc.php"; //admin header
$each_page = EACH_PAGE; ... | true |
d4e00c68dfcfe1aac80fa6822286cf750114a8f7 | PHP | WilliamD-s/Postagens | /app/Controller/AdminController.php | UTF-8 | 3,471 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
class AdminController{
public static function route($index = ""){
$link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
if(strpos($link,"?pagina=") == false){
$link .= "?pagina=home";
}else{ ... | true |
d72cf8b2c514b0b4bbe439e555417b90f98298d4 | PHP | BrianOn99/pollpoll2720 | /ajax/add_event.php | UTF-8 | 1,461 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/*
* The code here handle ajax image upload
* Referance: https://gist.github.com/ebidel/2410898
*/
session_start();
require_once "../classes/event.php";
$user = new User(User::name2id($_SESSION["user_name"]));
// the 2nd parameter true let us assess data as assoc array
$data = json_decode($_REQUEST["metada... | true |
75d9a82f7501619e0d2c7f6b1407a54649319cb8 | PHP | thiagodp/traits | /tests/GetterBuilderTest.php | UTF-8 | 510 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace phputil\traits\tests;
require_once 'vendor/autoload.php';
use \PHPUnit_Framework_TestCase;
use \phputil\traits\GetterBuilder;
class Immutable {
use GetterBuilder;
private $name;
function __construct( $name ) {
$this->name = $name;
}
}
/**
* Tests GetterBuilder.
*
* @author Thiago Delgado P... | true |
961c96520159360f7148d8c16e2d232fe4a8c945 | PHP | hinson0/hxyj | /app/Http/Controllers/Admin/NinePatchesController.php | UTF-8 | 4,836 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Admin;
use App\Models\NinePatch;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
class NinePatchesController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
... | true |
fa57f9ae9c728be2598c3117f4629ba81b97cf1b | PHP | sed-internatinal/sed | /src/TranslationBundle/Entity/Campo.php | UTF-8 | 3,570 | 2.65625 | 3 | [] | no_license | <?php
namespace TranslationBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Campo
*
* @ORM\Table(name="campo")
* @ORM\Entity(repositoryClass="TranslationBundle\Repository\CampoRepository")
*/
class Campo
{
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @O... | true |
7fee0e21b47454d5b3bc91b8d84d426540773b63 | PHP | arxanas/schmacebook | /register.php | UTF-8 | 3,696 | 2.78125 | 3 | [] | no_license | <?php
ob_start();
require_once("classes/user.php");
$vars = array ("username" => "", "password" => "", "confirm" => "", "first_name" => "", "last_name" => "", "email" => "");
$errors = array();
foreach ($vars as $key => $value) {
$vars[$key] = escape($_POST["r_".$key."_txt"]);
//if a value wasn't given
if ($vars[$ke... | true |
96b257e75fdf5094e565052544250267460bc454 | PHP | inerciacreativa/twist | /engine/Service/Core/ImageSearch/Module/YouTubeModule.php | UTF-8 | 1,360 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Twist\Service\Core\ImageSearch\Module;
use RuntimeException;
use Twist\Library\Api\Client\YouTubeClient;
use Twist\Library\Support\Arr;
/**
* Class YouTubeModule
*
* @package Twist\Service\Core\ImageSearch
*/
class YouTubeModule extends VideoModule
{
/**
* @inheritdoc
*
* @see http://stac... | true |
ecea187fb0258273a1a50a7259e222bd8877bbc3 | PHP | costinistor/costinistor | /inc/form.php | UTF-8 | 3,492 | 2.9375 | 3 | [] | no_license | <?php
// Contact form in page
/*
$contactMessage = '';
if(filter_has_var(INPUT_POST, 'submit')){
$name = htmlspecialchars($_POST['name']);
$email = htmlspecialchars($_POST['email']);
$subject = htmlspecialchars($_POST['subject']);
$message = htmlspecialchars($_POST['message']);
... | true |
2b96573a265631149c2af0b114c0aa623aa0277f | PHP | glasgowphp/site | /module/Strayobject/News/NewsUpcoming.php | UTF-8 | 1,631 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
namespace Module\Strayobject\News;
use Module\Strayobject\News\NewsSortByDate;
use Module\Strayobject\News\NewsListInterface;
/**
* This is experimental functionality
*/
class NewsUpcoming
{
/**
* @var NewsListInterface
*/
private $newsList;
public function __construct(NewsListInterfac... | true |
79d59e0efce16f6f9b13bf3217cbbb5a81be9d3a | PHP | lezhnev74/Eximporter | /src/Exceptions/BadFile.php | UTF-8 | 510 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace Eximporter\Exceptions;
use Exception;
/**
* Class BadFile
* Detects bad input file
*
* @package Eximport\Exceptions
*/
class BadFile extends Exception
{
protected $input_file;
public function __construct($input_file, $message, $code, Exception $previous = null)
{
$this->input_file = $inpu... | true |
b3d58d9e52d662f49958b563cc435468c16f9958 | PHP | salihbasakk/todo | /src/Event/MemcacheEvent.php | UTF-8 | 592 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: salih
* Date: 19.02.2019
* Time: 14:08
*/
namespace App\Event;
use Symfony\Component\EventDispatcher\Event;
class MemcacheEvent extends Event
{
const NAME = 'memcache.clear';
/**
* @var string
*/
private $memcacheKey;
/**
* @return strin... | true |
11a20a82724a6e597271f099ad104a4111c8c2b2 | PHP | novadwisetya/OOP | /exOop.php | UTF-8 | 1,981 | 3.78125 | 4 | [] | no_license | <?
// Interface
interface fungsiAlat {
public function menulis();
public function menggambar();
}
class alatTulis{
// Encaptulation
private $tipe;
private $merk;
private $harga;
// Constructor
function __construct( $t, $m, $h ) {
$this->tipe = $t;
$this->merk = $m;
$this->harga = $h;
}
... | true |
c51c6a2a8a3d0e5e12f6526dd52d86d62ade4de4 | PHP | ronanhigg/quizzle | /fuel/app/classes/model/advertiser.php | UTF-8 | 624 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
class Model_AdvertiserException extends Exception {}
class Model_Advertiser extends KinveyModel
{
public static $kinvey_name = 'advertisers';
public static $field_name = 'advertiser';
protected static function validate($params)
{
if ( ! array_key_exists('name', $params) || ! ... | true |
0bedf4328cf9da434500fb0329d489b50c8a4f41 | PHP | pedrocorin/aprendendophp | /if_else_02.php | UTF-8 | 167 | 3.59375 | 4 | [] | no_license | <?php
/** Script de teste IF e ELSE em PHP
* By Pedro Corin */
$a = 3;
$b = 2;
if($a < $b){
echo"$a é menor do que $b";
}else{
echo"$a é maior do que $b";
}
?>
| true |
e974840aa32d4b6cf5b969c80148cff88c569b57 | PHP | lluistfc/ddd-blog | /src/Blog/Application/Command/Post/RetrievePostCommand.php | UTF-8 | 1,064 | 3 | 3 | [] | no_license | <?php
namespace Blog\Application\Command\Post;
use Blog\Application\Command\CommandInterface;
use Blog\Application\Queries\Post\PostQueries;
use Blog\Application\Repository\PostQueriesInterface;
use Blog\Domain\DataObject\Identifier\Identifier;
use Blog\Domain\Entity\Post;
use Blog\Domain\Exceptions\Validation\Invalid... | true |
58fa0555abfa4dbfaa60f093dc207accb1f14fa2 | PHP | prismistim/twitter_super_search | /getTweet.php | UTF-8 | 5,045 | 2.625 | 3 | [] | no_license | <?php
date_default_timezone_set('Asia/Tokyo');
$resultPage = 5;
// 認証情報の読込先
if (getenv('ENV_MODE') === 'dev'){
require 'oauthLocal.php';
}else{
require 'oauthServer.php';
}
if (isset($_GET['text'])){
$searchWords = $_GET['text']; // キーワードを取得
$optionType = $_GET['options']; // 検索したいものを取得
$subOptionType = $_... | true |
75de0f4e37e8c6605050ce9776338f8022823662 | PHP | ramshresh/dmis | /common/components/response/formatter/geojson/GeoJson.php | UTF-8 | 1,067 | 2.8125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\components\response\formatter\geojson;
use Yii;
/**
* Interface to generate geojson file
*/
class GeoJson
{
/**
* List of items to output
* @var array
*/
private $_items = [];
/**
* @param Object $object
* @return void
*/
public function add($obj... | true |
1593d8e1d6f558cb308d834ff143b48bc7eacd1e | PHP | boxtar/reminders | /app/Controllers/Reminders/CreateReminderController.php | UTF-8 | 1,170 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Controllers\Reminders;
use App\Controllers\Controller;
use App\Domain\Reminders\ReminderData;
use App\Domain\Reminders\Actions\CreateOrUpdateReminderAction;
use Psr\Http\Message\{
ServerRequestInterface as Request,
ResponseInterface as Response
};
class CreateReminderController extends Co... | true |
50a060a523afc1f8276d9860c0f4c3b905e9bbe6 | PHP | hyb90/customer | /app/Http/Controllers/Employees/EmployeeStatuses/EmployeeStatusesController.php | UTF-8 | 3,345 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Employees\EmployeeStatuses;
use App\Helpers\Helpers;
use App\Domain\Employees\EmployeeStatuses\Actions\CreateEmployeeStatusAction;
use App\Domain\Employees\EmployeeStatuses\Actions\DeleteEmployeeStatusAction;
use App\Domain\Employees\EmployeeStatuses\Actions\UpdateEmployeeStatus... | true |
bdd61032527a70cc4d244e7bb88c340ae8b898bc | PHP | korobovn/roadrunner-laravel | /src/Middleware/SetServerPortMiddleware.php | UTF-8 | 877 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace AvtoDev\RoadRunnerLaravel\Middleware;
use Closure;
use Illuminate\Http\Request;
class SetServerPortMiddleware
{
/**
* Handle an incoming request.
*
* @param Request $request
* @param Closure $next
*
* @see \Illuminate\Http\Request::url()
* @see \Symfony\Componen... | true |
b131b99a2cb4fd3a39e0dc324c7fd558bb520395 | PHP | andyra/telco-theme | /templates/content-page-leadsheets.php | UTF-8 | 1,589 | 2.75 | 3 | [] | no_license | <?php while (have_posts()) : the_post(); ?>
<?php // Convert URL parameter string to array of integers
$tracks = str_getcsv($_GET['tracks']);
$track_ids = array_map(
create_function('$value', 'return (int)$value;'),
$tracks
); ?>
<div>
<section class="setlist">
<h1>Setlist</h1>
<ol>
... | true |
5a606abe5ec05a8b55daa8947763e9283e2ba04a | PHP | kfiatos/simple-ddd-api | /src/Products/Infastructure/Http/ProductController.php | UTF-8 | 3,087 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Products\Infastructure\Http;
use App\Products\Application\Create\ProductCreateCommand;
use App\Products\Application\Find\ProductFinder;
use App\Products\Domain\Dto\NewProductDto;
use App\Products\Domain\ValueObject\Name;
use League\Tactician\CommandBus;
use Psr\Log\LoggerInterface;
use Symfony\Bun... | true |
802393e4084974ac09bc2f6d846d4446bda9d5ab | PHP | jkiwanuka38/Phart_group | /database/seeds/ProductsTableSeeder.php | UTF-8 | 2,011 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Product;
class ProductsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
// bulbs
for ($i=1; $i <= 10; $i++) {
Product::create([
'name' => 'bul... | true |
8495932cd61892ba5db63ddc199133f3d913ba2d | PHP | LAGS30/POS-Restaurant | /inventario/list.php | UTF-8 | 2,209 | 2.5625 | 3 | [] | no_license | <?php
if (isset($_REQUEST["tipo"])) {
$tipo = $_REQUEST["tipo"];
} else {
$tipo = 1;
}
?>
<div class="grid_5" align="center">
<?php
$sql="SELECT * FROM inf_tipos";
$rs=mysql_query($sql,$db);
while ($row=mysql_fetch_object($rs)) { ?>
<a href="<?php echo $_SERVER["PHP_SELF"]."?tipo=$row->id_tipo" ?>"><button id="... | true |
df26b5c698e2f4d094e4ab58cfc00f3769307b67 | PHP | steview/moojon | /0.3/classes/moojon.base.route.class.php | UTF-8 | 1,262 | 2.75 | 3 | [] | no_license | <?php
abstract class moojon_base_route extends moojon_base {
protected $pattern;
protected $patterns;
protected $params = array();
final public function __construct($pattern, $params = array()) {
$this->pattern = $pattern;
$this->patterns = explode('/', $this->pattern);
$this->params = $params;
$this->ini... | true |
457c8a4100d707fa262c59b3c59ce7ae3a984584 | PHP | dangkhoa221195/dangkhoa221195.github.io | /Docfile/fopen.php | UTF-8 | 294 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
$filename = basename($_POST['file']);
$fp = @fopen($filename, "r");
// Kiểm tra file mở thành công không
if (!$fp) {
echo 'Mở file không thành công';
}
else
{
// Lặp qua từng ký tự để đọc
while(!feof($fp))
{
echo fgetc($fp);
}
}
?> | true |
aa1fc466e6a04e0a374114fba443d82caafcf9ac | PHP | Symfony-Plugins/diemPlugin | /dmCorePlugin/lib/view/html/dmTableTag.php | UTF-8 | 2,250 | 2.84375 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
class dmTableTag extends dmHtmlTag
{
protected
$head,
$body,
$foot;
protected static
$toggler;
public function __construct()
{
$this->initialize();
}
protected function initialize(array $options = array())
{
parent:: initialize($options);
$this->head = $this->body ... | true |
af93b3a70fabd1ac8511263ea3aa85b9b344c3b8 | PHP | okmarq/newcashpoint | /object/forum.php | UTF-8 | 2,573 | 3.4375 | 3 | [] | no_license | <?php
// use readOne to get a data from row if something in its like breaks
class Forum{
private $conn;
private $table_name = "forums";
// object properties
public $id;
public $created;
public $modified;
// constructor
public function __construct($db){
$this->conn = $db;
}
public function showErr... | true |
52c27abbac402951bd50d0dc90b36e02ee4b8969 | PHP | Jaeggel/AppPerros | /application/controllers/PerrosStrategy.php | UTF-8 | 244 | 2.859375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
abstract class PerrosStrategy {
//STRATEGY
private $miAlgoritmo;
public function setAlgoritmo($a){
$this->miAlgoritmo = $a;
}
public function adoptar(){
$this->miAlgoritmo->adoptarse();
}
} | true |
463443d36f2190a75ac00bbaa381a4d697c460c0 | PHP | sydneyme/psalm | /src/Psalm/Provider/FileProvider.php | UTF-8 | 1,678 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Psalm\Provider;
use PhpParser;
use Psalm\Checker\ProjectChecker;
class FileProvider
{
/**
* @param string $file_path
*
* @return string
*/
public function getContents($file_path)
{
return (string)file_get_contents($file_path);
}
/**
* @param str... | true |
25ec7c9f8a65c096f60d868adf36a4e809149ffc | PHP | Droid-M/FirstTraining_EcompJr_Complete | /models/User.php | UTF-8 | 8,905 | 3.15625 | 3 | [] | no_license | <?php
define("imgExtension", ".extensaoQualquer");
/**
* Entidade responsavel por alterar dados contidos no banco de dados
* @author Marcos Vinicius F. dos Santos
* @author EcompJr
* @access public
*
*/
class User{
private $id;
private $name;
private $email;
private $type;
private $password;... | true |
75b26d5fd9845472dd3becd9558776a09e9a7768 | PHP | bijay-khatri/CI3-CRUD-DEMO | /application/views/products/list.php | UTF-8 | 987 | 2.546875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Products</title>
</head>
<body>
<table>
<thead>S.No</thead>
<thead>Name</thead>
<thead>Description</thead>
<thead>Price</thead>
<thead>Category</thead>
... | true |
54a45a9a0e58f8718ce0d04305170e968268b470 | PHP | buckdalao/chat-server | /app/Repositories/Tool/ExpressionRepository.php | UTF-8 | 533 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Tool;
use App\Models\Tool\Expression;
use App\Repositories\EloquentRepository;
class ExpressionRepository extends EloquentRepository
{
public function __construct(Expression $expression)
{
$this->model = $expression;
}
/**
* 获取表指定列的全部有效数据
*
* ... | true |
718c243c951bc2d755d253527d4927579967d0dd | PHP | vstrog/php | /phpscripts/17.php | UTF-8 | 205 | 3.75 | 4 | [] | no_license | // another array list
<?php
//create an array
$simpson[1] = "Homer";
$simpson[2] = "Marje";
$simpson[3] = "Bart";
$simpson[4] = "Lisa";
$simpson[5] = "Santa's Little Helper"; | true |
c192d773822cce8c035a6a67bb709f88e6f0cb4f | PHP | Typemuscle/RevampKensyu | /models/Session.class.php | UTF-8 | 1,621 | 2.9375 | 3 | [] | no_license | <?php
namespace pokemon\models;
class Session extends Table
{
private $session_key = '';
public function __construct()
{
//セッションスタート
session_start();
//セッションIDを取得する
$this->session_key = session_id();
//DBの登録
parent::__construct();
$this->setTable('s... | true |
58fd807be8be35f2673ff598ec41820efe1ed69e | PHP | ThomasMoraes02/doadores | /src/helpers/Helper.php | UTF-8 | 640 | 2.890625 | 3 | [] | no_license | <?php
Trait Helper
{
//Carrega a página e passa as variáveis extraindo de um array associativo
public function loadView($view, $data = NULL)
{
extract($data);
require_once __DIR__ . "/../views/template/header.php";
require_once __DIR__ . "/../views/$view.php";
require_once... | true |
f4c5ed7819e1f3e7bc763f3cb892778f7c09c2bb | PHP | haozhaofei/cwu_14 | /zhangqingmin/JavaScript09/EXE/4.php | UTF-8 | 115 | 2.6875 | 3 | [] | no_license | <?php
$name = $_GET['name'];
if(in_array($name,array("李甜媛","叶梦晗"))){
echo "yes";
}else{
echo "no";
} | true |
4d86af28c88faa5564ff95a65869180a459f1f5e | PHP | InnaGutsaliuk/MySite | /modules/game/main.php | UTF-8 | 784 | 2.828125 | 3 | [] | no_license | <?php
if(isset($_POST['start'])){
$_SESSION['client'] = 10;
$_SESSION['server'] = 10;
unset($_POST['start']);
}
if(isset($_SESSION['client'], $_SESSION['server'])){
if(isset($_POST['client'])){
if($_POST['client']>=1 && $_POST['client']<=3){
$client = $_POST['client'];
$... | true |
d1881ddcfb0f1ebf0590a820c648abf9b2973993 | PHP | rubex01/framework | /Framework/Migrations/Migrations.php | UTF-8 | 803 | 3.140625 | 3 | [] | no_license | <?php
namespace Framework\Migrations;
use Framework\Database\Database;
class Migrations
{
/**
* Contains database connection
*
* @var object $database
*/
public $database;
/**
* Contains query to be executed
*
* @var string $query
*/
public $query;
/**
... | true |
bde6ef24308890653ba67ee4678c174d74864bb8 | PHP | mbrick02/mbgal | /photo_gal/includes/emailer.php | UTF-8 | 1,523 | 2.734375 | 3 | [] | no_license | <?php
require_once (LIB_PATH.DS.'database.php');
// *** also requires PHPMailer which should be included in initialize
class Emailer extends DatabaseObject { // ****UNTESTED BASED ON comment.php
public function try_send_notification() {
$mail = new PHPMailer();
$mail->IsSMTP();
// DEBUG ONLY comment out other... | true |
0cf88ec0a502cc4a0d8827d4df59caa6dda9280a | PHP | slyxster/fusionpro | /fusionSDK/src/EnumType/JobStatus.php | UTF-8 | 1,571 | 2.671875 | 3 | [] | no_license | <?php
namespace EnumType;
use \WsdlToPhp\PackageBase\AbstractStructEnumBase;
/**
* This class stands for JobStatus EnumType
* Meta information extracted from the WSDL
* - nillable: true
* - type: tns:JobStatus
* @subpackage Enumerations
*/
class JobStatus extends AbstractStructEnumBase
{
/**
* Constan... | true |
71777cf5c3b1a51b08e9a6d9407dc3b19b531c1b | PHP | srizzling/glastopf-webdashboard | /app/database/migrations/2014_08_29_122405_create_attack_table.php | UTF-8 | 749 | 2.59375 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateAttackTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('attacks', function(Blueprint $table)
{
$table->increments('id');
$table->... | true |
b09d43f9c4de54b69468f9c57b6357b4fae625c5 | PHP | TanzimIbthesam/PHP--All-in-One- | /OOP/index.php | UTF-8 | 572 | 3.71875 | 4 | [] | no_license | <?php
/*
Class-Defines what an object is the properties or characterestics a class can have
Object-Instance of a class
*/
class Person{
public $name;
public $age;
public function hello(){
echo "My Name is Tanzim";
}
public function __construct($name,$age){
$this->name=... | true |
a923125e4ed074027dc4edf6f42c08d38c10b08d | PHP | yuriyoung/mclarm | /database/factories/UserFactory.php | UTF-8 | 1,738 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/** @var \Illuminate\Database\Eloquent\Factory $factory */
use Faker\Generator as Faker;
use Illuminate\Support\Str;
/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory sh... | true |
31efdb9e68d5d143cfba81c410001236cafb242c | PHP | miglekras/namudarbai-1 | /functions/nfq.php | UTF-8 | 87 | 2.609375 | 3 | [] | no_license | <?php
function calculateHomeWorkSum(... $numbers)
{
return array_sum($numbers);
}
| true |
75366c43118b603d80af2ab2972210a76782110c | PHP | greysocstyles/ama_capstone_2020 | /pages/request_to_open_student_list-2.php | UTF-8 | 2,435 | 2.5625 | 3 | [] | no_license | <?php
if (isset($_GET['v_id'])) {
$petition_id = $_GET['v_id'];
$petition_subject = query(" SELECT sl.subject_code
FROM request_to_open_list rto
inner join subject_list sl
on rto.subject_id = sl.id
where rto.id = '$petition_id'");
$petition_student_list = query("SELECT
... | true |
dabef0d739bee2941e3de959a61724213f642da3 | PHP | ligiacavallini/simple_rest_api | /api/Library/Core/Master/Suport/Pdo.php | UTF-8 | 1,748 | 2.6875 | 3 | [] | no_license | <?php
namespace Library\Core\Master\Suport;
class Pdo {
protected function getCampos(Array $campos) {
$save['sql']='';
foreach ($campos as $key => $value) {
$save['sql'].='`'.$key.'` = :'.$key.', ';
$save['save'][':'.$key]=$value;
}
$save['sql'] =... | true |
a5ee03473e510e3f6982b2916a481de9fa100a3d | PHP | fernandobco/UdemyPHP7 | /funcao/exemplo05.php | UTF-8 | 222 | 2.53125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: fbco_
* Date: 22/07/2018
* Time: 14:18
*/
function trocaValor(&$a){
$a+=50;
return $a;
}
$a=10;
echo $a;
echo "<br/>";
echo trocaValor($a);
echo "<br/>";
echo $a;
?> | true |
43bb12f65708dd3b3654894e33ab1bd026c7b2ae | PHP | ymaksimenko/email_parser_test | /app/core/Router.php | UTF-8 | 1,102 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Core;
class Router
{
private $route;
private $controller;
private $action;
public function __construct()
{
$this->route = include APP_PATH . '/config/routes.php';
}
public function Routing()
{
$path = parse_url($_SERVER["REQUEST_URI"],PHP_URL_PA... | true |
807505b25b64960bbf0a8273b926c88aa9defbda | PHP | oroinc/OroInfinitePayBundle | /Action/Mapper/CaptureRequestMapper.php | UTF-8 | 1,858 | 2.53125 | 3 | [] | no_license | <?php
namespace Oro\Bundle\InfinitePayBundle\Action\Mapper;
use Oro\Bundle\InfinitePayBundle\Action\Provider\ClientDataProvider;
use Oro\Bundle\InfinitePayBundle\Action\Provider\OrderTotalProviderInterface;
use Oro\Bundle\InfinitePayBundle\Action\RequestMapperInterface;
use Oro\Bundle\InfinitePayBundle\Method\Config\... | true |
e4891c8471119da15de6cae455f5c73e6911fb5c | PHP | jirigalis/attendance | /api/src/Application/Actions/Badge/UpdateBadgeAction.php | UTF-8 | 658 | 2.6875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Application\Actions\Badge;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
class UpdateBadgeAction extends BadgeAction
{
/**
* {@inheritdoc}
*/
protected function action(): Response
{
... | true |
739cd858efd55c01b6f4c4526d12b6140d62486e | PHP | dtarcz/northwind-appli-employes | /index.php | UTF-8 | 1,813 | 2.59375 | 3 | [] | no_license | <?php
include 'assets/includes/header.php'; // inclusion du header html
include '../../../connect-bdo.php'; // On se connecte à notre BdD';
?>
<h1>Liste des employés</h1>
<p>
La liste des employés est :
<div>
<?php
// on récup tt le contenu de la table employee... | true |
f5f5488e3dd5ac15a6f9136f3e6d9576bb367e58 | PHP | mugar/aser_english | /app/controllers/salles_controller.php | UTF-8 | 2,459 | 2.546875 | 3 | [] | no_license | <?php
class SallesController extends AppController {
var $name = 'Salles';
function index() {
$this->set('salles', $this->paginate());
}
function _logic($data,$action){
$this->Salle->set($data);
if(!$this->Salle->validates()){
$failureMsg='Le nom de salle et le montant sont obligatoires!';
if($actio... | true |
d7f29c31f1e4214327a4ba8736ed9283ecdf7665 | PHP | LucasMatthes/curso-php | /controle/operadores_relacionais.php | UTF-8 | 924 | 3.875 | 4 | [] | no_license | <div class="titulo">Operadores Relacionais</div>
<?php
var_dump(1 == 1); // true
var_dump(1 > 1); // false
var_dump(1 >= 1); // true
var_dump(4 < 7); // true
var_dump(1 != 1); // false
var_dump(1 <> 1); // false
echo '<br>';
var_dump(111 == '111'); // true
var_dump(111 === '111'); // false
var_dump(111 != '111'); // f... | true |
ca0448d6ac7a0458176746d3e974f521f552b48d | PHP | lalejandro1091/SmartLock | /SmartLock/PI2/php/Admin.php | UTF-8 | 962 | 2.75 | 3 | [] | no_license | <?php
/**
* Description of Admin
*
* @author Gersain Castañeda Muñoz
*/
include_once("User.php");
class Admin extends User
{
// public static function delete($identification)
// {
// return 0;
// }
//
// public function insert()
// {
//
// }
//
// public static function s... | true |
2080e5e98550f19f2ecf93c6625552b689a1030e | PHP | Betaoptics/Web-Palvelinohjelmointi | /Harjoitustehtävä3-3/Harjoitustehtava3-3.php | UTF-8 | 834 | 2.515625 | 3 | [] | no_license | <html>
<head>
<meta charset="UTF-8">
<title>Harjoitukstehtävä 3-3</title>
</head>
<body>
<div style="display: inline-block">
<h1>Rosvo peli</h1>
<?php
session_start();
if(isset($_SESSION["userID"])) {
include... | true |
69d7e1c6b31fd6d00ae2db2a082872270b4ad771 | PHP | bubargain/oakknight | /shop/controller/basecontroller.php | UTF-8 | 1,309 | 2.53125 | 3 | [] | no_license | <?php
namespace shop\controller;
use sprite\mvc\controller;
use \stdClass;
// admin base controller
class BaseController extends Controller {
protected $current_user = array('user_id'=>0, 'user_name'=>'guest');
protected $has_login = false;
public function __construct($request, $response) {
parent::__c... | true |
d210184bb3f62f023e5ae38a3b3574a8e49b02f9 | PHP | Saharien/vein | /inc/Tools.php | UTF-8 | 1,945 | 3.5625 | 4 | [] | no_license | <?php
class MonatJahr
{
private $monat;
private $jahr;
public function __construct($monat, $jahr)
{
$this->monat = $monat;
$this->jahr = $jahr;
}
public function get_monat()
{
return($this->monat);
}
public f... | true |
07acd53804d057f74b6bbd8d3c41934bffc6fcca | PHP | fitriewulan/flashhline | /application/libraries/ringkas.php | UTF-8 | 380 | 2.71875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
/**
*
*/
class ringkas
{
function cutTExt($text, $length, $mode = 2){
if(mode !=1){
$char = $text{$length - 1};
switch ($mode) {
case 2:
while ($char != ' ') {
$char = $text{--$length};
}
case 3:
while ($char != ' ') {
$char = $text{++$length};
}... | true |
8e02edb3ed01eee01a959a8487dceb740c983c91 | PHP | easy-swoole/wechat | /src/OfficialAccount/CustomerService/SessionClient.php | UTF-8 | 3,099 | 2.546875 | 3 | [] | no_license | <?php
namespace EasySwoole\WeChat\OfficialAccount\CustomerService;
use EasySwoole\WeChat\Kernel\Exceptions\HttpException;
use EasySwoole\WeChat\Kernel\ServiceProviders;
use EasySwoole\WeChat\Work\BaseClient;
class SessionClient extends BaseClient
{
/**
* @param string $account
* @return mixed
* ... | true |
61c409f0a04bb8e971e8e53bbb063db1853c550f | PHP | mohamadsdg/php-tut | /06/colorTable.php | UTF-8 | 326 | 2.84375 | 3 | [] | no_license | <?php
echo '<table style="width:100%;height:100%;">' . PHP_EOL;
for ($i = 0; $i <= 20; $i++) {
echo "<tr>" . PHP_EOL;
for ($j = 0; $j <= 20; $j++) {
echo "<td style='background-color: rgb(".rand(0,255).",".rand(0,255).",".rand(0,255).")'> </td>";
}
echo "</tr>" . PHP_EOL;
}
echo "</table>" . PHP... | true |
85e6072013f9bedb62e31fa28e3677f8e2b45c72 | PHP | jamesoncarrwalker/geo_cache_fun | /teams.php | UTF-8 | 8,138 | 2.625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: jamesskywalker
* Date: 28/01/2017
* Time: 21:04
*/
include 'globals.php';
$conn = new connection();
$conn = $conn->connect();
$msg = "";
if(isset($_GET['msg'])){
$msg = $_GET['msg'];
switch($msg){
case 1:
$abusers = $_GET['abusers'];
... | true |
8d3ed3341b73d101cfd3fe0eac9d9613ccf6e161 | PHP | DPradeepa/codingjobs-1 | /PHP/Evaluation Solution/Exercise_4/Part 4/get-car.php | UTF-8 | 456 | 3.015625 | 3 | [] | no_license | <?php
// Grab the id from the URL
$id = (int) $_GET['id'];
// Make sure to get a correct id (greater than 0)
if($id <= 0) {
die('The page you are trying to access doesnt exists. <a href="/">Home page</a>');
}
// Connect to DB and retrieve the specific car.
$conn = mysqli_connect('localhost', 'root', '', 'car_re... | true |
fbe67db4e56e0a8fa2490986a9c8e63c96e30829 | PHP | starlocke/cakephp_parisiens | /Controller/SurveySmsController.php | UTF-8 | 2,690 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
App::uses('AppController', 'Controller');
/**
* SurveySms Controller
*
* @property SurveySm $SurveySm
*/
class SurveySmsController extends AppController {
/**
* index method
*
* @return void
*/
public function index() {
$this->SurveySm->recursive = 0;
$this->set('surveySms', $this->paginate());
... | true |
1e9fb3e29c5eb8e971e6090aa2d47e1164dc22b5 | PHP | jesse1981/govhack2018 | /classes/io.class.php | UTF-8 | 6,807 | 2.625 | 3 | [] | no_license | <?php
$tmp_dir = ini_get('upload_tmp_dir') ? ini_get('upload_tmp_dir') : sys_get_temp_dir();
define('TMP_DIR',$tmp_dir,true);
class io {
public function downloadFile($file, $name, $mime_type='') {
/*
This function takes a path to a file to output ($file),
the filename that the browser will see ($name) and
... | true |
a77c65fe1e59ad957a1e4cb21ebef3b7f35442be | PHP | SkyrayLabs/Skyray | /proto/stream/ProtocolInterface.php | UTF-8 | 671 | 2.9375 | 3 | [] | no_license | <?php
namespace skyray\stream;
/**
* Interface ProtocolInterface
*
* @package skyray\stream
* @since 0.1
*/
interface ProtocolInterface
{
/**
* Called when stream created successfully but the connection is not established yet.
*
* @param $stream
*/
public function connectStream($strea... | true |
5fc6b8667e091cda4a35bb7aaea4d5f95cfea434 | PHP | DeprecatedCode/PHP-Stripe-Payments | /charge.php | UTF-8 | 754 | 2.671875 | 3 | [] | no_license | <?php
require_once('stripe-php/lib/Stripe.php');
// get the single use token from the form submitted by stripeResponseHandler
$token = @$_POST['stripeToken'];
if(strlen($token) < 1)
die('No token to charge');
// set your secret key: remember to change this to your live secret key in production
Stripe::setApiKey... | true |
5db96b3895280a2111ae1d10dbc0396386b6378f | PHP | Eng-HebaEssam/Math | /old_m3a/index.php | UTF-8 | 37,091 | 2.546875 | 3 | [] | no_license | <?php
ob_start();
session_start();
$noNavbar = '';
$pageTitle = 'Homepage';
if (isset($_SESSION['user'])) {
header('Location: profile.php');
}
include 'inital.php';
// Check If User Coming From HTTP Post Request
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
if (isset($_POST['login-up']))... | true |
ce57321bcace4017feb5e03a4aebcd97254a5bf1 | PHP | bradz/bradzevo2 | /www/classes/ships.class.php | UTF-8 | 1,374 | 3.140625 | 3 | [] | no_license | <?php
/**
* @ignore
*/
if( !defined('IN_EVO') ) {
exit;
}
/**
* Ship class. Lumps together information about the ships.
*
* @author morrow
* @version Alpha
*
*/
class ships {
private $ships_id; // array of ship ids
private $ships_name; // array of ship names
private $db;
/**
* Constructor.
*
... | true |
6b7204e7facb6932853988a969d5fdb6c0ea54b7 | PHP | NicolasMura/AToU | /admin/ateliersPhotosMobilesGestion.php | UTF-8 | 13,308 | 2.8125 | 3 | [] | no_license | <?php
include_once ("inc/include.inc.php");
/* ------------------------------------------- Récupération infos création ----------------------------------- */
if(isset($_GET["ID"]))
{
$id = $_GET["ID"];
}
else
{
//header("Location:creationsGestion.php");
}
// Récupération des infos présen... | true |
b8ffa4f9b3590bfed910c5e0548881d016f02f29 | PHP | codesyariah122/Learn-WebDev | /View/Trait/classes/Sapaan.php | UTF-8 | 161 | 2.890625 | 3 | [] | no_license | <?php
trait Sapaan {
public function salam($nama){
$this->nama=$nama;
return
"Assalamu'alaikum? ... {$this->nama}<br>" . PHP_EOL;
}
} | true |
3ad1fc111d9aa24755bfe4b30af6857f22ae20fd | PHP | Minhaj-Khan/day-20 | /app/classes/Student.php | UTF-8 | 1,056 | 3.03125 | 3 | [] | no_license | <?php
namespace App\classes;
class Student
{
public function saveStudentInfo($data)
{
// echo "<pre>";
// print_r($data);
$link=mysqli_connect("localhost","root","","bitm");
// echo "<pre>";
// print_r($link);
$sql="INSERT INTO students(name, email, mobile)VALUES(... | true |
74cfc571662048d40719dec6f315286afc59d9bf | PHP | mokhamad/php-mvc-example | /src/Error.php | UTF-8 | 3,814 | 3.0625 | 3 | [] | no_license | <?php
namespace Core;
use Core\Error;
use Config\Application as AppConfig;
use Exception;
use Error as PHPError;
/**
* Error class
*
* This class is responsible for displaying errors.
*
* @category Errors
* @package Core
* @author Andrej <*.*.com>
* @license http://www.php.net/license/3_01.txt P... | true |
0d53397e9f1bd3a46e3b0749b0b984afeb6749d0 | PHP | grideye/grideyeproject | /Server Code/persontracking.php | UTF-8 | 1,136 | 2.640625 | 3 | [] | no_license | <?php
echo '<meta http-equiv="refresh" content="1">'; //Refresh every 1 minute
echo '<html><body><form action = "http://grideye.no-ip.biz/grideye/" method = "get">';
$resultsArray = json_decode(file_get_contents("http://grideye.no-ip.biz/grideye/webservice.php"), true); //Decodes json object from webservice
... | true |
8c184ff80221a95f853b9d68067e07919c49ad68 | PHP | tf198/plodis | /lib/Plodis/String.php | UTF-8 | 8,706 | 2.640625 | 3 | [] | no_license | <?php
require_once "IRedis_String_2_4_0.php";
class Plodis_String extends Plodis_Group implements IRedis_String_2_4_0 {
protected $sql = array(
'select_key' => 'SELECT item, type FROM <DB> WHERE pkey=?',
'insert_key' => 'INSERT INTO <DB> (pkey, type, item, expiry) VALUES (?, ?, ?, ?)',
'update_key' => 'UPDA... | true |
bef4103b1ede88fea61aa7521663549f86b2fc29 | PHP | mmilojevic/SingleSignOnIdentityProviderBundle | /src/Krtv/Bundle/SingleSignOnIdentityProviderBundle/Manager/LogoutManager.php | UTF-8 | 3,502 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Krtv\Bundle\SingleSignOnIdentityProviderBundle\Manager;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
use Symfony\Component\Routing\RouterInterface;
/**
* Class LogoutManager
* @package Krtv\Bundle\SingleSignOnIdentityProviderBundle\Manager
*/
class LogoutManager
{
const SERVI... | true |
a32bff4436d0713f9fa8e44da443384fa6538279 | PHP | tenarjw/php1 | /basis/ex10.php | UTF-8 | 194 | 3.3125 | 3 | [] | no_license | <?php
$x = 13;
var_dump($x++); // druk 13, potem $x = $x+1
$y = ++$x; // $x i $y zwiększone o 1 (15)
var_dump($x, $y);
$y = $x--; // zmienia się tylko $x (znaki po zmiennej)
var_dump($x, $y);
| true |
dab9d22b8e078f9bcb64458a22caa510754de345 | PHP | Dit81/JSONShop | /lib/JSONClass.php | UTF-8 | 1,716 | 3.234375 | 3 | [] | no_license | <?php
class JSONClass {
function __construct(){}
// json из массива
public $cart = array(
"orderID" => 12345,
"shopperName" => "Ваня Иванов",
"shopperEmail" => "ivanov@example.com",
"contents" => array(
array(
"productID" => 34,
"productName" => "Супер товар",
"quantity" => 1
),
arr... | true |
7a0fabefae7e759244e63f1cec43cd5ba3a1d8bf | PHP | armandojanssen1993/Rock--paper---scissors | /php/RPS.php | UTF-8 | 3,102 | 2.6875 | 3 | [] | no_license | <?php
session_start();
include_once("../Template/class.TemplatePower.inc.php");
$tpl = new TemplatePower("../tpl/index.tpl");
$tpl->prepare();
$rock = "rock";
$paper = "paper";
$scissors = "scissors";
$win = "You win";
$lose = "You lose";
$draw = "draw";
if(!(isset($_POST ['submit'])))
{
$player = NULL;
}
else
{
... | true |
da1cccf227a700d9b4048d969b0d0082eb2790d9 | PHP | afgnsu/tpshop | /App/Home/Model/AddressModel.class.php | UTF-8 | 3,160 | 2.703125 | 3 | [] | no_license | <?php
/**
* 跃飞科技版权所有 @2017
* User: 钟贵廷
* Date: 2017/2/4
* Time: 13:54
*/
namespace Home\Model;
use Think\Model;
class AddressModel extends Model
{
/**
* 处理用户收货信息
* @return array
*/
public function getUserAddressInfo()
{
$addressInfo = $this->where(array('user_id'=>session('user... | true |
98bb3cde3c2bf20dcb4e829a5487c90411e48e03 | PHP | YogaPratama02/php-belajar | /pertemuan5/latihan1.php | UTF-8 | 978 | 3.53125 | 4 | [] | no_license | <?php
// array, yaitu variabel yang dapat memiliki banyak nilai
// array ialah pasangan antara key dan value
// keynya index, yang dimulai dari 0
// membuat array (cara lama),
$hari = array("senin", "selasa", "rabu");
$arr1 = [123, "tulisan", false];
// cara baru
$bulan = ["Januari", "Februari", "Maret"];
// elemen pa... | true |
85a2f705902d093af21d8677a68ab66bd532f91e | PHP | Azurix78/freeads | /application/classes/Model/user.php | UTF-8 | 737 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class Model_User extends Model_Auth_User
{
public static function get_password_validation($values)
{
return Validation::factory($values)
->rule('password', 'min_length', array(':value', 6))
->rule('password_confirm', 'matches', array(':validation', ':field', 'password'));
}
public stat... | true |
3e66d3d3036dea0b4f8e538c6c73864f25303618 | PHP | dubey3250/admission-portal | /admin/show2.php | UTF-8 | 1,223 | 2.609375 | 3 | [] | no_license | <?php
session_start();
if($_SESSION['admin']=="")
{
session_destroy();
header("location:index.php");
}
?>
<?php
mysql_connect('localhost','root','');
mysql_select_db("project");
$query="select *from contact order by id";
$res=mysql_query($query);
?>
<html>
<head>
</head>
<body bgcolor="lightblue">
<table border="... | true |
b625c8da3ca4d050097397740fdeff6c39289b77 | PHP | cyantz7/Laravel-Development | /app/controllers/PasswordResetsController.php | UTF-8 | 2,036 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
class PasswordResetsController extends BaseController {
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
//
}
/**
* Show the form for creating a new resource.
*
* @return Response
*/
public function create()
{
//creating the view to allow use... | true |
5fbcc6b17d140de437e0710f40f07d4e84cf09b2 | PHP | frankyframework/franky-skeleton-application | /modulos/developer/src/entity/organosEntity.php | UTF-8 | 4,057 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace Developer\entity;
class organosEntity
{
public $id;
public $nombre;
public $url;
public $css;
public $js;
public $jquery;
public $php;
public $permisos;
public $constante;
public $ajax;
public $modulo;
public $status;
public function __constr... | true |
311b452104a7c55176ca2a8485aaef44a5169f73 | PHP | easy-system/es-template | /src/TemplateEngine.php | UTF-8 | 1,181 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the "Easy System" package.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Damon Smith <damon.easy.system@gmail.com>
*/
namespace Es\Template;
use Es\Mvc\ViewModelInterface;
use Es\Service... | true |
db6eed5c0e2ae760e7672b84d1a40d4030d01c77 | PHP | navindex/html-formatter | /tests/HelperTest.php | UTF-8 | 4,684 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Navindex\HtmlFormatter\Tests;
use Iterator;
use Navindex\HtmlFormatter\Helper;
use Navindex\HtmlFormatter\Pattern;
use PHPUnit\Framework\TestCase;
/**
* @covers \Navindex\HtmlFormatter\Helper
*
* @uses \Navindex\HtmlFormatter\Pattern
*/
final class HelperTest extends Tes... | true |
74e96377d832d3dd77bbbe5ed368b871907f6c28 | PHP | dio5/silverstripe-comments | /code/formfields/CommentTableField.php | UTF-8 | 3,101 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Special kind of ComplexTableField for managing comments.
*
* @package comments
*/
class CommentTableField extends ComplexTableField {
protected $template = "CommentTableField";
protected $mode;
function __construct($controller, $name, $sourceClass, $mode, $fieldList, $detailFormFields = null, $sour... | true |
8d132271dda722dbfe02b385b81480387d576494 | PHP | natashand/test.blog | /migrations/m180522_135129_create_students_table.php | UTF-8 | 644 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
use yii\db\Migration;
/**
* Handles the creation of table `students`.
*/
class m180522_135129_create_students_table extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('students', [
'id' => $this->primaryKey(),
'first_n... | true |
ac0b476986f2ba666cbffc3cc128d1cdb977f123 | PHP | lukinoteam/DriverWebProject | /source/php/Business/ThumbGenerator.php | UTF-8 | 1,264 | 2.921875 | 3 | [] | no_license | <?php
require_once "ImageCreateFromBmp.php";
function make_thumb($src, $ext)
{
$desired_height = 1000;
$dest = $_SERVER["DOCUMENT_ROOT"] . "/temp.jpg";
/* read the source image */
ini_set('memory_limit', '-1');
if ($ext == 'jpg' || $ext == 'jpeg') {
$source_image = imagecreatefromjpeg($src)... | true |