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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
3accba37082253aef2c35b6946b168892c58d40c | PHP | leticiaboca/opdrachten-php- | /7.6.5.php | UTF-8 | 896 | 3.015625 | 3 | [] | no_license | <html>
<head>
<style>
input[type=text]{
width: 50px;
}
</style>
<body>
<?php
if(isset($_POST['uitrekenen'])) {
$a = $_POST['a'];
$b = $_POST['b'];
$c = $_POST['c'];
}else {
$a = "";
$b = "";
$c = "";
}
?>
<form action="" method="POST">
<label>ABC-formu... | true |
ea16f80bd90ed9d51d57bc28a36893984e1fe6e5 | PHP | oz-sysb/kinakomochi | /src/app/VendingMachine.php | UTF-8 | 2,584 | 3.375 | 3 | [] | no_license | <?php
namespace VendingMachine;
class VendingMachine
{
/**
* お金管理
*
* @var MoneyBox
*/
private $moneyBox;
/**
* 釣り銭トレイ
*
* @var ChangeTray
*/
public $changeTray;
/**
* 購入管理
*
* @var SaleManager
*/
public $saleManager;
/**
*... | true |
f8545834a869cfb5d60bcf4bf8dbc5a31a5d89bd | PHP | emiviada/prodedeamigos | /backend/src/AppBundle/Repository/GameRepository.php | UTF-8 | 1,040 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Repository;
/**
* GameRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class GameRepository extends \Doctrine\ORM\EntityRepository
{
/**
* findBetweenDates() method
* @param AppBundle\Entity\Tournament
* @... | true |
00b9a44e2a8698a42749beaa433fa4e1ff4470eb | PHP | DanielKalinin/galamart_tracker | /application/modules/cDownload/mDownload.php | UTF-8 | 388 | 2.671875 | 3 | [] | no_license | <?php
class mDownload
{
static function isAuth()
{
session_start();
return !empty($_SESSION['user']);
}
static function findFile($fileid)
{
$db = DataBase::get();
$querry = $db->prepare('SELECT name, data FROM file WHERE fileid=?');
$querry->execute([$fileid... | true |
6a0f8983cc94ca49a75380f4c0cdf0dd00d028ff | PHP | DanSandberg/Pizzeria-Fridhem | /modules/menu.php | UTF-8 | 2,816 | 2.5625 | 3 | [] | no_license | <?php
$stmt = $con->prepare('SELECT * FROM menu');
$stmt->execute();
$result = $stmt->get_result();
while ($data = $result->fetch_assoc()){
$menu_items[] = $data;
}
$stmt->close();
//$layoutSettings = array(6, 13, 17, 24, 32, 37, 42, 48, 53, 56, 59, 64, 69, 74);
setLastSide(0);
setTitleIdCounter();
array_walk($menu... | true |
e5c57426667db2c4faa838b26e9eb743d1bc7a0e | PHP | dev-backend/report | /app/Exports/OrdersExport.php | UTF-8 | 727 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Exports;
use Maatwebsite\Excel\Concerns\WithHeadings;
use Maatwebsite\Excel\Concerns\FromArray;
class OrdersExport implements FromArray, WithHeadings
{
protected $orders;
public function __construct(array $orders)
{
$this->orders = $orders;
}
public function array():... | true |
9550484f89e3e4515029dd9176a3f1cba390877d | PHP | testmonitor/devops-client | /src/Resources/WorkItem.php | UTF-8 | 1,337 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace TestMonitor\DevOps\Resources;
class WorkItem extends Resource
{
/**
* The id of the work item.
*
* @var string
*/
public $id;
/**
* The area path for the work item.
*
* @var string
*/
public $path;
/**
* The title of the work item.
... | true |
3603e2f230282c8d4dfdc6517ea1ca615bab4081 | PHP | konpaa/laravelOffice | /app/Repositories/DepartmentsRepository.php | UTF-8 | 2,588 | 2.765625 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Models\Department;
use App\Repositories\Interfaces\DepartmentsRepositoryInterface;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Collection as Col;
use Illuminate\Support\Facades\DB;
/**
* Class DepartmentsRepository
* @package App\Repositories
*/
c... | true |
7fe08a08458d86c5f51e9ab3a2ea73bf9c8b6502 | PHP | AurickB/TP_Voyage_MVC | /controller/frontendController.php | UTF-8 | 817 | 2.5625 | 3 | [] | no_license | <?php
require_once 'model/frontendModel.php';
function displayTravel($message=null){
$travels = getTravel();
require 'view/displayTravels.php';
}
function displayLogin(){
require 'view/displayLogin.php';
}
function displayAddTravel(){
require 'view/displayAddTravel.php';
}
// fonction qui permet d'... | true |
1700059edb41ab490f2eb084796435defdf057e5 | PHP | camilo255423/autoevalinpahu | /protected/models/Matriz.php | UTF-8 | 2,405 | 2.578125 | 3 | [] | no_license | <?php
class Matriz{
public static $SQLNumeroRespuestasPositivasPorCaracteristica=
'select numero_caracteristica, fuente.nombre as nombre_fuente, count(*) as numero_respuestas from fuente,fuente_proceso,respuesta,opciones_respuesta,caracteristica_pregunta_proceso,caracteristica_proceso
where fuente.id_fuente=fuente... | true |
85697b05c18a4c3e2a26e062aa5a3fda1b7f4a8d | PHP | Liquipedia/CardHover | /src/Hooks/MainHookHandler.php | UTF-8 | 3,924 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Liquipedia\Extension\CardHover\Hooks;
use HtmlArmor;
use Mediawiki\Hook\BeforePageDisplayHook;
use Mediawiki\Hook\ThumbnailBeforeProduceHTMLHook;
use MediaWiki\Linker\Hook\HtmlPageLinkRendererBeginHook;
use MediaWiki\Linker\LinkRenderer;
use MediaWiki\Linker\LinkTarget;
use MediaWiki\MediaWikiServices... | true |
e0ea8573eaaea9f9c19b3ebd2e770502fba706ad | PHP | cslopes/cultura | /cultura/application/models/Formulario.php | UTF-8 | 14,520 | 2.71875 | 3 | [] | no_license | <?php
require_once 'public/tcpdf/tcpdf.php';
require_once 'AreaTematica.php';
require_once 'Coordenador.php';
require_once 'Unidade.php';
require_once 'Departamento.php';
require_once 'Recursos.php';
require_once 'Zend/Date.php';
class Formulario extends TCPDF {
/**
* Width of the document
*
*/
const WID... | true |
6908e3c2919232bc22c3f34f3f68586e26e4a392 | PHP | ScaleCommerce/lizards-pumpkins-outlet46-demo | /src/lizards-and-pumpkins/bin/listUrlKeys.php | UTF-8 | 5,086 | 2.578125 | 3 | [] | no_license | #!/usr/bin/env php
<?php
declare(strict_types=1);
namespace LizardsAndPumpkins;
use League\CLImate\CLImate;
use LizardsAndPumpkins\DataPool\DataPoolReader;
use LizardsAndPumpkins\Util\BaseCliCommand;
use LizardsAndPumpkins\Util\Factory\CommonFactory;
use LizardsAndPumpkins\Util\Factory\MasterFactory;
use LizardsAndP... | true |
30bc0d92cd5e1f34b3f94b6ab9a2b459dc075ed3 | PHP | brennersc/Cebas | /conteudo-formulario2/infos.php | UTF-8 | 4,108 | 2.921875 | 3 | [] | no_license | <?php
require_once('gets/db_class.php');
require_once('gets/cursos.class.php');
$id_usuario = $_SESSION['id_usuario'];
$objDb = new db();
$link = $objDb->conecta_mysql();
$curso = new Cursos();
$sql = "SELECT * FROM curso where id_usuario = '$id_usuario'";
$resultado_id = mysqli_query($link, $sql);
if ($resulta... | true |
4747005807184408372b96b715e458b371391e08 | PHP | MarkMatute/ci_starter_pack | /application/core/MY_Model.php | UTF-8 | 3,905 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php defined('BASEPATH') or exit('No direct scripts allowed.');
/**
* Base Model
*/
class MY_Model extends CI_Model {
/**
* Database Table
*/
protected $table = '';
public $datatable_options = array();
/**
* Constructor
*/
public function __construct() {
parent::__construct();
}
/**
*... | true |
b187b6db5add503fa7bd8cec74794e170921cbe0 | PHP | rappasoft/laravel-boilerplate | /app/Domains/Auth/Models/Traits/Method/UserMethod.php | UTF-8 | 1,931 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Domains\Auth\Models\Traits\Method;
use Illuminate\Support\Collection;
/**
* Trait UserMethod.
*/
trait UserMethod
{
/**
* @return bool
*/
public function isMasterAdmin(): bool
{
return $this->id === 1;
}
/**
* @return mixed
*/
public function... | true |
c3583cb3caa8453f853aa89e0e1ae81fd38f10cb | PHP | RomainYeye/gestion_des_employes | /INTERFACES/DAOUserInterface.php | UTF-8 | 283 | 2.5625 | 3 | [] | no_license | <?php
include_once("DAOInterface.php");
interface DAOUserInterface extends DAOInterface {
public function controlPassDB($username, $password) : bool;
public function getRoleFromName($name) : string;
public function selectAllWhere($colonne, $info) : array;
} | true |
3aba14467716b8b5afd27c5fe29d60ef948fe397 | PHP | robier/sitemaps | /src/Driver/Text.php | UTF-8 | 1,082 | 2.78125 | 3 | [] | no_license | <?php
namespace Robier\Sitemaps\Driver;
use Robier\Sitemaps\File\SiteMap as SiteMapFile;
use Robier\Sitemaps\Location;
class Text extends Base
{
const EXTENSION = 'txt';
const BYTES_PER_FILE = 10485760; // ~10 MB
public function write(string $group, \Iterator $items): \Iterator
{
$index = 0... | true |
4c69c45e36740271c304c92d50a8ac04a950e18d | PHP | anklimsk/internal-ldap-based-phonebook | /app/Model/Setting.php | UTF-8 | 3,800 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is the model file of the application.
* Methods for management settings of application.
*
* CakeSettingsApp: Manage settings of application.
* @copyright Copyright 2016-2018, Andrey Klimov.
* @license https://opensource.org/licenses/mit-license.php MIT License
* @package app.Model
*/
App:... | true |
b48543f1a5f9f799e881f45f8bf3f76133294dfb | PHP | iZeaoGamer/PM-plugins | /Adrenaline v1/src/Adrenaline/Commands/PvPCommand.php | UTF-8 | 1,945 | 2.828125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Adrenaline\Commands;
use Adrenaline\BaseFiles\BaseCommand;
use Adrenaline\Loader;
use pocketmine\command\CommandSender;
use pocketmine\Player;
use pocketmine\Server;
/**
* Class PvPCommand
*
* @package Adrenaline\Commands
*/
class PvPCommand extends BaseCommand {
/**
... | true |
871ab072b0a5b688ed5de580af80b91ba7b937d5 | PHP | Raizohaza/eCommerce-Website | /resources/views/web/Pages/register.php | UTF-8 | 1,802 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
require_once 'init.php';
$title = 'Register';
if(isset($_POST['email']) && isset($_POST['password']) )
{
$email = $_POST['email'];
$password = $_POST['password'];
$confirmpassword = $_POST['confirmpassword'];
$exists = existsUsername($email);
if ($exists == true) {
echo '<div c... | true |
e1b40ea981d525f395f7fb6b093ca5267525e5fd | PHP | Jigsaw00/agmar-roles | /src/Permissions/hasPermissionsTrait.php | UTF-8 | 4,272 | 2.875 | 3 | [] | no_license | <?php
namespace Agmar\Role\Permissions;
use Agmar\Role\Models\Role;
use Agmar\Role\Models\Permission;
trait hasPermissionsTrait {
/*
Roles
---------------------------------------------------------------------------------
*/
/**
* Check if user has role
* @param array $roles
... | true |
aad7c5d2b2f21a2ab5b323dc2f70a5ec7d81180e | PHP | SteibiM/ToDoList | /connection.php | UTF-8 | 589 | 2.65625 | 3 | [] | no_license | <?php
$localHost="localhost";
$username="root";
$password="";
$connection=mysqli_connect($localHost,$username,$password);
mysqli_query($connection,"CREATE DATABASE todolist");
mysqli_select_db($connection,'todolist');
$sql="SELECT * FROM project";
$result=mysqli_query($connection,$sql);
... | true |
d0d17c89b35a1dd998263e75145df9a4536f498d | PHP | sixty-nine/timesheep | /src/SixtyNine/Timesheep/Model/DataTable/Builder/StatsDataTableBuilder.php | UTF-8 | 675 | 2.796875 | 3 | [] | no_license | <?php
namespace SixtyNine\Timesheep\Model\DataTable\Builder;
use SixtyNine\Timesheep\Model\DataTable\DataTable;
use SixtyNine\Timesheep\Model\DateStrings;
use SixtyNine\Timesheep\Model\ProjectStatistics;
class StatsDataTableBuilder
{
public static function build(
ProjectStatistics $stats
): DataTable... | true |
288222e7d00b45d0c4bbb22068f16cc564f3c0f4 | PHP | ravindra281298/php_tasks | /Calculator.php | UTF-8 | 2,042 | 4.125 | 4 | [] | no_license | <?php
class calculator {
public $number1,$number2;
function getInput() {
$this->number1 = readline("Enter first Number: ");
$this->number2 = readline("Enter second Number: ");
}
function addNumbers() {
$this->getInput();
return $thi... | true |
9396eb65b2a62b74c98bb5b6f75c1e499bb89a80 | PHP | nochso/fast-forward | /src/Console/ConsoleStyle.php | UTF-8 | 1,452 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace phparsenal\fastforward\Console;
use Symfony\Component\Console\Style\SymfonyStyle;
/**
* Tone the Symfony defaults down a bit
*/
class ConsoleStyle extends SymfonyStyle
{
/**
* {@inheritdoc}
*/
public function success($message)
{
$this->block($message, 'OK', 'fg=green',... | true |
8ab13416ace26e4def928679694ac670b1da49f2 | PHP | mihaf24/Object-Oriented-PHP | /object iteration/object iteration index.php | UTF-8 | 383 | 3.96875 | 4 | [] | no_license | <?php
include 'object iteration.php';
$person= new person;
echo 'all the variable can be accessed cz the function is within the class<br>';
$person->iterator();
echo 'outside of the class. that is why only the public variable is accessed<br>';
foreach($person as $key => $value){
... | true |
006a41c2cddbfbda892dfa23575ef911a360e165 | PHP | Warmold/clubEmployeAPI | /src/Assembler/Invitation/InvitationAssembler.php | UTF-8 | 3,348 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Assembler\Invitation;
use App\Assembler\AbstractAssembler;
use App\Assembler\User\UserAssembler;
use App\Dto\DtoInterface;
use App\Dto\Invitation\InvitationDto;
use App\Entity\Invitation\Invitation;
use App\Entity\User\User;
use App\Manager\Invitation\InvitationManager;
use App\Manager\User\UserM... | true |
85ea5bc180e70681b7296a5fd4d480a189725998 | PHP | geioi/eVoting | /webpage/application/models/login.php | UTF-8 | 1,065 | 2.78125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Login extends CI_Model {
function __construct() {
parent::__construct();
}
public function getData() {
$query = "SELECT `users`.`username`,`users`.`password` FROM `users`";
$exec = $this->db->query($query);
return $exec->result();
}
public function validateUser($person_id, $password) {
$que... | true |
88e4605563a9469142306ebf11dc3e62c32109f4 | PHP | IshanRudani/Appointment-Booking | /share.php | UTF-8 | 2,742 | 2.59375 | 3 | [] | no_license | <?php
session_start();
$con = mysqli_connect('127.0.0.1','root','','user');
$username = $_SESSION['username'];
$rec = mysqli_query($con, "SELECT first_name,last_name,email,phone,date,time,uname FROM appointment WHERE share_app='$username'");
?>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta ... | true |
820dbec66b769e044bfccc39d88bc63e8972c176 | PHP | fictivekin/Dropbox | /tests/dropbox_test.php | UTF-8 | 7,526 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
require_once 'config.php';
require_once '../dropbox.php';
require_once 'PHPUnit/Framework/TestCase.php';
/**
* Dropbox test case.
*/
class DropboxTest extends PHPUnit_Framework_TestCase
{
/**
* @var Dropbox
*/
private $dropbox;
/**
* Prepares the environment before running a test.
*/
protected... | true |
921e971799d5f76fda520f110f5271281d9d8d1a | PHP | caylaXu/log_center | /DI.php | UTF-8 | 2,786 | 2.71875 | 3 | [] | no_license | <?php
use LogSystem\Notify\NotifyInterface;
use LogSystem\Queue\QueueInterface;
use LogSystem\Storage\StorageInterface;
/**
* Class DI
* @author Leo Yang <leoyang@motouch.cn>
*/
class DI
{
/**
* @var array
*/
private static $container = array();
/**
* 不同队列容器的redis的单例
* @return Queu... | true |
c2b3d22dd1713e1d0f00523ee571b96c03824a7d | PHP | mattheu/CLI-Content-Generator | /inc/class.image-generator.php | UTF-8 | 2,988 | 2.640625 | 3 | [] | no_license | <?php
class CLIImageGenerator {
private $data = array();
function get_data( $search ) {
$search = str_replace( ' ', '+', $search );
$api_url_base = 'http://api.flickr.com/services/rest/';
$api_url_base = add_query_arg( array(
'method' => 'flickr.interestingness.getList',
'api_key' => MPH_GENERATOR_F... | true |
b187a71348dd6eec9b0944cb8e59b304c234efb2 | PHP | stanasss333/namu_darbai | /05masyvai/index.php | UTF-8 | 4,103 | 3.109375 | 3 | [] | no_license | <?php
echo '<br>';
echo '<br>';
echo 'Pirmas uzdavinys';
echo '<br>';
$masyvas =[];
foreach (range(1, 10) as $keyBig => $_) {
foreach (range(1, 5) as $keySmall => $_) {
$masyvas[$keyBig][$keySmall] = rand(5, 25);
}
}
print_r($masyvas);
echo '<br>';
echo '<br>';
echo 'Antras uzdavinys';
echo '<br>';
ec... | true |
64e8bf8c36ef918ea5db38bc5160bab0c50ccd69 | PHP | soa-php/event-sourcing | /src/Projection/ConventionBasedProjector.php | UTF-8 | 865 | 2.703125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Soa\EventSourcing\Projection;
use Soa\EventSourcing\Event\DomainEvent;
use Soa\EventSourcing\Event\EventStream;
class ConventionBasedProjector implements Projector
{
public function projectEventStream(EventStream $eventStream, array $projection): array
{
fore... | true |
a73f27bfc28fc75f3b07ee827d4d06d1e45be58b | PHP | LavaToaster/BeardCMS | /app/commands/Refresh.php | UTF-8 | 1,826 | 2.5625 | 3 | [] | no_license | <?php
/**
* @author bstrahija
* @link http://forums.laravel.io/viewtopic.php?id=6210
*/
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class Refresh extends Command {
/**
* The console command name.
*
* @var st... | true |
dcab4f40f3868b083e3ddd4fa99f1fa681c2cace | PHP | SoftIlnyr/AuctionSite | /auction_page.php | UTF-8 | 1,655 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: softi
* Date: 11.02.2017
* Time: 14:40
*/
include_once "includes/session_check.php";
if (isset($user)) {
if (isset($_GET["auction_id"])) {
$stmt = $mysqli->prepare("select * from auctions where id=?");
$stmt->bind_param('i', $_GET["aucti... | true |
c411d2086cdff76f1bc969d11d3c3060965ec95d | PHP | ceroideas/vipfansweb | /app/Http/Controllers/apiController.php | UTF-8 | 1,092 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\User;
class apiController extends Controller
{
public function getAllUsers(){
$u = User::where('role' , 2)->get();
return $u;
}
public function addMagnetism(Request $r , $id){
$u = User::find($id);
... | true |
7f5720ab7116f816e35282cd78d78a023003757d | PHP | rickselby/minecraft-map-editor | /src/Block/Lever.php | UTF-8 | 1,026 | 2.90625 | 3 | [] | no_license | <?php
namespace MME\Block;
class Lever extends \MME\Block implements Interfaces\ActiveBit8, Interfaces\AttachSouth4
{
use Traits\Create;
const ATTACH_TOP_EAST = 0;
const ATTACH_BOTTOM_SOUTH = 5;
const ATTACH_BOTTOM_EAST = 6;
const ATTACH_TOP_SOUTH = 7;
/**
* Get a lever, with the given ... | true |
0ea624ec6bb6858da670dfc3e92e047e6591bbf8 | PHP | Im0rtality/jsonstreamingparser | /tests/JsonStreamingParser/Tests/example/example.php | UTF-8 | 1,964 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
require_once dirname(__FILE__).'/../src/JsonStreamingParser/Listener.php';
require_once dirname(__FILE__).'/../src/JsonStreamingParser/Parser.php';
/**
* This basic implementation of a listener simply constructs an in-memory
* representation of the JSON document, which is a little silly since the whole
* poin... | true |
427cb1ff797a742588914032c5e1706339a374ba | PHP | yejiansnake/php-fw | /lib/vendor/wechat/CorpWeChat.php | UTF-8 | 5,820 | 2.640625 | 3 | [] | no_license | <?php
/**
* 微信网页授权
*/
namespace app\lib\vendor\wechat;
class CorpWeChat extends BaseWeChat
{
//---------------------------------------------------------------------------------------------------
//参数名称
private $corpID = '';
private $accessToken = '';
//-----------------------------------------... | true |
e0f20e82ec7ae84c5e7ef5881e5ded0a498e02e3 | PHP | kevin2001-se/sistema_farmacia | /app/ClienteAjax.php | UTF-8 | 2,320 | 2.703125 | 3 | [] | no_license | <?php
require_once "../function/funciones.php";
require_once "../controller/clienteController.php";
require_once "../model/clienteModel.php";
class AjaxCliente{
public $datos;
public function ajaxCrearCliente()
{
$data = $this->datos;
$respuesta = ClienteController::ctrCrearCliente($data... | true |
1d49c3b6877ffbddf6770e4573e2e6b81e20cafe | PHP | tomsmith987/bearychat-DuBaiSearch | /vendor/hachi-zzq/bearychat-open-api/src/P2P/Client.php | UTF-8 | 1,244 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Hachi\Bearychat\P2P;
use Hachi\Bearychat\Kernel\BaseClient;
class Client extends BaseClient
{
const CREATE = 'p2p.create';
const INFO = 'p2p.info';
const LIST = 'p2p.list';
/**
* 创建一个 P2P 聊天会话.
*
* @param $userId
*
* @return array|\EasyWeChat\Kernel\Support... | true |
56c13e8b760f070f567ff0b9198828fd47ee6485 | PHP | rob893/PHP-OData-Query-Builder | /src/Helpers/SimpleOrderByBuilder.php | UTF-8 | 727 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace ODataQueryBuilder\Helpers;
use ODataQueryBuilder\ODataQueryBuilder;
class SimpleOrderByBuilder
{
private $oDataQueryBuilder;
private $property;
public function __construct(ODataQueryBuilder $queryBuilder, string $property)
{
$this->oDataQueryBuilder = $queryBuilder;
... | true |
0b5fde79c0079d834a5043072e50f1c096cb10f1 | PHP | foothing/laravel-performance-tracker | /src/Time.php | UTF-8 | 285 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php namespace Foothing\Laravel\PTracker;
class Time {
public static function start() {
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
public static function tick($t0) {
return self::start() - $t0;
}
}
| true |
57aa8c8dfe4e8941990db99805e71b759e6d598e | PHP | hikarine3/programming_language_comparison | /examples/test/tests/tests.php | UTF-8 | 764 | 2.5625 | 3 | [] | no_license | <?php
$target_url = "https://www.yahoo.com/";
$context = stream_context_create(array('http' => array(
'method' => "GET",
'header' => implode("\r\n", array('Accept-Encoding: gzip,deflate'))
)));
$content = file_get_contents($target_url, false, $context);
if (isGzipResponse($http_response_header)) {
$content ... | true |
1346faf0cee159ef0c8801a03e317a1436d7a4ee | PHP | scandar/cart-cli | /tests/Unit/Core/Builders/OffersBuilderTest.php | UTF-8 | 1,148 | 2.640625 | 3 | [] | no_license | <?php
use App\Core\Builders\OffersBuilder;
use App\Core\Models\Item;
use App\Core\Models\Offer;
it('calculates and sets offers on items', function () {
$items = collect([
new Item(['name' => 'shoes', 'price' => 1000]),
new Item(['name' => 't-shirt', 'price' => 1100]),
new Item(['name' => '... | true |
1253ef40a8d044a4d0c9542a2ac7300b482652e4 | PHP | balintsera/cleancode | /src/Exception/NotADayDateException.php | UTF-8 | 384 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: balint
* Date: 2015. 10. 07.
* Time: 17:36
*/
namespace Evista\CleanCode\Exception;
class NotADayDateException extends \Exception
{
public function __construct($message, $code = 0, \Exception $previous = null) {
// make sure everything is assigned properly
... | true |
f9c714065967c82861832101d8a6cf32eebe7ed8 | PHP | katongilang/Web-Monitoring-Jamur | /fungsi-reports-all.php | UTF-8 | 3,613 | 2.65625 | 3 | [] | no_license | <?php
session_start();
if(!isset($_SESSION["admin"])){
header("Location: login.php");
}
function reports_kelembaban_node1(){
include "koneksi.php";
?>
<table class="table table-striped table-sm text-center">
<thead>
<tr>
<th>#</th>
<th>Waktu</th>
<... | true |
1bcac0bf61754c296c374e250830b4d32463015a | PHP | dng-es/bgarchive | /includes/createbg.php | UTF-8 | 2,180 | 2.65625 | 3 | [] | no_license | <?php
function createBg($fileName,$bg_red = 0,$bg_green = 0,$bg_blue = 0,$bg_width = 140,$bg_height = 140,$bg_opacity = 1){
//generar el fondo, aplicar propiedades y guardar el archivo
$backgroundName = time().'background.png';
$im = imagecreatetruecolor ( $bg_width, $bg_height );
$bg = imagecoloralloc... | true |
4e6db3cffba44b442b5eaea5753da75aace46ca2 | PHP | BahaaAlhagar/Islam-Oasis-CMS | /app/Http/ViewComposers/FAQComposer.php | UTF-8 | 1,210 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\ViewComposers;
use App\Tag;
use App\Fatwa;
use Illuminate\View\View;
use Illuminate\Support\Facades\Cache;
class FAQComposer
{
protected $locale;
protected $tags;
protected $randomFAQ;
public function __construct()
{
$this->locale = app()->getLocale();
$... | true |
777937cc52977a6b04b10b3ab138a0fc8f329f46 | PHP | vilasbondre123/Cloudesign-test-git | /custom-shortcode/index.php | UTF-8 | 1,824 | 2.796875 | 3 | [] | no_license | <?php
/*
Plugin Name: Custom shortcode code
Description: This Plugin use for create custom shortcode use and using this shortcode display category post. And also create coupon code for perticular product
Version: 1.0
Author: Vilas bondre
*/
//For display category post using shortcode [myshortcode categories=”xyz... | true |
2e1f7488e4126f70300954622bbc5cdfae4f7ad2 | PHP | chibucious/BestmanTech | /db/requestaproject.php | UTF-8 | 2,916 | 2.671875 | 3 | [] | no_license | <?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
$name = htmlspecialchars(trim($_POST['name']));
$sd = htmlspecialchars(trim($_POST['department']));
$email = htmlspecialchars(trim($_POST['email']));
$sptype = htmlspecialchars(trim($_POST['projecttype']));
$sb = htmlspecialchars(trim($... | true |
f69f939d3af38062fb57117b1a8ae5f5bbb6af65 | PHP | true-agency/evolve-engine | /src/Post/AbstractPostType.php | UTF-8 | 6,597 | 2.671875 | 3 | [] | no_license | <?php
namespace EvolveEngine\Post;
abstract class AbstractPostType
{
/* -------------------------------------------------- */
/* Edit these variables
/* -------------------------------------------------- */
public $id = 'true_cpt';
protected $singleName = 'CPT';
... | true |
7c1d468d71c8474dcf28bc73ebf5ce765fa36192 | PHP | symfonySimpleSite/nestedsets | /src/Repository/AbstractBase.php | UTF-8 | 1,691 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace SymfonySimpleSite\NestedSets\Repository;
use Doctrine\ORM\EntityManagerInterface;
use SymfonySimpleSite\NestedSets\Entity\NodeInterface;
use SymfonySimpleSite\NestedSets\Exception\NestedSetsException;
abstract class AbstractBase
{
private EntityManagerInterface $entityManager;
private string ... | true |
2ebbd491be3806085bb8aa18fc5196b92efa0ab8 | PHP | mogi86/mogi_php | /php/src/Phpunit/Mock/Output.php | UTF-8 | 624 | 3.234375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Phpunit\Mock;
class Output
{
private $leapYear;
public function __construct(LeapYear $leapYear)
{
$this->leapYear = $leapYear;
}
/**
* うるう年かどうかをメッセージで返す
*
* @param int $year 西暦
* @return string
*/
public functi... | true |
67c5f74407c85d14daa426f1ff4b0a5d92be05d3 | PHP | yhxddd/php | /类和对象.php | UTF-8 | 1,140 | 3.84375 | 4 | [] | no_license | <?php
//堆区存放 对象
//栈区存放基本数据类型
//入门例子:
/*
class Cat{
public $name;//成员属性(一般是基本数据类型,也可以是复合类型(数组、对象))
public $age;
public $color;
}
//创建一只猫
$cat=new Cat();
$cat->name="小白";
$cat->age=3; //访问对象属性
$cat->color="白色";
//只要找到该对象 就可以找到所有相关的属性
$findname="小白";
if($cat->name ... | true |
ab5375a70e587e53510e06df81d7c607d6395034 | PHP | monikq/body-mentor | /_server/trainings/add_new_training_record.php | UTF-8 | 2,352 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Headers: access");
header("Access-Control-Allow-Methods: POST");
header("Content-Type: application/json; charset=UTF-8");
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With");
req... | true |
d9c7495e4bd1852e4a43cba118bf1cd71fca8ffa | PHP | limen/fastrq-php | /tests/OfCappedPriorityQueueTest.php | UTF-8 | 2,946 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Author: LI Mengxiang
* Email: limengxiang876@gmail.com
* Date: 2018/11/25
*/
use PHPUnit\Framework\TestCase;
class OfCappedPriorityQueueTest extends TestCase
{
/**
* @var \Limen\Fastrq\OfCappedPriorityQueue
*/
private $queue;
protected function setUp()
{
... | true |
aefbe2cbfcf265c2873521fe1756b434723d3f7a | PHP | 12345amar/Ecommerce | /app/Http/Controllers/API/WishlistController.php | UTF-8 | 5,560 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\API;
use Illuminate\Http\Request;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
use App\Wishlist;
class WishlistController extends Controller {
/*
* List all product add to user's wishlist.
*
* @return \Illuminate\Http... | true |
cd1b9598d9c61b86489ce6eadda06a9a37da380b | PHP | Samikov-Marat/work5 | /controllers/Register.php | UTF-8 | 262 | 2.53125 | 3 | [] | no_license | <?php
namespace controllers;
use app\Render;
use models\Repository;
class Register implements ControllerInterface
{
public function execute(array $semanticParameters)
{
Repository::createUser($_POST);
Render::redirectTo('/');
}
} | true |
3ec60b2896b0eab03500bf3ed89087509a512835 | PHP | phan/phan | /tests/files/src/0065_tostring.php | UTF-8 | 230 | 3.34375 | 3 | [
"Apache-2.0",
"ISC",
"BSD-3-Clause",
"MIT"
] | permissive | <?php
class Stringular
{
public function __toString()
{
return 'test string';
}
}
function test(string $test, int $arg=0)
{
echo $test;
}
test(new Stringular());
test(new Stringular(), new Stringular());
| true |
084ac962a8380baf5eadf0324637635e4ea0f840 | PHP | GeekGianca/aguablue-prempacadora | /app/models/LotModel.php | UTF-8 | 506 | 2.59375 | 3 | [] | no_license | <?php
require_once 'dao/LoteImplement.php';
class LotModel{
private $daolot;
public function __construct()
{
$this->daolot = new LoteImplement();
}
public function insert($data){
return $this->daolot->insert($data);
}
public function getAll(){
return $this->daolot->... | true |
0912be63da2fdb6ac8d3830b0aa42bd5e381badd | PHP | wluberti/adventOfCode | /2022/day03a.php | UTF-8 | 546 | 3.25 | 3 | [] | no_license | <?php
$sourceFile = 'day03_input.txt';
$unique = [];
$values = [];
foreach(file($sourceFile) as $line) {
list($backpack1, $backpack2) = str_split(trim($line), strlen($line) / 2);
$unique[] = array_values(array_unique(array_intersect(str_split($backpack2), str_split($backpack1))))[0];
}
foreach($unique as $va... | true |
d81ae21c7ac5a952caf0fc9dfa3c534d70acea6b | PHP | lsw51988/ddb-admin | /app/Models/Users.php | UTF-8 | 7,874 | 2.71875 | 3 | [] | no_license | <?php
namespace Ddb\Models;
/**
* Users
*
* @package Ddb\Models
* @autogenerated by Phalcon Developer Utils
* @date 2018-05-18, 10:58:52
*
* @method static static findFirstByName($name)
* @method static static[] findByName($name)
* @method static int countByName($name)
* @method static static findFirstByP... | true |
f5b8142f304c90463e5b1294ef8a865003853239 | PHP | leo4all/pangu | /pangu518/app/controllers/posts_controller.php | UTF-8 | 2,707 | 2.578125 | 3 | [] | no_license | <?php
class PostsController extends AppController {
var $name = 'Posts';
var $helpers = array('Html', 'Form' );
function index() {
$this->Post->recursive = 0;
$this->set('posts', $this->Post->findAll());
}
function view($id = null) {
if (!$id) {
$this->Session->setFlash('Invalid id for Post.');
$thi... | true |
9f7a81f8a1af91a4de6f0378428b3865613a2937 | PHP | evanrahadi/my-first-repo | /apppenggajian/fungsi.php | UTF-8 | 1,106 | 3.125 | 3 | [] | no_license | <?php
function buatRp($angka){
$rupiah = "Rp. ". number_format($angka,0,',','.');
return $rupiah;
}
//fungsi untuk membuat bulan indonesia
function bulanIndonesia($angkaBulan){
switch ($angkaBulan) {
case '1':
$bulan = "Januari";
break;
case '2':
$bulan = "Februari";
break;
case '3':
$bu... | true |
09351a315e21ae5bd3965202386632a5adda91ec | PHP | marcelorambomartins/sigecloudtoolkit | /XML.php | UTF-8 | 3,515 | 3.140625 | 3 | [] | no_license | <?php
//http://www.devwilliam.com.br/php/aprenda-como-ler-arquivos-xml-com-php
# verificar a possibilidade de refatorar as funções de obter itens do XML
class XML{
static function obterInfoProduto($codigoProduto,$xml){
foreach($xml->NFe->infNFe->det as $produto): //percorre todos os produtos
$codXML = $produ... | true |
0939f818cfa98698c1da67c5b1099acf0f07cc14 | PHP | SouLWings/jobmatcher | /views/resumeform.V.php | UTF-8 | 5,575 | 2.609375 | 3 | [] | no_license | <?php
/* -- defining optional variables -
* $title - add title of the page, eg. $title = 'sample';
* $scripts[] - additional script of the page eg. $scripts[] = 'asd'; to include asd.js inside js folder * if the order is important, define the inversely
* $styles[] - additional style of the page eg. $styles[] ... | true |
a3a827f0e051c1a1baed34ff48d478c83df47060 | PHP | mbecker-databay/ILIAS | /Modules/TestQuestionPool/classes/class.assAnswerMultipleResponse.php | UTF-8 | 2,379 | 2.953125 | 3 | [] | no_license | <?php
/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
include_once "./Modules/TestQuestionPool/classes/class.assAnswerSimple.php";
include_once "./Modules/Test/classes/inc.AssessmentConstants.php";
/**
* Class for true/false or yes/no answers
*
* ASS_AnswerMultipleResponse is a class ... | true |
6f33246539b8aec2c99a439b4ffdc0198ded2e22 | PHP | kreait/firebase-tokens-php | /tests/JWT/Action/CreateCustomTokenTest.php | UTF-8 | 1,634 | 2.90625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Kreait\Firebase\JWT\Tests\Action;
use InvalidArgumentException;
use Kreait\Firebase\JWT\Action\CreateCustomToken;
use PHPUnit\Framework\TestCase;
/**
* @internal
*/
final class CreateCustomTokenTest extends TestCase
{
/**
* @dataProvider invalidExpirationTimesInSe... | true |
d35e616d2b9a6b4f64ade24582dea86cfd050f96 | PHP | lecturio/ILIAS | /Services/GlobalCache/classes/Redis/class.ilRedis.php | UTF-8 | 2,819 | 2.6875 | 3 | [] | no_license | <?php
require_once('./Services/GlobalCache/classes/class.ilGlobalCacheService.php');
/**
* Class ilRedis
*
* @author Fabian Schmid <fs@studer-raimann.ch>
* @version 1.0.0
*/
class ilRedis extends ilGlobalCacheService {
/**
* @var Redis
*/
protected static $redis_object;
/**
* @param $service_id
* ... | true |
9c7802f92a4fe7641d41e0de52c11201e1a3e025 | PHP | jbaldrich/assets | /Infrastructure/AssetAutoLoader.php | UTF-8 | 2,838 | 2.859375 | 3 | [] | no_license | <?php declare( strict_types=1 );
/**
* Assets.
*
* @package JacoBaldrich\Assets
* @author Jaco Baldrich <hello@jacobaldrich.com>
* @license MIT
* @link https://jacobaldrich.com
* @copyright 2019 Jaco Baldrich
*/
namespace JacoBaldrich\Assets\Infrastructure;
use DateTime;
use RegexIterator;
use Re... | true |
38a28c858a824b4633b44bb2da22de4a33afc610 | PHP | raphaelbarbosaqwerty/TrainingMuscleMemory | /PhpStudy/BasicPHP/oop/abstraction.php | UTF-8 | 524 | 3.71875 | 4 | [] | no_license | <?php
abstract class Country {
abstract protected function formatValue($value);
public function showValue($value) {
echo $this->formatValue($value);
}
}
class Brasil extends Country {
protected function formatValue($value) {
return "R$ ".$value."<br>";
}
}
class EUA extends Country {... | true |
eba07d7a7050170d32aaa158ca2dd9d0296be0e7 | PHP | moli-php/cr8v-angularjs1 | /application/controllers/Api.php | UTF-8 | 3,692 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Api extends CI_Controller {
protected $data;
protected $verb;
public function __construct() {
parent::__construct();
$this->_init();
// filter only ajax request is allowed
// if(!$this->input->is_ajax_request()) {
// exit('No ... | true |
ecbb39cc3de70d47d5ba2143c620040aada1df55 | PHP | Tenko-Star/LinkSMS | /test/lib/ConsoleLog.php | UTF-8 | 590 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace LinkSms\Test\lib;
use LinkSms\Library\LogInterface;
class ConsoleLog implements LogInterface
{
public function info(string $message, array $data = [])
{
fwrite(STDERR, "\n[INFO] " . $message . "\n[DATA]\n" . json_encode($data));
}
public function warning(string $message, arr... | true |
16f6a14eee5005633efd6fe61cd6d5cbfef8a6b1 | PHP | ArcherCraftStore/ArcherVMPeridot | /apps/joomla/htdocs/libraries/cms/schema/changeset.php | UTF-8 | 6,503 | 2.734375 | 3 | [
"Apache-2.0",
"MIT",
"GPL-2.0-only",
"GPL-2.0-or-later"
] | permissive | <?php
/**
* @package Joomla.Libraries
* @subpackage Schema
*
* @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE
*/
defined('JPATH_PLATFORM') or die;
jimport('joomla.filesystem.folder');
/**
* Co... | true |
2fb4f06b98fd70c3a1d785fecad5c486738579f1 | PHP | ArmanZarei/Larafiles | /app/Utility/File.php | UTF-8 | 366 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Utility;
class File
{
/**
* @param \App\Model\User $user
*
* @return bool
*/
public static function can_user_download($user)
{
$userSubscribe = $user->getCurrentSubscribe();
return User::is_user_subscribed($user->id) && !($userSubscribe->download_lim... | true |
d4bdae12490127862a8901ecba4ba32dcc558f67 | PHP | opacopac/navplan2 | /src/php/Navplan/MeteoDwd/Domain/Model/GridDefinition.php | UTF-8 | 1,569 | 2.875 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Navplan\MeteoDwd\Domain\Model;
use InvalidArgumentException;
use Navplan\Common\Domain\Model\Extent2d;
use Navplan\Common\Domain\Model\Position2d;
class GridDefinition {
public Extent2d $extent;
public function __construct(
public int $width,
public... | true |
bfc4b6862bb2e9c1d8eb381f7b2ccea0a208024b | PHP | WuGe01/CSS-learning | /20200515-PHP/save.php | UTF-8 | 803 | 2.5625 | 3 | [] | no_license | <?php
$dns="mysql:host=localhost;charset=utf8;dbname=invoice";
$pdo=new PDO($dns,'root',"");
date_default_timezone_set("Asia/Taipei");
$date=[
'id'=>'9',
'code'=>'t3',
'number'=>'55913945',
'period'=>'1',
'expend'=>'0',
'years'=>'2020'
];
echo "<pre>";
print_r($date);
echo "</pre>";
save('invoices',$date);
functi... | true |
e23f6f40cd41fd6c521e29749b0bc49dea367be8 | PHP | ishunko/hubzero-cms | /core/plugins/user/constantcontact/lib/Components/CTCTException.php | UTF-8 | 649 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
/**
* CTCException class
*/
class CTCTException extends Exception
{
public function __construct($message, $code = 0, Exception $previous = null)
{
parent::__construct($message, $code);
}
public function generateError($msgPrefix=null)
{
$this->logError($this->message);
echo $msgPrefix.' '.$this->getM... | true |
88dcf1b8b6837dd57532f729a012a00bb1c683a2 | PHP | JulissaCorrales/smilesoftware | /app/User.php | UTF-8 | 1,397 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use App\Traits\HasRolesAndPermissions;
use App\Notifications\ResetPassword;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Illuminate\Support\Facades\Mail;
use Illuminate\Auth\Passwords\CanResetP... | true |
465b4e328013747d3174455fc4d798f0051ce99c | PHP | YaroslavFedirko/PHP | /resize.php | UTF-8 | 1,237 | 2.71875 | 3 | [] | no_license | <?php
function resizeToSave($file,$fileNameToSave,$max_h,$max_w, $rotate = null, $quality = null)
{
if ($quality == null)
$quality = 75;
if ($file['type'] == 'image/jpeg')
$source = imagecreatefromjpeg($file['tmp_name']);
elseif ($file['type'] == 'image/png')
$source = imagecre... | true |
a70d2c34a247d6a1c085a8a193acc8c96eba7a22 | PHP | dnsoftware/yajraqualify | /database/seeders/UsersTableSeeder.php | UTF-8 | 681 | 2.59375 | 3 | [] | no_license | <?
namespace Database\Seeders;
use App\Models\User;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
class UsersTableSeeder extends Seeder
{
public function run()
{
DB::table('users')->delete();
$faker = \Faker\Factory::create();
... | true |
08d8701ddcff283c20d7ce14b296e7aa98cc5ab8 | PHP | aguila1903/mundial | /api/ds/vereineDS.php | UTF-8 | 6,063 | 2.546875 | 3 | [] | no_license | <?php
session_start();
require_once('adodb5/adodb.inc.php');
require_once('db_psw.php');
header("Cache-Control: no-cache, must-revalidate");
$host = (htmlspecialchars($_SERVER["HTTP_HOST"]));
$uri = rtrim(dirname(htmlspecialchars($_SERVER["PHP_SELF"])), "/\\");
if (isset($_SESSION["login"]) && $_SESSION["login"] == l... | true |
a071952c363cc8023ae3c581bb7a520563bf0725 | PHP | mager19/FPS-Base-Update | /themes/fpsBase/inc/shared-social.php | UTF-8 | 2,013 | 2.546875 | 3 | [] | no_license | <?php
function social_sharing_buttons($content) {
global $post;
if(is_singular('post')){
// Get current page URL
$iconURL = urlencode(get_permalink());
// Get current page title
$iconTitle = str_replace( ' ', '%20', get_the_title());
// Get Post Thumbnail for pinterest
$iconThumbnail = wp_get_attachment... | true |
70d35ac412cd39d30a5d28ff8fd83780b73e2733 | PHP | YanaMihova/Online-Library- | /contactpage.php | UTF-8 | 1,756 | 2.765625 | 3 | [] | no_license | <html>
<head>
<title>Contact Page</title>
<script type="text/javascript">
function validateForm(){
var fromValue =
document.forms["contactForm"]["fullName"].value;
var subjectValue =
document.forms["contactForm"]["subject"].value;
var messageValue =
document.forms["contactForm"]["message"]... | true |
6cd3d163d0736cfbb39a0120ffe021784dee9989 | PHP | bartikowskiw/marc_toolset | /src/MarcFind.php | UTF-8 | 2,330 | 2.796875 | 3 | [] | no_license | <?php
declare( strict_types = 1 );
namespace Umlts\MarcToolset;
use File\MARC;
use Umlts\MarcToolset\AnsiCodes;
use Umlts\MarcToolset\MarcFileToolBase;
use Umlts\MarcToolset\MarcMask;
use Umlts\MarcToolset\MarcMaskChecker;
use Umlts\MarcToolset\MarcDump;
use Umlts\MarcToolset\MarcRecordNotFoundException;
/**
* Loo... | true |
0c792376604b62bef41b16fa26c5685587dc08db | PHP | espr1t/action | /web/code/actions/delete_solution.php | UTF-8 | 1,293 | 2.703125 | 3 | [] | no_license | <?php
require_once(__DIR__ . "/../config.php");
require_once(__DIR__ . "/../db/brain.php");
require_once(__DIR__ . "/../entities/problem.php");
global $user;
// User doesn't have access level needed for deleting solutions
if ($user->getAccess() < $GLOBALS["ACCESS_EDIT_PROBLEM"]) {
printAjaxResponse(array(
... | true |
9618e16dbabb6ee0bcd0b500b716bfef3add74ca | PHP | Alex-DSJ/CON-System | /func/dbQuery.php | UTF-8 | 2,239 | 2.90625 | 3 | [] | no_license | <?php
require_once dirname(__FILE__).'/db.php';
function formatOutput($success = true, $msg = 'option success', $data = []) {
header('Content-Type:application/json');
echo json_encode([
'success' => $success,
'msg' => $msg,
'data' => $data
]);
exit;
}
// get the first instanc... | true |
6160ba4412709cbfe0c0ae7788327e7aaec8e799 | PHP | shahed-swe/laravel-jwt-authentication | /app/Models/DokanActivityLog.php | UTF-8 | 1,140 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use App\Models\Traits\HasUuid;
use Illuminate\Database\Eloquent\SoftDeletes;
class DokanActivityLog extends Model
{
use HasFactory;
use HasUuid;
use SoftDeletes;
protected $prim... | true |
2865cd238160d79d9ac20459cc958240c121cba9 | PHP | shanetaggart/get_nfl_teams | /Assets/Includes/get_nfl_teams_show_data.php | UTF-8 | 1,902 | 2.90625 | 3 | [] | no_license | <?php
//Create the HTML for displaying the data from get_nfl_teams_get_data()
function get_nfl_teams_show_data(){
$teams = get_nfl_teams_sort_data($get_nfl_teams_sort_type);
$html_body = '';
$html_body = $html_body . '<section class="nfl_teams">
<label>Sort By:</label>
<a href="http://l... | true |
6df8d7c2a53204cb704041e9647860ea03e5182e | PHP | TamaraTceveen/php_advanced | /controllers/BasketController.php | UTF-8 | 1,177 | 2.515625 | 3 | [] | no_license | <?php
namespace app\controllers;
use app\engine\Request;
use app\models\Basket;
class BasketController extends Controller
{
public function actionIndex() {
$basket = Basket::getBasket(session_id());
echo $this->render('basket', [
'basket' => $basket
]);
}
public func... | true |
e85162a52184b7a310598fa2cd3e61a339e73466 | PHP | nikom2532/buildthedot-30.goodjobstore | /site/goodjobstore/dashboard/admin-2/drop.php | UTF-8 | 911 | 3.046875 | 3 | [] | no_license | <?php
function printOptions ($options, $parent, $level=0)
{
foreach ($options as $opt)
{
if ($parent == $opt['parentid'])
{
$indent = str_repeat('---', $level);
echo "<option value='{$opt['id']}'>$indent {$opt['name']}</option>\n";
printOptions($options, $opt['id'... | true |
0c0e41a906be085167455e33d5839c5ededdba28 | PHP | guicastro/curso-lavarel | /laravel-form-validation/app/Client.php | UTF-8 | 1,222 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Client extends Model
{
//
const ESTADO_CIVIL = [
1 => 'Solteiro(a)',
2 => 'Casado(a)',
3 => 'Divorciado(a)',
4 => 'Viúvo(a)'
];
const TIPO_CLIENTE = [
'PF' => 'Pessoa Física',
'PJ' => '... | true |
6066aff2369ed50c086f4b6082fb951e0d10987c | PHP | linsera1809/PHP-Work | /8-5-2017 (G)/Structure-Introduction.php | UTF-8 | 1,294 | 3.609375 | 4 | [] | no_license | //Structure/Introduction
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<p>
<?php
echo "My first line of PHP!";
?>
</p>
</body>
</html>
//You might have noticed that our main file is now index.php
//instead of index.html. This is important! It tel... | true |
21c6362b934fb51bf7be5bbe2925ad423b5988d7 | PHP | jupardev97/pasarelaAntonella | /app/controllers/Ajax.php | UTF-8 | 1,247 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
class Ajax extends Controller {
private $controller;
private $method;
private $data;
private $db;
public function __construct() {
}
public function index() {
if (isset($_POST['object']) && isset($_POST['process']) && isset($_POST['data'])) {
$this->cont... | true |
0cb0a3c624f2444642870702e59d80d56a40b47c | PHP | mjsolutions/cierres | /vendor/cviebrock/eloquent-sluggable/tests/SoftDeleteTests.php | UTF-8 | 1,784 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php namespace Cviebrock\EloquentSluggable\Tests;
use Cviebrock\EloquentSluggable\Tests\Models\PostWithIncludeTrashed;
use Cviebrock\EloquentSluggable\Tests\Models\PostWithSoftDeleting;
use Cviebrock\EloquentSluggable\Tests\Models\PostWithSoftDeletingIncludeTrashed;
/**
* Class SoftDeleteTests
*
* @package Tests
... | true |
da14312d3ea2ea6862b8ec2573ed569cd496cdce | PHP | ipunkt/calendar | /src/Calendar/Ical/Property/Value/Method.php | UTF-8 | 426 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
namespace Ipunkt\Calendar\Ical\Property\Value;
class Method extends Text
{
/**
* Set method.
*
* @param string $method
* @return self
*/
public function setMethod($method)
{
$this->text = (string)$method;
return $this;
}
/**
* Get method.
... | true |
bf80d35c1bc44d76495d7e15b8d87e78da62ca5f | PHP | MonGDCH/mon-cache | /example/extend.php | UTF-8 | 2,057 | 3 | 3 | [
"MIT"
] | permissive | <?php
use mon\cache\Cache;
use mon\cache\CacheInterface;
require __DIR__ . '/../vendor/autoload.php';
// 扩展自定义缓存类型,需要继承Driver类
class MyDriver implements CacheInterface
{
public function __construct(array $config = [])
{
var_dump($config);
}
/**
* 获取缓存内容
*
* @param string $key... | true |