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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
86b8ff5976719e490bfa7a5e16091a029fb24c22 | PHP | hwsyy/phpgameserver | /public/newapi.php | UTF-8 | 736 | 2.578125 | 3 | [] | no_license | <?php
// PHPファイル群をロード.
//require_once ("../app/config/load.php");
require_once ("../app/config/autoload.php");
setEnvironment($_SERVER["SERVER_NAME"],$_SERVER["SERVER_PORT"]);
define("LOCK_SEC", 90);
function underscore2Camel($str) {
$words = explode('_', strtolower($str));
$return = '';
foreach ($words as $word)... | true |
33da47492c570cc766ff8d70926446cb852a2fef | PHP | sepbin/framework | /Frame/Behavior/File/FileModel.php | UTF-8 | 1,217 | 2.90625 | 3 | [] | no_license | <?php
namespace Sepbin\System\Frame\Behavior\File;
use Sepbin\System\Frame\Model;
use Sepbin\System\Util\FileUtil;
class FileModel extends Model
{
/**
* 文件路径
* 文件存在服务器的实际路径
* @var string
*/
public $filename;
/**
* 文件名称
* 用户下载时的文件名称
* @var unknown
*/
... | true |
22562d81e13caa0b7a031cb82774104870b453f3 | PHP | bqk-/deploy-server | /app/Http/deploy.php | UTF-8 | 5,395 | 2.625 | 3 | [] | no_license | <?php
function deploy($repo, $remote, $deployKey, $sshKey)
{
set_time_limit(0);
define('TMP_DIR', storage_path() . '/tmp/'. str_replace('/', '_', $repo->Name) .'/' . $repo->Branch .'/');
?>
<div id="deploy">
<pre>
Checking the environment ...
Running as <b><?php echo trim(shell_exec('whoami')); ?></... | true |
2dc1cb1b8b8bfd847c3f09be2ce1ac59c6f5b7a1 | PHP | IureaCosmin/Facultate | /labs/test/backend.php | UTF-8 | 2,758 | 3.046875 | 3 | [] | no_license | <?php
include('connect.php');
//tragere variabile
if (isset($_POST['nume2'])) {
$nume2 = $_POST['nume2'];
}
if (isset($_POST['Email'])) {
$email = $_POST['Email'];
}
if (isset($_POST['categorie'])) {
$categorie = $_POST['categorie'];
}
if (isset($_POST['numar'])) {
$numar = $_POST['numar'];
}
if (isse... | true |
0e8c89f0a81815fa3034a8017ce4117bf51d43c6 | PHP | jzxyouok/zhihu-sample | /app/Repositories/Topics.php | UTF-8 | 1,049 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Repositories;
use App\Topic;
use Prettus\Repository\Criteria\RequestCriteria;
class Topics extends BaseRepository
{
/**
* Specify Model class name
*
* @return string
*/
public function model()
{
return Topic::class;
}
/**
* Boot up the reposit... | true |
7f7f3247461f074a8a9ea654497ac9b98bd2780a | PHP | robertzengcn/bcms | /kernel/entity/PatientDiagnosisFee.php | UTF-8 | 793 | 2.734375 | 3 | [] | no_license | <?php
/**
* 患者管理-患者就诊费用
* */
require_once ENTITYPATH . '/Entity.php';
class PatientDiagnosisFee extends Entity{
/**
* @param $id
* 主键id
* */
var $id;
/**
* @param $case_number
* 病历号
* */
var $case_number;
/**
* @param $detail_id
* 详情id
* */
var $detail_id;... | true |
175171f3c659a44ae4cd7ed9859cde636ac63386 | PHP | MarlonSchultz/CodeIgniter3-Autocomplete-Models | /Autocomplete.php | UTF-8 | 2,291 | 2.640625 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Autocomplete extends CI_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
... | true |
98f39a88a08264ea5f531a26f2ca4d1d5fc002d7 | PHP | SemicolonAcademy/semicolon-test-project | /project/design/back/actions/users - Copy.php | UTF-8 | 1,832 | 2.578125 | 3 | [] | no_license | <?php
include "connection.php";
//get user input from GET / POST method
/*
echo "<pre>";
print_r($_POST);
var_export($_POST);
echo "</pre>";
*/
$data= $_POST;
$action = $_GET['action'];
$submit = $data['submit'];
$username = $data['username'];
$password = $data['password'];
$email = $data['email'];
$user_type = $dat... | true |
bfd9644832e519308733ad95de258375342ffb60 | PHP | siaoynli/hyperf-base | /app/Model/Article.php | UTF-8 | 697 | 2.625 | 3 | [] | no_license | <?php
declare (strict_types=1);
namespace App\Model;
use Hyperf\Scout\Searchable;
/**
*/
class Article extends Model
{
use Searchable;
public function searchableAs()
{
return 'article_index';
}
public function toSearchableArray()
{
return $this->toArray();
}
/**
... | true |
323937b104a65b6b52ff0c7217e92a16923b4651 | PHP | maxbaun/Aposh | /widgets/widget_home_featured.php | UTF-8 | 4,558 | 2.5625 | 3 | [] | no_license | <?php
add_action( 'widgets_init', 'register_widget_home_featured_widget' ); // function to load my widget
function register_widget_home_featured_widget() {
register_widget( 'Widget_Home_Featured' );
} // function to register my widget
class Widget_Home_Featured extends WP_Widget {
funct... | true |
1dcb2daf73b22afc87ab707bad596f5321a6573b | PHP | berliozd/kata-refacto-master | /src/Renderer/UserRenderer.php | UTF-8 | 391 | 2.828125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: didierberlioz
* Date: 29/10/2017
* Time: 00:48
*/
class UserRenderer
{
use SingletonTrait;
private $user;
public function first_name()
{
return ucfirst(mb_strtolower($this->user->firstname));
}
/**
* @param mixed $user
*/
pu... | true |
78f1aa6cb693d5c0476e62c1879ef4a94913820a | PHP | AleksandrBaukov/geekbrains_PHP_lvl_1 | /lesson_2/index.php | UTF-8 | 1,987 | 4.125 | 4 | [] | no_license | <?php
/*
//задание 1
$a = rand(-5,5);
$b = rand(-5,5);
if ($a >= 0 && $b >= 0){
echo $a - $b;
}
elseif ($a < 0 && $b < 0){
echo $a * $b;
}
elseif(($a < 0 && $b >= 0)||($a >= 0 && $b < 0)){
echo $a + $b;
}
*/
/*
//задание 2
$a = rand(0,15);
switch ($a){
case 0:
echo ($a++.... | true |
a5daa041d7ce0cdf4f54f286d61b9004374e05cc | PHP | Promotheux/meldpunt | /app/Console/Commands/syncTilesets.php | UTF-8 | 858 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use Bakerkretzmar\LaravelMapbox\Facades\Mapbox;
use Illuminate\Console\Command;
class syncTilesets extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'mapbox:tilesets';
/**
* The ... | true |
e730718abc4839f117d8e012172798d623a97c8d | PHP | jaosorio1013/plataforma-cursos | /app/database/seeds/RetoTableSeeder.php | UTF-8 | 545 | 2.65625 | 3 | [] | no_license | <?php
// Composer: "fzaninotto/faker": "v1.3.0"
use Faker\Factory as Faker;
use PlataformaCursos\Entities\Reto;
class RetoTableSeeder extends Seeder {
public function run()
{
$faker = Faker::create();
foreach(range(1, 100) as $index)
{
Reto::create([
'nombre' => $faker->name,
'tipo_reto_id' => $f... | true |
b3bd7b64d8cb10e8f82676197d452b22b2c4d523 | PHP | agense/laravelBookReviewApi | /app/QueryFilters/GenreId.php | UTF-8 | 218 | 2.515625 | 3 | [] | no_license | <?php
namespace App\QueryFilters;
use Closure;
class GenreId extends Filter {
public function applyFilter($builder){
return $builder->where($this->filterName(), request($this->filterName()));
}
} | true |
24074544965d5812ade72300f00f548c8a1ec76b | PHP | ifaridaiman/digitalawareness | /digitalawareness/application/models/Team_model.php | UTF-8 | 490 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class Team_model extends CI_model
{
public function getTeamScore($teamid)
{
$sql = 'SELECT team.teamname,mata.scoretotal FROM score AS mata JOIN team ON mata.teamid=team.teamid WHERE mata.teamid=?';
return $this->db->query($sql, array($teamid));
}
public function updateTeamName(... | true |
d15b9633533197b1e0a7f4b5589cd4e394721a82 | PHP | eoko/opence-eoze | /modules/EozeExt4/php/controller/Rest/Cqlix/Record.php | UTF-8 | 5,596 | 2.53125 | 3 | [] | no_license | <?php
/**
* Copyright (C) 2013 Eoko
*
* This file is part of Opence.
*
* Opence is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.... | true |
04c2d7c61630afb068e36a0e82e6e4901f1aee73 | PHP | Algo-Web/xsdTypes | /src/xsNOTATION.php | UTF-8 | 1,301 | 2.984375 | 3 | [] | no_license | <?php
namespace AlgoWeb\xsdTypes;
use AlgoWeb\xsdTypes\Facets\LengthTrait;
/**
* The type xsd:NOTATION represents a reference to a notation. A notation is a method of interpreting XML and
* non-XML content. For example, if an element in an XML document contains binary graphics data in JPEG format,
* a notation ... | true |
33d2fdf8257bc539458c3bbfa119d1107d3a2fec | PHP | acki/sparky.mysql | /class.sparky.mysql.php | UTF-8 | 1,241 | 3.421875 | 3 | [] | no_license | <?php
/**
* Class for creating MySQL connections and queries
*/
class mysql {
// variables
public $mysqli;
// construct function, called when creating a new object
function __construct() {
// globalize some data
global $cfg;... | true |
fa9b17104ff41a7979e9c6c5a56354d620828c0b | PHP | wesleytiburcio/sistemamedico | /model/Funcoes.php | UTF-8 | 9,207 | 3.078125 | 3 | [] | no_license | <?php
class Funcoes {
function map($param) {
if( is_object( $param ) ) {
$param = get_object_vars( $param );
}
if( is_array( $param ) ) {
return array_map( __FUNCTION__, $param );
}
else {
return $param;
}
}
// FUNCAO QUE CRIPTOGRAFA.
function criptografar($dad... | true |
b7b9dfba6a0e51b5dea0db44aeb5ed465c7ac316 | PHP | softsquad-git/articles | /app/Repositories/User/Photos/AlbumPhotosRepository.php | UTF-8 | 844 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\User\Photos;
use App\Models\Users\Photos\AlbumPhotos;
use Illuminate\Support\Facades\Auth;
use \Exception;
class AlbumPhotosRepository
{
/**
* @param array $params
* @return mixed
*/
public function items(array $params)
{
$items = AlbumPhotos::orde... | true |
6b23c46ecf3c6b15b8c6295422bea0c2d48d4d61 | PHP | it1572010/pw2_w08 | /dao/BookDaoImpl.php | UTF-8 | 4,025 | 3 | 3 | [] | no_license | <?php
/**
* Description of BookDaoImpl
*
* @author Anthony
*/
class BookDaoImpl {
public function getAllBook() {
$link = PDOUtil::createPDOConnection();
$query = 'SELECT * FROM book b JOIN genre g ON g.id = b.genre_id';
$result = $link->query($query);
$result->setFetchMode(PDO:... | true |
243b059bd00cd387e10c6a6504b35686f834652a | PHP | bgerp/PiCons | /standard_scale.php | UTF-8 | 1,537 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
/*
* US,GS,+ 7.14 kg
*US,GS,+ 27.26kg
*ST,GS,+ 0 g
*US,GS,+ 23550 g
*ST,GS,+ 0.00lb
*US,GS,+ 61.36lb
*ST,GS,+ 0.0oz
*US,GS,+ 1071.0oz
**/
$tmpl = "<?xml version='1.0' encoding='UTF-8' ?>" .
"<monitor>" .
"<Devices>" .
"<item>" .
"<Name>D19</Name>" .
"<Entries>" .
"<item>" .
"<... | true |
8d440ae0f09ebfd97f633803bc0e225121386c55 | PHP | HiLevel16/HiCMS | /Engine/Load.php | UTF-8 | 1,301 | 2.578125 | 3 | [] | no_license | <?php
namespace Engine;
/**
*
*/
class Load
{
const JS_ENDING = '.js';
const CSS_ENDING = '.css';
const MASK_MODEL_ENTITY = '\App\%s\Model\%s\%s';
const MASK_MODEL_PROCESSOR = '\App\%s\Model\%s\%sProcessor';
public static function getAssetPath($lang, $path, $themePath)
{
$loadPath = '';
switc... | true |
9eebdeccc87ec1602b55d772ff0e412bb743577d | PHP | gergogy/symfony-course | /src/Blog/ModelBundle/DataFixtures/ORM/5-Users.php | UTF-8 | 1,358 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Blog\ModelBundle\DataFixtures\ORM;
use Blog\ModelBundle\Entity\User;
use Doctrine\Common\DataFixtures\AbstractFixture;
use Doctrine\Common\DataFixtures\OrderedFixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
use Symfon... | true |
775e5066a06f403070f1212f8b6c14fd4394eaa0 | PHP | worksolutions/education | /Unit 1/Task 2/server.php | UTF-8 | 589 | 2.84375 | 3 | [] | no_license | <?php
use WS\Education\Unit1\Task2\Connection;
use WS\Education\Unit1\Task2\Server;
include __DIR__."/bootstrap.php";
$server = new Server(10100);
$fileStrings = file(__DIR__.'/data/file.txt');
$server->registerHandler(function (Connection $connection) use ($fileStrings) {
$number = (int) $connection->read();
... | true |
5f2e06f4ecad5ade492a1bb5ca863f866e400ebf | PHP | adamcameron/php | /general/spec/arrays/foreachVsArrayMapSpec.php | UTF-8 | 1,815 | 3.078125 | 3 | [] | no_license | <?php
namespace me\adamcameron\general\spec\arrays;
use me\adamcameron\general\arrays\ForeachVsArrayMap;
describe('comparing testing for foreach vs array_map', function() {
given('sut', function () {
return new ForeachVsArrayMap();
});
given('allObjects', function () {
return [
... | true |
6690fd2a53809991395da54aa4d01f483fe78f04 | PHP | digigov/Taichung-ParticipatoryBudget | /application/models/ImageModel.php | UTF-8 | 894 | 2.59375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class ImageModel extends CI_Model {
var $_table = "images";
function __construct()
{
// Call the Model constructor
parent::__construct();
}
public function insert_image($url,$type = 0){
$data = ... | true |
15660caed84ac6468d673e58ca2798db61f2ee32 | PHP | DmitryAstafyev/PureWordpressTheme | /components/websocketserver/module/bin/thread/heartbeat.stack.php | UTF-8 | 453 | 2.609375 | 3 | [] | no_license | <?php
namespace Pure\Components\webSocketServer\Module {
class HeartbeatStack extends \Stackable {//Threaded
public function __construct(){
$this->state = true;
}
public function set($state){
$this->state = $state;
}
public function get(){
... | true |
13b0cdbd3449f2cc5e6709f8f9810f3c27bf94fb | PHP | Drramos131/imobiliaria | /app/Http/Requests/ImovelRequest.php | UTF-8 | 1,751 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class ImovelRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;
}
/**
* Get the... | true |
c032f1894d4a13d1bb24524d2b8a7e6f3f83b41d | PHP | afadhilen/Hospitalization | /application/views/links_loops.php | UTF-8 | 1,797 | 2.78125 | 3 | [] | no_license | <!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML Parser</title>
</head>
<body>
<?php
include('application/libraries/libs/simple_html_dom.php');
$url_1 = "http://mitrakeluarga.com/cikarang/jadwal-dokter/?wpv_view_count=6175&wpv_paged=1";
$url_2 = "http://mitrakeluarga.com/cikaran... | true |
5d02f8fa6c2582e53a1c2895b7380c2a2cbeaf89 | PHP | NookeST/a3f | /3-task/HttpScrapper.php | UTF-8 | 1,344 | 2.9375 | 3 | [] | no_license | <?php
namespace Task3;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
use Psr\Http\Message\ResponseInterface;
use Symfony\Component\HttpFoundation\Response;
class HttpScrapper implements Scrapper
{
private Client $client;
public function __construct(Client $client)
{
$this->cli... | true |
9f8dd71085b107c72589796e2c4a2e2a7b74bf44 | PHP | dustingraham/phpdaemon-test | /src/Application.php | UTF-8 | 551 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php namespace DustinGraham\ReactMysql;
use PHPDaemon\Core\AppInstance;
use PHPDaemon\Servers\WebSocket\Pool;
class Application extends AppInstance
{
/**
* @var \PHPDaemon\Clients\MySQL\Pool
*/
public $sql;
public function init()
{
$this->sql = \PHPDaemon\Clients\MySQL\Pool::ge... | true |
c52ba16f06b4d1c8beeabec54a35e586565ebca0 | PHP | DHD0303/web | /xiaobai/php/index.php | UTF-8 | 3,774 | 2.546875 | 3 | [] | no_license | <?php
session_start();
if( !isset($_SESSION['root'])){
echo "<script language='javascript'>document.location = '../index.html'</script>";
}
if( isset($_GET['chdir']) ) {
chdir( $_SESSION['path'] );
chdir( $_GET['chdir'] );
$_SESSION['path'] = getcwd();
echo "<scri... | true |
7d9f10558ffad3a6e62797af7d4b2022d4996726 | PHP | LeonanCarvalho/PHP-HiveClient | /lib/hive/classes/class.hive.php | UTF-8 | 1,032 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | <?php
class Hive
{
public function __construct()
{
}
public function __destruct()
{
}
}
class MysqlMeta extends Hive
{
private $mDb;
private $mRes;
public function __construct()
{
$this->mDb = mysql_connect(METADB.":".METAPORT,METAUSER,METAPASS);
mysql_select_db(METANAME,$this->mDb);
}
priv... | true |
5b96d25a9d9d77f0bca3da92ce162725ef8e230f | PHP | bailei12355/playgit | /blogs/Application/Admin/Controller/UserController.class.php | UTF-8 | 2,292 | 2.546875 | 3 | [] | no_license | <?php
namespace Admin\Controller;
use Admin\Controller\AdminController;
/**
* 用户
*/
class UserController extends AdminController
{
public function index()
{
// $assign = M('user');
// $data = $assign->select();
// $this->assign('data',$data);
// $this->display();
$User = M('User'... | true |
221bfb52e32bc8d5e8f780790df2931aba782ec4 | PHP | AHMEDHASSAN202/MVC-PHP | /vendor/System/Route.php | UTF-8 | 3,365 | 3.0625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: AHMED
* Date: 7/9/2017
* Time: 2:47 AM
*/
namespace System;
class Route
{
/**
* Application Object
*
* @var $app
*/
private $app;
/**
* Container Routes
*
* @var array
*/
private $containerRoutes = [];
/**
... | true |
2b3c889948d03e17f0ad6e6defbbecd441c1c91e | PHP | shabaraba/practices | /practices/isara/render.php | UTF-8 | 9,382 | 2.96875 | 3 | [] | no_license | <?php
function render($path)
{
if (PathManager::isIndexUri($path)) {
$methodName = 'index';
}
else {
$methodName = $path[0];
}
return $methodName($path);
}
function index($path)
{
$database = new Database();
$requestPage = $path[1];
if ($requestPage == "") {
... | true |
82e08c48d11fd003cc2b74308fc89e18f7c9c40d | PHP | Jahed2000/canteen | /imgupload.php | UTF-8 | 975 | 2.5625 | 3 | [] | no_license | <?php
include_once 'header.php';
if(isset($_POST['imgSubmit']))
{
include_once 'inc/dbh.inc.php';
$id=$_SESSION['u_id'];
// Name of the Upload Folder
$uploaddir = 'uploads/';
// Name of the Uploaded Photo
$name = $_FILES['photo']['name'];
// The Final Path Where the... | true |
101669670f2eb029a9b19a9af048b51742d3cfcc | PHP | orlandosaraivajr/FATEC_2021_1SEM_Des_Serv_II | /PHP_do_estruturado_ao_OO/cap3/nivel2/pessoa_list.php | UTF-8 | 1,891 | 2.671875 | 3 | [] | no_license | <html>
<head>
<meta charset="utf-8">
<title> Listagem de pessoas </title>
<link href="css/list.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<?php
$dsn = "host=localhost port=5432 dbname=livro user=postgres password=";
$conn = pg_connect($dsn);
if (!empty($_GET... | true |
975f71137adb708de11b3debbe0cc5616ccb1875 | PHP | loginmyanmar/hello-world | /substr.php | UTF-8 | 814 | 3.96875 | 4 | [] | no_license | <!DOCTYPE html>
<html>
<body>
<?php
$var1 = '2,3';
$var2 = '1,2';
$var3 = '1,2,3,4';
$var4 = '1,2,3,4,5';
echo similar_text($var1, $var2);// 1
echo "<br>";
echo similar_text($var1, $var3); // 2
echo "<br>";
echo similar_text($var1, $var4); // 2
echo "<br><br>";
$name = "1,2,3";
$a = explode(... | true |
3fd78c6de3b4f8b788121db708818730414defdd | PHP | sergei-kalugin/Learning_PHP_MySQL | /3/create_user_ALT.php | UTF-8 | 3,045 | 2.75 | 3 | [] | no_license | <?php
require_once'config.php';
require_once 'db_connect.php';
$upload_dir = SITE_ROOT . "uploads/profile_pics/";
$image_fieldname = "user_image";
// File upload errors:
$php_errors = array(1 => 'File size is more than in php.ini',
2 => 'File size is more than in HTML',
3 => 'Just part of fil... | true |
469a4e5eb0856cc6944f817ec68496a0c2a0aa72 | PHP | osovskaya/ks_homework1 | /protected/views/aboutmyself.php | UTF-8 | 686 | 2.609375 | 3 | [] | no_license | <?php require_once(__DIR__.'/layouts/header.php');?>
<h2>Information about myself</h2>
<?php if (empty($_SESSION['user'])): ?>
<p>You haven't add information yet</p>
<?php else: ?>
<div class="table">
<table>
<?php foreach ($_SESSION['user'] as $key => $value): ?>
<tr>
<td class="key"><?php e... | true |
7ea40df36dc2318ec42aedb255ea7c99765fd0cb | PHP | Work-Webteam/agency-insider | /web/modules/custom/atwork_idir_update/src/AtworkIdirAddUpdate.php | UTF-8 | 8,698 | 2.828125 | 3 | [] | no_license | <?php
namespace Drupal\atwork_idir_update;
use Drupal\Database\Core\Database\Database;
use Drupal\user\Entity\User;
/**
* Class AtworkIdirAddUpdate.
*
* @package Drupal\atwork_idir_update
*/
class AtworkIdirAddUpdate extends AtworkIdirGUID {
/**
* Inits updates/Adds functions.
*
* @param string $type... | true |
2ca863755e42243fcf16f7170e3d36c4b66a005f | PHP | Jumeni/jumeni | /app/Helpers/Common.php | UTF-8 | 820 | 3.203125 | 3 | [] | no_license | <?php
/**
* find the % of a number
*
* @param $x
* @param $total
*/
function percentage($total, $x){
if($total == 0){
return 0;
}else {
$val = ($x * 100)/$total;
return round( $val, 1, PHP_ROUND_HALF_UP);
}
}
/**
* f... | true |
9c1ad44f3bee5ae83d0e73425b09676f65f10994 | PHP | jtgoodman/labs | /lab5/ch09/index.php | UTF-8 | 1,898 | 2.640625 | 3 | [] | no_license | <?php # Script 3.7 - index.php #2
// This function outputs theoretical HTML
// for adding ads to a Web page.
function create_ad() {
echo '<div class="alert alert-info" role="alert"><p>Put any text you want into the annoying ad. No need to use Chinese.
</p></div>';
} // End of the function definition.
$page_title = ... | true |
51f8724bfc7871abdb912e0a5dcab4658f3947f8 | PHP | stickynoter/stickynoter.com | /rss.php | UTF-8 | 1,608 | 2.71875 | 3 | [] | no_license | <?php
session_start();
//chache issue fixed.
if (isset($_SESSION['username']) && !(isset($_COOKIE['username']))) {
$expire = time()+60*60*24*30;
setcookie("username", $_SESSION['username'], $expire);
$username = $_SESSION['username'];
}
else{//this else statement fixed the cache issue because otherwise the n... | true |
2e6abb0c38e97a7fa8070cba4966634ee5b107e9 | PHP | PoetraPono/SIGKRA | /admin/forminputkesehatan.php | UTF-8 | 7,733 | 2.703125 | 3 | [] | no_license | <?php include 'session.php'; ?>
<?php
error_reporting( ~E_NOTICE ); // avoid notice
require_once 'dbconfig.php';
if(isset($_POST['simpan']))
{
$nama = $_POST['namakesehatan'];// user name
$alamat = $_POST['alamat'];// user email
$info = $_POST['info'];// use... | true |
3dee21f1746f7913e9245426488c79511f8b9089 | PHP | Arunkumar9/SkillnerArun | /protected/common/TFirePHPLogRoute.php | UTF-8 | 2,843 | 2.6875 | 3 | [] | no_license | <?php
/**
* TFirePHPLogRoute class file
*
* @author
* @link http://www.pradosoft.com/
* @copyright Copyright © 2005 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Revision: $ $Date: $
* @package System.Util
*/
/**
* TFirePHPLogRoute class.
*
* TFirebugLogRoute prints selected log... | true |
ccadbdec9ad10481113e7ccb98f154c90056c68d | PHP | wskeee/hellobabo | /common/models/activity/VoteActivity.php | UTF-8 | 2,820 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models\activity;
use Yii;
use yii\db\ActiveRecord;
/**
* This is the model class for table "{{%vote_activity}}".
*
* @property int $id
* @property string $name 名称
* @property string $cover_url 封面路径
* @property string $share_poster_url 分享海报路径
* @property string $content 内容
* @property i... | true |
c9f2c885fe1cc9b4b891a5d2ce00d6c9f6fa5b57 | PHP | duytc/tagcade-api | /src/Tagcade/Model/Core/VideoPublisher.php | UTF-8 | 1,006 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace Tagcade\Model\Core;
use Tagcade\Model\User\UserEntityInterface;
class VideoPublisher implements VideoPublisherInterface
{
/**
* @var integer
*/
protected $id;
/**
* @var string
*/
protected $name;
/**
* @var UserEntityInterface $publisher
*/
p... | true |
89262a92819c15b1784af47b3ab69f8d1b2620ce | PHP | diysoho/ecjia-daojia | /content/system/classes/Frameworks/Requests/EcjiaFormRequest.php | UTF-8 | 864 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: royalwang
* Date: 2018/10/8
* Time: 2:43 PM
*/
namespace Ecjia\System\Frameworks\Requests;
use Royalcms\Component\Foundation\Http\FormRequest;
use ecjia;
use ecjia_admin;
abstract class EcjiaFormRequest extends FormRequest
{
/**
* 可选: 重写基类方法
* 如果需要自定义在验证失败... | true |
cf36aca8653f9e409230cf9a2d4b69cd19f90b5b | PHP | Laede/AnnuityCalculator | /app/Http/Middleware/ValidateRequest.php | UTF-8 | 1,077 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use Illuminate\Validation\Factory;
use Illuminate\Validation\ValidationException;
class ValidateRequest
{
/**
* @var Validator
*/
private $validator;
public function __const... | true |
3af30acea03cf16cdb624adbc04a6e29d60f6ca5 | PHP | cpopescuakx/Proiectus | /app/Http/Controllers/BlogController.php | UTF-8 | 2,329 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Blog;
use App\Post;
use App\User;
use Illuminate\Support\Facades\Log;
class BlogController extends Controller
{
/**
* Retorna la vista de la wiki passant-li els articles i la wiki.
*
* @param int $id_project
* @var bl... | true |
80c346af272286854f3d8f4efdeb5aa325b1f25b | PHP | clay567/PTB12 | /PDO/ejercicio06.php | UTF-8 | 945 | 2.828125 | 3 | [] | no_license |
<?php
#1 Ejecutar una sentencia preparada con parámetros de sustitución con nombre
/* Ejecutar una sentencia preparada vinculando varialbes de PHP */
echo "<h2 style=text-align:center;background-color:#ffbf00>Ejecutar una sentencia preparada con parametros de sustitucion con nombre bindparam()</h2>";
$gbd=new... | true |
e6e97355d59f0c0ca71f3435c21abffba98788a6 | PHP | ThomasGraci/ClassDB | /CinemaWeb/client/lib/php/classes/clientDB.class.php | UTF-8 | 3,129 | 2.921875 | 3 | [] | no_license | <?php
class clientDB extends Client {
private $_db;
public function __construct($db) {
$this->_db = $db;
}
public function create() {//création d'un client vers la base de donnée
$erreutRetour = "";
try {
$query = "INSERT INTO client(nom, prenom, cp, localite,... | true |
56655c93f4f1b7cea2102e1109d7f35f9cdf5565 | PHP | Jairos-1999/church-mis-souls | /app/Services/Tracker.php | UTF-8 | 408 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Models\UserTrack;
use App\Models\User;
class Tracker
{
public function newUserTrack($userAgent = null)
{
$userTrack = new UserTrack();
$userTrack->user_agent = $userAgent;
$userTrack->save();
return [
'success' => true,
... | true |
929c694f04ecf326edc7be6cdc5258bb1dc4a05d | PHP | flixbeat/lms | /models/objects/User.php | UTF-8 | 685 | 2.859375 | 3 | [] | no_license | <?php
require_once 'models/MySQLConnection.php';
class User extends MySQLConnection{
public function __construct(){
$this->connectDB();
}
public function getUserType($userId){
$q = "SELECT (SELECT user_type FROM tbl_usertypes WHERE id = tbl_users.user_type_id) as user_type FROM tbl_users WHERE id = $use... | true |
5976a9f436af12de9a2712c487a78f6067500e99 | PHP | Alexander637/phpLessons | /HomeTask4/Task4/ForThrow/InvalidInputTypeException.php | UTF-8 | 362 | 3.03125 | 3 | [] | no_license | <?php
namespace ForThrow;
class InvalidInputTypeException extends \Exception
{
private $age;
public function __construct($age)
{
$this->age = $age;
$message = 'Incorrect data: ';
parent::__construct($message);
}
/**
* @return mixed
*/
public function getAge(... | true |
0fd728918895545bba9678f7f59ff2a3f4a925e9 | PHP | AstghikMirijanyan/examYii | /common/models/Blog.php | UTF-8 | 1,304 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace common\models;
use Yii;
/**
* This is the model class for table "blog".
*
* @property int $id
* @property string $image
* @property string $title
* @property string $date
* @property string $slug
* @property string $description
* @property string $status
*
* @property Comment[] $comments
... | true |
ca1736aa30743331f04044cdf84d23778fa68bb9 | PHP | gong023/namae-space | /src/ReplacedCode.php | UTF-8 | 868 | 2.71875 | 3 | [] | no_license | <?php
namespace NamaeSpace;
use SplFileInfo;
class ReplacedCode extends MutableString
{
public $isTargetClass = false;
// ugly properties to add use stmt
public $named = false;
public $stmtUseModified = false;
public $stmtNameSpacePosEnd;
public $stmtClassLikePosStart;
public $stmtUsesPos... | true |
1cd459a8ead51f087c5309bfded389f5efda7ef9 | PHP | jmespath/jmespath.php | /src/TreeInterpreter.php | UTF-8 | 7,849 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace JmesPath;
/**
* Tree visitor used to evaluates JMESPath AST expressions.
*/
class TreeInterpreter
{
/** @var callable */
private $fnDispatcher;
/**
* @param callable|null $fnDispatcher Function dispatching function that accepts
* a function na... | true |
abc2c5e187580760c75c2fa80a38943cbbb1065f | PHP | kurari/NyaaTemplater | /templater.default.class.php | UTF-8 | 1,551 | 2.5625 | 3 | [] | no_license | <?php
/**
* Default Templater
* ---
* custom set up sample
*
*/
require_once 'templater/templater.class.php';
// plugins
require_once 'templater/plugin/resource.file.class.php';
require_once 'templater/plugin/resource.string.class.php';
require_once 'templater/plugin/compiler.foreach.class.php';
require_once 'te... | true |
adde6e865faa52fe4f9234146975187ff5765837 | PHP | hieupham0206/ohvacation | /common/models/Customer.php | UTF-8 | 1,732 | 2.578125 | 3 | [] | no_license | <?php
namespace common\models;
use common\models\base\CustomerBase;
use Yii;
/**
* Class Customer
* @property string $code
* @package common\models
*/
class Customer extends CustomerBase
{
public $code;
public static function isVerified($customerId)
{
/** @var Customer $customer */
$... | true |
3816c503d4364c56341fdab95aede3a7d2ea35c8 | PHP | no222bd/1DV408-Projekt | /model/SuperDAL.php | UTF-8 | 424 | 2.796875 | 3 | [] | no_license | <?php
namespace model;
require_once('Settings.php');
abstract class SuperDAL {
protected $dbConnection;
protected function connectToDB() {
if ($this->dbConnection == NULL)
$this->dbConnection = new \PDO(\Settings::$dbConnectionString, \Settings::$dbUsername, \Settings::$dbPassword);
//$this->dbConn... | true |
4e6684470eee48dc93739daa0419cec106d52373 | PHP | adrhumphreys/office-tracker | /app/src/User.php | UTF-8 | 916 | 2.78125 | 3 | [] | no_license | <?php
namespace App;
use SilverStripe\ORM\DataObject;
/**
* @property string UserID
* @property string Username
* @property string Name
* @property string Email
* @property string Office
*/
class User extends DataObject
{
private static $table_name = 'user';
private static $db = [
'UserID' => ... | true |
4ace60f76be57b7b03d17f4159423631835f69c0 | PHP | arthurbershadskiy/sportsmonkey | /_editprofile.php | UTF-8 | 3,119 | 2.828125 | 3 | [] | no_license | <form id=userform action="_update.php" method="post">
<?php
$conn = mysql_connect(MYSQL_HOST, MYSQL_LOGIN, MYSQL_PASSWORD) or die("Could not connect: " . mysql_error());
mysql_select_db(MYSQL_DB);
$users_table = MYSQL_USERS_TABLE;
$query = "SELECT * FROM users WHERE username='$username'";
$result = ... | true |
9706812daef66d3de8eeb833991e952705c80dc7 | PHP | TacticalTome/TacticalTome | /app/Http/Controllers/AjaxController.php | UTF-8 | 4,704 | 2.65625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
// Models
use App\Models\StrategyGuide;
use App\Models\Comment;
// Laravel
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Auth;
class AjaxController extends Controller {
/*
AJAX Call that requests a post to be p... | true |
fcc3c421f77b54688c5a1316160cf62adfad1e46 | PHP | JalisDwiM/UASPemrogramanWeb-TI2017B | /INDIVIDU/17051204048-Jalis Dwi Muthohhar/ProjectWajib2/register.php | UTF-8 | 4,368 | 2.578125 | 3 | [] | no_license | <?php
include "header.php";
if(isset($_POST['reg'])){
$fn = $_POST['fullname'];
$em = $_POST['email'];
$un = $_POST['username'];
$pw = password_hash($_POST['password'], PASSWORD_DEFAULT);
$tp = $_POST['type'];
$hash = md5(rand(0,1000));
try {
$stmt = $dbh->prepare("INSERT INTO loginp... | true |
07157e9e17269e7f3be83e1b12bd9fd56324e029 | PHP | ybasori/ujian-ark | /6/c/application/models/Names_model.php | UTF-8 | 1,055 | 2.65625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class Names_model extends CI_Model
{
public function __construct(){
parent::__construct();
$this->table_name = "name";
$this->table_work = "work";
$this->table_salary = "salary";
}
public function get(){
return $this->db->query("SELECT n.id, n.name as name, w.i... | true |
cc353c2ae3a38abde7dfb9ea1c4d64b5c32c8e22 | PHP | Moskeet/hubspot-app | /backend/src/WickedReports/WickerReportManager.php | UTF-8 | 1,089 | 2.96875 | 3 | [] | no_license | <?php
namespace App\WickedReports;
class WickerReportManager
{
/**
* @var WickedReportProvider
*/
private $wickedReportProvider;
/**
* @var WickedReportConverter
*/
private $wickedReportConverter;
/**
* @param WickedReportProvider $wickedReportProvider
* @param Wick... | true |
00347822583cd47f415c3872bdc57f765b9ec60b | PHP | lurke/crimsonbookstore | /html/ajax/classlist.php | UTF-8 | 1,930 | 2.578125 | 3 | [] | no_license | <?php
if(isset($_POST['booksearch']) || !empty($_POST['booksearch'])) {
require '../db/connect.php';
$filterquery = mysql_query("SELECT * FROM users WHERE ('id' = 1)") or die(mysql_error());
$classquery = mysql_query("
SELECT * FROM classes
... | true |
724f4c62dcc98b808c05a1471ae03077394a8bee | PHP | jbboehr/php-handlebars | /tests/vm/renderFile.phpt | UTF-8 | 318 | 2.59375 | 3 | [
"BSD-3-Clause",
"BSD-2-Clause",
"BSD-2-Clause-Views"
] | permissive | --TEST--
Handlebars\VM::renderFile()
--SKIPIF--
<?php if( !extension_loaded('handlebars') ) die('skip '); ?>
--FILE--
<?php
use Handlebars\VM;
$vm = new VM();
for( $i = 0; $i < 2; $i++ ) {
var_dump($vm->renderFile(__DIR__ . '/../fixture1.hbs', array('foo' => 'bar')));
}
--EXPECT--
string(3) "bar"
string(3) "bar"
| true |
8a46862a1a2ee33513fdf28e5df39a45204d7ba3 | PHP | tuncerb17/ipara | /app/Http/Controllers/Message/Response.php | UTF-8 | 2,569 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: tuncer
* Date: 11/10/16
* Time: 19:11
*/
namespace App\Http\Controllers\Message;
use Omnipay\Common\Message\AbstractResponse;
use Omnipay\Common\Message\RedirectResponseInterface;
class Response extends AbstractResponse implements RedirectResponseInterface
{
protec... | true |
3e7e2a363405dcbce05f08cb583bd8f66bf012f4 | PHP | Yiber-Eulices/School | /Model/ModeloEvento.php | UTF-8 | 2,606 | 2.953125 | 3 | [] | no_license | <?php
require_once "Conexion.php";
class ModeloEvento{
public static function CrearEvento($fecha,$titulo,$descripcion,$foto,$lugar){
$oBJEC_DATA_INSERT = Conexion::conectar()->prepare("INSERT INTO Evento (Fecha,Titulo,Descripcion,Foto,Lugar) VALUES (:fecha,:titulo,:descripcion,:foto,:lugar)"... | true |
f657e8c70208a77a4a6c4d938d8ee1e885e747e8 | PHP | kiiimes/senior_1st_semester | /캡스톤_사물인터넷을적용한스마트그리드관리시스템/소스코드_4조/www/html/application/controllers/Graph.php | UTF-8 | 1,730 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Graph extends CI_Controller {
public function __construct(){
parent::__construct();
$this->load->model('auth_model');
}
private function head(){
$this->load->view('header');
}
private function foot(){
$this->load->view('footer')... | true |
cc255c5503d68d276999f974121bb3ff67694054 | PHP | DevKhalidSami/Tigarty | /Tigarty/vendor/amphp/amp/examples/001_basic_run_func.php | UTF-8 | 1,622 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
require __DIR__ . '/../vendor/autoload.php';
/**
* Running the reactor gives control of program control to the Amp event loop. Once started,
* the reactor will only stop under one of the following two conditions:
*
* (1) No scheduled events remain outstanding and no IO streams are registered for observati... | true |
eaeb2f62efefae62f0cad83a9ec4501d2c898f62 | PHP | melah200/famla_hospital | /templates/forms/appointment.php | UTF-8 | 1,748 | 2.53125 | 3 | [] | no_license | <?php
// print_r($_POST);
// exit();
//header("Location:../index.php?act=success");
if(!isset($_POST['name'])){
header("Location: ../");
}
// print_r($_POST);
// exit();
if($_POST['name'] != ""){
include("../../hms/inc/connect.php");
// include("../../../hms/inc/functions.php");
// fu... | true |
11b030d8941d6600756a26aba4209a2a139e80b2 | PHP | kamberpeka/code-check | /CourseController.php | UTF-8 | 21,673 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Admin;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Requests\CourseStoreRequest;
use App\Services\CourseService;
use Hash;
use App\User;
use App\Course;
use App\Vendor;
use App\Category;
use App\Technology;
use Illuminate\Support\Str;
use App\Allc... | true |
bab35f526c6c07379f1e0b48d3b228d5481f57db | PHP | DarkteK/site_api | /src/Controller/JsonControllerPage.php | UTF-8 | 2,507 | 2.625 | 3 | [] | no_license | <?php
namespace Drupal\site_api\Controller;
use Drupal\Core\Access\AccessResult;
use Drupal\Core\Config\ConfigFactoryInterface;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundati... | true |
bffaf8d7eebaba870b0e0881581499c98cf0cf3d | PHP | alaarezk1989/aykhedma | /app/Events/LocationCreatedEvent.php | UTF-8 | 617 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Events;
use Illuminate\Queue\SerializesModels;
use Illuminate\Foundation\Events\Dispatchable;
use App\Models\Location;
class LocationCreatedEvent
{
use Dispatchable, SerializesModels;
public $location;
public $message;
public $objectType;
public $objectId;
/**
* lo... | true |
c80981721b101beac0be44b243b9f78f64679a12 | PHP | jgalyga/bikealert | /src/Controller/BikesController.php | UTF-8 | 3,592 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Controller\AppController;
/**
* Bikes Controller
*
* @property \App\Model\Table\BikesTable $Bikes
*/
class BikesController extends AppController
{
/**
* Index method
*
* @return \Cake\Network\Response|null
*/
public function index()
{
... | true |
7d5a7ea399d3f3fa80933364e6200cf95f8b0cb1 | PHP | mistim/code-note | /frontend/controllers/PostController.php | UTF-8 | 3,103 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace frontend\controllers;
use common\models\Category;
use common\models\Post;
use common\models\search\PostSearch;
use common\models\Tag;
use common\models\TextBlock;
use yii\data\ActiveDataProvider;
use yii\web\NotFoundHttpException;
use Yii;
/**
* Class PostController
* @package frontend\controllers
... | true |
ff9fb20fa5a1fd50ee19cc86834cdae5a4f03400 | PHP | dmaciel/CRUDlex | /src/CRUDlex/FileProcessorInterface.php | UTF-8 | 2,393 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the CRUDlex package.
*
* (c) Philip Lehmann-Böhm <philip@philiplb.de>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace CRUDlex;
use Symfony\Component\HttpFoundation\Request;
/**
* This ... | true |
0984395224fcb103e13cd913cbe5875084e51a33 | PHP | afllm/php1819 | /despliegue/cadenas.php | UTF-8 | 5,218 | 3.5625 | 4 | [] | no_license | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">
<html>
<head>
<!-- Alejandro Llamas -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ejercicios con cadenas</title>
</head>
<body>
<h2>Ejercicios con cadenas</h2>
<?php
/*1*/
echo "<hr><p>Ejercicio 1</p>";
... | true |
ae35c4a14329b36d8ab56e45bcc229a413ae2b82 | PHP | BrandConstantin/php | /cursos/clases/User2.php | UTF-8 | 778 | 3.453125 | 3 | [] | no_license | <?php
class User2{
public $id;
public $userName;
public $email;
public $pass;
public function __construct($userName, $pass) {
echo "Constructor llamado<br>";
$this->userName = $userName;
$this->pass = $pass;
}
public function register(){
... | true |
78637f77ef8b7a3a49f182ae79d0a598969f4ec6 | PHP | fizios/wildstarLatino | /src/Paths/.svn/text-base/Paths.php.svn-base | UTF-8 | 621 | 2.703125 | 3 | [] | no_license | <?php
require_once $_SERVER['DOCUMENT_ROOT'].'/src/WLClases.php';
include $_SERVER['DOCUMENT_ROOT'].'/src/Paths/Path.php';
class Paths extends WLClases{
public $paths = array();
public $imagen = "";
private $imagen_repo = "/imagenes/Paths/";
public function __construct(){
... | true |
776ade133ea116e46433d3c470876f9bdf9d79e0 | PHP | nkowdley/CS1530-Team9 | /source/PHP/dbTest.php | UTF-8 | 1,710 | 2.96875 | 3 | [] | no_license | /**
* User: Blaise
* Date: 6/23/2015
* Time: 11:50 PM
*/<!DOCTTYPE html>
<html>
<head>
<title>Testing a Table</title>
</head>
<body>
<?php
require_once 'PHPUnit/Autoload.php';
class dbTest extends PHPUnit_Framework_TestCase {
function tester ()
{
$db = new mysqli('localhost', 'root',... | true |
ce989d54d036bf0767982e737ca4be613914a16f | PHP | tjmonsi/drunken-dog | /php/connect_to_mongo.php | UTF-8 | 1,656 | 2.65625 | 3 | [] | no_license | <?php
/**
* Created by JetBrains PhpStorm.
* User: tjmonsi
* Date: 31/8/13
* Time: 1:37 PM
* To change this template use File | Settings | File Templates.
*/
//ds041178.mongolab.com:41178
function MongoConnect($username, $password, $host, $db) {
try {
$connection = new Mongo('mongodb://'.$username.':... | true |
9745c9c98be05ac44b637e47b0e1395d6669a177 | PHP | Krato/LaravelInstaller | /src/Controllers/EnvironmentController.php | UTF-8 | 1,728 | 2.6875 | 3 | [] | no_license | <?php
namespace Infinety\LaravelInstaller\Controllers;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Routing\Redirector;
use Infinety\LaravelInstaller\Helpers\EnvironmentManager;
use Validator;
class EnvironmentController extends Controller
{
/**
* @var EnvironmentManager... | true |
2cfd13cabbb0fdd8cd68ba75b26572007a333552 | PHP | evp/ezcomponents | /Graph/tests/custom_chart.php | UTF-8 | 533 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
class ezcCustomTestChart extends ezcGraphPieChart
{
public function __construct( array $options = array() )
{
parent::__construct( $options );
$this->driver = new ezcGraphSvgDriver();
$this->renderer = new ezcGraphRenderer3d();
$this->palette = new ezcGraphPaletteEzBlue(... | true |
aa6266a4b59d1d82fe65cb2e8bce677f5a53e0ae | PHP | bayonetio/bayonet-magento | /Ui/Component/Listing/Column/BlocklistAction.php | UTF-8 | 3,592 | 2.59375 | 3 | [] | no_license | <?php
namespace Bayonet\BayonetAntiFraud\Ui\Component\Listing\Column;
use Magento\Framework\UrlInterface;
use Magento\Framework\View\Element\UiComponent\ContextInterface;
use Magento\Framework\View\Element\UiComponentFactory;
use Magento\Ui\Component\Listing\Columns\Column;
/**
* Class to define a blocklist action ... | true |
1cf0cdbd7f3df213e4da7b6b49133103cf15cfe9 | PHP | marcondesmacaneiro/aulas_desweb_1 | /php/src/higorrangel/atividade 6/index.php | UTF-8 | 135 | 2.796875 | 3 | [] | no_license | <?php
$mensagem = "Estou aprendendo";
$i = 1;
while( $i <= 50 ){
echo $i . ' - ' .$mensagem . '<br />' . PHP_EOL ;
$i++;
}
> | true |
d0252ab9ffd3d5cb00e3c1a7b92d4f3815139113 | PHP | alexbriones/formacionArquitecturaHexagonal | /src/UsesCases/Users/ViewUserUseCase.php | UTF-8 | 834 | 2.921875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: alex.briones
* Date: 28/02/14
* Time: 14:26
*/
namespace UsesCases\Users;
require 'ViewUserRequest.php';
require 'ViewUserResponse.php';
class ViewUserUseCase {
/**
* @var \Domain\UserRepository
*/
private $userRepository;
public function __constr... | true |
285f09501249aaa5a23ae463362b06c93be24af0 | PHP | bbeeking/swarm | /admin/includes/function.php | UTF-8 | 26,759 | 2.59375 | 3 | [] | no_license | <?php
//JS跳转页面
function gourl($alert,$page,$history='',$target="window")
{
if ($alert != "")
{
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />';
echo '<script language="javascript">alert("'.$alert.'")</script>';
}
if ($page != "")
{
echo '<script language="javascript">'... | true |
4f338674ce877b3a882458ddfd0223caca136a46 | PHP | aronduby/hwp-bridge | /classes/DumpFormatter.php | UTF-8 | 834 | 2.625 | 3 | [] | no_license | <?php
class DumpFormatter extends \Monolog\Formatter\HtmlFormatter{
public function format(array $record)
{
$output = $this->addTitle($record['level_name'], $record['level']);
$output .= '<table cellspacing="1" width="100%">';
$output .= $this->addRow('Message', (string) $record['messag... | true |
bcf1615337a73b5f786fd7bd1bfca61987930457 | PHP | vinyl-projects/di | /src/main/factory/argument/DefinitionFactoryValue.php | UTF-8 | 790 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace vinyl\di\factory\argument;
use vinyl\di\factory\FactoryValue;
/**
* Class DefinitionValue
*/
final class DefinitionFactoryValue implements FactoryValue
{
/**
* ObjectValue constructor.
*/
public function __construct(private readonly ?string $definitionId,... | true |
ecc05d3379b51c7c95c93ce9030b714113aaab3d | PHP | ibnutriyuono/phpnativecommerce | /produk.php | UTF-8 | 3,733 | 2.8125 | 3 | [] | no_license | <?php
$connect = mysqli_connect("localhost", "root", "", "db_atol");
if(isset($_POST["add_to_cart"]))
{
if(isset($_SESSION["shopping_cart"]))
{
$item_array_id = array_column($_SESSION["shopping_cart"], "item_id");
if(!in_array($_GET["id"], $item_array_id))
{
$count = count($_SESSION["shopping_cart"]);
... | true |
c0be6e8386cf5f31fb8dadad1dc9be0cdfbe2f51 | PHP | Wapweb/api.rozklad.org.ua | /application/models/TimetableModel.php | UTF-8 | 1,229 | 3 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Шаповал
* Date: 28.12.2014
* Time: 14:48
*/
class TimetableModel {
public $group;
public $nearest_lesson;
public $weeks = array();
public function __construct($group_name)
{
$this->group = GroupModel::getByNameOrId($group_name);
... | true |
b9cdb788a134be3cf560eb600807dfc2c68dfc26 | PHP | abdallahisham/events-backend | /app/Console/Commands/SendEmailsTomorrowEvents.php | UTF-8 | 970 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Console\Commands;
use App\Services\EventNotificationsService;
use Illuminate\Console\Command;
class SendEmailsTomorrowEvents extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'email:send-coming';
/**
... | true |