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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
1bd6c60a0a8802b3bc717bd94a43aeafa6ce6546 | PHP | jaredstevens10/appServer_Files | /BattleField/UpdateAutoPlayers.php | UTF-8 | 4,782 | 2.65625 | 3 | [] | no_license | <?php
//chmod("/usr/local/bin/php/home/clavenso/public_html/Apps/BattleField/UpdateAutoPlayers.php", 0755);
chmod("/var/www/html/Apps/BattleField/UpdateAutoPlayers.php", 0755);
///usr/local/bin/php/home/clavenso/public_html/Apps/BattleField/UpdateAutoPlayers.php
//omefile", 0755);
header('Content-type: application/j... | true |
1c64c6eab764ee7012cf28786e525362c82522b0 | PHP | Tomassky/php_crawl | /class/db.class.php | UTF-8 | 2,211 | 3.015625 | 3 | [] | no_license | <?php
class db
{
public $host;
public $username;
public $password;
public $database;
//初始化各个参数
function __construct($host='',$username='',$password='',$database='')
{
$this->host = empty($host)? $GLOBALS['sql_connst']['host'] : $host;
... | true |
3eb50f8b4f89325a86ce41cd276b829bef6e6623 | PHP | jumper32126/Challenge | /PHPプログラミング基礎学習2/php2_7.php | UTF-8 | 224 | 3.203125 | 3 | [] | no_license | <?php /* 課題7 以下の順番で、要素が格納された配列を作成してください。
10, 100, 'soeda', 'hayashi', -20, 118, 'END' */
$arr = array('10','100','soeda','hayashi','-20','118');
?>
| true |
a2433600efab03bebf657b99d9db4992d57ea390 | PHP | adolfokrah/school-management-system | /cms/upload_subjects_csv.php | UTF-8 | 4,198 | 2.515625 | 3 | [] | no_license | <?php
//upload crest to database
//error_reporting(0);
include '../includes/school_ini_user_id.php';
include '../includes/resize_image.php';
$allowedExts = array("csv");
$temp = explode(".", $_FILES["file"]["name"]);
$extension = end($temp);
$data = '';
$class = '';
if(isset($... | true |
19c08172e7a197af8d87341630ef6990b0d3bf57 | PHP | Edivald0/PROYECTOS-PHP | /codejobs/ejercicios/07polimorfismo/calculadora/calculadora.php | UTF-8 | 708 | 3.828125 | 4 | [] | no_license | <?php
/**
*
*/
class Calculadora
{
public $numero1;
public $numero2;
public function Suma( $numero1, $numero2 )
{
return "<center><h2>= ". $this->numero1 = $numero1 + $this->numero2 = $numero2. '</h2><center>';
}
public function Resta ( $numero1, $numero2 )
{
return "<center><br><h2>= ". $this->num... | true |
74a07b34696a3c17c314c8f9c3eff4346add514b | PHP | karlmarkuswahlberg/php-ruhmatoo-projekt | /page/confirm.php | UTF-8 | 2,944 | 2.65625 | 3 | [] | no_license |
<?php
require_once("functions.php");
require_once("../classes/Confirm.class.php");
if(!isset($_SESSION['logged_in_user_id'])){
header("Location: login.php");
}
if(isset($_GET["logout"])){
session_destroy();
header("Location: login.php");
}
$Confirm = new Confirm($mysqli);
if(isset($_GET... | true |
4b7ecc323ae58a685d80c0fee77a879a2d9502a5 | PHP | SuichiNagi/Intro-PHP | /Coin Throw/index.php | UTF-8 | 658 | 3.5 | 4 | [] | no_license | <?php
$headcount = 0;
$tailcount = 0;
$flipcount = 0;
for($i = 1; $i <= 5000; $i++){
$flip = rand(0,1);
$flipcount++;
if($flip == 1){
$headcount++;
echo "Attemp #". $flipcount . " Throwing a coin... It's a head!... Got
'" . $headcount ."' head(s) so far and '". $t... | true |
577b46d9df6ce0d901b560866959a6d2b533c80c | PHP | seguracarlos/cetec | /cetecreloadedapp/module/System/src/System/Services/UsersRolesServices.php | UTF-8 | 792 | 2.96875 | 3 | [] | no_license | <?php
namespace System\Services;
use System\Model\UsersRolesModel;
class UsersRolesServices
{
private $userRoleModel;
protected function getUserRoleModel()
{
return $this->userRoleModel = new UsersRolesModel();
}
//Metodo que agrega un usuario relacionado con un rol
public function addRoleToUser($user_id,... | true |
6c002451be6151b4dbe7b2018981730497ed942d | PHP | mrvnvlkmnn/whiteboard | /app/View/Components/tableDivTHeader.php | UTF-8 | 565 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\View\Components;
use Illuminate\View\Component;
class tableDivTHeader extends Component
{
public $textToDisplay;
/**
* Create a new component instance.
*
* @param $textToDisplay
*/
public function __construct($textToDisplay)
{
$this->textToDisplay = $t... | true |
b632ea5007dca9c922a31a996df980593c733c79 | PHP | adam-godfrey/operation-braveheart | /models/admin/analytics_model.php | UTF-8 | 2,112 | 2.9375 | 3 | [] | no_license | <?php
class Analytics_Model extends Model {
public function __construct()
{
parent::__construct();
}
public function getDailyHits() {
//get the number of page hits for today
$sql = 'SELECT *, ROUND((counter / (SELECT sum(counter) FROM analytics WHERE insertdate = CURDATE() ORDER BY counte... | true |
5ba90b908646e0cf2a1406cd8ee3ce80e2c6a0fd | PHP | dangqun/tp | /extend/Assessment.php | UTF-8 | 2,642 | 2.734375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* 党员考核分计算
* Trait Assessment
*/
use think\Db;
trait Assessment
{
//用户ID
public $uid;
//考核分
public $score;
//类型【加或减】
public $type;
//项目,比如meeting:党员会议,daily_activities:日常活动
public $typeStr;
//我也不知道为什么设置这个,暂时也没用
public $parent = false;
//规则数组
protected $rule;... | true |
253cfa6830599aa79ed3c2fe0052782449685c2e | PHP | seanmorris/ids | /source/Collection.php | UTF-8 | 5,127 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace SeanMorris\Ids;
use \UnexpectedValueException;
use \SeanMorris\Ids\WrappedMethod;
use SeanMorris\Ids\Inject\FactoryMethod;
use \CallbackFilterIterator, \Countable, \Traversible, ArrayAccess;
use \Iterator, \IteratorAggregate, \AppendIterator, SplObjectStorage;
use \SeanMorris\Ids\Collection\Driver;
us... | true |
bb7298390d91f7bb00fa71fbacf484d5ea7aee84 | PHP | DocKob/PHP-Games-Archives | /Isalow/action/confrerie_creation.php | ISO-8859-1 | 1,749 | 2.546875 | 3 | [] | no_license | <?php
//paramettres de session//
session_start();
if( !session_is_registered("pseudo") || !session_is_registered("sexe") ||!session_is_registered("race") ||!session_is_registered("portrait") ||!session_is_registered("alliance") )
{
exit();
}
$pseudo = $_SESSION['pseudo'];
$sexe = $_SESSION['sexe'];
$race = $_SESSION['... | true |
084f1dbb481278b359e92160e500f2ae7ecb775e | PHP | AndriusRasimavicius/Lankomumas | /app/Http/Controllers/Admin/ClubController.php | UTF-8 | 2,720 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\User;
use App\Models\Club;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Http\Requests\ClubValidator;
class ClubController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Re... | true |
9bef97b126b22d4a380b0db7ed6a1e3b1051fab7 | PHP | kosuha606/virtual-model | /src/Example/Shop/Services/OrderService.php | UTF-8 | 1,196 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace kosuha606\VirtualModel\Example\Shop\Services;
use kosuha606\VirtualModel\VirtualModelEntity;
use kosuha606\VirtualModel\VirtualModelManager;
use kosuha606\VirtualModel\Example\Shop\Model\OrderReserve;
use kosuha606\VirtualModel\Example\Shop\Model\Product;
class OrderService
{
/** @var UserServic... | true |
e0bbc5fc273d121186684dc94e97d6c9fad8df95 | PHP | desarrolla2/kata1 | /src/App/Controller/Api/UserController.php | UTF-8 | 3,213 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the "Kata 1" package.
*
* Copyright (c) Daniel González
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* @author Daniel González <daniel@desarrolla2.com>
*/
namespace App\Controller\Api;
use Com... | true |
d1ea13d430bfa856a6a7c38c91a448fa3dc3c5ee | PHP | Tekorius/URL-Shortener | /src/AppBundle/Repository/UrlRepository.php | UTF-8 | 944 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Repository;
use AppBundle\Entity\Url;
/**
* UrlRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class UrlRepository extends \Doctrine\ORM\EntityRepository
{
/**
* Retrieve Url entity by provided short url
*
... | true |
ced95530d280b02e0ef0ffe23907b8265fcdb4c0 | PHP | turelsminion/Web_Technologies | /Lab3-4/php_scripts.php | UTF-8 | 9,043 | 2.53125 | 3 | [] | no_license | (create)
//Mobile_api.php
function new_tournament() {
$user_data = $this->check_token();
$api_token = $this->input->get_request_header('API-TOKEN');
$name = $this->input->post('name') ? $this->input->post('name') : null;
$description = $this->input->post('description') ? $this->input->post('description'... | true |
cd10e21d6f0a8b21e49923643fec3793889c2ef7 | PHP | anhvandev/composer_test | /composer/src/Composer/Util/Http/RequestProxy.php | UTF-8 | 793 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace Composer\Util\Http;
use Composer\Util\Url;
class RequestProxy
{
private $contextOptions;
private $isSecure;
private $formattedUrl;
private $url;
public function __construct($url, array $contextOptions, $formattedUrl)
{
$this->url = $url;
$this->contextOptions = $contextOptions;
$t... | true |
d835aae3c78df19b4d45053b4d4ae436ce3dd4cc | PHP | AndryMandresyRAM/ApiDiseaseHelper | /src/DataFixtures/DiseaseFixtures.php | UTF-8 | 760 | 2.59375 | 3 | [] | no_license | <?php
namespace App\DataFixtures;
use App\Entity\Disease;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\Persistence\ObjectManager;
class DiseaseFixtures extends Fixture
{
public function load(ObjectManager $manager)
{
for ($i=0; $i < 100; $i++) {
$disease = new Disease(... | true |
9434e62d636aa78795275c478a5840cfa0c06e30 | PHP | Lawrence-Portfolio/Flexicon-main | /plugins/bizmark/flexicon/models/PrintType.php | UTF-8 | 1,707 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php namespace BizMark\Flexicon\Models;
use Model;
/**
* PrintType Model
* @package BizMark\Flexicon\Models;
* @author Nick Khaetsky @ Biz-Mark, nick@biz-mark.ru, info@biz-mark.ru
*
* @mixin \October\Rain\Database\Builder
* @mixin \Eloquent
*
* @property int $id
* @property boolean ... | true |
8c2ba4e589cfb1d4f2201ed72f0d19233264244f | PHP | elhamrv/ninilala | /yii/models/Dings.php | UTF-8 | 1,154 | 2.609375 | 3 | [] | no_license | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "dings".
*
* @property int $id
* @property string $name
* @property string $status
* @property string $quantity
* @property string $url
*/
class Dings extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public st... | true |
01477bec6723bfaea49bf4b2a28142ba65b71f61 | PHP | aaryareddy/Online-Movie-Rating-System | /newActor.php | UTF-8 | 813 | 2.75 | 3 | [] | no_license | <?php
$aName = $_POST['aName'];
$age = $_POST['age'];
$aNation = $_POST['aNation'];
$adatebirth = $_POST['adatebirth'];
$ainfo = $_POST['ainfo'];
?>
<html>
<body>
<?php
$con = mysqli_connect("localhost", "root", "root", "movierate",8889);
if (!$con) {
die('Could not connect: '.mysqli_error());
... | true |
bad8606698b84e43c34ff7859e1c1acb1c075bf6 | PHP | Tomasz-Kolasa/toolbox | /php/tabs/rhapsody/xmlReader/templates/rhapsodySectionReader/listItems.php | UTF-8 | 413 | 2.90625 | 3 | [] | no_license | <?php
// used by RhapsodySectionReader::printItemsNames()
?>
<ul>
<?php foreach($listThisItem as $key=>$properies): ?>
<li> <!--property-->
<h3><?=$key;?></h3>
<ul>
<?php foreach($properies as $object): ?>
<li><?=$object->getName();?></li> <!--property list item-... | true |
92b234f458d6e4600c8d115074f780e4e5329c13 | PHP | Abel3005/PHP-Programming | /chapter7/7-2.php | UTF-8 | 3,014 | 2.96875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Abel
* Date: 2019-03-29
* Time: 오전 11:55
*/
$connect = mysql_connect("localhost", "kdg", "1114");
mysql_select_db("kdg_db", $connect);
if($_GET[mode] == "insert")
{
$sum = $_POST[sub1] + $_POST[sub2] + $_POST[sub3] + $_POST[sub4] + $_POST[sub5];
... | true |
e4c4e11ccb43325e7f484436d4708cad59d34887 | PHP | Vensla/ekarta | /application/models/Soap.php | UTF-8 | 1,728 | 2.578125 | 3 | [] | no_license | <?php
class Application_Model_Soap
{
protected $klijent;
public function Application_Model_Soap()
{
$opcije = array(
'location' => 'http://ps/Index/soap',
'uri' => 'http://ps/Index/soap'
);
try {
$this->klijent = new Zend_Soap_Client(n... | true |
56cecd50a9d50ea823cd5f674fd64e4ab862ce7d | PHP | holalluis/magicosona | /header_sessio.php | UTF-8 | 996 | 2.71875 | 3 | [] | no_license | <div style="margin:0;background-color:#395693;color:white;padding:0.5em">
<?php
if(isset($_COOKIE['admin']))
{ ?>
Sessió iniciada com a ADMINISTRADOR | <a href="controller/logout.php" style=color:white>Finalitza sessió</a>
<?php }
else if(isset($_COOKIE['jugador']))
{
$sql="SELECT nom FROM jugadors WHERE id=".... | true |
5a0dddca149c500ad7425dbf13739b07c6233fa8 | PHP | shilpabharamanaik/shilpazend3Fisdap | /vendor/fisdap/members-api/backup/app/Data/Repository/RetrievesByName.php | UTF-8 | 305 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php namespace Fisdap\Data\Repository;
/**
* Trait RetrievesByName
*
* @package Fisdap\Data\Repository
* @author Ben Getsug <bgetsug@fisdap.net>
*/
trait RetrievesByName
{
/**
* @inheritdoc
*/
public function getOneByName($name)
{
return $this->findOneBy(['name' => $name]);
}
} | true |
fd726a38c3bd9ddfe5c959e7599c6724d1b26ba9 | PHP | JakubMarden/eshop | /app/model/DatabaseModel.php | UTF-8 | 9,919 | 3.109375 | 3 | [] | no_license | <?php
/**
* Database model pro controlery
*
* @author vizus.jestrab
*/
class DatabaseModel
{
/** @var string host pripojeni. */
private $host;
/** @var string uzivatelske jmeno pro pripojeni k databazi. */
private $user;
/** @var string uzivatelske heslo pro pripojeni k databazi.... | true |
af765842f65dcbe5ead4c7581bdcfcb68844bb9c | PHP | summerKK/learn-swoole | /project/basics/client.php | UTF-8 | 562 | 2.828125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: summer
* Date: 2018/5/3
* Time: 0:14
*/
$client = new swoole_client(SWOOLE_SOCK_TCP);
//连接到服务器
if (!$client->connect('127.0.0.1', 9501, 0.5)) {
die("Connect failed!\n");
}
//向服务器发送数据
$n = 0;
while ($n <= 100) {
if (!$client->send('Hello World')) {
die("Se... | true |
84a11f2ff875df14940e6eb0a6cd10e0ea212500 | PHP | Arkowsky/prooph-symfony4-bank-account-demo | /src/Domain/Query/GetBankAccountQueryHandler.php | UTF-8 | 757 | 2.640625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Domain\Query;
use App\Projection\BankAccount\BankAccountFinder;
use React\Promise\Deferred;
class GetBankAccountQueryHandler
{
/** @var BankAccountFinder */
private $bankAccountFinder;
public function __construct(BankAccountFinder $bankAccountFinder)
{
... | true |
6757980d2d916b6089c7a8a17322dafe449643a6 | PHP | yves02coder/Projet_3B | /ajouterampoule.php | UTF-8 | 1,644 | 2.578125 | 3 | [] | no_license | <?php
ob_start();
try
{
// On se connecte à MySQL
$db = new PDO('mysql:host=localhost;dbname=ecommerce;charset=utf8', 'root', '');
$db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
}catch(PDOException $exception)
{
// En cas d'erreur, on affiche un message et on arrête tout
die("E... | true |
dcc54e739aacc69c5ea5275f26dc40996a03d5c2 | PHP | RobertGrubb/coolapi | /example/index.php | UTF-8 | 1,298 | 2.546875 | 3 | [] | no_license | <?php
require '../vendor/autoload.php';
require_once __DIR__ . '/../src/CoolApi.php';
$userRoutes = require_once __DIR__ . '/userRoutes.php';
use CoolApi\Instance;
// Instantiate Cool Api
$api = new Instance([
// Base URI (For sub-directories)
'baseUri' => '/coolapi/example/',
'logging' => [
'enabled' =... | true |
d7e3de47f906fdbbe914b5fddcda321fc76b198a | PHP | yansa05/belajarphp | /latihan4.php | UTF-8 | 167 | 2.8125 | 3 | [] | no_license | <?php
/* Pertemuan 4 Dasar PHP
variable */
$nama = "Yansa";
$umur = 30;
echo "Nama : ";
echo "\n";
echo $nama;
echo "\n";
echo "Umur : ";
echo "\n";
echo $umur;
?> | true |
f50a2bbdd0439fbecd779c46e2a6a3a4202de5b5 | PHP | melkotoury/lara-recipe | /database/seeds/RecipeAllergensTableSeeder.php | UTF-8 | 1,080 | 2.734375 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use App\RecipeAllergen;
use Illuminate\Support\Facades\DB;
class RecipeAllergensTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('recipes')->orderBy('id')->chunk(100, function ... | true |
10c60d7a075adf1b4e6e2b2aa6ccfee3e1d15fbc | PHP | slopezvvv/Foro | /CTR/Publicar.php | UTF-8 | 847 | 2.828125 | 3 | [] | no_license | <?php
session_start();
include('../DTO/Constantes.php');
include('../DTO/Usuario.php');
include('../DTO/Mensaje.php');
$usuario = new Usuario("Anonimo");
$mensaje = new Mensaje($usuario, null);
$_SESSION[KEY_ERROR] = $mensaje->setValor($_GET[KEY_MENSAJE]);
// Todos los mensajes que vaya a recibir publicar se van a guar... | true |
c6a690e9be5344462e3d106751e31641a23111b5 | PHP | Millambeur/WatchaDoing | /src/Altgeek/ArtistBundle/Entity/Nationality.php | UTF-8 | 1,569 | 2.609375 | 3 | [] | no_license | <?php
/* src/Altgeek/ArtistBundle/Entity/Nationality.php */
namespace Altgeek\ArtistBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Nationality
*
* @ORM\Table("altgeek_nationality")
* @ORM\Entity(repositoryClass="Altgeek\ArtistBundle\Entity\NationalityRepository")
*/
class Nationality
{
/**
* @va... | true |
0eb02655bae32e8ebb88b36ec33f1f0c03a6c6a7 | PHP | KaiqueLimaNovaes/fullstackGames | /Fullstack games/pedido.php | UTF-8 | 3,065 | 2.765625 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
$database = "fullstackgames";
$conn = mysqli_connect($servername, $username, $password, $database);
if (!$conn){
die("A conexão com o banco de dados falhou: ".mysqli_connect_error());
}
if (isset($_POST['clie... | true |
0231e9f9d4b536ee4e62a7da816cf949edf2b680 | PHP | xigemall/new | /database/migrations/2019_04_30_151103_create_wechats_table.php | UTF-8 | 1,024 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateWechatsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
//微信管理
Schema::create('... | true |
d5a063308ec8fb542806f330774d073934b51060 | PHP | sascha-beloborodov/soap-mock-service | /storage/wsdl/1/LoadingRate.php | UTF-8 | 2,297 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
class LoadingRate
{
/**
* @var string $product
*/
protected $product = null;
/**
* @var string $transport
*/
protected $transport = null;
/**
* @var float $qty
*/
protected $qty = null;
/**
* @var string $measure_unit
*/
protected $measu... | true |
8ffa635f9ea3e645388c471e1e2b89f0a7f3b230 | PHP | DannielOlsson/oophp | /kmom05/content/edit.php | UTF-8 | 1,627 | 2.65625 | 3 | [] | no_license | <?php
$id = isset($_GET['id']) ? $_GET['id'] : null;
is_numeric($id) or die('Check: Id must be numeric.');
$slug = isset($_POST['slug']) ? $_POST['slug'] : null;
$title = isset($_POST['title']) ? $_POST['title'] : null;
$url = isset($_POST['url']) ? strip_tags($_POST['url']) : null;
$url = empty($url) ? n... | true |
35ba6dc7e58af1035187abb143d58a9de0f2eddc | PHP | romfr/infostrates_tnt | /app/code/community/Infostrates/Tnt/Block/Onepage/Shipping/Method/Available.php | UTF-8 | 2,297 | 2.765625 | 3 | [] | no_license | <?php
class Infostrates_Tnt_Block_Onepage_Shipping_Method_Available extends Mage_Checkout_Block_Onepage_Shipping_Method_Available
{
protected $_itemRenders = array();
public function __construct()
{
parent::__construct();
//Rendu par défaut
$this->addItemRender(
'defau... | true |
f0fd7b66622aceda055b98df21d7fff6f0cae444 | PHP | AlanPedersen/RAD_project_movie_database | /web/movie_top_10_google_data_scr.php | UTF-8 | 922 | 2.90625 | 3 | [] | no_license |
<?php
// RAD Sprint 1
// Name: Alan Pedersen
// ID: P225139
// Date: 31/05/2020
// Project code
// Create the Top 10 chart data for google charts
try {
// connect to the database
include "connect.pdo.php";
// create the sql commands
$sqlCommand = "SELECT * FROM vwGetTop10records ";
// prepare ... | true |
c1c039827fc1b6888fe9d7d30b2d035e9feca4e9 | PHP | unnati2000/real-estate-php | /alert.php | UTF-8 | 787 | 2.71875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./Styles/style.alert.css"/>
<title>Document</title>
</head>
<body>
... | true |
a36089d9b4bc7d704441b8a8ff2982594ddb70b1 | PHP | QB-K1/blog | /delete_article.php | UTF-8 | 1,088 | 2.71875 | 3 | [] | no_license | <?php
// va inclure le fichier qui contient le pdo, comme ça si un jour change ID ou MDP de la BDD n'a à le changer que dans ce fichier externe, et en plus pas besoin de le réécrire
include 'application/bdd_connection.php';
// si id n'est pas présent dans les infos récup en URL ou si différent d'un chiffre alors renv... | true |
96daf8e14cd3822b0bce2ae82c5301a254dbb94b | PHP | mhndev/darmanet | /src/UrlGenerator.php | UTF-8 | 2,788 | 2.828125 | 3 | [] | no_license | <?php
namespace mhndev\darmanet;
use mhndev\darmanet\Exception\InvalidFunctionException;
/**
* Class UrlGenerator
* @package mhndev\darmanet
*/
class UrlGenerator
{
/**
* @var array
*/
protected $default_config;
/**
* @var array
*/
private $config;
/**
* UrlGenerator... | true |
a7f5b0c0a406f59ac43cd1af63af0652ca33177f | PHP | antoniocunh/ProjetoPSI | /assets/php/Object/obj.DeleteUser.php | UTF-8 | 953 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
//require da verificação do login
require_once($_SERVER["CONTEXT_DOCUMENT_ROOT"] . "/ProjetoPSI/assets/php/Object/Roles/obj.VerifyLogin.php");
//require da verificação da role de admin
require_once($_SERVER["CONTEXT_DOCUMENT_ROOT"] . "/ProjetoPSI/assets/php/Object/Roles/obj.VerifyAdminRole.php");
... | true |
ac410ba8e14ee942844975c0e9bc9e979c3b9c10 | PHP | raghukhanal/Back-end-Web-Development | /labs/lab2.php | UTF-8 | 1,313 | 3.5 | 4 | [] | no_license | <?php
function drawTree() {
$stars = 5;
for($line = 1; $line <= $stars; $line++) {
for($j = 1; $j <= $line; $j++) {
echo "*";
}
echo "<br/>";
}
$stars = 9;
for($line = 3; $line <= $stars; $line++) {
for($j = 1; $j <= $line; $j++) {
echo "*";
... | true |
4a8a54582196167f7af8c8b139b9138bfa6cad79 | PHP | msojocs/faka | /app/Service/PayServiceInterface.php | UTF-8 | 414 | 2.75 | 3 | [] | no_license | <?php
declare (strict_types=1);
namespace App\Service;
/**
* Interface PayServiceInterface
* @package App\Service
*/
interface PayServiceInterface
{
/**
* 获取平台列表
* @return array
*/
public function getPlatforms(): array;
/**
* 获取平台信息
* @param string $handle
* @return array... | true |
6dde9ff3be9600f2e50713e5b30a60322400b9c4 | PHP | srbverma10-android-dev/AudioFY | /api_php_file/getDataForRecyclerView.php | UTF-8 | 377 | 2.78125 | 3 | [] | no_license | <?php
require "DataBase.php";
$db = new DataBase();
if ($db->dbConnect()) {
$array = array();
for( $i = 2 ; $i < 5 ; $i++ ){
$data = new dataForRecyclerView();
$data = $db->getDataForRecyclerView($i);
array_push($array, $data);
}
$toReturn = json_encode($array);
print($toRe... | true |
9181de94701ae94243bb09dd494d8117a50c52ed | PHP | yutohino/plain_nikki | /function_php/username_change.php | UTF-8 | 2,023 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
require_once 'monitor.php';
$new_name = mysqli_real_escape_string( $link, $_POST['new_username'] );
$pass = mysqli_real_escape_string( $link, $_POST['password'] );
// トークン認証
if ( isset( $_POST['csrf_token'] ) && $_POST['csrf_token'] == $_SESSION['csrf_token'] ) {
// ========== ユーザー名変更 ===... | true |
f81a738f2ef3c8c031c35a41188acbe8b5ed752d | PHP | fastmvc/php | /lib/core/Autoloader.php | UTF-8 | 1,110 | 2.5625 | 3 | [] | no_license | <?php
/**
* @option: 自动加载类
* @author: bishenghua
* @date: 2013/07/19
* @email: bsh@ojo.cc
*/
namespace lib\core;
spl_autoload_register(__NAMESPACE__.'\Autoloader::loader');
class Autoloader {
public static function loader($className) {
$thisClass = str_replace(__NAMESPACE__ . '\\', '', __CLASS__);
$baseD... | true |
21e178c114d0570b37726204083f52c5f5cf354a | PHP | flame-cms/CMS | /AdminModule/forms/Users/UserAddForm.php | UTF-8 | 782 | 2.53125 | 3 | [] | no_license | <?php
/**
* UserAddForm.php
*
* @author Jiří Šifalda <sifalda.jiri@gmail.com>
* @package Flame\CMS
*
* @date 14.10.12
*/
namespace Flame\CMS\AdminModule\Forms\Users;
class UserAddForm extends \Flame\CMS\AppModule\Application\UI\Form
{
public function configure()
{
$this->addSelect('role', 'Role:')
... | true |
0c7d29b071d2c02fd6523affe2482a454eb21619 | PHP | riegerc/vemapproject01 | /review_uebersichts_tabelle.php | UTF-8 | 3,330 | 2.71875 | 3 | [] | no_license | <?php
/*
Autor: Theo Isporidi
*/
$checkme = "a30ee472364c50735ad1d43cc09be0a1";
require_once "include/constant.php";
$pageRestricted = true; // defines if the page is restricted to logged-in Users only
$userLevel = PERM_CED_REVIEW; // uses a PERM_ const now and hasPermission($userLevel) now if fails a 403 Error-Page i... | true |
7cd348dfa30383ecd1bd5a2b0eed1ecdb2afb67a | PHP | tarcisiojr/php-cache | /src/Core/Cache.php | UTF-8 | 4,084 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace PHP\Cache\Core;
use PHP\Cache\API\CacheStrategy;
use PHP\Cache\API\CacheSystem;
use PHP\Cache\Core\Strategy\DefaultCacheStrategy;
use PHP\Cache\Core\Strategy\ExactlyCacheStrategy;
use PHP\Cache\Core\Strategy\ScopeCacheStrategy;
use PHP\Cache\Core\Strategy\StatefulCacheStrategy;
use PHP\Cache\Core\Stra... | true |
7842f5117e7d6a305da7ba14f5cb6b8241bf602b | PHP | InnaBublikova/guestbook | /guestbook.inc.php | UTF-8 | 2,883 | 2.828125 | 3 | [] | no_license |
<?
//конфигурация
define ('DB_HOST', 'localhost');
define ('DB_LOGIN', 'root');
define ('DB_PASSWORD', '');
define ('DB_NAME', 'guestbook');
$link = mysqli_connect(DB_HOST, DB_LOGIN, DB_PASSWORD, DB_NAME);
if (!$link) {
echo "Ошибка: Невозможно установить соединение с MySQL." . PHP_EOL,"<br>";
ec... | true |
dd5178ad7be4f74d7d0d338364afb7cde6cd91ec | PHP | jessehuss/jessehuss.githhub.io | /CMPE2500/Assignments/ICA04/dbUtility.php | UTF-8 | 1,488 | 2.671875 | 3 | [] | no_license | <?php
$mysql_connection = null;
$mysql_response = array();
$mysql_status = "";
mysqlConnect();
function mysqlConnect()
{
global $mysql_connection, $mysql_response;
$mysql_connection = new mysqli("localhost", "jhuss222_test", "P@ssw0rd", "jhuss222_CMPE2500");
if($mysql_connection -> connect_error) ... | true |
656151a760079cd273cad3d13a3da2f7b5173dee | PHP | brandonbrock/MobileView | /php/profile.php | UTF-8 | 3,495 | 2.65625 | 3 | [] | no_license | <?php
session_start();
include"connection.php";
if(!isset($_SESSION['username'])){
header("location: loginForm.php"); // Redirecting To Home Page
}
//variables
$username = "";
$firstname = "";
$surname = "";
$password_1 = "";
$password_2 = "";
$level = "";
//update users info
if(isset($... | true |
95275b23358f31bbb806b50e3c15c01d8de839ff | PHP | LuisCorredor/propiya-master | /application/controllers/packs.php | UTF-8 | 5,789 | 2.5625 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Packs extends CI_Controller {
function __construct() {
parent::__construct();
}
public function comprar()
{
/*
Redireccionar al login / register si la
sesión no fue iniciada previamente.
*/
if ($this->session->userdata("log... | true |
f813301e6ca7986b8d8d0ebc646b2282b720d7c4 | PHP | wsgan001/Han | /Han-htdoc/test2.php | UTF-8 | 176 | 2.6875 | 3 | [] | no_license | <?php
// $data = array();
$data[0][0] = 1;
$data[0][1] = 2;
$data[1][0] = 3;
$data[1][1] = 4;
$data[1][2] = 5;
echo $data[1][1] . "<br>";
echo count($data);
?>
| true |
3f68b2872eb26a3d697f1f7976eab912200f0355 | PHP | cableclark/miniBlog | /resources/Signup.Class.php | UTF-8 | 3,839 | 3.15625 | 3 | [] | no_license | <?php
Class Signup {
private $firstname;
private $lastname;
private $username;
private $password;
public $email;
public function __construct($firstname, $lastname, $username, $password, $email) {
$this->firstname = $firstname;
$this->lastname = $lastname;
$this->usern... | true |
fb57343e54395d6c87739bd7e1faddba1c8512be | PHP | larangogon/T12-V2 | /app/Models/Stock.php | UTF-8 | 931 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
class Stock extends Model
{
protected $fillable = ['product_id', 'color_id', 'size_id', 'quantity'];
public function size()
{
return $this->belongsTo(Size::class)->select... | true |
01c53c079de5a0866b2d49286cfb0f7b5bb3c690 | PHP | DoghouseMedia/Dope | /lib/Dope/Report/_Base.php | UTF-8 | 8,372 | 2.625 | 3 | [] | no_license | <?php
namespace Dope\Report;
abstract class _Base
{
const FORM_CLASS = 'Dope\Report\Form';
const DEFAULT_SORT_COLUMN = true;
const REQUIRED = true;
protected $timeStart;
protected $timeEnd;
protected $enabled = true;
protected $memoryStart;
protected $memoryEnd;
... | true |
df8d2a072ae6889e5b6f799e7deee021e6136ec3 | PHP | luyadev/luya-generic | /src/blocks/LineBlock.php | UTF-8 | 2,646 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace luya\generic\blocks;
use luya\generic\Module;
use luya\generic\BaseGenericBlock;
/**
* Simple horizontal line block
*
* @author Basil Suter <basil@nadar.io>
* @since 1.0.0
*/
final class LineBlock extends BaseGenericBlock
{
/**
* @inheritdoc
*/
public $cacheEnabled = true;
... | true |
eb9ba108b106284fc24e2663ee5baa636da9b506 | PHP | dilipsam/i-life | /database/seeds/UsersTableSeeder.php | UTF-8 | 1,257 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Seeder;
use App\Models\Role;
use App\Models\User;
use App\Models\Permission;
class UsersTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
//OWNER
DB::table('users')->insert([
... | true |
ff128b3413c602daf6e47bcdd6d2b386767ef89a | PHP | brodozer/system | /app/ajax/salesap.php | UTF-8 | 3,659 | 2.53125 | 3 | [] | no_license | <?php
$name ='';
if(isset($_POST['name'])){
$name = htmlspecialchars($_POST['name']);
}
$phone ='';
if(isset($_POST['phone'])){
$phone = htmlspecialchars($_POST['phone']);
}
$email ='';
if(isset($_POST['email'])){
$email = htmlspecialchars($_POST['email']);
}
$date ='';
if(isset($_POST['date'])){
$da... | true |
67dcce84a467e22cdd0061feac1c5cc5d65ed172 | PHP | nerijusza/rss-feed | /api/src/Controller/ValidationController.php | UTF-8 | 1,218 | 2.59375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Controller;
use App\Repository\UserRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Validator\Constraints as Assert;
use Sy... | true |
ef16ede1bcb6cd0dfb94b92950291867c1c8b10e | PHP | Kate9021/PropertyPHP | /createArea.php | UTF-8 | 690 | 2.59375 | 3 | [] | no_license | <?php
require_once 'Area.php';
require_once 'Connection.php';
require_once 'AreaTableGateway.php';
$id = session_id();
if ($id == "") {
session_start();
}
require 'ensureUserLoggedIn.php';
$connection = Connection::getInstance();
$areaGateway = new AreaTableGateway($connection);
$address = filt... | true |
1ee539e043c8c8ba78517eea82b77a05546cc1e9 | PHP | QuiqueGilB/Finizens-fullstack-challenge | /src/InvestmentContext/OrderModule/Application/Command/Create/CreateOrderCommand.php | UTF-8 | 667 | 2.53125 | 3 | [] | no_license | <?php
namespace FinizensChallenge\InvestmentContext\OrderModule\Application\Command\Create;
use FinizensChallenge\SharedContext\CqrsModule\Domain\Model\Command;
class CreateOrderCommand extends Command
{
public function orderId(): string
{
return $this->data['id'];
}
public function portfol... | true |
204a06264430fddff29fe6cf5699615a64c06ef5 | PHP | olivehopkin/social-investor | /classes/Member.php | UTF-8 | 2,012 | 3.34375 | 3 | [] | no_license | <?php
class Member
{
// property declaration
public $fName = '';
public $lName = '';
public $dateOfBirth = '';
public $emailAddress = '';
public $username = '';
public $password = '';
public $riskLevel;
/*
* Constructor for existing member
*/
public fun... | true |
71295fb0e0868ad30920611e2ba380b7d6c2ce16 | PHP | kosarkas994/auctioApp | /auctionApp/modules/user/UserBL.class.php | UTF-8 | 7,003 | 2.640625 | 3 | [] | no_license | <?php
include_once ("modules/classes/Validation.class.php");
include_once ("modules/classes/ValidationRegister.class.php");
include_once ("modules/classes/ValidationUpdateUser.class.php");
include_once ("db/classes/user/RegistrationCredentialsRequest.class.php");
include_once ("db/classes/user/UpdateUserInformatio... | true |
9645260948399ace17aefeed9e61c5fa052e42cb | PHP | legiaifenix/DatabaseGate | /src/Services/LaravelService.php | UTF-8 | 11,744 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace LegiaiFenix\DatabaseGate\Services;
use Illuminate\Database\DatabaseManager;
use Illuminate\Contracts\Logging\Log;
class LaravelService
{
/**
* @var Connection
*/
protected $db;
protected $events = [];
public function __construct(DatabaseManager $db, Log $log)
{
... | true |
8c793fc009600874a208d9bc9cd3d977e2d82f57 | PHP | garimajajoo/filesharing | /send.php | UTF-8 | 470 | 2.578125 | 3 | [] | no_license | <DOCTYPE! html>
<html>
<head>Sending Page<head/>
<body>
<?php
#starts a session to save filename that wants to be sent
session_start();
$filename=$_GET['sentfile'];
$_SESSION['file']=$filename;
?>
<!-- creates a form for user to select which user they want to send the file to -->
<form action="sender.php" method="POST"... | true |
d410eac14eaccbd2302c7a7ff5c7363685ff4802 | PHP | Exirel/NoBleme.com | /inc/captcha.inc.php | UTF-8 | 1,388 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Cette page génère une image de type captcha lorsqu'elle est appelée.
// Un nombre à 6 chiffres est aléatoirement généré et placé dans la variable de session $_SESSION['captcha']... | true |
463eca302ba7e26a86b0211f9f4b365afba1dcab | PHP | layely/CarnetAdresse-PFC_ServerPHP | /delete_student.php | UTF-8 | 811 | 2.6875 | 3 | [
"Unlicense"
] | permissive | <?php
$ine = filter_input(INPUT_GET, 'ine');
$servername = "localhost";
$dbname = "DBcarnetadresse";
$username = "gl";
$password = "gl";
if (isset($ine)) {
try {
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
// set the PDO error mode to exception
$conn->se... | true |
b37051ea8f6c0558371e2aaaca65b3e19a8b5bb3 | PHP | yanntyb/tchat | /Entity/User.php | UTF-8 | 1,192 | 3.3125 | 3 | [] | no_license | <?php
namespace App\Entity;
class User
{
private ?int $id;
private ?string $name;
private ?string $pass;
public function __construct(int $id = null, string $name = null, string $pass = null){
$this->id = $id;
$this->name = $name;
$this->pass = $pass;
}
/**
* @r... | true |
c6a59c1deb52d64d92915594431e9714a9cb711a | PHP | pizizou/php_algorithm | /code/sort/changeSort.php | UTF-8 | 966 | 3.78125 | 4 | [] | no_license | <?php
/**
* Created by dreambee
* User: dreambee
* Date: 2019/5/14
* Time: 14:41
* @description 选择排序
* 选择排序(Selection Sort)与冒泡排序类似,也是依次对相邻的数进行两两比较。不同之处在于,它不是每比较一次就调换位置,而是一轮比较完毕,找到最大值(或最小值)之后,将其放在正确的位置,其他数的位置不变
* 参考网址:http://javascript.ruanyifeng.com/library/sorting.html
*/
function changeSort($arr){
$len =... | true |
79f1871eb4765aaa89c958636b463516a77d8af0 | PHP | SomeGeek/magento2-gdpr | /Console/Command/EraseCommand.php | UTF-8 | 3,208 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Copyright © OpenGento, All rights reserved.
* See LICENSE bundled with this library for license details.
*/
declare(strict_types=1);
namespace Opengento\Gdpr\Console\Command;
use Magento\Framework\App\Area;
use Magento\Framework\App\State;
use Magento\Framework\Console\Cli;
use Magento\Framework\Except... | true |
8784840538a7edb210f5e3436a3d8c5d758c34c5 | PHP | anna-mihaylova/PHP | /Strings/task6.php | UTF-8 | 146 | 2.71875 | 3 | [] | no_license | <?php
require_once 'readline.php';
$string = readline('Enter text:' . PHP_EOL);
$string = mb_convert_case($string, MB_CASE_TITLE);
echo $string;
| true |
0f86e974f78da1f746f75481c25b69a5e9126176 | PHP | kvillarojo/get-programmer | /app/Http/Controllers/API/SkillsController.php | UTF-8 | 998 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\API;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Skills;
class SkillsController extends Controller
{
public function index() {
return Skills::latest()->paginate(10);
}
public function store(Request $request) {
$this->val... | true |
624c1d6510906fe4aeb94b1a561f5b0d5f32a62e | PHP | NewwayLibs/Comments | /src/Newway/Comments/CommentsCaptcha.php | UTF-8 | 1,394 | 2.8125 | 3 | [] | no_license | <?php namespace Newway\Comments;
use Newway\Comments\Libraries\DataImage;
use Newway\Comments\Libraries\EasyCaptcha\EasyCaptcha;
class CommentsCaptcha
{
public static function getCaptchaImage($captchaSessionName = 'newway_comments_captcha') {
self::initSession();
if (!isset($_SESSION)) {
... | true |
c68176f5c5393a8d2b50495673694452055ab7fa | PHP | anastasija-stepanova/ood | /lab7/style/Style.php | UTF-8 | 752 | 3.609375 | 4 | [] | no_license | <?php
class Style implements StyleInterface
{
/** @var bool */
private $isEnabled;
/** @var RGBAColor */
private $color;
/**
* Style constructor.
* @param bool $isEnabled
* @param RGBAColor $color
*/
public function __construct(bool $isEnabled, RGBAColor $color)
{
... | true |
1b9b798ecf9cdcab1465c45ca3d8e06c76b6cd9b | PHP | motaylormo/PHP-Piscine | /day01/ex07/rostring.php | UTF-8 | 333 | 3.15625 | 3 | [] | no_license | #!/usr/bin/php
<?php
if ($argc < 2)
return (1);
$arr = preg_split("/ +/", trim($argv[1]));
//remove first element - https://www.php.net/manual/en/function.array-shift.php
$first = array_shift($arr);
//append to end - https://www.php.net/manual/en/function.array-push.php
array_push($arr, $first);
echo implode(" ", $... | true |
292885390033a3d46d318578672352c65a302f99 | PHP | phpmicroservice/mongo-odm | /test/OneTest.php | UTF-8 | 740 | 2.53125 | 3 | [] | no_license | <?php
namespace test;
use MongoOdm\Collection;
use MongoOdm\Document\Document;
use test\Collection\Demo;
class OneTest extends \PHPUnit\Framework\TestCase
{
/**
* 第一个测试
* @throws \Exception
*/
public function testOne()
{
$demo = new Demo();
$this->assertInstanceOf(Collectio... | true |
118acd9a7e7028eae0fc351d40ba99bc0d0459a9 | PHP | Global19-atlassian-net/wp-theme-openglam | /inc/widgets/og-newsletter.php | UTF-8 | 1,961 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
class WP_Widget_Newsletter_Form extends WP_Widget {
function __construct() {
$widget_ops = array(
'classname' => 'newsletter-form',
'description' => 'Display the newsletter form',
);
$control_ops = array();
parent::__construct( 'newsletter-form', 'Newsletter form', $widget_ops, $control_ops );
... | true |
cdb1130ed085c9f5dc86419c180a7f1c0ecaefa2 | PHP | ucking44/SchoolManagementSystem | /app/Http/Controllers/ProspectiveStudentController.php | UTF-8 | 6,404 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\ProspectiveStudent;
use Carbon\Carbon;
use Illuminate\Http\Request;
class ProspectiveStudentController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
... | true |
8d67e0e48a2d0173963d7fc834b5b04569bf9b70 | PHP | ludwig-sam/mt_xxl | /app/Models/MaterialModel.php | UTF-8 | 2,524 | 2.53125 | 3 | [] | no_license | <?php namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Collection;
use Illuminate\Support\Str;
class MaterialModel extends Model {
protected $table = 'wechat_material';
protected $fillable = [
'type','updated_at','deleted_at','mp_media_id','title'
... | true |
6be29a7f51d723221ad143ae914e11e5e5b9aaf4 | PHP | adrianodemoura/admoura | /config/Seeds/UnidadesSeed.php | UTF-8 | 779 | 2.84375 | 3 | [] | no_license | <?php
use Migrations\AbstractSeed;
/**
* Unidades seed.
*/
class UnidadesSeed extends AbstractSeed
{
/**
* Run Method.
*
* Write your database seeder using this method.
*
* More information on writing seeds is available here:
* http://docs.phinx.org/en/latest/seeding.html
*
... | true |
ab00cb253135fd65842e4855692e66b0b70577de | PHP | Jarzon/Form | /tests/UrlInputTest.php | UTF-8 | 802 | 2.765625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Tests;
use Jarzon\ValidationException;
use PHPUnit\Framework\TestCase;
use Jarzon\Form;
class UrlInputTest extends TestCase
{
public function testInvalidUrl()
{
$this->expectException(ValidationException::class);
$this->expectExceptionMessage('test is ... | true |
14a4f960b8c2e78b87715c106f4d32acfc5a42ad | PHP | rtv456/Integrador2 | /modelo/HistoriaClinicaDao.php | UTF-8 | 9,731 | 2.53125 | 3 | [] | no_license | <?php
include_once dirname( __DIR__ ) . '../util/ConexionBD.php';
include_once dirname( __DIR__ ) . '../entidad/HistoriaClinicaBean.php';
class HistoriaClinicaDao
{
public function BuscarExamenHistorial($idHistoria)
{
try {
$cn = new ConexionBD();
$cnx = $cn->getConexionBD();
... | true |
03592e5f037b172838025a54ee007989dd082ec1 | PHP | ludioao/leadstore-core | /src/Models/Repository/MenuGroupRepository.php | UTF-8 | 1,008 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace LeadStore\Framework\Models\Repository;
use LeadStore\Framework\Models\Database\MenuGroup;
use LeadStore\Framework\Models\Contracts\MenuGroupInterface;
class MenuGroupRepository implements MenuGroupInterface
{
/**
* Find an MenuGroup by given Id
*
* @param $id
* @return \LeadSt... | true |
b6b5b56fa5ff7e3022ddf760e93243ebf5b6d7be | PHP | alanAG95/cntrl-vet | /AppWeb/datos/mascotaDb.php | UTF-8 | 2,347 | 2.84375 | 3 | [] | no_license | <?php
require_once('datos/Db.php');
require_once('entidades/mascota.php');
class mascotaDb extends Db{
public function getOne($id_mascota){
$sql = "SELECT *
FROM mascota
WHERE id_mascota = " . $id_mascota . "";
$result = $this->mysqli->query($sql) or die("... | true |
2a968f739bfeb9ea19b7e1285248e6d2d3ede06c | PHP | MaksIgnatchenko/btw | /app/Modules/Users/Customer/Factories/SocialServiceFactory.php | UTF-8 | 1,498 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by Ilya Kobus, Appus Studio LP on 1.10.2018
*/
namespace App\Modules\Users\Customer\Factories;
use App\Modules\Users\Customer\DTO\SocialServiceDto;
use App\Modules\Users\Customer\Enums\SocialServiceEnum;
use App\Modules\Users\Customer\Exceptions\SocialServiceFactoryException;
use App\Modules\Use... | true |
33624fedc357b442a9c99a69ce0cad46ffe427d4 | PHP | osmanadak/php-bitcoin-trading-bot-bittrex | /reports.php | UTF-8 | 954 | 2.59375 | 3 | [] | no_license | <?php
include("inc/header.php");
$balances = $polo->get_balances();
$total = 0;
foreach($balances as $key=>$value){
if($value > 0) {
$valueOnOpenOrder = $polo->get_open_orders("BTC_".$key);
for($k=0; $k<count($valueOnOpenOrder); $k++){
if($valueOnOpenOrder[$k]['orderNumber'] != ""){
... | true |
d793314ced375778ef04e348afbf107f7aa26bcd | PHP | Thomas1407/ProjetWeb | /code projet/SupprimerProduit.php | UTF-8 | 735 | 2.546875 | 3 | [] | no_license | <?php
include 'singletton.php';
?>
<!DOCTYPE html>
<html>
<head>
<title>Supprimer produit</title>
</head>
<body>
<form method="post" action="">
<input type="text" name="nom" value="nom">
<input type="submit" name="SUPP" value="Supprimer">
<?php
$databaseConnection = DbConnection();
if (isset($_POST['nom']))
{
$nom =... | true |
d5c452524e7fab00520bccc226e1305ec5c2b7f0 | PHP | devs-poetadigital/laravel-api-generator | /src/Console/Commands/RefreshClassCommand.php | UTF-8 | 966 | 2.546875 | 3 | [
"Unlicense",
"LicenseRef-scancode-public-domain"
] | permissive | <?php
namespace CodeGenerator\Console\Commands;
use CodeGenerator\GenerateModel;
use CodeGenerator\RefreshClassHander;
class RefreshClassCommand extends GenerateApiCommand
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'api:swagger {model_... | true |
4c4c1057616c857729647120610b42332a9136cf | PHP | Gudang-Source/ehealthsys-abepura | /protected/modules/sistemAdministrator/models/SATandagejalaM.php | UTF-8 | 2,577 | 2.515625 | 3 | [] | no_license | <?php
class SATandagejalaM extends TandagejalaM
{
public $diagnosakep_nama,$diagnosakep_id,$aktif;
/**
* Returns the static model of the specified AR class.
* @param string $className active record class name.
*/
public static function model($className=__CLASS__)
{
re... | true |
41b31689546883e4a1d074593a82b35957626011 | PHP | moussaclarke/beatportapi | /src/BeatportApi.php | UTF-8 | 2,037 | 3.140625 | 3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | <?php
// Usage:
// $api = new Moussaclarke\BeatportApi (array $parameters); // initialise
// $response = $api->queryApi (array $query); // run the query
// echo $response; // do something with response
namespace MoussaClarke;
use GuzzleHttp\Client;
class BeatportApi
{
private $client; // http client
private ... | true |
caee06d505e0b1dddb40b357dba3ef5ced0d21e5 | PHP | anand27krishn/Hotel_management_PHP | /ContactUsNew.php | UTF-8 | 5,308 | 2.578125 | 3 | [] | no_license | <!DOCTYPE HTML>
<!DOCTYPE HTML PUBLIC="-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<!--Scripted by Krishn Anand-->
<html>
<head>
<link href="images\icons\contactus.ico" type="image/icon" rel="icon" />
<title>Contact Us</title>
<meta http-equiv="content-type" content="text/html" charse... | true |
a1ae188abc9ee2791cc8e07c95d7c222bd458634 | PHP | virginiabinati/ger | /TJoin.class.php | ISO-8859-1 | 2,760 | 3.515625 | 4 | [
"Apache-2.0"
] | permissive | <?php
/*
* classe TJoin
* Esta classe abstrata
* para gerencias Joins
*
*/
class TJoin
{
// TIPO DE JOIN
const INNER_OPERATOR = 'INNER ';
const LEFT_OPERATOR = 'LEFT ';
const RIGHT_OPERATOR = 'RIGHT ';
private $types; //lista de INNER, LEFT, RIGHT
private $leftEntities; //... | true |