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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
9024b5ecf54dbd59df0b2eba999a047548caf715 | PHP | lktslionel/charis4children.wp | /src/wp-content/plugins/the-events-calendar/src/Tribe/Views/V2/Views/Reflector_View.php | UTF-8 | 957 | 2.890625 | 3 | [
"GPL-2.0-or-later",
"LGPL-2.0-or-later",
"LicenseRef-scancode-generic-exception",
"LicenseRef-scancode-warranty-disclaimer",
"GPL-1.0-or-later",
"LicenseRef-scancode-other-copyleft",
"GPL-2.0-only",
"LicenseRef-scancode-proprietary-license",
"MIT"
] | permissive | <?php
/**
* A View that will reflect back the view context for debugging purposes.
*
* @since 4.9.3
* @package Tribe\Events\Views\V2\Views
*/
namespace Tribe\Events\Views\V2\Views;
use Tribe\Events\Views\V2\View;
/**
* Class Reflector_View
*
* @since 4.9.3
* @package Tribe\Events\Views\V2\Views
*/
clas... | true |
955e7347003d086c6d2e761cf57f01359df99227 | PHP | alam2didar/PHP-and-Website-Design | /member.inc.php | UTF-8 | 2,910 | 2.890625 | 3 | [] | no_license | <?php
/*
member class
*/
class Member {
// This class is used to create and maintain products for the survey
public static function listMembers($db){
//query for all users
$query = "SELECT FirstName, LastName, Email FROM Member";
$result = $db->query($query);
//check if ok
if (!$result){
... | true |
b6e57d8cdb95c0bc4ba2f7c029a3ccc751bb124d | PHP | RingCentralVuk/ringcentral-php | /src/Http/Transaction.php | UTF-8 | 5,767 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace RingCentral\SDK\Http;
use Exception;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
use RingCentral\SDK\Core\Utils;
use stdClass;
/**
* FIXME Support streams
* @package RingCentral\SDK\Http
* @see http://www.opensource.apple.com/source/apache_mod_php/apache_mod_... | true |
27e6c4c99a29d0afde5c446bf501dd1e37160291 | PHP | JSpeci/PRJ | /sandbox/app/model/JizdaManager.php | UTF-8 | 4,589 | 2.5625 | 3 | [] | no_license | <?php
namespace app\model;
use Nette;
use Nette\Utils\DateTime;
use app\model\AdresaManager;
use app\model\SmenaManager;
/** Třída pro práci s Jízdami
*
* @author Jan Špecián
*/
class JizdaManager {
use Nette\SmartObject;
/**
* @var Nette\Database\Context
*/
private $database;
privat... | true |
f58dc72d562c7e698b83c0692471dec503dc7c53 | PHP | ifhexa4113/tp-sere | /www/html/login2.php | UTF-8 | 1,413 | 2.953125 | 3 | [] | no_license | <?php
include 'functions.php';
$conn = db_connect('userdb2', 'passdb2');
$conn->select_db("db2");
$user = fetch_post("user");
$pass = fetch_post("pass");
$results = null;
// Very badly coded db :
if ($user !== null and $pass !== null)
{
$sql = "SELECT * FROM login WHERE username = '" .
$user .
"' AND password = ... | true |
6abd94869c4e4d27d89a9fb06a1836dcae42fa72 | PHP | adaptdk/sportmaster-backend-task | /CaseExamples/Example2.php | UTF-8 | 1,041 | 2.953125 | 3 | [] | no_license | <?php
/**
* Random store example.
*/
use App\DataExamples\Cart\Cart;
use App\DataExamples\Cart\Product;
use App\DataExamples\Store\Inventory;
use App\DataExamples\Store\Store;
$cart = new Cart(
[
new Product(992994, '99999199811'),
new Product(993991, '99399199991'),
new Product(992996,... | true |
308458fa1d06b4fba7b92d099373fc3b44874741 | PHP | ravimalani86/cropperjs-codeigniter | /application/models/User.php | UTF-8 | 2,506 | 2.828125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class User extends CI_Model{
function __construct() {
// Set table name
$this->table = 'student';
}
/*
* Fetch student data from the database
* @param array filter data based on the passed paramet... | true |
9b2dab98de24add284948d80ada699772a71c7b7 | PHP | ckahsheng/SportsSystem_3104 | /PHPCodes/listTrainingTypes.php | UTF-8 | 548 | 2.53125 | 3 | [] | no_license | <?php
require_once '../DBConfig.php';
$sqltran = mysqli_query($link, "SELECT ID, TRAINING_NAME, TRAINING_RATE FROM trainingtype")or die(mysqli_error($con));
$arrVal = array();
$i = 1;
while ($rowList = mysqli_fetch_array($sqltran)) {
$result = array(
'num' => $i,
'ID' => $rowList['ID'],
... | true |
556f3b90817ebf403c3c0f75dea0a533b2bb0df3 | PHP | TarasDrobotko/-PHP-UP-learning | /frontend/views/shop/products.php | UTF-8 | 436 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/* @var $this yii\web\View */
/* @var productList[] frontend\models\Shop; */?>
<h1>Products</h1>
<?php foreach ($productList as $product): ?>
<div class="col-md-10">
<h3><?php echo $product->product; ?></h3>
<p><?php echo $product->getDateManufactured(); ?></p>
<p><?php echo $product->getCategoryName()... | true |
a7167400799aa72aa1af2a5cc9a908d5bdeff08b | PHP | HEMMER-FX/WildCodeSchool | /php-poo-heracles-labour-2/src/Shield.php | UTF-8 | 635 | 3.3125 | 3 | [] | no_license | <?php
class Shield
{
private int $protection;
private string $image;
public function __construct(
int $protection = 10,
string $image = 'shield.svg'
) {
$this->protection = $protection;
$this->image = $image;
}
public function getProtection()
{
ret... | true |
0224db8e3d293cba3b62ca2c886304245bfca644 | PHP | knub/wordbol | /src/Wordbol/StanbolEnhancer.php | UTF-8 | 6,070 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Wordbol;
use EasyRdf_Graph;
use Wordbol\Models\EnhancementResult;
use Wordbol\Models\EntityAnnotation;
use Wordbol\Models\EntityType;
use Wordbol\Models\LanguageEnhancement;
use Wordbol\Models\TextAnnotation;
class StanbolNotAccessibleException extends \Exception { }
/**
* This class enhances a giv... | true |
a4651e6752ec3a6df2efc69374698aa9b019f0d1 | PHP | Petko-Petkov/SoftwareUniversity | /PHP/Basics/Exam-Preparations/03-Working-Days.php | UTF-8 | 1,105 | 2.984375 | 3 | [] | no_license | <?php
date_default_timezone_set("Europe/Sofia");
$firstDate = $_GET['dateOne'];
$secondDate = $_GET['dateTwo'];
$valid = false;
function returnDates($fromdate, $todate) {
$fromdate = DateTime::createFromFormat('d-m-Y', $fromdate);
$todate = DateTime::createFromFormat('d-m-Y', $todate);
return ... | true |
836fe30419d7481189d8f94077f1aba7fdc45544 | PHP | Danack/DataType | /src/DataType/ProcessRule/ProcessRule.php | UTF-8 | 895 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace DataType\ProcessRule;
use DataType\DataStorage\DataStorage;
use DataType\ProcessedValues;
use DataType\Rule;
use DataType\ValidationResult;
/**
* A rule for processing the value after it has been extracted from the
* InputStorage by an ExtractDataTypeRule.
*/
interface ... | true |
6251d2324be2f3cb579617d42b6471dd644bfb36 | PHP | Prometee/SwaggerClientGenerator | /src/Base/View/Method/MethodViewInterface.php | UTF-8 | 870 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Prometee\SwaggerClientGenerator\Base\View\Method;
use Prometee\SwaggerClientGenerator\Base\View\ViewInterface;
interface MethodViewInterface extends ViewInterface
{
/**
* @param string|null $indent
*
* @return string
*/
public function buildMethod... | true |
8950b3f424b81979d5a892ac1eb188ed83079453 | PHP | JackZhang0817/Crmtest | /Crm/Action/CommonAction.class.php | UTF-8 | 3,840 | 2.65625 | 3 | [] | no_license | <?php
/**
* Author: gaorenhua
* Date: 2014-11-05
* Email: 597170962@qq.com
* 公共控制器 主要用于处理自动登录 AND 权限验证
*/
class CommonAction extends Action{
/**
* 自动登录 AND Auth权限认证
*/
public function _initialize(){
//处理自动登录
if (isset($_COOKIE['auto']) && !isset($_SESSION['uid'])) ... | true |
4d6809e2144000b5fb2185d03fad9fd93b1d79db | PHP | pixhausdigital/Bem-a-Bordo | /WordPress/plugins/bemabordo_people/bemabordo_people.php | UTF-8 | 41,626 | 2.515625 | 3 | [] | no_license | <?php
/*
Plugin Name: BemABordo_people
Description: A plugin to add people to database
Version: 1.0
Author: Yuri Koster
*/
global $BABP_db_version;
$BABP_db_version = '1.0';
function BABP_install() {
global $wpdb;
global $BABP_db_version;
$table_name = $wpdb->prefix . 'BABP';
$charset_collate = $wpdb->get_char... | true |
dd31582d908e372bd60b1fbd942b8d34602c4516 | PHP | ABSH86090/myproject | /admin.php | UTF-8 | 4,425 | 2.703125 | 3 | [] | no_license | <?php
ob_start();
include("top.php");
include("footer.php");
include("connect.php");
if(!isset($_SESSION['aname'])){
header("Location:index.php");
}
// Checking to make sure that this admin session value is in fact in the database
$adminId = preg_replace('#[^0-9]#i', '', $_SESSION['aid']);
$adminName = preg_replac... | true |
ea6225423e5bbd978ec000c5033491119abadec6 | PHP | pasadinhas/php-oauth-lib | /src/OAuth/OAuth2/Service/Instagram.php | UTF-8 | 1,629 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace OAuth\OAuth2\Service;
use OAuth\OAuth2\Token\StdOAuth2Token;
use OAuth\Common\Http\Exception\TokenResponseException;
use OAuth\Common\Http\Uri\Uri;
use OAuth\Common\Consumer\CredentialsInterface;
use OAuth\Common\Http\Client\ClientInterface;
use OAuth\Common\Storage\TokenStorageInterface;
use OAuth\Co... | true |
10f97594cd704109a26345fe164aeb1896418451 | PHP | Konsul117/valentina-vl | /frontend/modules/commentFront/models/CommentFront.php | UTF-8 | 777 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace frontend\modules\commentFront\models;
use common\modules\comment\models\Comment;
use yii\helpers\ArrayHelper;
/**
* Расшинерие модели комментария для фронэтнда
*/
class CommentFront extends Comment {
const SCENARIO_USER_ADD = 'userAdd';
/**
* @inheritdoc
*/
public static function tableName... | true |
a3065ccdcbc6f0c73dd68201c10f521af6a320a5 | PHP | TadeuA/AtividadePHPAula | /Views/exerc8.php | UTF-8 | 5,712 | 2.65625 | 3 | [] | no_license | <?php
$nomeArquivo = "../Import/compras.json";
//Incluindo funções externas
require_once "../Include/manipularJson.inc.php";
require_once "../Include/encapsular8.inc.php";
require_once "../Include/tabelas.inc.php";
$clientes = abrirJson($nomeArquivo);
?>
<!DOCTYPE html>
<html lang="pt-BR">
<head>
... | true |
063d7c9552ca9d9c489bc398ee6823d8c0b75484 | PHP | jyxo/php | /Jyxo/Beholder/Output/HtmlOutput.php | UTF-8 | 3,470 | 2.734375 | 3 | [] | permissive | <?php declare(strict_types = 1);
/**
* Jyxo PHP Library
*
* LICENSE
*
* This source file is subject to the new BSD license that is bundled
* with this package in the file license.txt.
* It is also available through the world-wide-web at this URL:
* https://github.com/jyxo/php/blob/master/license.txt
*/
names... | true |
d40ab7c5622120b9aad985474da8fa0a0e69aa1e | PHP | iptomar/codematch_11-12 | /Apresentacao Final 2011/Dispatcher_Versao_Final/Scripts/APIS/github.php | UTF-8 | 2,255 | 2.921875 | 3 | [] | no_license | <?php
// Parametros:
// - $project (nome do projecto)
// Retorna:
// - array() (retorna array com os seguintes dados:)
// - nome projecto
// - titulo
// - link
// - array (autor)
// - array (linguaguem)
// - array (data criado, ultimo update)
// - logo
function get_project_github($user, $project) {
$ch = @... | true |
29b33e72091e7607cd21268b1a82df6596d8ca79 | PHP | KanuPeace/transitOption | /app/Http/Middleware/AdminMiddleware.php | UTF-8 | 770 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Session;
class AdminMiddleware
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
... | true |
69df809037a12dda301f9e7b8dd9bdecfa9664ec | PHP | bhsiung/novelFetcher | /sites/novellover/app/controller/Api/Remote/Chapter.php | UTF-8 | 1,666 | 2.578125 | 3 | [] | no_license | <?php
namespace Api\Remote;
/*
* @usage:
* http://www.novellover.net/remote/sites/kxwxw/books/67633/chapters/427756?options={%22preview%22:true}
* http://www.novellover.net/remote/sites/kxwxw/books/67633/chapters/427756?options={%22includeInfo%22:true}
* http://www.novellover.net/remote/sites/kxwxw/books/67633/chap... | true |
3c19aa61e6fc8da2a5d2eacd36750fd829db3daa | PHP | utsavized/csprojects | /lsudoku/generate.php | UTF-8 | 7,646 | 2.8125 | 3 | [] | no_license | <html>
<head>
<style type="text/css">
body{
overflow:hidden;
}
.style1 {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
font-weight: bold;
}
</style>
<script language="javascript">
function resize_window()
{
window.resizeTo(300,300);
}
</script>
</head>
<body ... | true |
abf05904ea3a121b3a3c47f724358085f8e1d410 | PHP | linpax/microphp-framework | /src/mvc/MvcResolver.php | UTF-8 | 6,567 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php /** MicroHMVCResolver */
namespace Micro\Mvc;
use Micro\Base\Exception;
use Micro\Base\KernelInjector;
use Micro\base\ResolverInterface;
use Micro\Mvc\Controllers\IController;
use Micro\Web\RequestInjector;
use Micro\Web\RouterInjector;
use Psr\Http\Message\ServerRequestInterface;
/**
* MVC Resolver class fil... | true |
c10951abd3fce7a1331344f8bf8e8e59b8c62fb2 | PHP | Lukrecka/backend | /user/readUsersCorpses.php | UTF-8 | 847 | 2.546875 | 3 | [] | no_license | <?php
require 'database.php';
$id = $_GET['id'];
$ret = array ();
$sql = "SELECT * FROM corpses JOIN cemetery ON cemetery.id_grave = corpses.id_grave JOIN users ON users.id_user = cemetery.id_user WHERE users.id_user = '{$id}' ";
$result = mysqli_query($con, $sql);
if (mysqli_num_rows($result) > 0) {
while($ro... | true |
4b4c84e952172b6c311a98621d787b524dfc353c | PHP | nandkunal/ssb-repo | /administrator/includes/UserFunctions.php | UTF-8 | 1,509 | 2.71875 | 3 | [] | no_license | <?php
require_once('ADAO.php');
class UserFunctions extends ADAO
{
public static function isUserAuthenticated(){
if(isset($_SESSION['id'])){
return true;
}
else
return false;
}
public static function getPriorityLargerTag($p){
switch($p){
case 1:
$tag="tags/normaltag.png";
break;
case 2:
... | true |
b2114d62fbb52532b95b6b3c76e8a4a6ebf9a0e4 | PHP | EtonDigital/EDFlagBundle | /EventListener/FlagReportListener.php | UTF-8 | 1,103 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace ED\FlagBundle\EventListener;
use Doctrine\ORM\Event\LifecycleEventArgs;
use ED\FlagBundle\Model\FlagReport;
use ED\FlagBundle\Service\FlagAnnotationReader;
class FlagReportListener
{
/**
* @var FlagAnnotationReader
*/
private $flagReader;
/**
* FlagReportListener construct... | true |
bf4d88d923cf0be71f3c8fcbdc0bc165a3ee0faf | PHP | Stolz/php-stubs | /res/php/math/functions/log10.php | UTF-8 | 144 | 2.9375 | 3 | [
"Apache-2.0",
"CC-BY-3.0"
] | permissive | <?php
/**
* Base-10 logarithm
*
* @phpstub
*
* @param float $arg
*
* @return float The base-10 logarithm of
*/
function log10($arg)
{
} | true |
612f213efc307a8cba2ca47eb6e54e106236a599 | PHP | sameeha94/Zebra | /application/modules/user/models/user_model.php | UTF-8 | 4,412 | 2.5625 | 3 | [] | no_license | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class User_model extends MY_Model {
protected $_table = 'users';
public function add_story_vote_record($user_id, $story_id)
{
$query = $this->db->insert('zebra_votes', array('user_id' => $user_id, 'story_id' => $story_id, 'v... | true |
2ce41bb4dc8b17d2752115d653d413a741aae48f | PHP | grizzm0/postcode | /src/Formatter/IEFormatter.php | UTF-8 | 1,167 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Brick\Postcode\Formatter;
use Brick\Postcode\CountryPostcodeFormatter;
/**
* Validates and formats the postcodes in the Republic of Ireland.
*
* Postcodes can have six different formats:
*
* - ANN ANAN
* - ANN AANN
* - ANN ANAA
* - ANW ANAN
* - ANW AANN
* - ANW ANA... | true |
49b99fe1fcc0ba9d8ca24186b60680675939572b | PHP | hamidpoorhashemi/barnphp | /view/home.php | UTF-8 | 775 | 2.921875 | 3 | [] | no_license |
PHP input : </br>
<?php var_dump($postdata = file_get_contents("php://input"));?>
</pre>
<pre>
POST:</br>
<?php foreach ($_POST as $key => $value) {
echo "Field ".htmlspecialchars($key)." is ".htmlspecialchars($value)."<br>";
} ?>
</pre>
<pre>
GET: <br>
<?php foreach ($_GET as $key => $value) {
echo "Fiel... | true |
f32489e4f64bc694eaee68f5f2aa74753c0b4e6d | PHP | forestbaba/auth-user-project | /v1/update.php | UTF-8 | 1,515 | 2.75 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin: *");
header("Content-Type:application/json; charset: UTF-8");
header('Access-Control-Allow-Methods: POST');
include_once('../config/database.php');
include_once('../classes/student.php');
//create object for database;
$db = new Database();
$con... | true |
983bc430f35cd8bc0e2d3d0c91c2fe70c895ee22 | PHP | m0nkeylabs/assisteai-back | /app/Services/TelegramBot.php | UTF-8 | 1,817 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Models\Thread;
use Curl\Curl;
use Illuminate\Support\Str;
class TelegramBot
{
private $url;
public function getUpdates()
{
$this->url = 'https://api.telegram.org/bot' . env('TELEGRAM_TOKEN') . '/getUpdates';
return $this->execute();
}
publ... | true |
8e38e993036649ed9f89405ebbe49b56b6e5c398 | PHP | MaratHmit/lapka_api | /vendor/SE/Shop/Trigger.php | UTF-8 | 3,236 | 2.625 | 3 | [] | no_license | <?php
namespace SE\Shop;
use SE\DB as DB;
use SE\Exception;
use TelegramBot\Api\BotApi;
class Trigger extends Base
{
protected $tableName = "trigger";
public function exec($event = null, $options = null)
{
if ($options) {
$temp = [];
foreach ($options as $key => $val)
... | true |
18c4f978749211e4374cc868f764a8f878917865 | PHP | jeremie-abt/piscine-php | /day01/ex14/agent_stats.php | UTF-8 | 2,639 | 3.203125 | 3 | [] | no_license | #!/usr/bin/php
<?php
function ft_moyenne(&$tab){
$ret = 0;
$nb_note = 0;
foreach ($tab as $elem){
foreach($elem as $subelem){
if ($subelem[1] != "moulinette") {
if ($subelem[0])
{
$ret += $subel... | true |
256eefe33d0060fc9db7d738aeae0698875d8681 | PHP | Mery4m/hostatlas | /inc/widgets/widget-block-tabs.php | UTF-8 | 6,705 | 2.6875 | 3 | [] | no_license | <?php
class crum_tabwidget extends WP_Widget {
/** constructor */
function __construct() {
parent::WP_Widget( /* Base ID */'crumina_tabwidget', /* Name */'Theme: Tabs', array( 'description' => 'Tab Panel block' ) );
}
/** @see WP_Widget::widget */
function widget( $args, $instance ) {
extract( $args );
$title = $in... | true |
b5072fcaeba7bcbc9a07f40294a4ab12b84a1d98 | PHP | aledefreitas/vivapets-moloni-magento2 | /Helper/MaturityDates.php | UTF-8 | 1,716 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* @author Alexandre de Freitas Caetano <alexandrefc2@hotmail.com>
*/
namespace Vivapets\Moloni\Helper;
use Vivapets\Moloni\Helper\Cache\CacheHelper;
use Vivapets\Moloni\Api\Endpoints\MaturityDatesEndpointInterface;
use Vivapets\Moloni\Api\CredentialsInterface;
class MaturityDates
{
/**
* @var \Vi... | true |
9885c05c120ef7d4fbab4621a08910a1a5a35605 | PHP | mitrahovich/complex_task | /oop_prin/client.php | WINDOWS-1251 | 716 | 3.140625 | 3 | [] | no_license | <?php
interface IBehavior {
public function doSmth();
}
class Behavior implements IBehavior{
public function doSmth() {
}
}
// !
class Client {
/**
* @var IBehavior
*/
private $_behavior;
// , !
public function setBehavior(IBehavior $b) {
$this->_behavior = ... | true |
c1e5eea46680ffd807666c0cf540ea79d045af33 | PHP | pedrohmsanttos/periciasmedicas | /app/Model/Municipio.php | UTF-8 | 1,184 | 2.609375 | 3 | [] | no_license | <?php
App::import("Model", "BSModel");
class Municipio extends BSModel {
public $displayField = "nome";
public $useTable = 'municipio';
public $belongsTo = array('Estado');
public function listarMunicipios() {
$filtro = new BSFilter();
$filtro->setCamposOrdenados(['Municipio.nome' =>... | true |
bf17c539a8455d2b9328a37860409473c3d33012 | PHP | JacobPickens/MUD | /WebContent/backend/login_account.php | UTF-8 | 1,113 | 2.65625 | 3 | [] | no_license | <?php
$host = "localhost";
$accountsDatabase = "u142423238_acco";
$gamesDatabase = "u142423238_games";
$accountsUser = "u142423238_jake";
$gamesUser = "u142423238_games";
$password = file_get_contents("res.txt");
$conn = mysqli_connect($host, $accountsUser, $password, $accountsDatabase);
if(!$conn) {
die("Connect... | true |
0570d1f74463ad9103a2b42ecab8759fdd07fef6 | PHP | impuulse/lucky | /migrations/m190808_202027_create_dump.php | UTF-8 | 1,633 | 2.578125 | 3 | [] | no_license | <?php
use yii\db\Migration;
/**
* Class m190808_202027_create_dump
*/
class m190808_202027_create_dump extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->batchInsert('{{%cover_type}}', ['id', 'name'], [
[1, 'Мягкая'],
[2, 'Твердая']
... | true |
33a362d8a0c5be222396aaf00053a593e7cba814 | PHP | line-stream/paginate | /src/Pagination.php | UTF-8 | 5,352 | 2.84375 | 3 | [] | no_license | <?php
namespace Paginate;
use Doctrine\DBAL\Exception;
use LogicException;
use Paginate\Implementers\QueryBuilder;
use Paginate\Stubs\{Column, PaginationColumns};
use Throwable;
class Pagination
{
protected int $totalRecords;
protected array $data;
/**
* Create a new pagination instance.
*
... | true |
c8d8124584773e744916e83614ed3e77381e0903 | PHP | 7rulnik/designgames | /app/scripts/case-process3.php | UTF-8 | 1,468 | 2.75 | 3 | [] | no_license | <?php
$to = 'v7rulnik@gmail.com';
$subject = 'Новая работа загружена';
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'From: Сайт «Игры дизайнеров» <bot@designgames.ru>' . "\r\n";
"Content-type: text/html; charset=UTF-8" . "\r\n";
$headers .= 'X-Mailer: PHP/' . phpversion();;
$team = $_POST['team'];
$emai... | true |
98d2134d0da2cd69107cccef5e66df33f501fa42 | PHP | w01f/VolgaTeam.SalesLibrary | /WebSalesLibraries/protected/models/shortcuts/models/landing_page/regular_markup/toggle_panel/TogglePanelBlock.php | UTF-8 | 2,730 | 2.6875 | 3 | [] | no_license | <?
namespace application\models\shortcuts\models\landing_page\regular_markup\toggle_panel;
use application\models\shortcuts\models\landing_page\regular_markup\common\BlockContainer;
/**
* Class TogglePanelBlock
*/
class TogglePanelBlock extends BlockContainer
{
/** @var TogglePanelButton[] */
public $t... | true |
1056df1a10aec8a8405a9b37b2586f1d56357027 | PHP | hayk-mxitaryan/auto-service | /src/AutoServiceStorage.php | UTF-8 | 1,238 | 2.640625 | 3 | [] | no_license | <?php
namespace HaykMxitaryan\AutoService;
class AutoServiceStorage
{
/**
* @var // Controller name
*/
private $controller_name;
/**
* @var // Service name
*/
private $service_name;
/**
* @var // Service namespace
*/
private $service_namespace;
... | true |
fdd3cbcdee7ccce5b441d59b0f8d83c9176911d7 | PHP | DiderickM/tickets | /student/ad.php | UTF-8 | 849 | 2.671875 | 3 | [] | permissive | <?php
/* Start the session for the username */
session_start();
/* Connect to the database to save all of the clicks */
include_once('../conn.php');
/* The URI where we want to send the users */
$TARGET_URI = 'https://www.versio.nl/?pa=122337mvepl';
$klascode = $_COOKIE['usercode'];
$ip = $_SERVER['REMOTE... | true |
588b00f00c14439b5ba0f38e223107c7c6a6ede8 | PHP | 1993alexey/CS-313 | /backend/controllers/MealPlannerController.php | UTF-8 | 8,816 | 2.796875 | 3 | [] | no_license | <?php
require "services/dbConnect.php";
class MealPlannerController extends Controller {
protected $controller;
private $db;
public function process($params) {
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
header('Content-Type: application/json');
... | true |
ac491727050df7518dfa10a049479194d047d5d6 | PHP | mkuswari/ral-travel | /application/models/Category_model.php | UTF-8 | 833 | 2.625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') or exit('No direct script access allowed');
class Category_model extends CI_Model
{
public function getAllCategories()
{
return $this->db->get("categories")->result_array();
}
public function deleteCategory($id)
{
$this->db->where("category_id", $id);
$this->db->delete("categorie... | true |
7457ccaacdf2cf1404d95b2a3c9685e051631e16 | PHP | apuc/teamlead | /console/migrations/db/m191105_143122_create_staff_tracking_table.php | UTF-8 | 643 | 2.578125 | 3 | [] | permissive | <?php
use console\components\BaseDbMigration;
/**
* Handles the creation of table `{{%staff_tracking}}`.
*/
class m191105_143122_create_staff_tracking_table extends BaseDbMigration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('{{%staff_tracking}}', [
... | true |
6ed9af33be4ae10943eacf580f485bc9ae550fc5 | PHP | mrsimonbennett/core | /src/Company/Listeners/TenancyListener.php | UTF-8 | 1,972 | 2.78125 | 3 | [] | no_license | <?php
namespace FullRent\Core\Company\Listeners;
use FullRent\Core\Company\Commands\EnrolNewTenant;
use FullRent\Core\Company\Commands\EnrolTenant;
use FullRent\Core\Tenancy\Events\InvitedExistingUserToTenancy;
use FullRent\Core\Tenancy\Events\InvitedNewUserToTenancy;
use SmoothPhp\Contracts\CommandBus\CommandBus;
use... | true |
eb4ec884929cd427734a2ed57a8ca990edd197a8 | PHP | jmtornetta/MU-Migration | /includes/commands/class-mu-migration-users.php | UTF-8 | 4,648 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/**
* @package TenUp\MU_Migration
*/
namespace TenUp\MU_Migration\Commands;
use WP_CLI;
class UsersCommand extends MUMigrationBase {
/**
* Updates/resets users passwords and optionally sends an email reset link.
*
* ## OPTIONS
*
* <newpassword>
* : The new password for the users set
*
* ## E... | true |
d3e2bef51baf95bc6aaf8915336c2de1a575f6f7 | PHP | softemp/softemp | /softemp_packages/mikrotik/src/Api/Commands/IP/Address.php | UTF-8 | 3,898 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
namespace Mikrotik\Api\Commands\IP;
use Mikrotik\Api\Talker\Talker;
use Mikrotik\Api\Util\SentenceUtil;
/**
* Class Address
* @package Mikrotik\Api\Commands\IP
*
* Description of Address
*
* @author Paulo Roberto da Silva <paulo@softemp.com.br>
* @copyright Copyright (c) 2018
* @license proprietary
*
... | true |
24467ed5d551198243a6133c5c1ffacd8560a398 | PHP | arjun-rao/MSRITLMS | /app/Models/Course.php | UTF-8 | 2,256 | 2.734375 | 3 | [] | no_license | <?php namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Course extends Model
{
protected $primaryKey = 'course_code';
public $timestamps = false;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protec... | true |
576a194bb2d5def11573802dcf0c2bb44166bfef | PHP | weer0026/xcx-sdk | /src/Traits/HttpRequest.php | UTF-8 | 2,292 | 2.84375 | 3 | [] | no_license | <?php
namespace HangJia\Xcx\Traits;
use GuzzleHttp\HandlerStack;
/**
* @description: request基础trait
* @author: He Chuan
*/
trait HttpRequest
{
/**
* @var
*/
protected $httpClient;
/**
* @var array
*/
protected $middleware = [];
/**
* 默认options
* @var array
... | true |
9c7b3a1b5a1b86b864500300526a89f7b2212825 | PHP | netaris/tasas | /lib/obtenerMaster.php | UTF-8 | 4,049 | 2.546875 | 3 | [] | no_license | <?php
include '../conexion2.php';
include '../lib/convert_utf8.php';
$login=$_SERVER['HTTP_LOGIN'];
$sql1 = "SELECT * FROM USUARIOS where USUARIOS.login='$login'";
$rs1 = odbc_exec( $conn, $sql1);
$perfil=odbc_result($rs1, "idperfil");
switch ($perfil){
case "DEC":
//echo ($perfil);
$sql2 = "SELECT USUARIOS_... | true |
5654bb98aefb659747a143b2e7f835fd4a6961ee | PHP | PeekAndPoke/metacore | /tests/Unit/DomainModel/TypeRegistryTest.php | UTF-8 | 1,462 | 2.5625 | 3 | [] | no_license | <?php
/**
* Created by gerk on 06.10.16 17:08
*/
namespace PeekAndPoke\Component\MetaCore\Unit\DomainModel;
use PeekAndPoke\Component\MetaCore\DomainModel as MetaCore;
use PHPUnit\Framework\TestCase;
/**
* @author Karsten J. Gerber <kontakt@karsten-gerber.de>
*/
class TypeRegistryTest extends TestCase
{
pub... | true |
4836f8c4156919ff051e50efeb5afb8df81bab16 | PHP | corriol/retrogames | /src/DBConnection.php | UTF-8 | 1,331 | 3.078125 | 3 | [] | no_license | <?php
namespace App;
use App\Core\AppException;
use App\Exception\DBException;
use Exception;
use PDO;
use PDOException;
class DBConnection
{
private $connection;
private function __construct()
{
try {
$config = require __DIR__ . '/../config/config.php';
$name = $config... | true |
05e2c94c93aee9f771cb408d8d79f989a8f983d6 | PHP | Ezouz/42_piscine_php | /d07/ex04/Jaime.class.php | UTF-8 | 311 | 3.4375 | 3 | [] | no_license | <?php
class Jaime extends Lannister {
public function sleepWith($id){
if ($id instanceof Cersei)
print("With pleasure, but only in a tower in Winterfell, then.".PHP_EOL);
elseif ($id instanceof Lannister)
print("Not even if I'm drunk !".PHP_EOL);
else
print("Let's do this.".PHP_EOL);
}
}
?>
| true |
5a8f92adc08d64f0ccf0e6cf0e01b5bf7063a200 | PHP | dezer32/dto | /src/Helpers/VerifyDto.php | UTF-8 | 840 | 2.546875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Dezer32\Libraries\Dto\Helpers;
use Dezer32\Libraries\Dto\Attributes\DataTransferObject as DataTransferObjectAttribute;
use Dezer32\Libraries\Dto\Contracts\DataTransferObjectInterface;
use ReflectionClass;
class VerifyDto
{
public static function isDto(mixed $object): boo... | true |
2c6f94914b79811f00e17d4924f0e37c92a0e9f5 | PHP | martynasssz/learn_php_set1 | /loops.php | UTF-8 | 926 | 3.765625 | 4 | [] | no_license | <?php
# LOOPS - Execute code set number of times
/*
For
While
Do..While
Foreach
*/
#For Loop (knowing time of executing)
#@params - init (initialisor), condition, inc (increment)
/*
for($i = 0;$i < 10;$i++) {
echo 'Number'.$i;
echo '<br>';
}
*/
#While Loop
#@params - condition
#use when we ... | true |
14b9879f16a7158e962aa9e74af00f66586d3110 | PHP | kasun0777/Mobitel-SMS | /pure.php | UTF-8 | 2,385 | 2.84375 | 3 | [] | no_license | <?php
$number = isset($_GET['incoming_number']);
$message = isset($_GET['incoming_message']);
if ($number && $message) {
//create a session with mobitel given username & password
$session = createSession('','USERNAME','PASSWORD','');
//send message with created session like this
sendMessages($s... | true |
42980a96dfba08f91ae5bbaf6fad952a6e159c3a | PHP | DapinvaX/DWES-SMS_Luis | /ficheros/gestionarDirectorios/index.php | UTF-8 | 3,762 | 3.265625 | 3 | [] | no_license | <HTML>
<HEAD><TITLE>Ejemplo 5 - Unidad 4 - Curso Iniciación de PHP 5</TITLE></HEAD>
<BODY>
<?php
// Operaciones con directorios
$directorio_trabajo = getcwd();
echo "DOCUMENT_ROOT: ".$_SERVER['DOCUMENT_ROOT']."<BR>";
echo "PHP_SELF: ".$_SERVER["PHP_SELF"]."<BR>";
echo "\$directorio_trabajo: ". $directo... | true |
309b8c7139ffe0efb010c1d67d9a768369042c08 | PHP | s9271/SEW3 | /controllers/ControllerMilitaryTypes.php | UTF-8 | 13,711 | 2.671875 | 3 | [] | no_license | <?php
class ControllerMilitaryTypes extends ControllerCategoryModel{
protected $search_controller = 'military-types';
protected $using_top_title = true;
protected $top_ico = 'map-marker';
public function __construct(){
$this->search_definition = $this->getSearchD... | true |
88a764f6f804c5ada647ec9341f3c243e016ea54 | PHP | manav-punjabi/wp2 | /multi-insert.php | UTF-8 | 678 | 2.828125 | 3 | [] | no_license | <?php
$server='localhost';
$username='root';
$password="";
$db="manav";
$conn= mysqli_connect($server,$username,$password,$db);
if(!$conn)
{
die("Connection failed: " . mysqli_connect_error());
}
$sql = "INSERT INTO hello (firstname, lastname, email)
VALUES ('John', 'Doe', 'john@example.com');";
$sq... | true |
f67a1b55eb1b47a3b67a776cbbc422c409a68b26 | PHP | dombrock-archive/contact_zero | /contact_zero/secure/connect.php | UTF-8 | 705 | 2.953125 | 3 | [] | no_license | <?php
class MyDB extends SQLite3
{
function __construct()
{
$this->open('secure/zero_contact_log.db');
}
}
$db = new MyDB();
if(!$db){
echo $db->lastErrorMsg();
} else {
//echo "Opened database successfully\n";
}
$sql =<<<EOF
CREATE TABLE IF NOT EXI... | true |
f39c3df381ddf1c234771df734b7497382341c3c | PHP | squirrelframework/typing | /library/Squirrel/Typing/Callback.php | UTF-8 | 4,674 | 3.59375 | 4 | [] | no_license | <?php
namespace Squirrel\Typing;
/**
* Provides an interface for calling
* functions or methods.
*
* @package Squirrel\Typing
* @author Valérian Galliat
*/
class Callback extends Object
{
/**
* @var string|object
*/
protected $class;
/**
* @var string
*/
protected $function;... | true |
5e1e1f5295ee2ed1f3354123dc9c8ead61b7a38f | PHP | nayeemkhan7/CRUD-Application | /update-user.php | UTF-8 | 3,288 | 2.765625 | 3 | [] | no_license | <?php
include "db.php" ;
include "header.php" ;
include "functions.php" ;
?>
<!-- ========== PHP Code-1 Starts ========== -->
<?php
if (isset($_GET['update'])) {
// SQL Query for Select user from Database ::
$userId = $_GET['update'] ;
$query = "SELECT * FROM user WHERE id = $userId" ;
... | true |
4967fa67c66fe64d30b9db6c519d12724e790a35 | PHP | Risakodama/LearnSNS | /function_practice.php | UTF-8 | 3,437 | 3.921875 | 4 | [] | no_license | <?php
//練習問題_1
//「seedくん」という文字列を出力する「nexseed」という名前の関数を作成してみましょう。(引数はなし)
function nexseed1(){
echo "seedくん";
}
//練習問題_2
//練習問題1で作成した「nexseed」関数を呼び出してみましょう。
// nexseed1();
//練習問題_3
//練習問題2で作成した「nexseed」関数に、「greeting」という引数を追加して「△△△△△、seedくん」と表示されるように呼び出してみましょう。
function nexseed_3($greeting_3){
echo $greeting_3."、s... | true |
5eefb127eedaaa1de700bdbc73dfc6737ddbc5a4 | PHP | crypto-scythe/m_nify | /src/m_nify.php | UTF-8 | 2,772 | 3.09375 | 3 | [
"MIT"
] | permissive | <?php
namespace crypto_scythe;
/*
* m_nify is a class for easy minifying JavaScript and CSS assets
*
* m_nify can be used to concatenate multiple .js or .css files
* and minify them in a simple manner.
*
* @access public
* @author Chris Fasel <crypto.scythe@gmail.com>
* @copyright Copyright (c) 2015, Ch... | true |
1976a8a14ad233bbc795f9dbf3ae7a118b79bb00 | PHP | Sergii81/admin-panel-example | /app/Console/Commands/DatabaseDumps.php | UTF-8 | 1,101 | 2.6875 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\DB;
class DatabaseDumps extends Command
{
/**
* Команда для добавление таблиц из database/dump в БД
*/
/**
* The name and signature of the console command.
... | true |
2cb3e58f9b5828b3a03804a8132313c910342e25 | PHP | dann95/teamspeak.nptunnel.dev | /app/Domain/HelpDesk/Events/UserCreatedAQuestion.php | UTF-8 | 729 | 2.609375 | 3 | [] | no_license | <?php
namespace NpTS\Domain\HelpDesk\Events;
use NpTS\Events\Event;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
use NpTS\Domain\HelpDesk\Models\Question;
class UserCreatedAQuestion extends Event
{
use SerializesModels;
private $question;
/**
* Creat... | true |
53b13954b169fa328ab799800ed61e5b91418add | PHP | IvanovDi/mvc | /core/views/View.php | UTF-8 | 288 | 2.65625 | 3 | [] | no_license | <?php
namespace core\views;
class View
{
protected $viewPath;
public function __construct($viewPath)
{
$this->viewPath = $viewPath;
}
function generate($path, $data = [])
{
extract($data);
include $this->viewPath . $path.'.php';
}
} | true |
9d56186d006033bb370086ff620c98e0e8792bd3 | PHP | BobbyKostadinov/MongoDB | /Connection.php | UTF-8 | 1,093 | 2.6875 | 3 | [] | no_license | <?php
/**
* Handle connections to MongoDB server
* @author Bobby Kostadinov b.a.kostadinov@gmail.com
*
*/
class MongoDB_Connection
{
public static $registryKey = 'mongoConnection';
public static function connect()
{
try {
$config = Zend_Registry::get('config');
$c... | true |
d8af411c21990f091ceb988c2413dd91073717c9 | PHP | linostar/trivia-report | /captcha.php | UTF-8 | 462 | 2.9375 | 3 | [
"MIT"
] | permissive | <?php
require_once "conf/config.php";
class Captcha {
public static function calculate() {
$key = Config::$captcha_secret_key;
$num1 = rand(2, 12);
$num2 = rand(2, 12);
$sum = $num1 + $num2;
$equation = $num1 . " + " . $num2 . " = ?";
return array($equation, hash("sha256", $sum . $key));
}
p... | true |
c3dd71e9d6687e3ea375b2e205aa7d8d9bc21160 | PHP | DeimosProject/Flow | /src/Flow/Extension/TForeach/TElseForeach.php | UTF-8 | 559 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Deimos\Flow\Extension\TForeach;
use Deimos\Flow\FlowFunction;
class TElseForeach extends FlowFunction
{
public static $elseForeach = [];
public function view()
{
self::$elseForeach[TForeach::$level] = true;
$init = '';
if (!empty(TForeach::$name[TForeach::$leve... | true |
3f45f7bb99fa979f945879a007132fd6325188cb | PHP | berryboylb/BasicPhp | /comparisonoperatorsandlogicoperators.php | UTF-8 | 1,469 | 4.25 | 4 | [
"MIT"
] | permissive | <?php
//comparison operators
$number1='10';
$number2=10;
#Equal
/*if ($number1==$number2) {
echo "Equal";
}
else
{
echo "Not Equal";
}*/
#Not Equal
/*if ($number1===$number2) {
echo "Equal";
}
else
{
echo "Not E... | true |
5cbbadb6986a540ad710de6f15cba28543f69b12 | PHP | huangdijia/deeka | /library/queue/driver/File.php | UTF-8 | 3,135 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace deeka\queue\driver;
use deeka\Queue;
use deeka\Str;
class File extends Queue
{
public function __construct(array $options = [])
{
$this->options = array_merge($this->options, $options);
}
public function lpop(string $name = '', int $size = 1)
{
// ch... | true |
5c7faf6aabd055264e6d55faabc298d1a2b162e8 | PHP | Oksanatishka/42_Piscine_PHP | /D01 - INTRODUCTION TO PHP/ex06/ssap.php | UTF-8 | 485 | 3.265625 | 3 | [] | no_license | #!/usr/bin/php
<?php
// .= Concatenation assignment, e.g. $txt1 .= $txt2, result: Appends $txt2 to $txt1
// split(":", "this:is:a:string");
// preg_split('/www/', 'D:/Projects/job.com/www/www/path/source', 2);
// explode('www', 'D:/Projects/job.com/www/www/path/source', 2);
$myString = "";
foreach ($argv as $elem)
{
... | true |
2fe0a86b0e30085c3002a193fcc7de27bbc0a13e | PHP | JesusValera/php-ddd-skeleton | /tests/src/Mooc/Courses/Application/Create/CreateCourseRequestMother.php | UTF-8 | 994 | 2.6875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace CodelyTv\Tests\Mooc\Courses\Application\Create;
use CodelyTv\Mooc\Courses\Application\CreateCourseRequest;
use CodelyTv\Mooc\Courses\Domain\CourseDuration;
use CodelyTv\Mooc\Courses\Domain\CourseName;
use CodelyTv\Mooc\Shared\Domain\Course\CourseUuid;
use CodelyTv\Tests\Mooc\... | true |
18eeb7d149810653a66b796e94f9d01eb5b6c9b6 | PHP | anibalealvarezs/paladins-stats | /src/Models/PsPassive.php | UTF-8 | 1,662 | 2.578125 | 3 | [] | no_license | <?php
namespace Anibalealvarezs\Paladins\Models;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\MorphToMany;
class PsPassive extends PsBuilder
{
protected $table = 'passives';
public $timestamps = false;
/**
* The attributes that are mass assignabl... | true |
cdf34c256c6d47fe0cb6a92b97548b32edbdf284 | PHP | farisrmdhn/gorVirtual | /application/views/lobbies/index.php | UTF-8 | 3,776 | 2.5625 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <!-- <h1><?= $title; ?></h1>
<?php foreach($lobbies as $lobby) : ?>
<?php if($lobby['id_pengunjung_away'] == NULL):?>
<div>
<h3 style="background-color: #f0f0f0"><?php echo $lobby['nama_lobby']?></h3>
<?php if($lobby['id_pengunjung_away'] === NULL): ?>
<p style="color: green;">OPEN</p>
<?php endif; ?>
... | true |
475accc4085158fb590248c7964d1d88ea1fde72 | PHP | dmaffioletti/PhpDescribe | /lib/PhpDescribe/Expectation/Assertions/NotBeNull.php | UTF-8 | 573 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace PhpDescribe\Expectation\Assertions;
use PhpDescribe\Expectation\InvalidExpectationParameterException,
PhpDescribe\Result\ExpectationResult;
class NotBeNull implements AssertionInterface{
function execute($subject) {
if($subject !== null) {
return new ExpectationResult(true);... | true |
b6db4741759eeb77c8680415788403fbdffa497c | PHP | fjrbarros/avlll-desenv-wev | /app/Model/Entity/User.php | UTF-8 | 6,208 | 3.125 | 3 | [] | no_license | <?php
namespace App\Model\Entity;
if (session_status() == PHP_SESSION_NONE) {
session_start();
}
use \App\db\Database;
use \PDO;
//Classe de ususario
class User
{
public $id;
public $nome;
public $cpf;
public $email;
public $senha;
public $endereco;
public $cliente;
public $admin... | true |
e269cbd917492d6ba35f299c51c13fafc78d9632 | PHP | tkrebs/ep3-bs | /src/Zend/Validator/src/Ip.php | UTF-8 | 6,232 | 3.0625 | 3 | [
"MIT",
"Apache-2.0"
] | permissive | <?php
/**
* Zend Framework (http://framework.zend.com/)
*
* @link http://github.com/zendframework/zf2 for the canonical source repository
* @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
* @license http://framework.zend.com/license/new-bsd New BSD License
*/
namespace ... | true |
0030139d3b2a4d374585b30df28cc6d6b3440937 | PHP | vangaru/Big-Dave-s-Butcher-Shop | /SignUpHandler.php | UTF-8 | 1,351 | 2.578125 | 3 | [] | no_license | <?php
include('connection.php');
if(isset($_POST['datetime'])){
$Name = htmlentities(mysqli_real_escape_string($connection, $_POST['name']));
$DateTime = htmlentities(mysqli_real_escape_string($connection, $_POST['datetime']));
$PhoneNumber = htmlentities(mysqli_real_escape_string($connection, $_POST... | true |
759bef63701d4c5fd493d8df4d646aa02af61ddf | PHP | albertkeba/service | /index.php | UTF-8 | 3,910 | 2.90625 | 3 | [] | no_license | <?php
require 'PdoConnector.php';
require 'Slim/Slim.php';
\Slim\Slim::registerAutoloader();
$app = new \Slim\Slim();
$dsn = 'mysql:host=localhost;dbname=directory';
$username = 'root';
$password = '';
$bdCon = PdoConnector::getInstance( $dsn, $username, $password );
function verifEmail( $email )
{
$regex = '/... | true |
e7274fd4152d843907209ac405fe47f801312d9d | PHP | BlueDG/Website_Model | /admin/tasks/clients/save_client.php | UTF-8 | 471 | 2.53125 | 3 | [] | no_license | <?php
// var_dump($_POST);
// 1) connexion à la BDD
require_once '../../../libraries/database.php';
// 2) Récupération des données dans le POST (envoi du formulaire)
$lastName = $_POST['lastname'];
$firstName = $_POST['firstname'];
$phone = $_POST['phoneNumber'];
$email = $_POST['email'];
$password = $_POST['passwo... | true |
033cc4d3ca558db5b9e8528b41bc6b9cae0fe4e0 | PHP | bashaen/mytestapp | /households/getUserHousehold.php | UTF-8 | 684 | 2.609375 | 3 | [] | no_license | <?php
require("../db.php");
try {
$results = $db->query("
SELECT
users.user_id as user,
households.home_id as home,
households.family_name as family_name
FROM user_household
INNER JOIN... | true |
2ce5c5e335594624d79d212b0152890fb7c424e1 | PHP | SSPKHas/LabWorks | /LabWorks/IT306Lab81.php | UTF-8 | 549 | 2.921875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Lab 8-1</title>
</head>
<body>
<form class="" action="IT306Lab81.php" method="post">
<input type="number" name="sayi" value="">
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>
<?php
error_reporting... | true |
9442d4a23ad6f431a6b1fd335a806bc64de073e6 | PHP | asb-school/416-php_multi | /sort_items.php | UTF-8 | 665 | 3.234375 | 3 | [] | no_license | <html>
<head>
<title>Sorter</title>
</head>
<body>
<h1><center>Sorter</center></h1>
<?php
// Do we have post data?
if (isset($_REQUEST['num_items']))
{
// Get number of items
$numberOfItems = $_REQUEST['num_items'];
// Get each item and stuff into a collection
for ($iteratorIndex = 0; $iteratorIndex < $numb... | true |
bcf9ba26e17e1e65f993ec8ee8948a19d17ad652 | PHP | rahuldas-hits/GitHub-and-wamp | /bootstrap-datetimepicker-master/sample in bootstrap v3/SignUpModal.php | UTF-8 | 3,928 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | <?php
require 'core.inc.php';
if(!loggedin())
{
if(isset($_POST['email'])&&isset($_POST['password'])&&isset($_POST['password_confirm'])&&isset($_POST['firstname'])&&isset($_POST['surname']))
{
$email = trim($_POST['email']);
$password = trim($_POST['password']);
$password_again = trim($_POST['pass... | true |
56c5457d1950fae972e4eb891817eb2da65f29d4 | PHP | ttreeagency/Map | /Classes/Service/GeocoderService.php | UTF-8 | 1,080 | 2.734375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Ttree\Map\Service;
use Geocoder\Geocoder;
use Geocoder\Query\GeocodeQuery;
use Neos\Flow\Annotations as Flow;
/**
* Geocoder Service
*
* @Flow\Scope("singleton")
* @api
*/
class GeocoderService {
/**
* @var Geocoder
* @Flow\Inject()
*/
protected $geocoder;
/**
* @var arra... | true |
68dc0c0755ab32bb8eb052ac44b7340202ebca19 | PHP | FlagBg/PhpCourse | /Shuffle/ErrorHandling.php | UTF-8 | 1,523 | 3.34375 | 3 | [] | no_license | <?php
class CustomException extends Exception {
public function __construct($e){
parent::__construct($e->getMessage(), $e->getCode());
//log knowledge
$msg = "-----------------------------------\n";
$msg .= __CLASS__ . ": [{$this->code}]: {$this->message}\n";
$msg .= $e->getTraceAsString() . "\n";
er... | true |
a015b4fbfaa26cf939fc721888389bb06eb0915b | PHP | liunianlh/PHP | /blog/Application/Test/Model/VocationModel.class.php | UTF-8 | 676 | 2.703125 | 3 | [] | no_license | <?php
/*
* 英雄
*/
require_once './Model/Model.class.php';
class VocationModel extends Model{
/**
* 获取英雄列表
* @param type $where where条件
* @param type $order 排序
* @param type $start 查询开始的位置
* @param type $num 查询单额条数,0为查询默认所有
* @return array
*/
public function getLi... | true |
e0462eb384bfbe1f5becceb00784c06e3b7d67e9 | PHP | demos-europe/demosplan-addon | /src/Contracts/Entities/StatementAttachmentInterface.php | UTF-8 | 1,035 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace DemosEurope\DemosplanAddon\Contracts\Entities;
interface StatementAttachmentInterface extends UuidEntityInterface
{
/**
* A file that originally resulted in the original statement being created. E.g. a PDF file
* send via email.
*
* @var string
*/... | true |
dee65b1efa7305096ee7f86b055dc6ded3e442c8 | PHP | linkorb/multi-repo | /src/Middleware/YamlMiddleware.php | UTF-8 | 1,951 | 2.546875 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Linkorb\MultiRepo\Middleware;
use Linkorb\MultiRepo\Dto\FixerInputDto;
use Linkorb\MultiRepo\Services\Helper\IndentionFormatAwareTrait;
use Linkorb\MultiRepo\Services\Io\IoInterface;
use Symfony\Component\Yaml\Yaml;
class YamlMiddleware implements MiddlewareInterface
{
us... | true |
7f1d018d9bdd6536e767c4f2366e7665d8576872 | PHP | RickardAhlstedt/TranquilMVC | /functions/fDevelopment.php | UTF-8 | 330 | 2.890625 | 3 | [] | no_license | <?php
function dump( $oObject ) {
echo '<pre>';
print_r($oObject);
echo '</pre>';
}
function averageSystemLoad() {
if( !function_exists('sys_getloadavg') ) return false;
$aLoad = sys_getloadavg();
return implode( '; ', $aLoad );
}
function memoryUsage() {
return memory_get_usage() . ' / ' . memory_get_peak_... | true |
c3812e11cc87c821ee8a6f488a45f000abc70b5c | PHP | cyberhubsa/cyberhub-ctf | /CyberHub CTF 0x02/Web/fast_shooter/challenge/index.php | UTF-8 | 1,853 | 2.8125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head><title>fast shooter</title></head>
<body>
<center>
<?php
Session_start();
//get Milliseconds from timestamp
function getMilliSecond() {
list($s1, $s2) = explode(' ', microtime());
return (float)sprintf('%.0f', (floatval($s1) + floatval($s2)) * 1000);
}
//create random session
functio... | true |