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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
cecf6af9a87b1955f2735722ca8f96ed685e2058 | PHP | DekodeInteraktiv/learndash-demo | /web/app/plugins/sfwd-lms/themes/legacy/templates/quiz/partials/show_quiz_check_page_box.php | UTF-8 | 2,616 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Displays Quiz Check Page Box
*
* Available Variables:
*
* @var object $quiz_view WpProQuiz_View_FrontQuiz instance.
* @var object $quiz WpProQuiz_Model_Quiz instance.
* @var array $shortcode_atts Array of shortcode attributes to create the Quiz.
* @var int $question_count Number of Question... | true |
0c90f8b4ce0a0ec32fd8185f0db9492cc324377c | PHP | nardellipv/socialpena | /app/Http/Requests/LoginNumberMemberRequest.php | UTF-8 | 775 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class LoginNumberMemberRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
... | true |
a986ee554a18f8fda4189f99448a9dc6fd48c51c | PHP | lotusbase/lotus.au.dk | /src/templates/lib/classes/expat/query.php | UTF-8 | 26,578 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace LotusBase\ExpAt;
use \PDO;
/* ExpAt\Query */
class Query {
private $error;
private $_expat = array();
private $expat = array();
// Construct
public function __construct() {
// Initailize classes
$this->error = new \LotusBase\ErrorCatcher();
// Default internal values
$_expat['clusteri... | true |
2524a0d33ce6712ebcd84f8e211c25985f8844a5 | PHP | Steve0723/PHP | /application/admin/validate/LoginValidate.php | UTF-8 | 2,004 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\admin\validate;
use think\Session;
use think\Validate;
use think\Db;
/**
* 定义一个登陆验证器
* Class LoginValidate
* @package app\admin\validate
*/
class LoginValidate extends Validate{
/**定义一个验证规则
* @var array
*/
public $rule=[
// 验证字段=>'验证规则'
'vcode'=>'require|captcha... | true |
c2d07485646da02fb50d9bd2dbf2f2954eb6e535 | PHP | alexandra-fedotova/laravel-sample-app | /module/Project/Achievement/src/Eloquent/DataRequest/AchievementDictionaryDataRequest.php | UTF-8 | 1,123 | 2.578125 | 3 | [] | no_license | <?php
namespace Project\Achievement\Eloquent\DataRequest;
use App\Eloquent\AbstractDataRequest;
use Project\Company\Entity\Company;
/**
* Class AchievementDictionaryDataRequest
*
* @package Project\Achievement\Eloquent\DataRequest
*/
class AchievementDictionaryDataRequest extends AbstractDataRequest
{
/**
... | true |
d6c854cb5635b729d6fc27060fd1d777f0aea552 | PHP | NadraniOussama/correction_examen | /2018_2019/exam2/no-struct/inner.php | UTF-8 | 382 | 2.625 | 3 | [] | no_license |
Nombre d'etudiants trouver: <?=size($etudiants)?>
Nombre d'etudiants:<?=$num?>
<br>
<table>
<tr>
<th>Code</th><th>Nom</th><th>Prenom</th><th>Action</th>
</tr>
<?php foreach ($etudiants as $e) { ?>
<tr>
<td><?=$e['Code'] ?></td>
<td><?=$e['Nom']?></td>
<td><?=$e["Prenom"]?></td>
<td><a href="supprimer.ph... | true |
d4948cc64407abe5f34829d9ace7952b7096f3cd | PHP | KoketsoMabuela92/test | /getPass.php | UTF-8 | 1,671 | 2.5625 | 3 | [] | no_license | <?php
require_once 'dbConnection.class.php';
//require_once 'redisConnection.php';
require_once('ConnetAutoloader.php');
class thisLogger extends logger {
}
$day = date('Y-m-d');
thisLogger::setLogFilename("/var/log/connet/campaigns/pricecheck_getPass$day.log");
thisLogger::setBacktrace();
define('ERROR_REPORTING'... | true |
c9906c9c2b3d84542a15d0f692a91f9415c29d01 | PHP | JaimeLujan1006/app | /php/insertar.php | UTF-8 | 712 | 2.625 | 3 | [] | no_license | <?php
include 'config.php';
$mysqli = new mysqli($Host, $User, $Password, $Dbname, $Port, $Socket);
if ($mysqli->connect_errno) {
printf("Falló la conexión: %s\n", $mysqli->connect_error);
exit();
}
//Datos del Formulario
$campo1 = $_POST['c1'];
$campo2 = $_POST['c2'];
$campo3 = $_POST['c3'];
$query_inser... | true |
2a09b8156e30e60eae0047a16089ca86cc2db8cb | PHP | printfxs/englishlistenpractice | /model/ListenSection.class.php | UTF-8 | 1,035 | 2.515625 | 3 | [] | no_license | <?php
class ListenSection extends model {
const TABLE_NAME = "listen_section";
#####课本数据表操作
public function insertSection($data) {
return $this->db->insert(self::TABLE_NAME,$data);
}
public function updateSection($data) {
if(empty($data)){
return false;
}
$condition = " id =".$data['id'];
unset($da... | true |
21dbbf4a2169d42529abe5ffd7738f9f57f898f4 | PHP | TauOmicronMu/labs | /2015/social-explorer/update/mysql/first_run.php | UTF-8 | 1,144 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
// Server information
$servername = "localhost";
$username = "phptest";
$password = "e94qWB6L";
$dbname = "labs";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
die("Connection faile... | true |
e8a5ad21fc391fec42d9a12bfa6cb2e1dd80e732 | PHP | Argentum88/wiki | /protected/models/Page.php | UTF-8 | 6,577 | 2.59375 | 3 | [] | no_license | <?php
/**
* This is the model class for table "page".
*
* The followings are the available columns in table 'page':
* @property integer $id
* @property string $title
* @property string $content
* @property integer $parent
* @property string $children
* @property string $url
*/
class Page extends CActiveRecor... | true |
95e2da08887a9a2844c52563954abbb5a06b98e2 | PHP | royercross/seguimientoegresados | /php/funciones.php | UTF-8 | 826 | 2.75 | 3 | [] | no_license | <?php
function get_message($hide=false){
if($hide===true) $classhide="alert-hide";
if(isset($_SESSION['mensaje'])){
if(!isset($_SESSION['mensaje_tipo']))
$_SESSION['mensaje_tipo']='success';
echo "<div class='alert alert-".$_SESSION['mensaje_tipo']." ".$classhide."' >".$_SESSION['mensaje']."</di... | true |
5fa9c25221c56ab6b157bab6fb9ddab24118d4e0 | PHP | LeBourb/abourgeons-guten-blocks | /src/post/render.php | UTF-8 | 1,869 | 2.546875 | 3 | [] | no_license | <?php
if ( ! function_exists( 'register_block_type' ) or is_admin() ) {
return;
}
register_block_type(
'abourgeons-guten/post',
[ 'render_callback' => 'abourgeons_guten_posts' ]
);
function abourgeons_guten_posts( $attributes ) {
if( ! isset( $attributes['postID'] ) ) {
return;
}
// Default values
$po... | true |
8da106e928ba07e8cfc81f4451b0391dffa88c89 | PHP | TwilDev/NuoTask | /ajax/getProjectInfo.php | UTF-8 | 446 | 2.828125 | 3 | [] | no_license | <?php
//prereq
require_once('../includes/db.php');
require_once('../classes/ProjectClass.php');
//initial validation
if(!empty($_POST['projectID'])) {
//get values
$projectID = $_POST['projectID'];
//Make new object and pass values to method
$projectObj = new project($DBH);
echo $result = $projectObj->g... | true |
2dabb63e16e4ec0f50a6ba4a81740eee24fc5eee | PHP | Hanamaxime/PHP-Application | /models/andrei/dbclass.php | UTF-8 | 891 | 3.15625 | 3 | [] | no_license | <?php
class Dbclass {
// private static $dsn = "mysql:host=localhost;dbname=phpclass";
// private static $username = 'root';
// private static $password = '';
private static $dsn = "mysql:host=dazzlin.xyz;dbname=dazzlin";
private static $username = 'tyzia';
private static $password = 'mYY.ed8z&8JG... | true |
e974edee3ea1a2464785094e9346f2802b207b30 | PHP | ihammer/SoundLab | /app/capsule/Api/Actions/Users/Edit.php | UTF-8 | 1,883 | 2.59375 | 3 | [] | no_license | <?php namespace Capsule\Api\Actions\Users;
use Sentry, Input;
use Capsule\Core\Users\User;
use Capsule\Core\Users\Commands\EditUserCommand;
use Capsule\Core\Users\AvatarUploadFailedException;
use Capsule\Core\Users\MobileExistsException;
use Capsule\Core\Support\Exceptions\ValidationFailureException;
use Capsule\Core\... | true |
6bd76c69b974d82c34b8a3bbeccc6dc1523c2ca0 | PHP | erepublicinc/docu | /core/models/class.Module.php | UTF-8 | 6,395 | 2.671875 | 3 | [] | no_license | <?
/*
* Modules are a hybrid object. They are a content item, so that they can use the revisioning of the content items
* However it does not use targeting but has its own link table that links it to a specific revision of a page
*
*/
class Module extends Content
{
/*
* creates a new article from ... | true |
397257942dd276c42b2de221df8d0b3ec077d1e6 | PHP | croxton/Stuff | /Stuff.php | UTF-8 | 8,849 | 2.796875 | 3 | [] | no_license | <?php defined('BASEPATH') or exit('No direct script access allowed');
/**
* Stuff
*
* A simple assets library for CodeIgniter.
*
* @package CodeIgniter
* @subpackage Asset
* @version 1.0
* @author Dan Horrigan <http://dhorrigan.com>
* @license Apache License v2.0
* @copyright 2010 Dan Horrigan
*
* Licen... | true |
323e03b3310bf7f4e303384087f53f431f131bb4 | PHP | ricardoper/slim3-skeleton | /app/Services/ErrorHandlerService.php | UTF-8 | 487 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Services;
use App\Kernel\ErrorHandler;
use App\Kernel\ServiceInterface;
class ErrorHandlerService implements ServiceInterface
{
/**
* Service register name
*/
public function name()
{
return 'errorHandler';
}
/**
* Register new service on dependency con... | true |
b966b470417d71dc2e15ee271e5cfe4763960eb7 | PHP | Fju/trivialis | /dist/phpinclude/Authorizer.class.php | UTF-8 | 1,270 | 2.890625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
require_once "autoload.php";
require_once "Config.class.php";
use \Firebase\JWT\JWT;
class Authorizer {
const JWT_VALID = 0;
const JWT_EMPTY = 1;
const JWT_INVALID = 2;
const JWT_EXPIRED = 3;
public static function authorize() {
// obtain JWT from request header
$headers = apache_request_headers();... | true |
a78b24a3c0bee6ef186cb9c6aa5672b56c9c761e | PHP | masixun71/Jsmemory | /test/SmemoryTest.php | UTF-8 | 649 | 2.984375 | 3 | [] | no_license | <?php
use Jue\Jsmemory\Infrastructure\Smemory;
use Jue\Jsmemory\Infrastructure\Storage;
require(__DIR__ . "/../src/Domain/IStorage.php");
require(__DIR__ . "/../src/Infrastructure/Smemory.php");
require(__DIR__ . "/../src/Infrastructure/Storage.php");
class tt
{
public $a;
public $b;
public function _... | true |
b1b00d6658b58bb77b5e5c757d350a281b9e9be0 | PHP | tongsq/mytest | /php/test_unpack.php | UTF-8 | 235 | 2.90625 | 3 | [] | no_license | <?php
$binarydata = "\x04\x00\xa0\x00";
var_dump($binarydata, strlen($binarydata));
$array = unpack("c4", $binarydata);
print_r($array);
$binarydata = pack("nvc*", 0x1234, 0x5678, 65, 66, 67);
var_dump($binarydata);
var_dump(chr(65));
| true |
f27e95f36d74bc2ccae0cbab76110d18c9a5ee53 | PHP | Singertwist/aulongcours | /ajouter-portfolio.php | UTF-8 | 1,868 | 2.8125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Titre</title>
</head>
<body>
<?php
$_POST['titre'] AND
$_POST['album'] AND
$name = $_FILES['image']['name'] AND //Le nom original du fichier, comme sur le disque du visiteur (exemple : mon_icone.png).
$type ... | true |
fa0d029ca4a93bc98f1f75141745da452a792ab1 | PHP | kadet1090/KeyLighter | /Tests/ContextTest.php | UTF-8 | 2,672 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/**
* Highlighter
*
* Copyright (C) 2016, Some right reserved.
*
* @author Kacper "Kadet" Donat <kacper@kadet.net>
*
* Contact with author:
* Xmpp: me@kadet.net
* E-mail: contact@kadet.net
*
* From Kadet with love.
*/
namespace Kadet\Highlighter\Tests;
use Kadet\Highlighte... | true |
a4697d323bef354fb26341b66f325797cd7f02e0 | PHP | ajaymorale/Feedback | /form3.php | UTF-8 | 5,616 | 2.5625 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>FeedBack Form</title>
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<?php
include "connection.php";
session_start();
if(isset($_GET['unm'])){
$u=$_GET['unm'];
echo "Hiiiiiiiiiiiiiiii". $u ." !";
}
if(isset($_GET['id'])... | true |
71dcbb33f88f5d4af68e5e6fd4b5c6e85c804947 | PHP | NastushaNik/Backend | /array/arrays_loops_tasks/17.php | UTF-8 | 804 | 3.4375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Yoga
* Date: 09.10.2017
* Time: 7:21
*/
//Сосктавьте массив месяцев. С помощью цикла foreach выведите все месяцы, а текущий
//месяц выведите жирным. Текущий месяц должен храниться в переменной $month.
$months = array("1"=>"Январь","2"=>"Февраль","3"=>"Март","4"=>... | true |
eb84090c0259120891c48ac7626e1f2a8b59f2d1 | PHP | boutell/SillyCMS | /src/vendor/symfony/src/Symfony/Component/HttpKernel/DataCollector/LoggerDataCollector.php | UTF-8 | 1,655 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Symfony\Component\HttpKernel\DataCollector;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
/*
* This file is part of the Symfony framework.
*
* (c) Fabien Potencier <fabien.potencier@symfony-projec... | true |
f5866beb0ab2f03355183afbf8911e8e2152937c | PHP | phannguyen/DesignPatterns | /BehavioralPatterns/Template/Football.php | UTF-8 | 367 | 3.109375 | 3 | [] | no_license | <?php
/*
* http://www.tutorialspoint.com/design_pattern/template_pattern.htm
*/
class Football extends Game
{
function endPlay()
{
echo "Football Game Finished!" . "<br>";
}
function initialize()
{
echo "Football Game Initialized! Start playing." . "<br>";
}
function startPlay()
{
echo "Football Ga... | true |
9ce604e500c5c38ea6ea1a37397ff0e829df5c49 | PHP | valeBarrera/prueba_tecnica_php | /app/Http/Controllers/UserController.php | UTF-8 | 6,318 | 2.625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\Models\Group;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Validator;
class UserController extends Controller
{
/**
* Store a newly created resource in storage.
*
* @param \Illumi... | true |
2101dd6b722f919162308f2e49de9c1d76ec60a9 | PHP | jadsvictor/estufa | /app/DAO/phDAO.php | UTF-8 | 1,938 | 2.65625 | 3 | [] | no_license | <?php
function ph(){
$servidor = 'localhost';
$banco = 'projeto_estufa';
$usuario = 'root'; //alterar
$senha = 'root'; // alterar
$link = mysql_connect($servidor, $usuario, $senha);
$db = mysql_select_db($banco,$link);
/* include '../sms/human_gateway_client_api/HumanClientMain.php';
$h... | true |
fff057570485e0e663b56dbc9c8f1dea25b5c965 | PHP | gq957534377/xyxxfbpt | /app/Store/ActionOrderStore.php | UTF-8 | 2,268 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: 郭庆
* Date: 2016/11/08
* Time: 16:34
*/
namespace App\Store;
use Illuminate\Support\Facades\DB;
/**
* Class roadStore
* 后台数据处理仓库层
*
* @package App\Store
*/
class ActionOrderStore{
// 表名
protected static $table = 'rel_action_order';
/**
* 插入数据
* ... | true |
4f28946ccb0025f2de77b79e314d5f12c74e7987 | PHP | pytha12/application-followup | /index.php | UTF-8 | 3,450 | 3.65625 | 4 | [] | no_license | <?php
class Interview
{
/* non static properties of a class cannot be called statically.
To solve the problem, precede $title with the keyword static. */
public static $title = 'Interview test';
//public $title = 'Interview test';
}
$lipsum = 'Lorem ipsum dolor sit amet, consectetur adipisicing elit. Poss... | true |
a1fb3e969e73fea7471853ba596759a2dcc36dee | PHP | vladislavmatvejev/MJ_Task | /src/Modeling/Customer.php | UTF-8 | 2,043 | 3.09375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: vlad
* Date: 27.11.2016
* Time: 19:30
*/
namespace Modeling;
class Customer
{
private $email;
private $mobile_number;
private $customer_name;
private $age;
private $address;
private $city;
private $zip_code;
private $something_1;
privat... | true |
f82bb9fdf478936656a7c9caf81115197facb2d5 | PHP | dancosbr/phorza | /src/Domain/Criteria/FilterOperator.php | UTF-8 | 754 | 2.90625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
declare(strict_types=1);
namespace Phorza\Domain\Criteria;
use Phorza\Domain\ValueObject\Enum;
use InvalidArgumentException;
/**
* @method static FilterOperator gt()
* @method static FilterOperator lt()
* @method static FilterOperator like()
*/
final class FilterOperator extends Enum
{
public const EQ... | true |
86d15db4735aa478cc8545cd79c2f0f398e172ce | PHP | wikimedia/labs-tools-meetingtimes | /src/Controller/MainController.php | UTF-8 | 1,552 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\MeetingTimes;
use App\Timezone;
use DateTime;
use Exception;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
class Mai... | true |
50f4dd705e19a31122b6ca6eb7f4648a8f3f4f8b | PHP | Kamelaar/faux_rhum | /application/models/User_model.php | UTF-8 | 5,192 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
class User_model extends CI_Model{
public function register($userInfo){
$this->db->insert('users', $userInfo);
}
// Log user in
public function login($username, $password){
// Validate
$this->db->select('*');
$this->db->from('users');
$this->db->where('username', $username... | true |
f3724a77503234b6abf36419a7ead3016854bf7e | PHP | Floravel/human-comparator | /tests/TemperatureTest.php | UTF-8 | 534 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Floravel\HumanComparator\Tests;
use Floravel\HumanComparator\Temperature;
use PHPUnit\Framework\TestCase;
class TemperatureTest extends TestCase
{
/** @test */
public function it_can_convert_celsius_to_fahrenheit()
{
$fahrenheit = Temperature::forCelsius(100)->toFahrenheit();
... | true |
a1de79c1b5941550c3ac62d2864608574a15caca | PHP | oezguerisbert/Arbeitsprobe | /www/Arbeitsprobe/repositories/Kommentar.repo.php | UTF-8 | 1,460 | 2.953125 | 3 | [] | no_license | <?php
/**
* Kommentar Repository
*/
class KommentarRepository extends BaseRepository
{
/**
* Findet alle Kommentare nach der AuftragsID
*
* @param int $auftragid
* @return Kommentar[] Kommentare-Array
*/
public static function findAllByID(int $auftragid)
{
$className = st... | true |
0b8761ea4d64c4da4235c3cddfa41eed035a6588 | PHP | ukrdev/patterns | /adapter/index.php | UTF-8 | 1,624 | 3.71875 | 4 | [
"MIT"
] | permissive | <?php
/**
* Adapter Pattern
*
* Classes that creates a common interface to a variety of different interfaces.
* Often useful when wanting to use the strategy pattern with various vendor
* libraries.
*/
class FancyWebService
{
public function new($name, $color)
{
var_dump("I'm creating a new fancy... | true |
19a58f34584e478372d844dd03a41abc2b52f995 | PHP | kevinlinux254/website-with-admin-panel | /admin/addRentals.php | UTF-8 | 962 | 2.515625 | 3 | [] | no_license | <?php
include 'security.php';
include 'db.php';
// add rentals
// ===========
$uploaddir = "../images/";
$uploadfile = $uploaddir . basename($_FILES["rental_images"]["name"]);
if (isset($_POST['add_rentals'])) {
$id = $_POST['id'];
$rentals_title = $_POST['title'];
$rentals_description = $_P... | true |
861848e688759074a7c297bce237c417a301c649 | PHP | metalabharvard/MLH-Custom-WP-Theme | /functions.php | UTF-8 | 710 | 2.59375 | 3 | [] | no_license | <?php
if ( ! function_exists( 'twentyten_posted_on' ) ) :
/**
* Prints HTML with meta information for the current post—date/time and author.
*
* @since Twenty Ten 1.0
*/
function twentyten_posted_on() {
printf( __( '<span class="%1$s">Posted on</span> %2$s <span class="meta-sep">by</span> %3$s', 'twentyten' ),
... | true |
9e99ddb6b1e2b11a482d24705efb990889eee19f | PHP | achugo/php-tutorial | /connect.php | UTF-8 | 413 | 2.65625 | 3 | [] | no_license | <?php
$localhost = 'localhost';
$user = 'root';
$password = '';
$connect = mysql_connect($localhost, $user, $password);
if ($connect) {
echo "connection all good" .'<br/>';
}
else{
echo "nothing bro, just chilling";
}
$db_name = "a_database";
$handle = mysql_select_db($db_name);
if ($handle) {
... | true |
00afb6c535b9919929ee40eb9d1b51b317232a7b | PHP | chauquang9/WebhookFacebook | /app/Http/Facebook/EventInterface.php | UTF-8 | 344 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Facebook;
/**
* Interface EventInterface
* @package App\Http\Facade
*/
interface EventInterface {
/**
* @param array $data
* @return mixed
*/
public function action(array $data);
/**
* @param array $data
* @return mixed
*/
public function get... | true |
bf6a7a8f71e090598c0bf42c38f6d2a05ca968c5 | PHP | reformalaw/CE-Reforma | /apps/customer/modules/home/templates/_userWebsitePracticeArea16.php | UTF-8 | 698 | 2.6875 | 3 | [] | no_license | <h2>Areas of Practice</h2>
<ul>
<?php if(!empty($practiceAreaArr)) { ?>
<?php for($i=0; $i<count($practiceAreaArr); $i++) {?>
<?php if(($i+1) == count($practiceAreaArr)): ?> <!--this condition is for remove the last white line for that put the style in li-->
<li style=" border-bottom:none;" ><?php ech... | true |
2f42cb9abb5463aadfe0713b8aca0a455d424f27 | PHP | ekumahost/cbt | /CONTROLLER/inc.excel.header.php | UTF-8 | 1,604 | 2.765625 | 3 | [] | no_license | <?php
// Set fills
$objPHPExcel->getActiveSheet()->getStyle('A1:E1')->getFill()->setFillType(PHPExcel_Style_Fill::FILL_SOLID);
$objPHPExcel->getActiveSheet()->getStyle('A1:E1')->getFill()->getStartColor()->setARGB('FF808080');
// Set style for header row using alternative method
//echo date('H:i:s') , " Set style for... | true |
4a111795173198f615ca65128e8283120b2e525e | PHP | bulfaitelo/tests | /PHP/strings/string.php | ISO-8859-1 | 534 | 3.9375 | 4 | [] | no_license |
<?php
$str = <<<EOD
Exemplo de uma string
distribuda em vrias linhas
utilizando a sintaxe heredoc.
EOD;
/* Exemplo mais complexo, com variveis */
class foo
{
var $foo;
var $bar;
function foo()
{
$this->foo = 'Foo';
$this->bar = array('Bar1', 'Bar2', 'Bar3');
}
}... | true |
de663a9b77891b7036a4766b61a73d21ffbceabb | PHP | palmic/lbox | /lBox/lib/classes/forms/abstract.LBoxFormControlChoose.php | UTF-8 | 1,874 | 3 | 3 | [] | no_license | <?php
/**
* class LBoxFormControlChoose
*/
abstract class LBoxFormControlChoose extends LBoxFormControl
{
/**
* @var array
*/
protected $options = array();
/**
* @param LBoxFormControlOptionItem $option
* @throws LBoxExceptionFormControl
*/
public function addOption(LBoxFormControlOptionItem $option) {... | true |
e646db4af87da605f8848ede4f76d8f8f45ceda6 | PHP | DianaBolocan/DulappMD | /App/Models/WardrobeMapper.php | UTF-8 | 6,514 | 2.890625 | 3 | [] | no_license | <?php
// file: model/UserMapper.php
require_once(__DIR__."/../core/DatabaseConnection.php");
require_once(__DIR__."/ActionMapper.php");
class WardrobeMapper {
private $db;
public function __construct(){
$this->db = DatabaseConnection::getInstance();
}
public function selectAllWardrobes($userID){
$sessionK... | true |
a77d3b2893e2c09ee319c844d6295272007659da | PHP | paullewallencom/laravel-978-1-7882-9226-9 | /_src/Section3/database/seeds/UserSeeder.php | UTF-8 | 384 | 2.8125 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
use App\Models\User;
use Illuminate\Database\Seeder;
class UserSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$users = factory(User::class)->times(1)->create();
foreach ($users as $user) {
echo 'User ... | true |
c57df85c6429271b09286634b608b95cf48af84e | PHP | SherinBloemendaal/php-google-analytics-reporting-api-v4 | /src/Serializer/DateRangeSerializer.php | UTF-8 | 646 | 2.875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace sherin\google\analytics\Serializer;
use DateTime;
use Google_Service_AnalyticsReporting_DateRange;
class DateRangeSerializer
{
/**
* @param DateTime $startDate
* @param DateTime $endDate
* @return Google_Service_AnalyticsReporting_DateRange
*/
public static function deseri... | true |
0bef431c3d957b74e93bb5775fe3e28f22d2ef03 | PHP | geckozilla/Peliwangi | /database/migrations/2017_12_05_172327_create_aplikasis_table.php | UTF-8 | 634 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateAplikasisTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('aplikasis', function(Blueprint $table) {
... | true |
2c39b89341e1acad8e57c68adc0f0b7a2fc556b5 | PHP | AllAlgorithms/php | /algorithms/sorting/monkey_sort.php | UTF-8 | 1,396 | 3.984375 | 4 | [
"MIT"
] | permissive | <?php
/**
* PHP implementation of MonkeySort
*
* This sorting algorithm should not be used in production as it might take a very long time.
* But this is per design. BongoSort randomizes order of elements in the input array and checks
* if it sorted the array by chance.
* You could say this is an anti-pattern o... | true |
85c9d75649849515d1c03dcaffc503ab9f35d670 | PHP | cathyleeson/ECKL | /classes/library.php | UTF-8 | 8,948 | 3.28125 | 3 | [] | no_license | <?php
namespace \classes;
// pc users may have to rework the include statements until we figure out how mto do autoloading
include_once "/Applications/XAMPP/xamppfiles/htdocs/songlibrary2/classes/connector.php";
class Library {
//the use statement connects the connector trait which connects the class to the data... | true |
25f7f71c9adeef8a47924e50eb126d230b32aba9 | PHP | jtlai0921/PU1903_PHP7_- | /繁/ch08/8.2.php | UTF-8 | 597 | 3.65625 | 4 | [] | no_license | <html>
<head>
<title> 建構方法</title>
</head>
<body>
<?php
class guests{
private $name;
private $gender;
function __construct($name,$gender){
$this->name = $name;
$this->gender = $gender;
}
function getname(){
return $this->name;
}
function getgender(){
... | true |
d7147eaf2c9068b22a8746266d6813db37f867e2 | PHP | adong23664/pages_demo | /example/mod28/_10_pdo_modifyStructure.php | UTF-8 | 2,359 | 3.109375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>fetchAll()</title>
<style>
</style>
</head>
<body>
<?php
echo "<h2 style='color:blue; text-align: center'>說明如何修改表格的結構</h2>";
echo "<h4 style='color:brown; font-family: monospace; font-size: 22px'>\$pdo ... | true |
cd9b32663ee7a91376426a60ffea26e4dd355770 | PHP | MechaDestoroyah/final-official | /domain/Room.php | UTF-8 | 593 | 3.03125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: cody
* Date: 8/14/2017
* Time: 12:37 PM
*/
namespace Domain;
class Room
{
protected $id;
protected $topic;
public function ID($id){
$this->id=$id;
return $id;
}
public function Topic($topic){
$this->topic=... | true |
f157ee334c3a1a53e1e2c27b2c95c7e3f0e49fe6 | PHP | yashrajb/My-story.com | /write.php | UTF-8 | 3,490 | 2.640625 | 3 | [] | no_license | <?php
require_once('sesssion.inc.php');
require_once('db.inc.php');
$connect = mysqli_connect(DB_HOST,DB_USER,DB_PASS,DB_SELECT) or die();
$msg = '';
if(isset($_POST["lyrics_title"]) AND !empty($_POST["lyrics_title"])) {
if(isset($_POST["lyrics_body"]) AND !empty($_POST["lyrics_body"])) {
$lyrics_title... | true |
cb4513b2809faf53e6b303f912ab44bb2701c763 | PHP | Symfony-Plugins/csOopCssPlugin | /test/unit/csOopCssTest.php | UTF-8 | 1,581 | 2.546875 | 3 | [] | no_license | <?php
require_once(dirname(__FILE__).'/../../../test/bootstrap/unit.php');
require_once(dirname(__FILE__).'/../lib/csOopCss.class.php');
require_once(dirname(__FILE__).'/../lib/csOopCssSelector.class.php');
require_once(dirname(__FILE__).'/../lib/csOopCssStyle.class.php');
$t = new lime_test(7, new lime_output_color(... | true |
4fb889a746862c79d843fb242adacc7301600287 | PHP | linj2015/hrpositioncontrol | /OrgChart-master/demo/php/pick_relation.php | UTF-8 | 1,403 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
/*
PHP MSSQL Example
Replace data_source_name with the name of your data source.
Replace database_username and database_password
with the SQL Server database username and password.
*/
$employee_id_initial=$_POST["employee_id"];
include_once 'constants.php';
$serverName = SQL_SERVER_NAME;
$uid = SQL_SERVER_US... | true |
ad9076d80c7210c5d6f465ea8ca78f77e4a818f1 | PHP | escribanodiaz/localHost | /PHP/Tema1 y 2/funciones/practica20.php | UTF-8 | 464 | 3.671875 | 4 | [] | no_license | <?php
echo "Fet amb el for";
echo "<br />";
$result = 0;
for($e=0;$e<=10;$e++){
$result = 2 * $e;
echo "2 x " .$e. " = " .$result .'<br />';
}
echo "<br />";
echo "Fet amb el while";
echo "<br />";
$f = 0;
while($f<=10){
echo "2 x " .$f. " = " .($f*2) .'<br />';
$f++;
}
echo "<br />";... | true |
0d9afe930a4d211a7d998ebaa39d514f44ff5856 | PHP | jarektkaczyk/laravel-searchable | /src/Parser.php | UTF-8 | 2,482 | 3.296875 | 3 | [
"MIT"
] | permissive | <?php
namespace Sofa\Searchable;
class Parser implements Contracts\Parser
{
/**
* Default search weight.
*
* @var integer
*/
protected $weight;
/**
* Wildcard token.
*
* @var string
*/
protected $wildcard;
/**
* Create new parser instance.
*
... | true |
810ecccf42ab88c684453e7d526bac515ddbeeff | PHP | emintela/youflix | /2014_12_13_070826_add_title_to_videos_table.php | UTF-8 | 800 | 2.6875 | 3 | [] | no_license | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddTitleToVideosTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('videos', function($table)
{
$table->string('title');
$table->date('rel... | true |
ba9d137cfc2eb602108ee3b42d718d1014db99fd | PHP | choudharyhimanshu/student-search | /script/user_data.php | UTF-8 | 506 | 2.53125 | 3 | [] | no_license | <?php
include 'JSON.php';
$json = new Services_JSON();
$params = array(
'username' => $_GET['username']
);
$data = file_get_contents(dirname(dirname(__FILE__)).'/data/student_data.bin');
$data = unserialize($data);
$result = array();
$result['data'] = NULL;
foreach ($dat... | true |
ca02b12c1dd2f86d73b81403eb647693d5f65e32 | PHP | mxnr/lectureapp | /src/Feedler/Framework.php | UTF-8 | 1,593 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Feedler;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Matcher\UrlMatcher;
use Symfony\Component\Routing\Generator\UrlGenerator;
use Symfony\Component\HttpKernel\Controller\ControllerResolver;
use Symfony\Component\Routing\E... | true |
d14dcef21f1c76067cb37b9f7b75a590b60ee31b | PHP | kmmbestshine/kmmbestshinetrack | /database/migrationsold/2019_01_08_113901_create_sionfee_structure_table.php | UTF-8 | 1,332 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSionfeeStructureTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
$sql= 'CREATE TABLE sionfee_structure (
id int(10... | true |
f5d7a18ff6e550d5c23689909efe8157d6e2d8d3 | PHP | doaaMohmmed/hr | /module/Application/src/Application/Model/LocationGroup.php | UTF-8 | 790 | 2.625 | 3 | [] | no_license | <?php
namespace Application\Model;
use Payment\Model\EntityInterface;
class LocationGroup implements EntityInterface {
private $id;
private $locationId;
private $attendanceGroupId;
public function getId()
{
return $this->id;
}
public function getLocationId()
... | true |
d6e0ae64b72d11c4bc75682d5c2ec6165ab7d47a | PHP | ProyectoAldeaAnimal/Archivos-de-la-BD | /Otros elementos/dias.php | UTF-8 | 418 | 3.34375 | 3 | [] | no_license | <?php
function getMonthDays($Month, $Year)
{
if( is_callable("cal_days_in_month"))
{
return cal_days_in_month(CAL_GREGORIAN, $Month, $Year);
}
else
{
return date("d",mktime(0,0,0,$Month+1,0,$Year));
}
}
$year = 2014;
$dias= array();
for($i=0;$i<12;$i++){
$dias[$i] = getMonth... | true |
48515f3df2839d8905da2774622f3d1be8d71678 | PHP | Ahmedkholaif/Online_Cafe | /classes/EmailManager.php | UTF-8 | 1,341 | 2.6875 | 3 | [] | no_license | <?php
namespace App;
use PHPMailer\PHPMailer;
use PHPUnit\Runner\Exception;
require __DIR__ . '/../vendor/autoload.php';
class EmailManager
{
public function sendMail($userName, $userEmail, $userPassword)
{
try {
$mail = new PHPMailer\PHPMailer;
$mail->Host = 'smtp.gmail.com... | true |
9075694744a2326a497e55fb8a16e3a382638bca | PHP | rrifat/mobilemarket | /app/models/m_products.php | UTF-8 | 8,574 | 3.21875 | 3 | [
"MIT"
] | permissive | <?php
/*
Products Class
Handle all task related to retrieving and displaying products
*/
/**
*
*/
class Products
{
private $Database;
private $db_table = 'products';
function __construct()
{
global $Database;
$this->Database = $Database;
}
/*
Getters /Setters
*/
/**
* Retrive Product Informat... | true |
63f1900b654ddaeb9e2637f927fbeaad120b6985 | PHP | ivamgf/WebService-soap | /tryBlock.php | UTF-8 | 174 | 2.78125 | 3 | [] | no_license | <?php
// try Block
try {
// Function block
} catch (Exception $e) {
echo "<h2>Exception Error!</h2>";
echo $e->getMessage();
}
// try Block
?>
| true |
c37ebb48dc58cd3ec4b1b13bfd26791e9b34a3cf | PHP | actual-saurabh/lifterlms-blocks | /tests/unit-tests/class-llms-blocks-test-functions.php | UTF-8 | 2,753 | 2.625 | 3 | [] | no_license | <?php
/**
* Test LLMS_Blocks_Page_Builders class & methods.
*
* @package LifterLMS_Blocks/Tests
* @since 1.3.0
* @version 1.3.1
*/
class LLMS_Blocks_Test_Functions extends LLMS_Blocks_Unit_Test_Case {
/**
* Test the classic editor enabled check function.
*
* @return void
* @since 1.3.0
* @version... | true |
4d36e687f367d4f07fb7a64390a671642be76c77 | PHP | fortSQ/test | /src/Round.php | UTF-8 | 2,213 | 3.46875 | 3 | [] | no_license | <?php
namespace Fool;
use Fool\Card\Rank;
use Fool\Card\Suit;
class Round implements IRound
{
const INIT_CARD_COUNT = 6; # по сколько карт раздаем в начале
/** @var Game Игра */
private $game;
/** @var Card[] $deck Колода */
private $deck = [];
/** @var Suit Козырь */
private $trump;
... | true |
260f1ff244b24a8d53409e1ff9b615305fac4bf4 | PHP | muthuwebg/TV-api | /app/Console/Commands/PlanSubscribe.php | UTF-8 | 1,989 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Log;
use App\Order;
use Carbon\Carbon;
class PlanSubscribe extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'plan:subscribe'... | true |
769688dd5d0c896ad2db20d40ad94a9fadb3dba9 | PHP | BlueEcheloon/ai1 | /ai1-w-9-patterns/adapter/after/ThrowableAdapter.php | UTF-8 | 303 | 3.03125 | 3 | [] | no_license | <?php
class ThrowableAdapter implements WeaponInterface
{
/** @var ThrowableInterface */
private $adaptee;
public function __construct(ThrowableInterface $adaptee)
{
$this->adaptee = $adaptee;
}
public function attack()
{
$this->adaptee->doThrow();
}
}
| true |
df5e4dc8e6a86b9c08ffd9d380bf506b2609d9c5 | PHP | Zafuzi/Mysidia-Deluxe | /public_html/view/exploreicelakeview.php | UTF-8 | 4,299 | 2.515625 | 3 | [] | no_license | <?php
include 'Fish.php';
class ExploreicelakeView extends View{
// The display text for the page.
protected $lang = [
'page_title' => 'Fishing in the ice Lake',
'area_description' => null,
'would_you_like_to_fish' => 'Would you like to go fishing here?',
'area_img' => 'http://i64.tinypic.com/mt... | true |
049785282506c59508d885b6fb199e480cbc3998 | PHP | alejandrachacon/proweb | /actualizar.php | UTF-8 | 9,773 | 2.828125 | 3 | [] | no_license | <?php
session_start();
// Verificar que solo pueda entrar el admin
if (!isset($_SESSION['rol']) || (isset($_SESSION['rol']) && $_SESSION['rol'] != 'admin'))
{
header('Location: index.php');
exit();
}
if (!isset($_GET['tipo']) || ($_GET['tipo'] != 'equipo' && $_GET['tipo'] != 'libro' && $_GET['tipo'] != 'evento'))
... | true |
f92098f7a8190ab29de268c8000160876e97ac78 | PHP | Nisha2192/Finalproject | /website/connect.php | UTF-8 | 385 | 2.515625 | 3 | [] | no_license |
<!----File name:connect.php--->
<!----Author's name: Nisha Dhanwani,kawaljeet kaur,navdeep kaur--->
<!----File Description: this is a login page . first page of website--->
<?php
try{
$dsn= 'mysql:host=localhost;dbname=trading_card';
$username = 'root';
$password= '';
$db= new PDO($dsn, $username, $password);
}... | true |
811a05d786f321cf495e8ac84139ea9156266d3f | PHP | max-kut/AmoCRM | /src/Query/LeadsQuery.php | UTF-8 | 966 | 2.5625 | 3 | [] | no_license | <?php
namespace AmoPRO\AmoCRM\Query;
use AmoPRO\AmoCRM\Query\Params\HasQueryParam;
use AmoPRO\AmoCRM\Query\Params\HasResponsibleUserParam;
/**
* @link https://www.amocrm.ru/developers/content/api/leads
*/
final class LeadsQuery extends AbstractEntityQuery
{
use HasQueryParam;
use HasResponsibleUserParam;
... | true |
f87c5460ca79c507429e55731f0d561c2641d1f9 | PHP | trojan302/MarketPlace | /admin/detail_user.php | UTF-8 | 3,599 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
$id_user = $_GET['id_user'];
$conn = new MySQLi('localhost','root','','marketplace');
$sql = "SELECT * FROM users WHERE id_user='".$_GET['id_user']."'";
$query = $conn->query($sql);
$data = $query->fetch_assoc();
// $sqlmember = "SELECT * FROM members WHERE id_member!=1";
// $run = $conn->query... | true |
f2ffff0c469caf31fb5312e5163f4e5553db3ad4 | PHP | hyorek/IMIESHPERE | /application/models/connectionModel.php | UTF-8 | 790 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
require_once 'application/bddConnect/singletonbdd.php';
class connectionModel {
public function getConnection() {
$bdd = BDD::getInstance ();
$email = $_POST['connectionEmail'];
$pwd = $_POST['connectionPassword'];
$req = "SELECT * FROM `user_role` INNER JOIN user ON user.id_user = user_role.id... | true |
76a56f363db1e0e3643c04f44b6f85991635cc67 | PHP | keehao/Php-Object-Framework | /HTFramework/DevelopmentModel/AbstractFactory/HTBaseInfo.php | UTF-8 | 892 | 2.78125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: saligia
* Date: 14-9-29
* Time: 下午1:43
*/
namespace HTFramework\DevelopmentModel\AbstractFactory;
use HTFramework\Library\HTException;
trait HTBaseInfo
{
/**
* @param $property_name
* @param $value
* @throws \HTFramework\Library\HTException
* @des... | true |
da413e6822aed3333ee1bb2f98d4a8b711f9845c | PHP | max-well89/johnson | /web/parser/sku.php | UTF-8 | 9,205 | 2.53125 | 3 | [] | no_license | <form method="POST" enctype="multipart/form-data">
<input type="file" name="sku"/>
<div>
<label for="database_en">en</label>
<input id="database_en" type="radio" name="id_database" value="1" />
</div>
<div>
<label for="database_ru">ru</label>
<input id="database_ru" type=... | true |
c3c7a76f40f8ce5c9ead29822e017896561d853a | PHP | bovill2006/Projects | /SelfServedAdPlateform Google DFP/blog_Bovie_Lu/blogphaseI.php | UTF-8 | 587 | 2.53125 | 3 | [] | no_license | <html>
<body>
<center>
<h2> Book Posts </h2>
<?php
include("dbconnect.php");
include("manageblog.php");
$con = new dbconnect();
$con->connect();
error_reporting(E_ALL);
$result = mysql_query("SELECT date_published, post_title, author, post, post_id FROM bookposts ORDER BY date_published DESC");
$man= new Manageblog()... | true |
96619134de6c32a4beeedc202b9d1db96d2c3d01 | PHP | yuriteixeira/WorkflowBundle | /Tests/AbstractIntegrationTest.php | UTF-8 | 2,565 | 2.5625 | 3 | [] | no_license | <?php
namespace YuriTeixeira\WorkflowBundle\Tests;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
/**
* Abstract integration test class
*
* @author Yuri Teixeira <contato@yuriteixeira.com.br>
*/
abstract class AbstractIntegrationTest extends AbstractUnitTest
{
protected function setUp()
{
p... | true |
4e47fb598e06b2439ada36a330e967fbb6742e29 | PHP | dev-ian-o/cpp-cai | /includes/classes/exam-functions.php | UTF-8 | 6,841 | 2.65625 | 3 | [] | no_license | <?php $dir = $_SERVER['DOCUMENT_ROOT'] .'cai_project'; ?>
<?php require_once $dir.'/includes/database/database.php';?>
<?php
function add_lesson($row,$conn){
$stmt = $conn->prepare("INSERT INTO tbl_lessons_chapters(
lesson_description,
lesson_chapter) values(:lesson_description,:lesson_chapter)
");
$stmt->... | true |
4c875f1a1b705351cc9baf405f1d7cd45bcdaed5 | PHP | Mouni212/Supermarket | /php_files/customer.php | UTF-8 | 867 | 2.6875 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<title>Customer page</title>
<style>
body {
background-image: url("background1.jpg");
}
</style>
</head>
<body>
<?php
include "connect.php";
session_start();
$query="select * from product";
$result=mysqli_query($conn,$query);
$num=mysql... | true |
71960ee36adecbc7908b8a4206fafd54c6336430 | PHP | joebubna/cora-container | /app/classes/class.Test.php | UTF-8 | 234 | 3.328125 | 3 | [
"MIT"
] | permissive | <?php
namespace Classes;
class Test {
protected $defaultIndent = 6;
public function indent($indentLevel)
{
$spacer = '';
for ($i=0; $i < $indentLevel; $i++) {
$spacer .= ' ';
}
return $spacer;
}
} | true |
598dc74840a8c7a286e7274d4a0a066b19d485e8 | PHP | MarekGalganski/car_rental_backend | /app/Models/Car.php | UTF-8 | 882 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Car extends Model
{
use HasFactory;
public function carBookings()
{
return $this->hasMany(CarBooking::class);
}
public function reviews()
... | true |
0d5c5cbd79052fa66f1149fec8b53d3d5ed521f3 | PHP | rezihardi/latihan | /02-looping.php | UTF-8 | 149 | 3.625 | 4 | [] | no_license | <?php
//menggunakan for
for ($i=1; $i<=10 ; $i++){
echo $i. '<br>';
}
//menggunakan while
$i = 1;
while ($i <= 10) {
echo $i. '<br>';
$i++;
}
| true |
0ae4182186583aa859ce52a5e30bdcac465bcf3c | PHP | javipj/Sarti_1819 | /uf1/part1/ejercicio3b-tablamultiplicarT.php | UTF-8 | 685 | 3.53125 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>Tabla de multiplicar</title>
<link rel="stylesheet" type="text/css" href="estiloT.css">
</head>
<body>
<h1>Tabla de multiplicar</h1>
<?php
for ($n=0; $n<=10; $n++){
print ("<P>La tabla de multiplicar del $n es:</P>");
print ("<table>");
p... | true |
52dd61346a14e3301b8afa5a50d2d0f599e23dec | PHP | suframe/core | /src/components/Config.php | UTF-8 | 3,035 | 2.75 | 3 | [] | no_license | <?php
/**
* User: qian
* Date: 2019/6/6 15:45
*/
namespace suframe\core\components;
use Zend\ConfigAggregator\ConfigAggregator;
use Zend\ConfigAggregator\ZendConfigProvider;
class Config extends \Zend\Config\Config
{
private static $instance;
/**
* @param mixed ...$args
* @return static
*/... | true |
605feabf505479378e41fff0dfc98b54b8d9aaab | PHP | Prior99/coffee | /src/content.php | UTF-8 | 340 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
/*
* Prototype for all Contents
* Contains a pointer to the main class of the program
* And defines the default constructor
*/
class Content
{
protected $coffee;//Pointer to the main class of the program
public function __construct($coffee) //Default constructor
{
$this->coffee = $coffee;//Sav... | true |
f2336e35d8601ec9ea5b190a47a102eebd5270a7 | PHP | miao1007/swaggy-jenkins | /clients/php-laravel/generated/lib/app/Models/MultibranchPipeline.php | UTF-8 | 1,214 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* MultibranchPipeline
*/
namespace app\Models;
/**
* MultibranchPipeline
*/
class MultibranchPipeline {
/** @var string $display_name */
private $display_name;
/** @var int $estimated_duration_in_millis */
private $estimated_duration_in_millis;
/** @var string $latest_run */
pr... | true |
fb650936b35bc19a0b4d44c77a53b9513a853d2e | PHP | wa2g/kisarawe.github.io | /pdfwana.php | UTF-8 | 1,692 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
require ('pdf/fpdf.php');
class PDF extends FPDF {
function header (){
// $this->image('pic/logo.png', 10, 10, 20);
$this->setfont('Arial','B', 16);
$this->settextcolor(0, 0, 0);
$this->cell(0, 10, 'WANANCHI', 0, 0, 'C');
$this->Ln(10);
$this->setfont('Arial','',12);
$this->settextcolor(0, 0, 0);
... | true |
c3ad2223aed5b9af330d1d99c3c3a3303fe321bf | PHP | ripespoon/code-example | /app/Models/User.php | UTF-8 | 5,058 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Str;
use Carbon\Carbon;
use App\Jobs\SendEmailJob;
use App\Models\Pa... | true |
5d8439f40100b91c32600b44fa319229a2bd292a | PHP | chrisbeckstrom/fishinglog | /user.php | UTF-8 | 2,680 | 2.984375 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
session_start();
/* USER PAGE- PROFILE PAGE!
this page will show information about the currently
logged-in user
(stats!)
*/
?>
<link rel='stylesheet' href='css/style.css' type="text/css" />
<?php
include 'header.php';
// include 'footer.php';
include 'config/connect.php';
print $header;
?>
<div id='main'>
... | true |
7e52320d8391985b1e9f2a7d251976679226dfca | PHP | codeproject-th/alumni | /bin/libs/html.php | UTF-8 | 711 | 2.765625 | 3 | [] | no_license | <?php
class html{
public static function select_option($option=array(),$data_key=array('label'=>'','value'=>''),$data=array(),$select=""){
$html['option'] = '';
if(count($option)>0){
foreach($option as $key => $val){
$html['option'] .= ' '.$key.'="'.$val.'"';
}
}
$html['list'] = '<option value="">... | true |
5cb024b8c8f05073d391d5e03650b97463e21467 | PHP | elitetheespeon/PHP-Booru | /html/classes/wiki.php | UTF-8 | 28,398 | 2.59375 | 3 | [] | no_license | <?php
class wiki{
var $post;
var $tag;
var $user;
var $logger;
var $search;
function __construct(){
$this->post = new post();
$this->user = new user();
$this->logger = new logger();
$this->search = new search();
$this->tag = new tag();
}
function list_all(){
global $f3, $db;
//Number of w... | true |
0ed1bea3cca5d1e246835b0e9ef489ed56028c0f | PHP | LittleStarJenny/Jenny-Carl-Malin-Roger | /classes/apiclass.php | UTF-8 | 1,180 | 3.125 | 3 | [] | no_license | <?php
class API {
// DB
private $conn;
private $table = 'userapi';
// Post Properties
public $userName;
public $passWord;
public $apiKey;
// Constructor with DB
public function __construct($db) {
$this->conn = $db;
... | true |
54c3558fd7a23878584427b6fefee4fa4c5f18d0 | PHP | ErikOnBike/mailbox-backup | /mailbox-backup.php | UTF-8 | 18,275 | 2.6875 | 3 | [] | no_license | <?php
// Retrieve configuration
require_once('config.php');
// Constants
define('DATE_TIME_FORMAT', 'Y-m-d\TH:i:s.v\Z'); // <yyyy>-<mm>-<dd>T<HH>:<MM>:<SS>.<SSS>Z
define('CREATE_FROM_STRING_FORMAT', 'Y-m-d*H:i:s.u*'); // Same as above except replaced fixed characters T and Z and changed milliseconds to microsec... | true |