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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
b0c5181f5b090485c5c5acd584cd02c98abfa25c | PHP | NucProject/almada | /api/config/database.php | UTF-8 | 7,315 | 2.78125 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
return [
/*
|--------------------------------------------------------------------------
| PDO Fetch Style
|--------------------------------------------------------------------------
|
| By default, database results will be returned as instances of the PHP
| stdClass objec... | true |
9673a42148043314de5400125c49f5d6e52a6d8f | PHP | Zoha/laravel-meta | /src/Meta/Helpers/SetMetaHelper.php | UTF-8 | 6,938 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Zoha\Meta\Helpers;
use Zoha\Meta\Helpers\MetaHelper as Meta;
abstract class SetMetaHelper
{
/**
* determine types of given meta
*
* @param $key
* @param $value
* @param $type
* @return array
*/
public static function determineMetaTypes($key, $value, $type)
... | true |
bfa9cc8b7d9d1fde7b0b116073103e37da8e50c0 | PHP | MonGDCH/mon-http | /example/router.php | UTF-8 | 2,801 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
// 定义路由
use mon\http\Route;
use mon\http\Request;
use mon\http\Response;
use mon\http\Session;
use mon\http\interfaces\RequestInterface;
use mon\http\interfaces\MiddlewareInterface;
/** @var \mon\http\Route $route */
$route = $app->route();
$route->get('/', function (A $aa) {
Session::instance()->set('t... | true |
39f64339718ecac834cef5244acc2b8fe6cc93ba | PHP | simarpannu98/Assignment2part2 | /registration.php | UTF-8 | 2,457 | 2.71875 | 3 | [] | no_license | <?php
$pageTitle='Registration';
require_once('header.php');
?>
<?php
if (!empty($_GET['email']))
$email = $_GET['email'];
else
$email = null;
$username = null;
$password = null;
$confirm = null;
if (!empty($email))
{
//connect to database
$conn = new PDO('mysql:host=aws.computerstudi.es;dbname=gc2003... | true |
cc83bde68412b731bc8b8be47b8dd3064c5704cd | PHP | hanshileiai/laravel5.7-jwt1.0-Dingo2.0 | /app/Helpers/app.php | UTF-8 | 1,266 | 2.734375 | 3 | [] | no_license | <?php
function compare_header(string $userId, string $idSign): bool
{
$idSignSha1 = base64_decode($idSign);
$userIdSha1 = sha1($userId);
return $idSignSha1 == $userIdSha1 ? true : false;
}
/**
* 获取请求中携带的token
* @return mixed
*/
function parse_token()
{
return app('tymon.jwt.parser')->parseToken();... | true |
c5c0ac95d624d2c30347174a80f8f776d9d31e49 | PHP | Darika/commandmake | /src/WorkStart.php | UTF-8 | 1,489 | 2.78125 | 3 | [] | no_license | <?php
namespace Darika\Make;
use cijic\phpMorphy\Facade\Morphy;
use Illuminate\Console\Command;
class WorkStart extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'work:start {name} {--m|model} {--c|controller} {--mi|migration}... | true |
586db011523ecd943eeebf3e4c8f5277968f3ab4 | PHP | hudaalfarizi98/sistem_informasi_sekolah | /class/C_admin.php | UTF-8 | 5,471 | 2.8125 | 3 | [] | no_license | <?php
class C_admin{
function __construct(){
$this->database = new PDO('mysql:host=localhost;dbname=db_siakad','root','');
$id_sess = $_SESSION['IdMember'];
}
//CRUD MEMBER
public function createMember($id,$username,$password,$Level){
try {
$stmt = $this->database->prepare("INSERT INTO... | true |
f42b66c9314b73b11ca9c3d54b088fcf83a31fe6 | PHP | vancehu/ARCHIVED-STUDENT-PROJECT_dbms-dashboard | /server/queryGen.php | UTF-8 | 1,760 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
//generate update query
function addUpdate(&$str, &$param, $colname){
if (isset($param[$colname])) {
$str .= " ".$colname."= '".$param[$colname]."',";
}
}
//generate insert query
function addInsert(&$str1, &$str2, &$param, $colname){
if (isset($param[$colname])) {
$str1 .= $colname.",";
$str2 .= "'".$pa... | true |
e313ae637b3d1d4df3b0243b39fd39c100ff8056 | PHP | bartekmaterla11/AutoForum | /src/Entity/Attribute.php | UTF-8 | 2,922 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\AttributeRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=AttributeRepository::class)
*/
class Attribute
{
/**
* @ORM\Id
* @ORM\Gen... | true |
5fa0b9c806e07a6e893efb315f4a38fe06cf8342 | PHP | indiana-university/iukb-api-doc-content-php | /src/Traits/Docid.php | UTF-8 | 826 | 2.828125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
declare(strict_types=1);
/**
* This file contains the Docid trait
* @copyright 2019 The Trustees of Indiana University
* @license BSD-3-Clause
*/
namespace Edu\Iu\Uits\KnowledgeBase\Document\Traits;
/**
* This trait represents a docid
*
* @author Anthony Vitacco <avitacco@iu.edu>
*/
trait Docid
{
/**... | true |
d3acc26eff0a3a03c81d1c5b091908f36909e849 | PHP | Abuarif/RailCompetency | /Controller/Component/ExampleComponent.php | UTF-8 | 646 | 2.703125 | 3 | [] | no_license | <?php
// App::uses('Component', 'RailCompetency.Controller');
class ExampleComponent extends Component
{
function export($fileName, $headerRow, $data)
{
ini_set('max_execution_time', 1600); //increase max_execution_time to 10 min if data set is very large
$fileContent = implode("\t ", $headerR... | true |
5b56b9cb4f19d4b5a36261a4a9280d6416020a5e | PHP | neos/contentrepository-development-collection | /Neos.ContentGraph.PostgreSQLAdapter/Classes/Domain/Projection/NodeRecord.php | UTF-8 | 5,224 | 2.515625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Neos\ContentGraph\PostgreSQLAdapter\Domain\Projection;
/*
* This file is part of the Neos.ContentGraph.PostgreSQLAdapter package.
*
* (c) Contributors of the Neos Project - www.neos.io
*
* This package is Open Source Software. For the full copyright and license
* informa... | true |
6f409ebb62ee46b74f8afc0c20c57373e863f4dc | PHP | Cecil-Zhang/QA-Community-Z.No | /Public/backup/index_bootstrap_login&signup.php | UTF-8 | 4,355 | 2.625 | 3 | [] | no_license | <?php
// Start the session
session_start();
$page_title='Welcome';
require_once('header.php');
// Clear the error message
$error_msg = "";
require_once('connectvars.php');
if (!isset($_SESSION['user_id'])){
if (isset($_POST['login'])){
// Connect to the database
$dbc = mysqli_conn... | true |
04c043996ddea0d47df1e99518d9983d629d2f6b | PHP | ShakilAhmmed/explore-learn | /DesignPatterns/app/Learn/State/Solution.php | UTF-8 | 577 | 2.828125 | 3 | [] | no_license | <?php
namespace App\Learn\State;
class Solution
{
private $travelModeContracts;
public function __construct(TravelModeContracts $travelModeContracts)
{
$this->travelModeContracts = $travelModeContracts;
}
public function getEta()
{
$this->travelModeContracts->etaCalculation... | true |
72112a8e393fbafa804230ef4ae8f58dd11ac218 | PHP | blazeriaz/info_media | /application/modules/webservice/models/Department_model.php | UTF-8 | 671 | 2.671875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Department_model extends CI_Model
{
public function __construct()
{
// Call the CI_Model constructor
parent::__construct();
$this->load->database();
}
/**
* get total rows from department table
*
* @param... | true |
534a34725f2c0310b29622c8b8209f1b840bdc4d | PHP | mikotomatsunaga/kadai_php3 | /todo_edit.php | UTF-8 | 1,609 | 2.6875 | 3 | [] | no_license | <?php
// var_dump($_GET);
// exit();
$id = $_GET['id'];
include('functions.php'); // 関数を記述したファイルの読み込み
$pdo = connect_to_db(); // 関数実行
$sql = 'SELECT * FROM todo_table3 WHERE id=:id';
$stmt = $pdo->prepare($sql);
$stmt->bindValue(':id', $id, PDO::PARAM_STR);
$status = $stmt->execute();
if ($status == false) {
$e... | true |
7c9334741be10d2badb387d8c80f984e1291128b | PHP | Sema-qq/Yii2_blog | /models/Article.php | UTF-8 | 7,286 | 2.59375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
use yii\data\Pagination;
use yii\helpers\ArrayHelper;
/**
* This is the model class for table "article".
*
* @property integer $id
* @property string $title
* @property string $description
* @property string $content
* @property string $date
* @property string $image
* @... | true |
7c312ea16bb60ac8d882b3ff6498040352cbd3bc | PHP | mpasini810/SkincareAuntie | /doLogin.php | UTF-8 | 1,527 | 2.984375 | 3 | [] | no_license | <?php
error_reporting(E_ERROR | E_WARNING | E_PARSE); // prevents error notices
session_start(); // starts the session so variables can be stored in the session superglobal
include 'database.php'; // This includes our database functions
// Gets email and password from HTML form
$email = $_POST['email'];
$pas... | true |
5466e3404ba359a10e8cf2a80fd0a920584c6397 | PHP | casperwilkes/laravel-helper_commands | /src/Commands/Helper/HelperRefreshCommand.php | UTF-8 | 2,358 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Purpose:
* Helper command to quickly remove old caches/configs and build new ones.
* History:
* 100919 - Wilkes: Created file
* @author Casper Wilkes <casper@casperwilkes.net>
* @package CasperWilkes\HelperCommands
* @copyright 2019 - casper wilkes
* @license MIT
*/
namespace HelperCommands\Com... | true |
2192d42887c4530edd5ac65197b5c4384a1fae7e | PHP | starlight36/SimpleOA | /system/filter/AclFilter.php | UTF-8 | 754 | 2.671875 | 3 | [] | no_license | <?php
namespace filter;
use lib\core\Filter;
use lib\util\Url;
/**
* 访问控制过滤器类
*
* @author starlight36
*/
class AclFilter extends Filter {
/**
* 执行过滤器
* @param \lib\core\FilterChain $filterChain
*/
public function doFilter($filterChain) {
$session = $this->getContext()->getSession();
if($this->check... | true |
bb8ea61f54122b3213583547795863b7a0427a1b | PHP | anikendra/Cakephp-3-Ratings | /src/Model/Table/RatingsTable.php | UTF-8 | 1,414 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright 2010, Cake Development Corporation (http://cakedc.com)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2010, Cake Development Corporation (http://cakedc.com)
* @license MIT License (http://www.opensource.org/lice... | true |
a2495c989aa8fb302971c63f5cba2ab4af1c5e5b | PHP | MilenaJimenez/huliTest | /app/Client.php | UTF-8 | 865 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $idclient
* @property string $name
* @property Invoice[] $invoices
*/
class Client extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'client';
public $t... | true |
ab9541e83a555de0ceeb27f87705143cf7bbf137 | PHP | marscore/hhvm | /hphp/test/slow/ext_file/feof_after_fwrite_after_eof.php | UTF-8 | 596 | 3.15625 | 3 | [
"Zend-2.0",
"PHP-3.01",
"MIT"
] | permissive | <?php
function main() {
$inputs = array(
'php://temp',
'php://memory',
);
foreach ($inputs as $input) {
printf("---%s---\n", $input);
$f = fopen($input, 'r+');
var_dump(fseek($f, 5, SEEK_SET));
var_dump(ftell($f));
fread($f, 1);
var_dump(feof($f));
fwrite($f, 'foo');
var_... | true |
3540c0bedec314fa3c807a799d50a103df1a96f3 | PHP | Ujjal0011/dino-task | /week5/insert_db.php | UTF-8 | 1,372 | 3.078125 | 3 | [] | no_license | <?php
require "includes/db_connection.php";
$name = $email = $gender = $comment = $website = $prog_lan_str = $laptop = "";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="... | true |
0594ebdf0b98c01fa4e3a738a0bb1cc2dae064ec | PHP | dondonudon/WAPRON | /database/seeds/SysRoleSeeder.php | UTF-8 | 534 | 2.71875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class SysRoleSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$data = [
['id' => 1,'name' => 'superuser'],
['id' => 2,'name' => 'admin'],
['id' => 3,'name'... | true |
f1502b0a230119ae96f958b4c01d8d627f52b367 | PHP | wf5ss2015/wfprj | /application/model/veranstaltungsterminBearbeitenModel.php | ISO-8859-1 | 4,154 | 3.078125 | 3 | [] | no_license | <?php
/* ---------- SPRINT 6 ----------
- Autor: Alexander Mayer
- Datum: 24.06.2015
- User Story (Nr. 590): Als Mitarbeiter mchte ich einen Veranstaltungstermin ndern knnen.
- User Story Punkte: 5
- Task: im Model Funktion loescheVeranstaltungstermin() erstellen.
- Zeitaufwand: 1h
//////////... | true |
44ee29981ec539a16d0e701af849755976679bde | PHP | myBoardTeam/myBoardAdmin | /library/view/render/LayoutPassword.php | UTF-8 | 1,627 | 2.59375 | 3 | [] | no_license | <?php
/**
* Layout do Campo de Senha.
*/
require_once(PROJECT_PATH."/library/view/render/LayoutTextInput.php");
/**
* Classe contendo o Layout do Campo de Senha.
*
* @author myBoardTeam <myboardteam@gmail.com>
* @version %I%, %G%
*/
class LayoutPassword extends LayoutTextInput {
/**
* Defin... | true |
35768bd2f5f40677c8543e256055891b4206079f | PHP | docteurklein/pgquery | /src/Node/FuncCall.php | UTF-8 | 814 | 2.640625 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace DocteurKlein\PgQuery\Node;
use DocteurKlein\PgQuery\Node;
use DocteurKlein\PgQuery\AST;
final class FuncCall implements Node
{
use DefaultBehavior;
const prefix = '';
const separator = ' ';
private $funcname;
public function __construct($name, array $ch... | true |
964e3606da42b9e5c628a4511d6934c1a49e24e3 | PHP | hxyali/study | /TestServiceImp.php | UTF-8 | 508 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: huangxiaoyan
* Date: 2018/4/23
* Time: 上午11:11
*/
include "gen-php/TestService.php";
class TestServiceImp implements TestServiceIf
{
public function getStr($type){
switch($type){
case 0:
$return = 'hello world';break;
... | true |
fdb3fff8b8d09dc00ce3f4ce6e21f7a6d836b3d5 | PHP | aspose-barcode/Aspose.BarCode-for-Java | /Plugins/Aspose_Barcode_Java_for_PHP/src/aspose/barcode/WorkingWithBarcodeImage/BarcodeImageBasicFeatures/SetBarcodeImageMargins.php | UTF-8 | 905 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace Aspose\Barcode\WorkingWithBarcodeImage\BarcodeImageBasicFeatures;
use com\aspose\barcode\Symbology as Symbology;
use com\aspose\barcode\BarCodeBuilder as BarCodeBuilder;
class SetBarcodeImageMargins{
public static function run($dataDir=null){
# Instantiate barcode object
... | true |
157a43edc4d3981fb33fe2c6721eefef5b5d5563 | PHP | smallwen1990/php1 | /newEmptyPHPWebPage.php | UTF-8 | 708 | 3.28125 | 3 | [] | no_license | <?php
echo "哈囉~~<br>";
class Cat{
public $name;
protected $position;
public function _construct($name){
$this->name =$name;
$this->position =['x'=>0,'y'=>0];
}
public function moveto($x,$y){
$this->position['x'] = $x;
$this->position['y'] = $y;
... | true |
52cd72d8c000d86122844533bd73db17b8d07410 | PHP | przemyslawk/interview-exercise | /tests/unittest/OfferServiceTest.php | UTF-8 | 5,971 | 2.65625 | 3 | [] | no_license | <?php namespace Tests\UnitTest;
use AppJobs\Entities\Offer\Entity as Offer;
use AppJobs\Entities\Requirements\Collection;
use AppJobs\Repositories\Offers\RepositoryInterface;
use AppJobs\Services\OfferService;
use PHPUnit\Framework\TestCase;
use AppJobs\Entities\Requirements\Entity as Requirement;
class OfferServiceT... | true |
2ed86ed8b3cbcf382fa3ad8750880538d417cf13 | PHP | johan-hoglund/yibei | /packages/core/fs_tools/fs_tools.class.php | UTF-8 | 2,500 | 2.890625 | 3 | [] | no_license | <?php
class fs_tools
{
public static function find_files($dir, $options)
{
$options['recursive'] = (isset($options['recursive']) && $options['recursive'] === false) ? false : true;
$files = scandir($dir);
foreach($files AS $key => $file)
{
$extension = substr($file, strrpos($file, '.... | true |
0808d3c05d26941870cc34ded9a94169d939bdb9 | PHP | square/square-php-sdk | /src/Models/Builders/LoyaltyEventAccumulatePointsBuilder.php | UTF-8 | 1,762 | 2.859375 | 3 | [
"Apache-2.0"
] | permissive | <?php
declare(strict_types=1);
namespace Square\Models\Builders;
use Core\Utils\CoreHelper;
use Square\Models\LoyaltyEventAccumulatePoints;
/**
* Builder for model LoyaltyEventAccumulatePoints
*
* @see LoyaltyEventAccumulatePoints
*/
class LoyaltyEventAccumulatePointsBuilder
{
/**
* @var LoyaltyEventAc... | true |
6f66c0c5f36e6c74a07396d5d21d54a2c9167257 | PHP | lemonvine/yii2-adminlte | /JpGraph/Graph/LogScale.php | UTF-8 | 3,724 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
/**
* JPGraph v4.0.3
*/
namespace lemon\JpGraph\Graph;
use lemon\JpGraph\Util;
/*
* File: JPGRAPH_LOG.PHP
* // Description: Log scale plot extension for JpGraph
* // Created: 2001-01-08
* // Ver: $Id: jpgraph_log.php 1106 2009-02-22 20:16:35Z ljp $
* //
* // Copyright (c) Asial Corporation. All ri... | true |
bf84687c49c82ffdd932cb42e2b1ccb1c845500b | PHP | FlowCommunications/JSONPath | /src/Flow/JSONPath/Filters/SliceFilter.php | UTF-8 | 1,155 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Flow\JSONPath\Filters;
use Flow\JSONPath\AccessHelper;
class SliceFilter extends AbstractFilter
{
/**
* @param $collection
* @return array
*/
public function filter($collection)
{
$result = [];
$length = count($collection);
$start = $this->token->v... | true |
f27d6120604a75c796cc562ae272d42401b90728 | PHP | KingPrawnPepe/WWW | /www-services/signIn.php | UTF-8 | 971 | 2.671875 | 3 | [] | no_license | <?php
include 'config.php';
//recieve the info, set vars
$unameEmail = $_POST['unameEmail'];
$pword = $_POST['password'];
//check the username and password for a match for sign-in
if (isset($_POST['unameEmail']) == TRUE && isset($_POST['password']) == TRUE ) {
//$safeUnameEmail = mysql_real_escape_string($uname... | true |
732de72b082e8ccdcc7b21f24d52c382dd58f444 | PHP | avnukov/flickrtest | /Libs/Flickr/FlickrInterface.php | UTF-8 | 531 | 2.828125 | 3 | [] | no_license | <?php
namespace Libs\Flickr;
/**
* Class FlickrInterface
* @package Libs\Flickr
*/
interface FlickrInterface {
/**
* @param $methodName Method from Flickr API for request
*/
public function setMethod($methodName);
/**
* @param $name Name of param which will be added to request
* @p... | true |
4b7608eb236e08d2b96b7b72b3952cb73404757e | PHP | MrWindlike/BabyShopServer | /utils/util.php | UTF-8 | 1,170 | 2.9375 | 3 | [] | no_license | <?php
class Util {
/** 检查$array[$key]是否存在且不为空字符串 */
function isSetParams($array, $keys) {
$flag = true;
$lostKey = '';
foreach ($keys as $i => $key) {
if(isset($array[$key]) === false || $array[$key] === '') {
$flag = false;
$lostKey = $key;
break;
... | true |
bb7a7a8150a0856307bcb2cbf5a022416d11707d | PHP | mkarimi-s/PhpDesignPatterns | /tests/Creational/AbstractFactoryTest.php | UTF-8 | 1,045 | 2.640625 | 3 | [] | no_license | <?php
namespace Test\Creational;
use Patterns\Creational\AbstractFactory\Interfaces\CsvWriterInterface;
use Patterns\Creational\AbstractFactory\Interfaces\JsonWriterInterface;
use Patterns\Creational\AbstractFactory\Interfaces\WriterFactoryInterfaces;
use Patterns\Creational\AbstractFactory\UnixWriterFactory;
use P... | true |
0e91fd21335a3760ded009bca418a604aaab44b6 | PHP | libertus-sabebeget/latihan-php-refactory | /jawabsoal1.php | UTF-8 | 142 | 2.5625 | 3 | [] | no_license | <?php
$nomor = 1;
for( $ucapan = 1; $ucapan <=10; $ucapan++ ) {
echo $nomor++.") "."Glory-Glory Refactory <br/>";
}
?> | true |
4688540b7ab070d9c4bb81d0ec2966b03abf8e48 | PHP | naanonaanos/CRM | /protected/models/Destination.php | UTF-8 | 3,752 | 2.8125 | 3 | [] | no_license | <?php
/**
* This is the model class for table "destination".
*
* The followings are the available columns in table 'destination':
* @property integer $destination_id
* @property string $code
* @property string $country
* @property string $province
* @property string $city
* @property string $subdistrict
* @p... | true |
048c5304f77b61180023cd43372d816bd45a39d7 | PHP | CrystReal/Site_frontend | /protected/modules/forum/models/Thread.php | UTF-8 | 7,653 | 2.578125 | 3 | [] | no_license | <?php
/**
* This is the model class for table "thread".
*
* The followings are the available columns in table 'thread':
* @property integer $id
* @property integer $forum_id
* @property string $subject Thread subject
* @property boolean $is_sticky Sticky thread
* @property boolean $is_locked Locked thread
* @... | true |
de85353ff15788152ff483fceddbbbf891d9b8bd | PHP | mikkohei13/pinnakisa | /application/views/results_participation_html.php | UTF-8 | 715 | 2.5625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
//header('Content-Type: text/html; charset=utf-8');
// TODO: siirrä controlleriin
if (! empty($participation))
{
$speciesList = $participation[0]['species_finnish'];
arsort($speciesList);
echo "<h4 id=\"participant\">" . htmlspecialchars($participation[0]['name'], ENT_COMPAT, 'UTF-8') . " <span>(" . htmlspec... | true |
9d74256e6fe02e62de58fceaf95a91d86846f09d | PHP | priyanshu1044/hostelsite | /ICTWIIb_Project_CE019_CE028_CE091/regestration.php | UTF-8 | 8,514 | 2.671875 | 3 | [] | no_license |
<?php
require_once "config.php";
$firstname = $middlename = $lastname = $usergender = $usercourse = $useremail = $usercontact = $useraddress = $userusercontact = $userpassword = $userconfirmpassword = "";
if($_SERVER["REQUEST_METHOD"] == "POST")
{
$name = $_FILES['userimage']['name'];
$size = $_FILE... | true |
049aad1d054087504fe8808e512397fb3f1a7f72 | PHP | Dagge1/supermerc | /php/change_directory.php | UTF-8 | 1,776 | 3.765625 | 4 | [] | no_license | <?php
// function that provides change of directory with a cd command (abstract system)
class Path {
public $currentPath; // original path
private $intoArray;
private $newPath; // changed path
private $cd = '../';
function __construct($item) {
// check if path is correctly formatted (start with /, only l... | true |
2530346d3b2f7db85cf5b072b52fceddb497aad8 | PHP | pablomatheusmm/php-frameworkless-skeleton | /App/Core/Router/Kernel/RegexRoute.php | UTF-8 | 2,895 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: pablo
* Date: 22/11/2019
* Time: 01:47
*/
namespace App\Core\Router\Kernel;
use App\Core\Exceptions\ActionNotFoundException;
use App\Core\Exceptions\ClassNotFoundException;
use App\Core\Exceptions\MethodNotAllowedException;
use App\Core\Exceptions\RouteNotFoundException;
... | true |
12deebd21f8265a0f29d8d821c1df3a5640f70af | PHP | pawelpiwonski/gotujtopl | /app/models/Recipe.php | UTF-8 | 5,596 | 2.875 | 3 | [] | no_license | <?php
class Recipe extends Database {
private $db;
public function __construct() {
$this->db = new Database();
}
public function add($data) {
$this->db->dbQuery('INSERT INTO recipes(user_id, name, description, ingredients, recipe, time, quantity, difficulty, category, private) VALUES(:u... | true |
4e9515c323de1d1fae76a79605123655a9b8d59c | PHP | danil99152/Tower-Defence | /Application/Game/Struct/BaseElement.php | UTF-8 | 247 | 2.828125 | 3 | [] | no_license | <?php
class BaseElement {
public $id;
public $type;
public $sprite;
public function __construct($options) {
$this->id = $options->id;
$this->type = $options->type;
$this->sprite = $options->sprite;
}
} | true |
f1e210dc9364271fa4f33eeb6e5fc7f43943f54a | PHP | ivke013/PHP-MVC-User-manager-Testing | /app/controller/AuthController.php | UTF-8 | 1,979 | 2.625 | 3 | [] | no_license | <?php
namespace Diwanee\Controller;
/**
* Created by PhpStorm.
* User: ivke
* Date: 5/19/2016
* Time: 12:52 PM
*/
use Diwanee\Library\BaseContollerFactory;
use Diwanee\Library\View;
use Diwanee\Model\AuthModel;
/**
* Class AuthController
*
* @package Diwanee\Controller
*/
class AuthController extends BaseCon... | true |
9faebdd27698e03d8769ca52ee7532079105c8be | PHP | subterranwars/legacy | /www/spiel/bericht.php | UTF-8 | 994 | 2.703125 | 3 | [] | no_license | <?php
session_start();
//Inkludes
require_once("../includes/klassen/db.php");
require_once("../includes/klassen/text.php");
require_once("../includes/klassen/fehler.php");
require_once("../includes/klassen/template.php");
//Datenbnakobjekt einbinden!
$db = new DATENBANK();
//überprüfen ob $_GET['ID'] geset... | true |
76d7c62e9ab905ac88da6bf52e9fb236661e7d03 | PHP | Trip09/workshop-symfony-messanger | /src/MessageHandler/BetResultHandler.php | UTF-8 | 815 | 2.6875 | 3 | [] | no_license | <?php
namespace App\MessageHandler;
use App\Exception\RejectMessageException;
use App\Message\GameResultMessage;
use Symfony\Component\Messenger\Handler\MessageSubscriberInterface;
class BetResultHandler implements MessageSubscriberInterface
{
public static function getHandledMessages(): iterable
{
y... | true |
0d8d2114410af63f840a8037205a8ad31cbf576f | PHP | dsx90/webx | /common/modules/order/models/Order.php | UTF-8 | 3,462 | 2.515625 | 3 | [] | no_license | <?php
namespace common\modules\order\models;
use yii\db\ActiveRecord;
use common\models\User;
use common\models\UserIp;
use common\modules\comment\models\Comment;
use common\modules\tehnic\models\TehnicCustomer;
/**
* This is the model class for table "{{%order}}".
*
* @property int $id
* @property string $table... | true |
cc42e14ca579d2a8cb9acddf364525cce1be550c | PHP | mpratt/Luthor | /Lib/Luthor/Parser/Parser.php | UTF-8 | 4,641 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Parser.php
*
* @package Luthor
* @author Michael Pratt <pratt@hablarmierda.net>
* @link http://www.michael-pratt.com/
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Luthor\Parser;
use \Luthor\Parser\Lex... | true |
301e9fe5293b7d5cb6238dc93c8839b2c2b53060 | PHP | fjzwn/designPattern | /structure/inversion/Ioc.php | UTF-8 | 843 | 2.796875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: cengweinan
* Date: 18/5/3
* Time: 下午6:05
*/
declare(strict_types = 1);
namespace structure\inversion;
class Ioc
{
protected static $register = [];
/**
* 绑定
*
* @param $name
* @param callable $resolver
* @return bool
*/
public st... | true |
a05afb86973960d929a3c4394861c86e30805640 | PHP | thohal/openqrm | /trunk/src/web/base/class/htmlobjects/htmlobject.template.class.php | UTF-8 | 4,168 | 3.015625 | 3 | [] | no_license | <?php
/**
* @package htmlobjects
*
*/
/**
* htmlobject_template
*
* @package htmlobjects
* @author Alexander Kuballa <akuballa@users.sourceforge.net>
* @copyright Copyright (c) 2009, Alexander Kuballa
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @version 1.0
*/
class html... | true |
69b8788e8c3aed48fb343f00b0e154f230b47a23 | PHP | clane/a11ybugtracker | /helpers/getClrComponents.php | UTF-8 | 1,288 | 2.875 | 3 | [] | no_license | <?php
require 'helpers/connect.php';
require 'helpers/vars.php';
$column_name = "Component";
$query = "SHOW COLUMNS FROM $database.$table WHERE Field=\"$column_name\"";
$result = $conn->query($query);
//clean up enough to explode the enum into an array
if ($result->num_rows > 0) {
while($row = mysqli_fetch_assoc... | true |
c2616277dbb32adb335726cec34ba8972d3c5a63 | PHP | josephmulligan/vapor-tek | /user_search.php | UTF-8 | 4,538 | 2.578125 | 3 | [] | no_license | <?php
//search form for user
include('includes/header.php');
include('includes/nav.php');
?>
<!-- Search Engine Bar for logged in users to search for contact details -->
<div class="container">
<h1>Vapor-tek User Search</h1>
<div class="row">
<div class="col-md-6">
<div id="custom-search-inp... | true |
da66c6171f4184637e24c01f6a21c0a92224324c | PHP | jpaldana/latenight.moe | /modules/pageloader.php | UTF-8 | 1,286 | 2.828125 | 3 | [] | no_license | <?php
define("DEFAULT_PAGE", "home");
define("DEFAULT_UI", "default");
class Page {
var $page;
var $ui;
function __construct($page = false, $ui = false) {
if ($page) {
$this->page = $page;
if ($ui) {
$this->ui = $ui;
}
else {
$this->ui = DEFAULT_UI;
}
}
elseif (isset($_GET["page"])) {... | true |
f3b06213416a89577dd7d10867eb2fd7f688bf73 | PHP | mujtabahussainjoo/ntids | /app/code/MageWorx/ShippingRules/Block/Adminhtml/Shippingrules/Widget/TimeSlider.php | UTF-8 | 2,446 | 2.53125 | 3 | [] | no_license | <?php
/**
* Copyright © 2017 MageWorx. All rights reserved.
* See LICENSE.txt for license details.
*/
namespace MageWorx\ShippingRules\Block\Adminhtml\Shippingrules\Widget;
use Magento\Framework\Data\Form\Element\AbstractElement;
use MageWorx\ShippingRules\Model\Rule;
class TimeSlider extends \Magento\Framework\V... | true |
fd851ac44e4fb06f6ad594fad8679aa25cda408d | PHP | lukinaliza/serenity | /serenity/database/seeds/ServiceSeeder.php | UTF-8 | 3,693 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use App\Models\ListSpecialization;
use App\Models\Service;
use Illuminate\Database\Seeder;
class ServiceSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$spec_brow=ListSpecialization::where('name', 'Архитектура бровей')->fi... | true |
2415c048e89a843b1babf838071d6bae046b7b2d | PHP | CamiloPortellaR/Practicas_PHP | /Prueba_003/2.php | UTF-8 | 1,698 | 2.90625 | 3 | [] | no_license | <?php
$página_Syte_Player = file_get_contents('http://192.168.52.198/Tesis.html',false);
$find_byte_status = '"byte_status"';
$find_fn = '"fn"';
$pos1 = strpos($página_Syte_Player, $find_byte_status);
$pos2 = strpos($página_Syte_Player, $find_f... | true |
c745036c8ee83a1fadda9c6d3a158024b1f71f21 | PHP | nishabojamma/Citizen-Management-System | /connectivity.php | UTF-8 | 839 | 2.71875 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "081721998@max";
$dbname = "citizen";
$name=$_POST["name"];
$password=$_POST["password"];
$email=$_POST["email"];
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error)... | true |
5af1df0576473a7a64c7ac689b7720732d9a0c61 | PHP | CS221-Aberystwyth-2014/WebApp | /reserves/edit.php | UTF-8 | 3,849 | 2.875 | 3 | [] | no_license | <?php
$title = "Edit Reserve";
$bodyid = "reserves";
require_once("../include/header.php");
// If the user isnt logged in, redirect
if(!isset($_SESSION['uid'])) {
header("Location: index.php");
exit;
}
// If no id is provided, redirect
if(isset($_GET['id'])) {
$id = htmlentities(strip_tags($_GET['id']))... | true |
3b3d4b60ee2c794c10876277f8e05444d9855bbd | PHP | SlimenTN/UserModule | /UserModule/Repository/UserRepository.php | UTF-8 | 737 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace app\UserModule\Repository;
use app\UserModule\Entity\User;
use Doctrine\ORM\EntityRepository;
/**
* Class UserRepository
* @package app\UserModule\Repository
*/
class UserRepository extends EntityRepository
{
/**
* @param $login
* @param $password
* @return User
... | true |
63ce61d19ca58e0963d4990e69ff4caa5978fefc | PHP | phanhongphat/book-library-with-PHP | /bookForm.php | UTF-8 | 757 | 2.734375 | 3 | [] | no_license | <?php include "menu.php"; ?>
<?php include "connection.php";?>
<?php
$sql="select max(books_id) from books";
$result=$db->query($sql);
$max = $result->fetch(PDO::FETCH_NUM);
//echo 'Max='.$max;
$max++;
?>
<h1> Add a book </h1>
<p>
<form class="" action="addBook.php" method="post">
<label for="">books_id</labe... | true |
05a56ba95e54a4903ca14e42939b2f26ae0a2d3a | PHP | kix/tz-techdev | /app/controllers/LogsController.php | UTF-8 | 1,630 | 2.53125 | 3 | [] | no_license | <?php
class LogsController extends Controller {
function index(){
}
function before(){
$this->loadModel('IP');
$this->loadModel('URL');
$this->loadModel('Request');
}
function parseLog(){
static $months = array(
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'... | true |
701e46dfa66ec6e9dedf6863d9a774bde3239b6f | PHP | duan-li/code-standerds-personal | /src/PHPMassDetector/CodeSizeRules/AgainstExcessiveMethodLength.php | UTF-8 | 5,708 | 2.828125 | 3 | [] | no_license | <?php
declare(strict_types=1);
/**
* Created by PhpStorm.
* User: Duan
* Date: 5/10/18
* Time: 11:16 AM
*/
namespace CodeStandards\PHPMassDetector\CodeSizeRules;
use CodeStandards\Interfaces\Againstable;
class AgainstExcessiveMethodLength implements Againstable
{
public function against(): void
{
... | true |
0a79202817bbd7859e0de1fb386e7a3bfba20d08 | PHP | KarolineLima/Disciplina-pw1 | /Exercises/exercises-algoritmo /function/function-factorial/src/factorial.php | UTF-8 | 137 | 4.09375 | 4 | [] | no_license | <?php
function factorial($number)
{
$factorial = 1;
for($n=$number; $n>=1; $n--){
$factorial *= $n;
}
return $factorial;
}
| true |
ed2a7e8b6474c6208019abde04c8a50db32b5199 | PHP | dkusama930/myPHP | /insert.php | UTF-8 | 630 | 3.046875 | 3 | [] | no_license | <?php
$pdo = new PDO('sqlite:hoges.sqlite3');
// SQL実行時にもエラーの代わりに例外を投げるように設定
// (毎回if文を書く必要がなくなる)
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
// デフォルトのフェッチモードを連想配列形式に設定
// (毎回PDO::FETCH_ASSOCを指定する必要が無くなる)
$pdo->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
$sql='INSERT INTO hoge... | true |
c862a0fce8be2f1466772d53a15433c29a2378fe | PHP | officialoghene/mini-cms | /app/views/users.view.php | UTF-8 | 1,984 | 2.59375 | 3 | [] | no_license | <?php require 'partials/head.php'; ?>
<h1>Welcome Home!</h1>
<!-- <form action="/tasks" method="POST">-->
<!-- <h3>Add new task</h3>-->
<!-- <input type="text" name="description" placeholder="Task"> <br>-->
<!---->
<!-- <input type="number" name="isComplete" placeholder="tas... | true |
c806680e30bad3215b558fc29a8924313f3b4fca | PHP | hjoruhjoru/lumen-graphql | /vendor/youshido/graphql/src/Field/InputFieldInterface.php | UTF-8 | 923 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is a part of GraphQL project.
*
* @author Alexandr Viniychuk <a@viniychuk.com>
* created: 9/29/16 10:32 PM
*/
namespace Youshido\GraphQL\Field;
use Youshido\GraphQL\Type\AbstractType;
interface InputFieldInterface
{
/**
* @return AbstractType
*/
public function getType();
... | true |
0c93c6c5da4d16f6651807cb34255bccb6a2ec1f | PHP | yannickbiheul/labelleoreille | /src/Entity/Site.php | UTF-8 | 2,254 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Entity;
use App\Repository\SiteRepository;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=SiteRepository::class)
*/
class Site
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="te... | true |
54c64a81056e6121f0be8406072fd5f2dcaeff8d | PHP | MarjoMaris/PPE_Fredi | /PPE3-Fredi-MM_MPB_LP_CG--master/FREDI/classes/Note.php | UTF-8 | 2,470 | 3.5625 | 4 | [] | no_license | <?php
/**
* Classe Note
*
* @author Marjorie :D
*/
class Note
{
////////////////////
//// Attributs ////
////////////////////
private $id_note;
private $date_remise;
private $total;
private $code_statut;
private $id_utilisateur;
//////////////////
// Constructeur //
... | true |
e1de63f613e0f12745881d5186964612802024c5 | PHP | starkbaum/sucon | /app/Http/Controllers/CommentsController.php | UTF-8 | 1,449 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Comment;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
use Input;
use URL;
class CommentsController extends Controller
{
public function __construct()
{
$this->middleware('auth');
}
/**
* Store a newly created resource in... | true |
9f96a973d70d4a476cc4f7f0d91f492760f839d4 | PHP | emarref/almanac | /lib/Emarref/Almanac/Renderer/JsonRenderer.php | UTF-8 | 308 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Emarref\Almanac\Renderer;
class JsonRenderer implements RendererInterface
{
const FILE_EXTENSION = 'json';
const MIME_TYPE = 'application/json';
/**
* {@inheritdoc}
*/
public function render(array $content)
{
return json_encode($content);
}
} | true |
16b6569a2e5dfdee86bb2e4e4bd5bdb5ee51e1bc | PHP | conedevelopment/root | /tests/Fields/NumberTest.php | UTF-8 | 845 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Cone\Root\Tests\Fields;
use Cone\Root\Fields\Number;
use Cone\Root\Tests\TestCase;
class NumberTest extends TestCase
{
protected $field;
public function setUp(): void
{
parent::setUp();
$this->field = new Number('Age');
}
/** @test */
public function a_numbe... | true |
cf6ac222b12a84f85ecca52a1680a38bdd3b582d | PHP | Chel1982/taskCur | /Classes/InnerData.php | UTF-8 | 1,178 | 3.484375 | 3 | [] | no_license | <?php
class InnerData {
private $country;
private $currency;
private $price;
private $_db;
/*Получаем в конструктор данные из формы*/
public function __construct($country,$currency,$price) {
$this->_db = DB::getInstance();
if (empty($country) or empty($currency) or empty($price)){
echo "<h1>Заполните все п... | true |
c46151fea72a59e3faffacc9c5d7ca55e9a973d8 | PHP | mateusfaustino/PHP_voting-system | /index.php | UTF-8 | 1,067 | 2.71875 | 3 | [] | no_license | <?php
require_once './Classes/Data.php';
$data = new Data('localhost', 'voting', 'root', '','candidate');
$res=$data->read();
if(isset($_GET['id'])){
$voteID=$_GET['id'];
$candidate = $data->readOne($voteID);
$data->update('votes',$candidate['votes']+1,$_GET['id']);
... | true |
bf4ff8038ac81b93a67dd745128693d9077bcc0d | PHP | Dev-Pledge/Feed | /src/WebSocket/AbstractStreamItem.php | UTF-8 | 816 | 3 | 3 | [] | no_license | <?php
namespace DevPledge\WebSocket;
/**
* Class AbstractStreamItem
* @package DevPledge\WebSocket
*/
abstract class AbstractStreamItem {
const FUNCTIONS = [ 'created-entity', 'updated-entity', 'deleted-entity', 'historical-stream' ];
/**
* @var string
*/
protected $id;
/**
* @var
*/
protected $pare... | true |
4a435a4b943f6c37e8cd92552092ced187471242 | PHP | mmarkie2/Studies | /php/firstProj/cw4/z3/utils/showPrettyStats.php | UTF-8 | 266 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
include_once 'loadFromFile.php';
function showPrettyStats($schema) {
$langs = loadFromFile($schema);
foreach ($langs as $lang => $count) {
echo "$count <div style='left: 40px; position: fixed; display: inline-block;'>$lang</div><br>";
}
}
| true |
47cdec0eeccd3a45d675d7a1b0458f4a8bc9c7d6 | PHP | slavisadev/magento2apiextension | /app/code/CerseiLabs/APIextension/Api/Data/CategoryPathInterface.php | UTF-8 | 402 | 2.5625 | 3 | [] | no_license | <?php
namespace CerseiLabs\APIextension\Api\Data;
interface CategoryPathInterface
{
/**#@+
* Constants defined for keys of the data array. Identical to the name of the getter in snake case
*/
/**
* @api
* @return array
*/
public function getData();
/**
* @api
* @pa... | true |
6501c5af3fc3fa4ddc8b6ec0773b5165912a950a | PHP | UwinIwinLebo/Assessmet | /users.php | UTF-8 | 1,359 | 2.515625 | 3 | [] | no_license | <?php
include_once('header.php');
$users = $database->getUsers();
?>
<!DOCTYPE HTML>
<html>
<head>
<title>Deals</title>
<link rel="stylesheet" type="text/css" href="css/styling.css">
</head>
<body>
<h1> Users </h1>
<button><a href="/uwin_iwin/create_user.php" class="button"> Create User </a></button>
<table bord... | true |
62ebff208133e535e51dfa36b72ef0bb89714c75 | PHP | dannd99/QLPhotocopy | /app/Http/Controllers/AuthenCustomerController.php | UTF-8 | 2,365 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Cookie;
use App\Http\Requests\RegisterRequest;
use App\Http\Requests\LoginRequest;
use App\Repositories\AuthCustomerRepository;
use App\Models\Customer;
use Carbon\Carbon;
use Session;
use Hash;
use DB;
class AuthenCust... | true |
d7686b635aa697b16a8555bfdbb235b382c06d7e | PHP | Salman-007-Pro/basic-practise-web-development | /sign page/QualityBags-Ecommerce-PHP-master/QualityBags-Ecommerce-PHP-master/QualityBagsEcommerce/business_layer/users/usersController.php | UTF-8 | 6,695 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
// Include MySQL class
require_once('/../../data_layer/data.inc.php');
function sha256_encrypt($data){
$ciphered = hash("sha256", $data);
return $ciphered;
}
class Users {
public static function displayRegisterForm() {
$output[] = '<form action="index.php?content_page=register" method="POST... | true |
afa997224095b569f41f788fa9223249e39ca011 | PHP | swayok/PeskyORM | /src/Exception/TableColumnConfigException.php | UTF-8 | 490 | 2.515625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace PeskyORM\Exception;
use PeskyORM\ORM\TableStructure\TableColumn\TableColumnInterface;
class TableColumnConfigException extends OrmException
{
public function __construct(
string $message,
private ?TableColumnInterface $column
) {
parent::__con... | true |
f25e21e87452c6b2579a7b0f935fd6ece41a65de | PHP | oz/toupti | /example/public/app.php | UTF-8 | 2,792 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
require '../lib/toupti.php';
class App extends Toupti
{
/**
* Map URLs to actions
*/
public $routes = array(
'' => 'index', // Default root-route
'test/:plop' => 'test', // Match :plop as a named parameter
... | true |
90171d60996df4e0a8664faf27c9b1f584c1f717 | PHP | Khurram1997/WebDevAug20th | /activateemail.php | UTF-8 | 1,787 | 2.546875 | 3 | [] | no_license | <?php
//file used for sending and activating email: verifyong account
require 'scripts/PHPMailerAutoload.php';
//Instantiation
//declaring variables being used
$mail = new PHPMailer;
$to=$_SESSION['email'];
$activation_code=$_SESSION['activation_code'];
$username=$_SESSION['username'];
$password=$_SESSION['p... | true |
f0b6c0f4dcf0fc768ce3bc1326504809eeb11fe3 | PHP | PauloFAragao/studyingPhp | /011.php | UTF-8 | 1,125 | 3.71875 | 4 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<pre>
<?php
class Mother
... | true |
3c5566d54f95209212116ea073a17c9589c735fc | PHP | 7evenUp/AME-WordPress-plugin | /ame/key/public/class-content-messenger.php | UTF-8 | 954 | 2.6875 | 3 | [] | no_license | <?php
class Content_Messenger {
/**
* A reference to the class for retrieving our option values.
*
* @access private
* @var Deserializer
*/
private $deserializer;
/**
* Initializes the class by setting a reference to the incoming deserializer.
*
* @param Deserializer $de... | true |
ea66cb9e4f67a39245848046fc6e44882232f5e5 | PHP | jakubkulhan/chrome-devtools-protocol | /gen-src/ChromeDevtoolsProtocol/Model/DOMStorage/SetDOMStorageItemRequestBuilder.php | UTF-8 | 1,372 | 2.828125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace ChromeDevtoolsProtocol\Model\DOMStorage;
use ChromeDevtoolsProtocol\Exception\BuilderException;
/**
* @generated This file has been auto-generated, do not edit.
*
* @author Jakub Kulhan <jakub.kulhan@gmail.com>
*/
final class SetDOMStorageItemRequestBuilder
{
private $storageId;
private $key;
... | true |
6267e9169032e1018530a25251d51858be5b68df | PHP | nimmividya/impressto | /impressto/application/core_modules/tags/widgets/tag_cloud.php | UTF-8 | 2,401 | 2.53125 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* File tag_list description
*
* This displays a list of tags associated with the current content type and content id
*
* Sample tags:
* [widget type='tag_list' content_type='page_manager' content_id='1']
* direct from PHP code Widget::r... | true |
3f75387d4e07a5ec99b3d47becb43674159f0f28 | PHP | lintungkung/ewo | /app/Console/Commands/ewo_createCache.php | UTF-8 | 3,403 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\Console\BaseCommand;
use App\Model\MSCNS09;
use App\Repositories\Order\OrderBaseRepository;
use App\Repositories\Order\OrderRepository;
class ewo_createCache extends BaseCommand
{
/**
* The name and signature of the console command.
*
* @var string
... | true |
5982ddea4a53789a2df80eb8e59e650943a2b3c9 | PHP | bbroger/livro-php-fontes | /MVC/ComBD/mini-framework/Customizacao/mini-framework2/src/Controller/VendedoresController.php | UTF-8 | 5,690 | 2.828125 | 3 | [] | no_license | <?php
declare(strict_types = 1);
namespace Mini\Controller;
use Mini\Model\VendedoresModel;
use Mini\View\VendedoresView;
class VendedoresController
{
/**
* PAGE: index
* This method handles what happens when you move to http://localhost/mini-framework2/customers/index
*/
public function index(... | true |
0de37d404871c5b42afd4671371133609dba1360 | PHP | thirtythreedev/Adldap2-Laravel | /src/AdldapAuthServiceProvider.php | UTF-8 | 2,989 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Adldap\Laravel;
use InvalidArgumentException;
use Adldap\Laravel\Commands\Import;
use Adldap\Laravel\Auth\DatabaseUserProvider;
use Adldap\Laravel\Auth\NoDatabaseUserProvider;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Hashing\Hasher;
class A... | true |
c6cecbe05a2f9726aad596ad90b5663129a866da | PHP | learnmove/angular2-vue2-laravel5.4-Todos | /laraveltodo/todo/app/Http/Controllers/UserController.php | UTF-8 | 1,165 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User;
use Tymon\JWTAuth\Exceptions\JWTException;
use JWTAuth;
class UserController extends Controller
{
//
public function signup(Request $res){
$this->validate($res,[
'name'=>'required',
'email'=>'required|email|uniqu... | true |
5ebaf4861f91fa1d3b53398cc33c6e7e6ddd989c | PHP | slywalker/tool_kit | /models/behaviors/mb_convert.php | UTF-8 | 603 | 2.640625 | 3 | [] | no_license | <?php
if (!function_exists('mb_trim')) {
function mb_trim($str)
{
return mb_ereg_replace(
'^[[:space:]]*([\s\S]*?)[[:space:]]*$', '\1', $str);
}
}
class MbConvertBehavior extends ModelBehavior {
function beforeValidate(&$model)
{
foreach ($model->data[$model->alias] as $key=>$data) {
if (is_string($dat... | true |
b147a11196c79aebbcb863803e08468a71400f6b | PHP | woodyj/battleships | /app/Classes/VesselBattleship.php | UTF-8 | 181 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Classes;
class VesselBattleship extends Vessel
{
const SIZE = 5;
public function __construct()
{
parent::__construct(self::SIZE);
}
}
| true |
ddf8c0ed21ab0f21e0c52faf19348d745624e808 | PHP | denisonfer/crud-php-procedural | /controllers/db-create.php | UTF-8 | 908 | 2.71875 | 3 | [] | no_license | <?php
//conexão com banco
require_once '../database/db_connect.php';
//sessão
session_start();
//verifica se botão foi clicado
if (isset($_POST['btn-cadastrar'])) {
//recebe os dados com filtro de segurança
$nome = mysqli_escape_string($conexao, $_POST['nome']);
$sobrenome = mysqli_escape_string($... | true |
b91f5c66a2e7df3926ba9c7b05ac4a72ca7e4fc9 | PHP | spalax/zf2-translation-scanner | /src/Zf2TranslationScanner/SpellCheckerAbstract.php | UTF-8 | 811 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
namespace Zf2TranslationScanner;
abstract class SpellCheckerAbstract implements SpellCheckerInterface {
/**
* @var array
*/
protected $misspelledWords = array();
/**
* @return array $misspelledWords
*/
public function getMisspelledWords() {
return $this->misspelledWords;
}
/**
* @... | true |