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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
defe02ea22f5703bf6b978128269136f6fe5669b | PHP | thanhbinh8715/bch1512 | /php_Tutorial/demo_function.php | UTF-8 | 1,054 | 3.40625 | 3 | [] | no_license | <?php
$b = '';
if (isset($_REQUEST['b'])){
$b = $_REQUEST['b'];
}
?>
<form action="" method="get">
So thu nhat : <input type="text" name="a" value="<?php
if (isset($_REQUEST['a'])) {
echo $_REQUEST['a'];
}
?>" /> <br />
So thu hai : <input type="text" name="b" value="<?= $b ?>" /><?php ... | true |
3194a86dc6b2569c4620401445c374b824eada90 | PHP | kalashretman/masterilla | /models/RegisterForm.php | UTF-8 | 848 | 2.828125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use yii\base\Model;
class RegisterForm extends Model
{
public $email;
public $password;
public $password2;
public $firstname;
public $lastname;
public $country;
public $region;
public $city;
public function rule()
{
return [
... | true |
6ced95c9873ec2b9ff37b292a048e1bc41c47bd3 | PHP | mathewsd3/php09form2 | /exercise-form-2.php | UTF-8 | 3,068 | 3.203125 | 3 | [] | no_license | <?php
/*
if(isset($_POST['send'])){
$error='';
//Sample of php validation
if(isset($_POST['languages']) && count($_POST['languages'])<2){
$error.= '<div id="erreur">Please choose at least 2 items</div>';
}
echo 'sending:';
echo '<ul>';
if($_POST['send']){
foreach($_POST as $k=>$v){... | true |
518429738036399ee5602b937ec82aee45022f44 | PHP | nancy010006/femr | /midcase/controller.php | UTF-8 | 7,065 | 2.609375 | 3 | [] | no_license | <?php
// Allow from any origin
if (isset($_SERVER['HTTP_ORIGIN'])) {
header("Access-Control-Allow-Origin: {$_SERVER['HTTP_ORIGIN']}");
header('Access-Control-Allow-Credentials: true');
header('Access-Control-Max-Age: 86400'); // cache for 1 day
}
// Access-Control headers are re... | true |
4354938e00d9197a0ab749f66333d2d5867911c4 | PHP | DPAttila/datviz | /get-data-on-day.php | UTF-8 | 510 | 2.625 | 3 | [] | no_license | <?php
include "query.php";
$db = open_db();
if ($db == null) {
echo "Can't open database";
}
$date = $_GET['date'];
$query = "select * from WeatherDataDaily where dated = :date";
$query_data = doquery($db, $query, array(
'date' => $date
));
$ret_json = "[";
while ($data_row = $query_data->f... | true |
ae1611fdb7688d0b51d35c24902301546d028056 | PHP | pokito31/streams-platform | /src/Anomaly/Streams/Platform/Support/Listener.php | UTF-8 | 1,559 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php namespace Anomaly\Streams\Platform\Support;
use Anomaly\Streams\Platform\Traits\CommandableTrait;
use ReflectionClass;
/**
* Class Listener
*
* @link http://anomaly.is/streams-platform
* @author AnomalyLabs, Inc. <hello@anomaly.is>
* @author Ryan Thompson <ryan@anomaly.is>
* @packag... | true |
4a7f383fbf51bd97f6e0766167088a5b54b6ea21 | PHP | longnn91/lottery | /functions/ticket.func.php | UTF-8 | 2,035 | 2.859375 | 3 | [] | no_license | <?php
require('db.php');
function correctNumber($number){
$temp = (string)$number;
while(strlen($temp)<3)
{
$temp = '0'.$temp;
}
return $temp;
}
function addTiket($ticket_number, $account_email)
{
if($ticket_number!=''&&$account_email!='')
{
$sql = "SELECT * FROM ticket WHERE ticket_num... | true |
0f82385f39fad50ede1e845e7692659c6f014458 | PHP | ossycodes/Asfalis | /app/Http/Requests/RegisterUser.php | UTF-8 | 1,254 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class RegisterUser extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the ... | true |
839d6b7a0ef59febe6dd6eb7cf9cef96f9ed63cc | PHP | jasonrobertfox/DTOx | /src/DTOx/Domain/ClassElement/ClassPropertyElement.php | UTF-8 | 1,079 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
/**
* DTOx
*
* @copyright Copyright (c) 2012, Jason Fox (jasonrobertfox.com)
* @license http://opensource.org/licenses/MIT
* @author Jason Fox <jasonrobertfox@gmail.com>
*/
namespace DTOx\Domain\ClassElement;
use DTOx\Domain\AbstractClassElement;
/**
* @package DTOx\Domain
*/
class ClassP... | true |
d008311494837131f8625032f0ad7c3a9431acc7 | PHP | AsemAlalami/Laravel-Advanced-Filter | /src/Operators/Contains.php | UTF-8 | 941 | 2.671875 | 3 | [] | no_license | <?php
namespace AsemAlalami\LaravelAdvancedFilter\Operators;
use AsemAlalami\LaravelAdvancedFilter\Exceptions\UnsupportedOperatorException;
use AsemAlalami\LaravelAdvancedFilter\Fields\Field;
use Illuminate\Database\Eloquent\Builder;
class Contains extends Operator
{
/**
* @inheritDoc
*/
public f... | true |
7efe520c473852db55929211ac469cf7c18acf0b | PHP | Dunhamzzz/Storbital | /bin/blogfeed.php | UTF-8 | 732 | 2.65625 | 3 | [] | no_license | <?php
/**
* File to update latest blog post element.
*/
if(!CRONSCRIPT) die;
//Settings
$blogFeed = 'http://www.storbital.com/blog/feed';
$numItems = 1;
$destinationFile = '/sites/storbital.com.local/app/views/elements/latestBlog.phtml';
//$destinationFile = '/sites/storbital.com/app/views/elements/latestB... | true |
8204614e867ce863df4300fb96a63750b6550481 | PHP | elidrissi97/phuml | /src/Parser/Code/Builders/TagType.php | UTF-8 | 1,813 | 2.8125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php declare(strict_types=1);
/**
* PHP version 8.0
*
* This source file is subject to the license that is bundled with this package in the file LICENSE.
*/
namespace PhUml\Parser\Code\Builders;
use PhUml\Code\Name;
use PhUml\Code\UseStatements;
use PhUml\Code\Variables\TypeDeclaration;
final class TagType
{
... | true |
740b10ee67678fc40cbc965c20dcc6f2a8d97cb4 | PHP | dntoll/PeerReview | /src/view/StudentView.php | UTF-8 | 4,240 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
namespace view;
class NoUIDException extends \Exception {}
class StudentView {
const NavigationAction = 'action';
public static $UploadID = "fileToUpload";
public static $UID = "userID";
public static $NOUIDErrorMessage = "No used id provided";
public function __construct(\Settings $s) {
$this->set... | true |
d48bec52fa7dab2826b351e9ab6c0e49224945fc | PHP | Arnaud-Adon/Blog-PHP-POO | /app/Views/admin/posts/edit.php | UTF-8 | 1,528 | 2.625 | 3 | [] | no_license | <?php
/*
$postTable = App::getInstance()->getTable('Post');
$categories = App::getInstance()->getTable('Category')->extract('id','titre');
$post= $postTable->find($_GET['id']);
if(!isset($post)){
echo 'l\'article n\'existe pas';
}
$form = new \core\HTML\BootstrapForm($post);
//var_dump($form);
i... | true |
db94713f3e5b8cc422829e543e8e506c64c46d5c | PHP | Micro-PHP/plugin-http | /src/Handler/Response/ResponseHandlerContextInterface.php | UTF-8 | 653 | 2.671875 | 3 | [] | no_license | <?php
namespace Micro\Plugin\Http\Handler\Response;
use Micro\Plugin\Http\Handler\HandlerContextInterface;
use Throwable;
interface ResponseHandlerContextInterface extends HandlerContextInterface
{
/**
* @param mixed $response
*
* @return void
*/
public function setResponse(mixed $respons... | true |
b203cd233c209e2f6d64b0e60a365ca311fad1bc | PHP | littlefoxmiastko/shopping-list-api | /src/Modules/Http/Serializer/Serializer.php | UTF-8 | 836 | 2.515625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Modules\Http\Serializer;
use Symfony\Component\Serializer\Encoder\JsonEncoder;
use Symfony\Component\Serializer\Normalizer\ObjectNormalizer;
use \Symfony\Component\Serializer\Serializer as BaseSerializer;
class Serializer
{
public const DEFAULT_FORMAT = 'json';
/... | true |
b4ce43976e5448219a6705c2b588d61225fe7653 | PHP | murat11/rf | /src/Domain/Salary/SalaryCalculator.php | UTF-8 | 972 | 2.96875 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace App\Domain\Salary;
use App\Domain\Salary\SalaryCalculationRules\SalaryCalculationRuleInterface;
/**
* Class TaxAwareSalaryCalculator
*/
class SalaryCalculator
{
/**
* @var SalaryCalculationRuleInterface
*/
private $amountRule;
/**
* @var SalaryCa... | true |
0fb97539f1bc141fb19c2df39c9cc47768263857 | PHP | Leon2012/coroutine | /Coroutine/Parallel.php | UTF-8 | 5,125 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace Async\Coroutine;
use ArrayAccess;
use InvalidArgumentException;
use Async\Coroutine\ParallelStatus;
use Async\Coroutine\ParallelInterface;
use Async\Coroutine\CoroutineInterface;
use Async\Processor\Processor;
use Async\Processor\ProcessInterface;
class Parallel implement... | true |
5ffacf804ed2f821c0e05cf0b4cc82eb43742615 | PHP | piotzkhider/laravel-web-site-boilerplate | /app/Domain/Criteria/UsersMailCriteriaInterface.php | UTF-8 | 803 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace App\Domain\Criteria;
use PHPMentors\DomainKata\Entity\CriteriaInterface;
/**
* Interface UsersMailCriteriaInterface
* @package App\Domain\Criteria
*/
interface UsersMailCriteriaInterface extends CriteriaInterface
{
/**
* @param array $attributes
* @return boo... | true |
67b3d50dad5fdbb64d2c0d6923fe526777b48fb7 | PHP | ankitb458/test | /plugins/random-widgets/tags/2.1.2/random-widgets.php | UTF-8 | 11,934 | 2.59375 | 3 | [] | no_license | <?php
/*
Plugin Name: Random Widgets
Plugin URI: http://www.semiologic.com/software/widgets/random-widgets/
Description: WordPress widgets that let you list random selections of posts, pages, links, or comments.
Version: 2.1.2
Author: Denis de Bernardy
Author URI: http://www.getsemiologic.com
Update Package: https://me... | true |
c0a42afcd509fb655e19dd911dfbfde01c72f199 | PHP | CodeExpertsLearning/formacao-php-codigos | /turma7/vespertino/php-oo/encapsulamento/Conta.php | UTF-8 | 279 | 3.359375 | 3 | [] | no_license | <?php
class Conta
{
private $saldo;
public function depositar($valor)
{
$this->saldo += $valor;
}
public function sacar($valor)
{
$this->saldo -= $valor;
}
public function verSaldo()
{
return $this->saldo;
}
} | true |
60471fe1196fe03851788fe83669a901c2f8fb4b | PHP | kata-agata/Maxi | /app/Models/Faq.php | UTF-8 | 1,158 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Models;
use Eloquent as Model;
use Illuminate\Database\Eloquent\SoftDeletes;
/**
* Class Faq
* @package App\Models
* @version October 28, 2018, 9:56 pm UTC
*
* @property string question_pl
* @property string question_pl_en
* @property string answer_pl
* @property string answer_en
* @... | true |
7362edd1d1b4751be3e6124eb00ef0a4308753b8 | PHP | bromontana/PolyHacks-com | /add_click.php | UTF-8 | 465 | 2.984375 | 3 | [] | no_license | <?php
$filename = "clicks.txt";
$failure = "failure";
try {
$fileData = file_get_contents($filename);
$num = (int) $fileData;
if ($fileData != $num) {
die($failure . "1");
}
if ($fileData == "") {
die($failure . "2");
}
$num++;
if (is_writeable($filename)) {
if (file_put_contents($filename, $num . "")) ... | true |
d2a7cdcd11bd11e0e5cb13a877f5ec42b436c861 | PHP | azizultex/PHP-OOP | /keendevs-classes/JS/Untitled-2.php | UTF-8 | 400 | 3.859375 | 4 | [] | no_license | <?php
interface Math{
public function set();
}
class ChildMath implements Math{
public function set(){
echo "This is Child Math";
}
}
abstract class Calculate{
abstract function sum($a,$b);
}
class MathSum extends Calculate{
function sum($a,$b){
return $a+$b;
}
}
// $result = ... | true |
0924716f539dbd999e7339bfb945e27fcc13908f | PHP | swanand09/myportfolio2 | /cv_generator_pdf.php | UTF-8 | 3,013 | 2.546875 | 3 | [] | no_license | <?php
//============================================================+
// File name : example_006.php
// Begin : 2008-03-04
// Last Update : 2013-03-16
//
// Description : Example 006 for TCPDF class
// WriteHTML and RTL support
//
// Author: Nicola Asuni
//
// (c) Copyright:
// Nicol... | true |
09e6c2834ecbf6eeff56855e564974fb795030b5 | PHP | kalina-iva/e-commerce-symfony-rest-api | /app/src/Application/ProductService.php | UTF-8 | 1,236 | 2.828125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Application;
use App\Domain\Product\Entity\Product;
use App\Domain\Product\ProductChanger;
class ProductService
{
private ProductChanger $productChanger;
public function __construct(ProductChanger $productChanger)
{
$this->productChanger = $productCh... | true |
821e3bd2a78684d6a31e5cf127b7c9dc964f0593 | PHP | mmarbonillo/pagina_peliculas_alfredo | /models/movie.php | UTF-8 | 1,349 | 3 | 3 | [] | no_license | <?php
include("./dbconnector.php");
include("./dbInfo.php");
class Movie {
private $db;
public function __construct(){
//$this->db = new DBConnector(DBInfo::getDbHost(), DBInfo::getDbUser(), DBInfo::getDbPassword(), DBInfo::getDbName());
$this->db = new DBConnector("localhost", "root", "", "c... | true |
c353b0937afcb029b4b093a6a8d248eeae94aebb | PHP | mohdasif110/minicrm | /app/Http/Controllers/CompaniesController.php | UTF-8 | 2,191 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Company;
use Illuminate\Http\Request;
class CompaniesController extends Controller
{
public function index()
{
$companies = Company::latest()->paginate(10);
return view('companies.index',compact('companies'))->with('i', (request()->input('page', 1) - 1) * 10... | true |
297ccfcc96c2a28b35ea33f532514d85afcca0c4 | PHP | arif-ak/bimmertech-test | /src/AppBundle/Controller/ServerLogsController.php | UTF-8 | 3,611 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Request;
class ServerLogsController extends Controller
{
/**
* @var string
*/
private $allLogs = 'all';
/**
* @var string
*/
private $criticalLogs ... | true |
435f3740fd8b661d6ad52d70b2caa2bdb795617e | PHP | onivaldolotti/CursoPHP | /Modulo2/Parte 2 - Exceptions - Tratamento de erros/src/ContaCorrente.php | UTF-8 | 2,091 | 3.25 | 3 | [] | no_license | <?php
use exception\SaldoInsuficienteException;
class ContaCorrente{
private $titular;
private $agencia;
private $numero;
private $saldo;
public static $totalDeContas;
public static $taxaOperacao;
public function __construct($titular, $agencia, $numero, $saldo)
{
$this->titular = $titular;
$this->agenci... | true |
5e969e59da1510bfdf50d30082f1d782997c3491 | PHP | nguyen-ha1201/Travel_News | /webservices/api/create_a_new_comment.php | UTF-8 | 1,267 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
include_once '../config/Database.php';
include_once '../models/Comment.php';
$database = new Database();
$db = $database->connect();
$comment = new Comment($db);
$news_id= $_POST['id'];
// get posted data
$data = json_decode(file_get_contents("php://input"));
// make sure data is not empty
if(
!empty... | true |
6ce802ec07c28b447a6c850ea198bf56cd20b6f3 | PHP | m-shehata/almatar-formatter | /src/Entities/LegEntity.php | UTF-8 | 18,271 | 2.59375 | 3 | [] | no_license | <?php
namespace AlmatarFormatter\Entities;
use AlmatarFormatter\Abstracts\AbstractTranslatedEntity;
use AlmatarFormatter\Enums\FlightConnectionTypeEnum;
use AlmatarFormatter\Enums\LegDirectionalityEnum;
use AlmatarFormatter\Traits\RemoveNullPropertiesTrait;
/**
* Description of LegEntity.
*
* @author Mohamed Sheh... | true |
69641b617b8117be6d73b1069f4285d991ae4a6b | PHP | leventlukas/digital-boardroom | /DBR/realtime/Umsatz_Balken.php | UTF-8 | 1,527 | 2.53125 | 3 | [] | no_license | <?php
date_default_timezone_set('Europe/Berlin');
$pdo = new PDO('mysql:host=localhost;dbname=realtimebi', 'janlevent', 'DigitalBoardroom2021');
$akDay = date("j");
$akMonth = date("n");
$data = [];
$statement = $pdo->prepare("SELECT COUNT(*) AS anzahl FROM Bestellung WHERE DAY(Eingang) = $akDay AND MONTH(Eingang... | true |
c5eff2f5f1870490a873dca8af79f590feab30c8 | PHP | ArcherCraftStore/ArcherVMPeridot | /apps/drupal/htdocs/modules/openatrium-7.x-2.19/profiles/openatrium/modules/contrib/ctools/ctools_plugin_example/plugins/contexts/simplecontext.inc | UTF-8 | 4,045 | 2.71875 | 3 | [
"LicenseRef-scancode-other-permissive",
"LicenseRef-scancode-other-copyleft",
"GPL-2.0-or-later",
"LicenseRef-scancode-unknown-license-reference",
"GPL-2.0-only",
"Apache-2.0",
"MIT"
] | permissive | <?php
/**
* @file
* Sample ctools context type plugin that shows how to create a context from an arg.
*
*/
/**
* Plugins are described by creating a $plugin array which will be used
* by the system that includes this file.
*/
$plugin = array(
'title' => t("Simplecontext"),
'description' => t('A single "si... | true |
6b2d7cd1e2819a57fa15a9fceb033cf2e8606e03 | PHP | ggroy12/starProject | /lib/Model/StatisticCollection.php | UTF-8 | 1,984 | 3.078125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Model;
class StatisticCollection implements \ArrayAccess, \IteratorAggregate
{
/**
* @var Statistic[]
*/
private array $statistic;
/**
* @param Statistic[] $statistic
*/
public function __construct(
array $statistic
) {
... | true |
c90cf07944cadbc9070f62a9fe1931bf6f20aa0c | PHP | teltors/norun | /Bmain.php | UTF-8 | 6,659 | 3 | 3 | [] | no_license | <?php include 'header.php';?>
<?php
include "connect_db.php";
?>
<!-- 페이징 처리 -->
<?php
if(isset($_GET['page'])) {
$page = $_GET['page'];
} else {
$page = 1;
}
$sql = 'select count(*) as cnt from board';
$result = $conn->query($sql);
$r... | true |
4474ff68f04af9b0851c4e9711ca0c4efac9c42a | PHP | pavellagoda/sherwood | /library/FW/Admin/Auth.php | UTF-8 | 6,032 | 2.625 | 3 | [] | no_license | <?php
/**
* Auth utils
*
* @author Pasha
*/
//var_dump (Zend_Auth::getInstance()->getIdentity());
class FW_Admin_Auth
{
/**
* Error messages
* @var array
*/
private static $_aErrorMessages = array();
/**
* Instance of a custom session storage class.
*
* @var object
*/
pri... | true |
02def0d26abec0ce94217c99479f67a89b6e0d22 | PHP | openactive/models-php | /src/Models/SchemaOrg/Book.php | UTF-8 | 4,810 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace OpenActive\Models\SchemaOrg;
/**
*
*/
class Book extends \OpenActive\Models\SchemaOrg\CreativeWork
{
/**
* @return string[]|null
*/
public static function getType()
{
return "schema:Book";
}
public static function fieldList() {
$fields = [
"... | true |
6f792abf490fb6e1c30caf4f5841736874f148f5 | PHP | ChaitanyaRajeev/wordpress | /wp-content/plugins/kiwi-social-share/includes/lib/class-kiwi-social-share-click-to-tweet.php | UTF-8 | 3,769 | 2.5625 | 3 | [
"Apache-2.0",
"GPL-2.0-only",
"GPL-3.0-or-later",
"GPL-3.0-only"
] | permissive | <?php
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Class Kiwi_Social_Share_Click_To_Tweet
*/
class Kiwi_Social_Share_Click_To_Tweet {
/**
* @var array
*/
public $post_types = array();
/**
* Kiwi_Social_Share_Click_To_Tweet constructor.
*/
public function __construct() {
$this->set_options();
if (... | true |
7a59f1c7fbd07bbffc4d66b504e2f3221330041a | PHP | imamovicdze/upnp-backend | /src/Services/AlbumService.php | UTF-8 | 1,945 | 2.59375 | 3 | [] | no_license | <?php
namespace Upnp\Services;
use Upnp\Models\Album;
use Symfony\Component\Config\Definition\Exception\Exception;
class AlbumService
{
public function createAlbum($title, $english_title)
{
try {
$album = Album::create([
"title" => $title,
"english_title" =... | true |
791e800ad3830191c67be49512cd83a986e1e2d2 | PHP | Triskae/TDs-WEB | /TP2/src/preferences.php | UTF-8 | 1,536 | 2.609375 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<?php
require_once 'entete.inc';
entete('preferences');
session_start();
// Insertion de la balise link
if (isset($_POST['style'])) {
if ($_POST['style'] == 'Vert et Jaune') {
$_SESSION['style'] = "<link rel='styles... | true |
8b43a8015d4f39a9745bead257e32487a2ba9179 | PHP | croluc/MSBLocatorBundle | /Places/GooglePlaceLocator.php | UTF-8 | 1,080 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace MSB\LocatorBundle\Places;
/**
* GooglePlaceLocator searches for places into the Google Place API
*/
class GooglePlaceLocator implements PlaceLocatorInterface
{
private $key;
/**
* @param string $key The google API key
*/
public function __construct($key)
{
$this->k... | true |
acccdac6b26cf67404c177ca69641b5d3ed6b675 | PHP | ozrabal/pwp | /modules/contact/class-contact.php | UTF-8 | 20,904 | 2.640625 | 3 | [] | no_license | <?php
/**
* Contact module class
*
* @package PWP
* @subpackage Contact
* @author Piotr Łepkowski <piotr@webkowski.com>
*/
class Contact extends Form {
private $shortcode = array();
private $callback_array = array();
/**
* Inicjalizacja modulu
*/
static function ini... | true |
5d8c4150ae96b6b6eae4368936836fb20f11967e | PHP | NegarMirgati/ChatBot-Server | /webservice/getMsgNumUnread.php | UTF-8 | 942 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
header('Content-Type: text/html; charset=UTF-8');
$domainname = 'http://localhost/moodle';
$functionname = 'core_message_get_unread_conversation_counts';
// REST RETURNED VALUES FORMAT
$restformat = 'json';
$token = $argv[2];
$params = array('userid'=> $argv[1]);
ini_set('default_charset', 'utf-8');
/// REST ... | true |
83fe1b8ae5e725c48f7303b092b31b91ae9f5da2 | PHP | sms-js/kipsoen | /app/controllers/GroupassignmentsController.php | UTF-8 | 2,032 | 2.6875 | 3 | [] | no_license | <?php
class GroupassignmentsController extends \BaseController {
/**
* Display a listing of the resource.
* GET /groupassignments
*
* @return Response
*/
public function index()
{
echo 'bonche';
}
/**
* Show the form for creating a new resource.
* GET /groupassignments/create
*
* @return Res... | true |
8dc510de743d0b9105bc8a8a156983b0ad320527 | PHP | scastillosanchez/HACK_AND_SLASH | /user/tutorials/tutorial_landing_page.php | UTF-8 | 3,927 | 2.59375 | 3 | [] | no_license | <?php
require "../../resources/general/start.php";
?>
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset = "UTF-8">
<meta name="author" content="Arron">
<title>Hack&/ Tutorials</title>
<link rel="stylesheet" type="text/css" href="../../resources/general/general_content.css">
<link rel="stylesheet" t... | true |
d7b7cf92b5c76befca5da701ef2f3306632fd900 | PHP | tuananh97/php | /phpfiles/specisl.php | UTF-8 | 449 | 3.65625 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>PHP Special Commands!</title>
</head>
<body>
<?php
// This function is used to generate new number each time you are refreshing the browser
$invoce = mt_rand() . "<br><br>";
echo $invoce;
//This function is used for displaying date and time
echo date("D/M/d/Y - h:m:s") . "<br><... | true |
845965abe9a58d28cfac67db1118e6284d8cc903 | PHP | wesllenalves/meusistema | /app/Pagseguro/src/Requests/RequestAbstract.php | UTF-8 | 994 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace BrPayments\Requests;
use BrPayments\OrderInterface as Order;
abstract class RequestAbstract implements RequestInterface
{
private $child_const;
public function getUrl(Order $order, bool $sandbox = null) :string
{
if ($sandbox) {
return $this->getC... | true |
94d8bbfdd3164808dfba60f24335acff4711688d | PHP | Nikolay-Mishin/PHP_06-Part_10-PHP | /lesson_04/project/index.php | UTF-8 | 1,566 | 3.640625 | 4 | [] | no_license | <?php
echo '<h2>Домашняя работа по теме 04: Основы PHP. Функции</h2>';
function hello($username, $weekday) {
switch ($weekday) {
case '1':
echo "Привет $username! Хорошего и продуктивного рабочего дня!";
break;
case '2':
echo "Привет $username! Хорошег... | true |
65070d758cf496886299277b6e8e964d59318e5f | PHP | Acronyms/Betisier | /classes/Personne.class.php | UTF-8 | 929 | 3.40625 | 3 | [] | no_license | <?php
class Personne
{
private $num_pers;
private $nom_pers;
private $prenom_pers;
function __construct($valeur = array() )
{
if(!empty($valeur))
{
$this->affecte($valeur);
}
}
function affecte($donnees)
{
foreach ($donnees as $attribut => $valeurs)
{
switch ($attribut... | true |
f0eee2548b3068c7c306a04dc882509259f3f3fa | PHP | luijar/fp-ph7-packt | /src/intro/imperative.php | UTF-8 | 851 | 3.296875 | 3 | [] | no_license | <?php
/**
* Introduction: Imperative vs Functional
* Author: Luis Atencio
* Imperative
* Find out the most won Nobel Prize category over the years
*/
declare(strict_types=1);
namespace Intro;
function mostDecoratedCategory(): void {
$contents = file_get_contents('prize.json');
if(!$contents) {
throw new \R... | true |
d90375f3dc45c219299f0d7d7fad6f0875935961 | PHP | SergiuszKotecki/wpis_codzienny | /application/models/Forms/AddNewThreadForm.php | UTF-8 | 3,738 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\models\Forms;
use Yii;
use yii\base\Model;
use yii\helpers\Html;
use app\models\Repository\ThreadsModeratorsRepository;
/**
* LoginForm is the model behind the login form.
*
* @property Users|null $user This property is read-only.
*
*/
class AddNewThreadForm extends Model
{
... | true |
f84280e53a9987f5a8ea01f261df7aedefa8c83b | PHP | aaana/COMP3421 | /assign/asg2q2/PongHauKi/server/game.php | UTF-8 | 641 | 3.5625 | 4 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: huanganna
* Date: 11/21/16
* Time: 9:16 PM
*/
class game
{
private $position;
private $turn;
// private $player1;
// private $player2;
//
// public function __construct($player1,$player2)
// {
// $this->player1 = $player1;
// $this->playe... | true |
82549cf375f1378ccc4b78a854f490ff29374bad | PHP | fontes204/onyxLatest | /models/entity/Localizacao.php | UTF-8 | 1,432 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: JOÃO FONTES PEREIRA
* Date: 09/10/2016
* Time: 21:04
*/
class Localizacao extends Atributo
{
protected $_id;
protected $_id_provincia;
protected $_id_municipio;
protected $_id_comuna;
/**
* Localizacao constructor.
* @param $_id_provincia
... | true |
8523d46674dc182e779b13a800ee6d6843ef3648 | PHP | arai0527/frima | /database/seeds/DeliveryPaymentsTableSeeder.php | UTF-8 | 487 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
class DeliveryPaymentsTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$array = [
'送料込み(出品者負担)',
'送料含まず(購入者負担)',
];
foreach ($array as $value) {
... | true |
ce192f9e18b7c34f7d5925ff04e4cdc68ca3919c | PHP | jack-small-wang/Luis-PHP-SDK | /src/Management/AppModel.php | UTF-8 | 829 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Microsoft\Luis\Management;
class AppModel extends Base
{
protected $basePath = '{appId}/';
protected $conf = [
'appId' => '',
'programmaticApiKey' => '',
];
public $id = null;
public $versions = null;
public function __construct($conf)
{
parent::_... | true |
fb6346611f56e6cbb892ce8a3e7c6568fa4194fa | PHP | nourgaber/Registeration_System | /app/Services/UserService.php | UTF-8 | 1,747 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Models\User;
use App\Repositories\UserRepository;
/**
* Class UserService
* This class contains all user actions
* @package App\Services
*/
class UserService
{
protected $userRepository;
/**
* UserService constructor.
*
* @param \App\Repositories\Use... | true |
60dafeaeaf39e1a833a15b4083ac8279cb00748f | PHP | renebitter/platform | /src/Storefront/Theme/Aggregate/SalesChannelThemeEntity.php | UTF-8 | 1,214 | 2.625 | 3 | [
"LicenseRef-scancode-generic-cla",
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Shopware\Storefront\Theme\Aggregate;
use Shopware\Core\Framework\DataAbstractionLayer\Entity;
use Shopware\Core\Framework\DataAbstractionLayer\EntityIdTrait;
use Shopware\Core\System\SalesChannel\SalesChannelEntity;
class SalesChannelThemeEntity extends Entity
{
use Entit... | true |
c4837b462ae4ec02ef423827548c2e7e7ab678ce | PHP | Athlon1600/pgbrowser | /src/PGBrowser.php | UTF-8 | 11,892 | 2.96875 | 3 | [] | no_license | <?php
/**
* PGBrowser - A 'pretty good' mechanize-like php library for managing cookies and submitting forms.
* Website: https://github.com/monkeysuffrage/pgbrowser
*
* <pre>
* require 'pgbrowser.php';
*
* $b = new PGBrowser();
* $page = $b->get('http://www.google.com/');
* echo $page->title;
* </pre>
*
* ... | true |
ff9a344bc194fe609c02a20fbf2bcb111d4d4bb0 | PHP | Ahmedssb/StudentClubsManagmentSytem | /Database/user.php | UTF-8 | 3,574 | 3.109375 | 3 | [] | no_license | <?php
include 'Connection.php';
// the name of class should be chnge into user
class User {
// check the user id && pass is correct
public function userLog($emailid, $password){
$conn = new Connection();
$db = $conn->connect();
// use pass verify
// sq= ... | true |
04f8f073ff915787b1d46e2ef6cee5db65316cca | PHP | guittex/BD | /library/models/RoutineParameter.php | UTF-8 | 1,492 | 2.546875 | 3 | [] | no_license | <?php
class RoutineParameter extends Model {
/** @var string $name */
protected $name;
/** @var string $type */
protected $type;
/** @var int $size */
protected $size;
/** @var int $precision */
protected $precision;
/** @var int $scale */
protected $scale;
/** @var string $mode */
protec... | true |
56643e5962790d868b01a427d82cc688e3c7f332 | PHP | c4pr1c3/ac-demo | /src/utils.php | UTF-8 | 6,371 | 2.703125 | 3 | [] | no_license | <?php
require_once 'config.php';
function debug_log($msg, $file = '', $line = '', $output = '') {
if(!is_file($output)) {
$output = Config::$debugLogFile;
}
$formatedMsg = date('Y-m-d H:i:s');
if(!empty($file)) {
$formatedMsg = sprintf("%s %s", $formatedMsg, $file);
}
if(!emp... | true |
fd72d035051e979284ef29877280b3cfca9397fe | PHP | dongjian110/happy | /cs_wish.php | UTF-8 | 1,932 | 2.71875 | 3 | [] | no_license | <?php
include('page_header.php');//画面出力開始
require_once('db_inc.php');
if ( isset($_SESSION['urole']) and $_SESSION['urole']==1 ) {
//学生としてログインしているなら
$uid = $_SESSION['uid']; // 認証済みのユーザID
$uname = $_SESSION['uname']; // 認証済みのユーザ名
echo '<h2>コース希望登録</h2>';
echo $uname . '(' . $uid . ')'; // ログイン中のユーザ氏名とID... | true |
078f6533b6cfecc6328a71d3ddf10d2e5d7b4820 | PHP | full-party/CrossUp | /tests/TestTrait.php | UTF-8 | 290 | 2.53125 | 3 | [] | no_license | <?php
namespace Tests;
/**
* Trait TestTrait
* @package Tests
*/
trait TestTrait
{
/**
* テスト用ログイン状態作成関数
* @param int $id
*/
public function login(int $id = 1)
{
$this->withSession(['UserInfo' => [['id' => $id]]]);
}
}
| true |
3a51770012f810b089ced81677f1a96e4e02efad | PHP | wwh-if/Test | /day1-3/pos.php | UTF-8 | 182 | 2.546875 | 3 | [] | no_license | <?php
$m = 0b00000111;
print sprintf("%b", $m);
print "<br>";
print sprintf("7的反码:%b", ~$m);
print "<br>";
print decbin(-4);
print "<br>";
print sprintf("%d", -7);
?> | true |
c28d3eda40cca8c8503541214abb35370d127909 | PHP | vitorbritto/labs | /php/basic/exercises/strings/check.php | UTF-8 | 828 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
if (isset($_GET['username']) && !empty($_GET['username'])) {
$username = $_GET['username'];
$username_lc = strtolower($username);
if ($username_lc == 'vitor') {
echo 'You are the best!';
}
}
?>
<!doctype html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<title>STRINGS</title>
<link rel="... | true |
37c5f89a353cab7748c9211efbd61966d4fbc195 | PHP | julius75/tfda | /app/Modules/Parameters/Entities/Finance/PaymentInterval.php | UTF-8 | 3,270 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: softclans
* Date: 9/21/18
* Time: 9:36 AM
*/
namespace App\Modules\Parameters\Entities\Finance;
use App\Modules\Parameters\Entities\AbstractParameter;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use App\Modules\Parameters\Entities\GetDataTrait;
class PaymentInt... | true |
d216edc6289cf1fad8a263f7ae85ae28cc0e1f66 | PHP | LeonardoVergara85/stock | /ValueObject/VoDetallePresupuestos.php | UTF-8 | 1,189 | 2.84375 | 3 | [] | no_license | <?php
/**
* Description of VoDetallePresupuestos
*
* @author Usuario
*/
class VoDetallePresupuestos {
private $id, $presupuesto_id, $producto_id, $precio_id, $precio, $cantidad;
//////// SETTERS ///////////////////////////////
function getId() {
return $this->id;
}
function getPresupuest... | true |
2f0eb53b47dd79c0af2e3e6d15bd2c5fc7c28c13 | PHP | dayaaanh/procinema | /Procinema/daos/HorarioDAO.php | UTF-8 | 3,279 | 3.015625 | 3 | [] | no_license | <?php
/**
* Se incluye el archivo Horario.php
*/
require_once('../entidades/Horario.php');
/**
* Representa el DAO de la clase Horario
*/
class HorarioDAO {
//------------------------------------------------------------
//Atributos
//----------------------------------------------------... | true |
b5fd6decb16f16c5303f0a8e79f09288c8c659ef | PHP | Sunnepah/forum-webapp | /application/Libraries/ImageUploader.php | UTF-8 | 2,102 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by: Sunday Ayandokun
* Email: sunday.ayandokun@gmail.com
* Date: 13/11/2016
* Time: 3:12 PM
*/
namespace Application\Libraries;
use Aws\S3\S3Client;
use Application\Config\ServiceConfig;
class ImageUploader
{
public static function upload_image($image_data) {
if (!self::isImageSu... | true |
c7333bb1b145ff2a3ce1351f1c5a091eba6d506f | PHP | jianswu/yunzmall | /app/frontend/modules/cart/manager/MemberCartCollection.php | UTF-8 | 3,482 | 2.546875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Administrator
* Date: 2021/4/12
* Time: 15:45
*/
namespace app\frontend\modules\cart\manager;
use app\common\models\Member;
use app\common\services\Plugin;
use app\framework\Http\Request;
use app\common\exceptions\AppException;
use app\framework\Database\Elo... | true |
63f959de540ddce813dff19810ac7ec4f6749b56 | PHP | aharabara/programming_challenges | /4/src/App/Entities/Snake.php | UTF-8 | 3,424 | 2.96875 | 3 | [] | no_license | <?php
namespace Snake;
use Base\Colors;
use Base\Curse;
use Snake\Interfaces\CollidableInterface;
use Base\Point;
use Base\Position;
class Snake extends Point implements CollidableInterface
{
/** @var Snake */
protected $child;
/** @var bool */
protected $isDead = false;
public function __const... | true |
dd8db4d6f0060fee79b9bf1ddc3d10c09b0faa23 | PHP | budde377/Part | /lib/util/traits/DateTimeTrait.php | UTF-8 | 753 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace ChristianBudde\Part\util\traits;
/**
* User: budde
* Date: 10/27/12
* Time: 11:31 AM
*/
trait DateTimeTrait
{
protected function monthNumberToName($number){
$monthArray = array('januar','februar','marts','april','maj','juni','juli','august','september','oktober', 'november','december');... | true |
55c5834469fb532e1b043bbcfa5598386522ad0f | PHP | Yurunsoft/YurunPHP | /compile.php | UTF-8 | 3,154 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* YurunPHP 开发框架 编译代码
* @author Yurun <yurun@yurunsoft.com>
*/
$result = '';
$coreClasses = array('ArrayData');
foreach($coreClasses as $class)
{
$result .= includeFile(__DIR__ . '/Core/'. $class .'.class.php');
}
// 加载Core目录文件
$dir = dir(__DIR__ . '/Core/');
while (false !== ($file = $dir->re... | true |
868ba7a429fa19c9d3c2787dadbae30424e18318 | PHP | netinfluence/NetinfluenceUploadBundle | /Controller/APIController.php | UTF-8 | 3,225 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace Netinfluence\UploadBundle\Controller;
use Netinfluence\UploadBundle\Event\Events;
use Netinfluence\UploadBundle\Event\TemporaryFileEvent;
use Netinfluence\UploadBundle\Event\TemporaryFileDeletedEvent;
use Netinfluence\UploadBundle\Model\TemporaryFile;
use Symfony\Bundle\FrameworkBundle\Controller\Cont... | true |
0148b262283267f8189f00a3bf879366091b40b8 | PHP | webignition/web-page-inspector | /src/IeConditionalCommentInspector.php | UTF-8 | 871 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace webignition\WebPageInspector;
class IeConditionalCommentInspector
{
const START_PATTERN = '\[if[^>]+\]>';
const END_PATTERN = '<!\[endif\]';
const IDENTIFICATION_PATTERN =
'/^' . self::START_PATTERN . '(?:(?!' . self::END_PATTERN . ').)+' . self::END_PATTERN . '$/ms';
public f... | true |
ad8699ea6117c43200b28ed35862b7348c42fc84 | PHP | yorledysm/pagina_web_frontend | /descargar.php | UTF-8 | 985 | 2.59375 | 3 | [] | no_license | <?php
require_once("config/database.php");
date_default_timezone_set("America/Lima");
$database = new Database();
$db = $database->getConnection();
$declaracion = $db->prepare("SELECT nombre,email,asunto,mensaje,fecha FROM tb_contacto");
$declaracion->execute();
$lista = $declaracion->fetchAll();
$nombre_archivo ... | true |
4dcbd77df22f0df637d131650f35e2e6e83b8035 | PHP | NetCommons3/Files | /Model/Behavior/DownloadCountUpBehavior.php | UTF-8 | 1,049 | 2.640625 | 3 | [] | no_license | <?php
/**
* DownloadCountUpBehavior.php
*
* @author Ryuji AMANO <ryuji@ryus.co.jp>
* @link http://www.netcommons.org NetCommons Project
* @license http://www.netcommons.org/license.txt NetCommons License
*/
/**
* Class DownloadCountUpBehavior
*/
final class DownloadCountUpBehavior extends ModelBehavior {
/*... | true |
be4e8f6cc38a5276a422a7c9a9cb19c740962bc5 | PHP | 11040678444/ddxm | /application/wxshop/model/item/SpecsGoodsPriceModel.php | UTF-8 | 1,007 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/*
股东数据统计表
*/
namespace app\wxshop\model\item;
use think\Model;
use think\Db;
/***
* Class StatisticsLogModel
* @package app\wxshop\model\statistics
*/
class SpecsGoodsPriceModel extends Model
{
protected $table = 'ddxm_specs_goods_price';
/***
* 商品图片
* @param $val
* @return string... | true |
8051fc77b1e1987f7fa6b6cf43985d2aa2c16db9 | PHP | esmcrezosis/esmc_php | /mcnp/application/models/EuProjetMapper.php | UTF-8 | 15,646 | 2.609375 | 3 | [] | no_license | <?php
class Application_Model_EuProjetMapper {
//put your code here
protected $_dbTable;
public function setDbTable($dbTable) {
if (is_string($dbTable)) {
$dbTable = new $dbTable();
}
if (!$dbTable instanceof Zend_Db_Table_Abstract) {
throw new Exception('... | true |
3ac061707ba82bf71c807c899be8a934c01e4fad | PHP | kylekatarnls/carbon-cli | /tests/Carbon/TestCase.php | UTF-8 | 823 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace Carbon\Tests;
use PHPUnit\Framework\TestCase as FrameworkTestCase;
class TestCase extends FrameworkTestCase
{
/**
* Remove a directory and all sub-directories and files inside.
*
* @param string $directory
*
* @return void
*/
protected function removeDirectory($d... | true |
b0d301b6fbb740be76cf4109bf2209dff011fabf | PHP | luxmealeks/senforages | /resources/views/layout/users/Dbs.php | UTF-8 | 922 | 2.984375 | 3 | [] | no_license | <?php
class Db
{
public static $pdo = null;
public static $instance = null;
private static $host = 'localhost';
private static $database = 'gestionforage';
private static $user = 'babacar';
private static $password = 'passer';
public static function getInstance()
{
if (!isset(se... | true |
9fc5cd080bacfc71a1a5757c918cdceedac12592 | PHP | opensrci/woocommerce-pos-host | /includes/api/class-pos-host-rest-taxes-controller.php | UTF-8 | 2,621 | 2.59375 | 3 | [] | no_license | <?php
/**
* REST API Taxes Controller
*
* Handles requests to pos-host/taxes.
*
* @package WooCommerce_pos_host/Classes/API
*/
defined( 'ABSPATH' ) || exit;
/**
* POS_HOST_REST_Taxes_Controller.
*/
class POS_HOST_REST_Taxes_Controller extends WC_REST_Taxes_Controller {
/**
* Endpoint namespace.
*
* @v... | true |
a4b6500c3e4fc253f3116d7cc5d490ae1dd697e4 | PHP | TraffordFewster/laravel-reflection | /tests/Feature/CompanyTests/CompanyEditTest.php | UTF-8 | 5,613 | 2.578125 | 3 | [] | no_license | <?php
namespace Tests\Feature\CompanyTests;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use Tests\TestCase;
use App\Models\User;
use App\Models\Company;
class CompanyEditTest extends TestCase
{
use RefreshDatabase;
public function setUp() :void
{
... | true |
99ccc75e23f6387388b7c5aee09a6a306046c6be | PHP | martinohmann/deploy-tracker | /src/Command/ApplicationCreateCommand.php | UTF-8 | 2,113 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace DeployTracker\Command;
use DeployTracker\Entity\Application;
use DeployTracker\Repository\ApplicationRepository;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\Ou... | true |
25e17c626b095ae8cfedb23d6fd610646b94c886 | PHP | xhhqyh/Student | /Admin/page.class.php | UTF-8 | 1,400 | 3.328125 | 3 | [] | no_license | <?php
/*
* 名称:分页类
* 作用:提供各页面的分页信息
* 作者:祁燕辉
* 时间:2016/12/12 10:22
*/
class Page{
public $rownum; //总行数
public $length; //每页行数
public $pagenum; //最大页数
public $pagetot; //总页数
public $offset; //从哪里开始截取多少个
public $prevpage; //上一页
public $nextpage; //下一页
public $limit; //查询限定
functio... | true |
f1881ab71cfcc8453bcda8cd373d3f0a5943f1eb | PHP | Scar107/demo | /Section 4/constants.php | UTF-8 | 327 | 3.3125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Constants</title>
</head>
<body>
<?php
$num = 10;
$num = 1000;
$num = "FIGJAM"; //variables can be re-used
echo $num."<br>";
define("NAME", 107); //constants can not
echo NAME;
?>
</body>
... | true |
8f7c68baad7050c26dc31690a0ae74afc1178086 | PHP | Symfony-Plugins/dgDojoPlugin | /lib/effect/DojoRemoveClassEffect.class.php | UTF-8 | 1,307 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This class enables you to create Javascript to remove a certain class from an
* element with a little animation. This is iffy in a chain, so do this only
* after testing.
*
*/
class DojoRemoveClassEffect extends DojoEffect
{
/**
* Handles the additional options. The additional o... | true |
a32db2b70f4a92e8e88e59fb218833d7f6266480 | PHP | kekeuy/masterlab | /app/test/unit/model/TestGroupModel.php | UTF-8 | 1,962 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace main\app\test\unit\model;
use PHPUnit\Framework\TestCase;
use main\app\model\user\GroupModel;
/**
* GroupModel 测试类
* User: sven
*/
class TestGroupModel extends TestCase
{
public static function setUpBeforeClass()
{
}
public static function tearDownAfterClass()
{
}
/*... | true |
5033971c3fda1f5a91322b9a1325f350ed2e0886 | PHP | BryantDavidDavis/davisgraph | /app/controllers/CommentsController.php | UTF-8 | 1,245 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
class CommentsController extends \BaseController {
protected $comment;
public function __construct(Comment $comment) {
$this->comment = $comment;
}
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
//
}
/**
* Show the form for creating a new reso... | true |
b4523217bc33dc2258020a4d98d775afba201a76 | PHP | legattes/agendapp | /php/Especialidade.php | UTF-8 | 1,475 | 2.796875 | 3 | [] | no_license | <?php
/**
* author legates (Lucas)
* email lucas.arantes55@gmail.com
*/
class Especialidade {
public function post(){
if(!isset($_POST['especialidade_nome'])
|| ($_POST['especialidade_nome']) == ''){
header('HTTP/1.1 500 FAIL');
header('Location: index.php');
... | true |
b5f02ce74432a07b7c756ce8d439cada04947a0b | PHP | AlexandrVozmitel/netology-university | /4.3/functions.php | UTF-8 | 787 | 2.546875 | 3 | [] | no_license | <?php
function FormChars($text, $p2 = false) {
return nl2br(htmlspecialchars(trim($text), ENT_QUOTES), false);
}
/*
function FormChars($text, $p2 = false) {
global $CONNECT;
if ($p2) return mysqli_real_escape_string($CONNECT, $text);
else return nl2br(htmlspecialchars(trim($text), ENT_QUOTES), false);
}
... | true |
b2ac236df2bb507d70415578cad55c2de7f5b6f1 | PHP | devmobgroup/postcodes | /src/Address/Address.php | UTF-8 | 3,206 | 3.484375 | 3 | [
"MIT"
] | permissive | <?php
namespace DevMob\Postcodes\Address;
use InvalidArgumentException;
class Address
{
/**
* Allowed postcode format.
* Does not validate actual postcodes and is only used to normalise all postcodes used within this package.
*/
public const POSTCODE_FORMAT = '/^(\d{4})([A-Z]{2})$/';
/**
... | true |
858b5c79f44916256affa1aa11a465cb7d53643e | PHP | dautv-ruslan/flawery | /app/Models/sklad_Model.php | UTF-8 | 14,500 | 2.90625 | 3 | [] | no_license | <?php
namespace App\Models;
use CodeIgniter\Model;
class sklad_Model extends Model {
/* Объявляем переменную $db - база данных */
protected $db;
/* Выбираем таблицу fadmin_sklad в переменной $table нашей модели */
protected $table = 'fadmin_sklad';
/* Выбираем ключ таблицы */
protected $prima... | true |
f96bd1e1ac0365eb767f2d394fce1efa2012c687 | PHP | ashley86/ashley86.github.io | /wf3/cours/exercices/php/poo/19-01/library/view/abonne.php | UTF-8 | 1,321 | 2.640625 | 3 | [] | no_license | <?php
require 'layout/top.php';
?>
<h2>Abonnés</h2>
<p><a href="<?=ABS_PATH ?>abonne-edit.php">Ajouter un abonné</a></p>
<div>
Filtrer :
<ul style="display: inline-block; padding: 0;">
<?php
$alphabet = range('a','z');
foreach( $alphabet as $letter )
{
echo '<li style="... | true |
67609739dca5a993f14269fda91b89e3cb86fd1d | PHP | sofeien/PHPCode | /demo9.php | UTF-8 | 766 | 4 | 4 | [] | no_license | <?php
class NumberSquared implements Iterator {
public function __construct($start,$end) {
$this->start = $start;
$this->end = $end;
}
public function rewind() {
$this->cur = $this->start;
}
public function key() {
return ... | true |
303278489cc046a3da51786912d7107a074b39e6 | PHP | ePrescription/patientportal | /app/patientportal/model/entities/PersonalHistory.php | UTF-8 | 1,135 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by Reliese Model.
* Date: Wed, 18 Oct 2017 07:09:24 +0000.
*/
namespace App\Models;
use Reliese\Database\Eloquent\Model as Eloquent;
/**
* Class PersonalHistory
*
* @property int $id
* @property string $personal_history_name
* @property int $status
* @property string $created_by
* @pr... | true |
65f672bfc28ba5a342d7569f17df5a5c75b6d544 | PHP | aftaa/marketcall | /task3/core/HtmlTagStorage.php | UTF-8 | 703 | 3.09375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Maxim Gabidullin <after@ya.ru>
* Date: 25.11.2018
* Time: 21:00
*/
namespace core;
class HtmlTagStorage
{
/**
* @var HtmlTag[]
*/
private $tags = [];
/**
* @param string $tagName
*
* @return HtmlTag
*/
public function getByT... | true |
0819b9787f9c90603c1432afa5b8dabb30069e68 | PHP | BigDevOo/Foxiadmin | /core/lib/outils.php | WINDOWS-1252 | 3,899 | 2.875 | 3 | [] | no_license | <?php
/**
* @brief generate xml fil config
* @author jribi.abdelaziz
* @mail jribi.azouz@gmail.com
* @date 26/12/2016
*/
/**
* @brief Redirect to error message
* @param $code
*/
function redirectMessage($code){
echo "<script language='JavaScript'>window.location.href = 'dash.php?t=".$code."&a=error';</scri... | true |
e4a7b2cbaa5d141b485700b62cee82ce3f63974b | PHP | OraveczKalman/801CMS | /application/common/CoreFunctions.php | UTF-8 | 12,963 | 2.9375 | 3 | [] | no_license | <?php
class CoreFunctions {
function getValuta($BeValuta) {
$postData = array('rateYearSelect' => '2014',
'rateMonthSelect' => '7',
'rateDaySelect' => '18');
$context = stream_context_create(array(
'http' => array(
'method' => 'POST',
... | true |