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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
5a453822e14008403f5a9e12f20244f7214454b4 | PHP | bfg-s/speed-test | /src/Server/WatcherServer.php | UTF-8 | 2,713 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Bfg\SpeedTest\Server;
use Bfg\SpeedTest\Point;
use Bfg\SpeedTest\PointSeparator;
use Illuminate\Console\Command;
class WatcherServer
{
/**
* The host of server
*
* @var string
*/
private string $host;
/**
* Socket resource
*
* @var resource
*/
... | true |
a3ff9a314a7ad6c3dd330fb34e91fa66a34b890b | PHP | JefriRakaF/TPP-SPK-beasiswa | /lib/koneksi.php | UTF-8 | 429 | 2.59375 | 3 | [] | no_license | <?php
if (!$connection = new Mysqli("localhost", "root", "", "spkberau")) {
echo "<h3>ERROR: Koneksi database gagal!</h3>";
}
if (isset($_GET["page"])) {
$_PAGE = $_GET["page"];
} else {
$_PAGE = "home";
}
function page($page) {
return "page/" . $page . ".php";
}
function alert($msg, $to = null) {
$to =... | true |
8ebcbfb24e5fd04a7811a481ef230c3c151be118 | PHP | comsi02/jenkins | /script/make_crontab_to_jenkins_jobs.php | UTF-8 | 8,703 | 2.609375 | 3 | [] | no_license | <?php
function usage() { /*{{{*/
if(is_array($_SERVER['argv']) and $_SERVER['argc'] < 2 ) {
print ( "\n" );
print ( "\tphp {$_SERVER['argv'][0]} [OPTIONS] \n" );
print ( "\n" );
print ( "Options are:\n" );
print ( "\t-s, --site <SITE_URL>\tconnect to jenkins at site.\tdef... | true |
7a17ecb9384b41831ef166e1dbfff4c0b45e0d61 | PHP | e-ponimash/order | /app/Services/BarcodeService.php | UTF-8 | 316 | 3.34375 | 3 | [] | no_license | <?php
namespace App\Services;
class BarcodeService
{
/**
* @param int $length
* @return string
*/
public function generate($length = 10): string{
$barcode = '';
for ($i = 0; $i < $length; $i++) {
$barcode .= rand(0, 9);
}
return $barcode;
}
}
| true |
1c4b8c77287673c320a99f392ebb6b5d39797508 | PHP | fred94/Control_Escolar | /Grupo.php | UTF-8 | 2,091 | 2.78125 | 3 | [] | no_license | <?php
class Grupo {
private $idg;
private $nombre;
private $orden;
private $estatus;
public function mostarGrupos(){
$sql="SELECT * FROM grupos WHERE estatus=1";
$consulta=mysql_query($sql)or die("Error de consulta");
echo"<form method='POST' action='testGrupo.php'> <table><tr><td><strong>Gr... | true |
7bec898c440917040ecaaae26584519f9c198dc7 | PHP | seynabou27/projet_quizz | /lib/validators.php | UTF-8 | 4,927 | 2.90625 | 3 | [] | no_license | <?php
//fonction de validation
function est_vide( $valeur):bool{
return empty($valeur);
}
function est_entier($valeur):bool{
$entier = (int) $valeur;
return is_int($entier);
}
function est_numerique($valeur):bool{
$entier = (int) $valeur;
return is_int($entier);
}
function form_valid($arrayErreu... | true |
182749dbc2478ea631a5860d96367d61a3f5083a | PHP | ibidem/mjolnir-types | /Cache.php | UTF-8 | 616 | 2.734375 | 3 | [
"BSD-2-Clause"
] | permissive | <?php namespace ibidem\types;
/**
* Common Language Interface
*
* @package ibidem
* @category Types
* @author Ibidem Team
* @copyright (c) 2008-2012 Ibidem Team
* @license https://github.com/ibidem/ibidem/blob/master/LICENSE.md
*/
interface Cache
{
/**
* @param string key
* @param mixed def... | true |
2310912a97a2bb2c2961ea456e3285b67fc5ab70 | PHP | luissalda1995/HeppiMarket | /admin/application/controllers/ControllerProductos.php | UTF-8 | 15,965 | 2.671875 | 3 | [] | no_license | <?php
Class ControllerProductos extends ControllerMain {
private $table;
private $msg_error;
private $msg_good;
public function __construct() {
$this->_modelo = new ModelMain();
$this->table = "producto";
$this->msg_error = "Error. Intente nuevamente, si el problema pesiste co... | true |
edd7a4358a81934d1306a52802e0d505779767f9 | PHP | vijayrajarathinam/vue-crud | /database/seeds/PostSeeder.php | UTF-8 | 496 | 2.53125 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use App\Post;
use Illuminate\Support\Facades\DB;
use Faker\Factory;
class PostSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$faker = factory::create();
foreach (range(1, 50) as $i){... | true |
da252e348e3112ebd3b8474e1ca35aa9238939aa | PHP | Sapistudio/SapiMox | /src/Auth/Token.php | UTF-8 | 893 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
namespace SapiStudio\Proxmox\Auth;
class Token
{
private $timestamp;
private $CSRFPreventionToken;
private $ticket;
private $username;
/** Token::__construct()*/
public function __construct($csrf, $ticket, $username)
{
$this->timestamp = time();
$this->CSRF... | true |
8616359d1757d91de95575277ace5a3593ff2644 | PHP | BagoesGazette/marchant-app | /Modules/Product/Entities/Product.php | UTF-8 | 625 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Modules\Product\Entities;
use Illuminate\Database\Eloquent\Model;
use Modules\Merchant\Entities\Merchant;
class Product extends Model
{
/**
* The primary key associated with the table.
*
* @var string
*/
protected $primaryKey = 'product_id';
/**
* The model's defa... | true |
5183e3d012d5fb8cee609aee0882de05624fb93c | PHP | BrieucCaillot/Twouiter | /app/Http/Controllers/UserController.php | UTF-8 | 2,062 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use App\User;
use App\Follower;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Auth;
class UserController extends Controller
{
/**
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function index()
{
return vi... | true |
3b79dd3b6adc01ff98f06d460bc44d71a11702e8 | PHP | binary-cats/sanitizer | /src/Laravel/FormRequest.php | UTF-8 | 1,091 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace BinaryCats\Sanitizer\Laravel;
use Illuminate\Foundation\Http\FormRequest as LaravelFormRequest;
class FormRequest extends LaravelFormRequest
{
/**
* Sanitize input before validating.
*
* @return void
*/
public function validate()
{
$this->sanitize();
... | true |
d7ea9d8f1d33cbae7defd66e9ac112345748c069 | PHP | PavloYurhelia/testtask | /app/Providers/ProviderFactory.php | UTF-8 | 484 | 2.703125 | 3 | [] | no_license | <?php
namespace PY\App\Providers;
use PY\Core\ObjectManager;
class ProviderFactory
{
private $providers = [
'WolfProvider' => WolfProvider::class,
'CoyoteProvider' => CoyoteProvider::class,
'FoxProvider' => FoxProvider::class
];
public function build(string $key)
{
if... | true |
e9aa73f0f183189ab49ecf7d405054f377f856a7 | PHP | sbine/bdgt | /app/Models/BelongsToUser.php | UTF-8 | 774 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Support\Facades\Auth;
trait BelongsToUser
{
public function __construct(array $attributes = [])
{
if (Auth::check() && ! array_key_exists('user_id', $attributes)) {
$this->user_id = Auth::id();
}
parent::__construct($attributes);... | true |
30a8b7a359a9d1b80abb4b3c5681e0bb1faa2935 | PHP | avayarzl/Rms | /libraries/measurement.php | UTF-8 | 2,477 | 2.765625 | 3 | [] | no_license | <?php
defined('_REXEC') or die('Restricted Access');
/**
* Measurement Class
*
*/
class Measurement {
private $id;
private $fields;
public function __construct() {
$this->id = null;
$this->fields = array('code' => '',
'description' => '');
}
public function __get($field) ... | true |
5086de12811ba95310f376470b6bf99ca5528077 | PHP | tukangslicing/utopia | /api/models/impediments.filter.model.php | UTF-8 | 722 | 2.90625 | 3 | [] | no_license | <?php
class ImpedimentFilter extends FilterBase {
public $users;
public $query;
public $is_resolved;
public function __construct() {
$users = "*";
$is_resolved = "0";
}
public function build_sql() {
$sql = array();
$args = array();
if(!is_empty($this->users)) {
array_push($sql, 'created_by in (... | true |
bea371a85d9d44479c6b553e7c0f300239aa1c27 | PHP | streetteam/YVMultiCurrencyBundle | /Model/ModelInterface/CurrencyInterface.php | UTF-8 | 1,281 | 2.53125 | 3 | [] | no_license | <?php
namespace YV\MultiCurrencyBundle\Model\ModelInterface;
use YV\MultiCurrencyBundle\Model\ModelInterface\FileUploadableInterface;
interface CurrencyInterface extends FileUploadableInterface
{
/**
* Set createdAt
*
* @param \DateTime $createdAt
* @return CurrencyAccountInterface
*/
... | true |
7297e29c76d7de1e8ea6548d28be3ffd872964c5 | PHP | igor-lisboa/commerce-sales | /app/Services/ProductExchangeService.php | UTF-8 | 379 | 2.625 | 3 | [] | no_license | <?php
namespace App\Services;
use App\Models\ProductExchange;
class ProductExchangeService extends BaseService
{
/**
*
* Init the class and inform the model
*
* @param \App\Models\ProductExchange $productExchange
*/
public function __construct(ProductExchange $productExchange)
... | true |
26d465b7154a8ed7b0e076c08bac9349040dc250 | PHP | crehn/DesignType | /php/loadQuestionnaireDetailsBase.php | UTF-8 | 2,392 | 2.78125 | 3 | [] | no_license | <?php
require_once('inc/Logger.php');
require_once('inc/config.php');
require_once('inc/common.php');
$log = new Logger(basename(__FILE__, ".php"));
if (DEBUG) {
$log->setLogLevel(LogLevel::debug());
}
function executeSelect($mysqli, $ukey) {
global $log;
$tablenameCS = DB_TABLEPREFIX . "ChosenStatements"... | true |
38d10ecb5da4eeab4c8273423972eca63786d61a | PHP | davidmather345/CherriPicker | /database.php | UTF-8 | 1,840 | 2.65625 | 3 | [] | no_license | <?php
$servername = "127.0.0.1";
$username = "x14322731";
$password = "";
$dbname = "cherrypickerdb";
$conn = mysqli_connect($servername, $username, $password);
if (!$conn) {
die("Connection failed: " . m... | true |
e2b400c7236e493dc6b0599e0fb2b4eb0f05c114 | PHP | eduardochagas/site-projeto-integrador | /conexao.php | UTF-8 | 515 | 2.5625 | 3 | [] | no_license | <?php
/*
$servidor = 'localhost';
$usuario = 'root';
$senha = '';
$banco = 'crud2';
*/
class SqlCmd extends PDO { // CRC - Class Resp. Col.
// atributos
private $conn;
public function __construct() {
//$this->$conn = new PDO("mysql:host=localhost;dbname=f5tecnologia;","root","");
$this->$conn = n... | true |
87a60c12c3529eaaa28d0529e5e1831434e2bc30 | PHP | devorto/thunar-custom-actions | /src/Commands/Terminal/OpenHere.php | UTF-8 | 2,038 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Commands\Terminal;
use App\Commands\BaseCommand;
use App\Services\Thunar;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**
* Open terminal window on directory.
*/
class OpenHere exten... | true |
230fad69eef69d2485a78c6ba9779be376dad6a7 | PHP | ppkpub/sdk | /ppk-lib2/php/PTAP02ASSET.php | UTF-8 | 2,211 | 2.53125 | 3 | [] | no_license | <?php
namespace PPkPub;
/*
PTAP02数字资产命名标识协议
PHP SDK for PTAP02 Digital Asset Naming
-- PPkPub.org
-- 2020-06-20
*/
require_once('Util.php');
require_once('ODIN.php');
require_once('PTTP.php');
class PTAP02ASSET
{
//常用数字资产命名示例
const COIN_TYPE_BITCOIN = 'bitcoin:'; //比特币类型前缀
const COIN_TYPE_BITCOINCASH = 'pp... | true |
4741c8727b41aa2adbb0f43b5a5e43c152630fc6 | PHP | FckThaSystem/logger | /main/setLog.php | UTF-8 | 403 | 2.84375 | 3 | [] | no_license | <?php
namespace logger\main;
use Psr\Log\AbstractLogger;
include __DIR__ . '/../vendor/autoload.php';
class setLog extends AbstractLogger
{
private $writer;
public function __construct(WriterInterface $writer){
$this->writer = $writer;
}
public function log($level, $message, array $context... | true |
0078220bf6cccd1eff3dbe5cc76ad1838af801db | PHP | userzhangjinlong/laravel-practice | /app/Utils/MqUtils.php | UTF-8 | 7,222 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Utils;
use AMQPChannel;
use AMQPConnection;
use AMQPExchange;
use AMQPQueue;
use App\Model\MysqlModel\MqPracticeModel;
use PhpAmqpLib\Connection\AMQPStreamConnection;
use PhpAmqpLib\Message\AMQPMessage;
class MqUtils
{
/**
* @var AMQPStreamConnection
*/
private $mqConnect;
... | true |
07c678bae5b401979135d51a31cb16c8b7b92cbf | PHP | bcbhuva/admin-panel-Laravel-and-Angular | /app/Models/Message.php | UTF-8 | 432 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class Message
*/
class Message extends Model
{
protected $table = 'messages';
protected $primaryKey = 'indexer';
public $timestamps = false;
protected $fillable = [
'from_username',
'subject',
'message... | true |
3f4d76b9f3fad83f8323b3d876535ba19d8d1c07 | PHP | Becklyn/JavaScriptContext | /src/Context/JavaScriptContext.php | UTF-8 | 1,637 | 3.0625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php declare(strict_types=1);
namespace Becklyn\JavaScriptContext\Context;
use Becklyn\JavaScriptContext\Exception\ContextSealedException;
use Becklyn\JavaScriptContext\Provider\ContextProviderInterface;
class JavaScriptContext
{
/**
* @var array
*/
private $data;
/**
* @var bool
*... | true |
059d6e4f5195d8f00d13df1331f22701f3f1042c | PHP | kodify/TranscoderBundle | /Service/Transcoder.php | UTF-8 | 1,292 | 2.5625 | 3 | [] | no_license | <?php
namespace Kodify\TranscoderBundle\Service;
use Symfony\Component\Config\Definition\Exception\InvalidConfigurationException;
use Doctrine\DBAL\Driver;
use Kodify\TranscoderBundle\Service\Driver\DriverInterface;
class Transcoder
{
protected $driver;
const DRIVER_BASEPATH = 'Kodify\TranscoderBundle\Servic... | true |
6342718d3176317ef06c6da4f8df6594fd551ea8 | PHP | haa1010/web-programming-e-commerce | /application/views/product/view.php | UTF-8 | 9,388 | 2.515625 | 3 | [] | no_license | <head>
<link rel="stylesheet" href="<?php
use function PHPSTORM_META\type;
echo PATH_URL_STYLE . 'product.css' ?>">
</head>
<?php
json_encode($product);
$highlight_img = 1;
if (isset($_GET['highlight'])) {
$highlight_img = $_GET['highl... | true |
041025bad3953ec830833a98a8d8767b0fbefd0b | PHP | UserScape/semver | /Tests/CleanCopyVersionTest.php | UTF-8 | 1,059 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* CleanCopyVersionTest.php
*
* @category Naneau
* @package SemVer
*/
use Naneau\SemVer\Parser;
use \PHPUnit_Framework_TestCase as TestCase;
/**
* CleanCopyVersionTest
*
* Testing Version::cleanCopy()
*
* @category Naneau
* @package SemVer
*/
class CleanCopyVersionT... | true |
00d1713fb520168a446ab66e24531d653a0626d9 | PHP | BoringFree/BoringFreeAPI | /test/BoredFile.class.php | UTF-8 | 1,947 | 2.796875 | 3 | [] | no_license | <?php
define ('BF_TYPE_PERSON','person');
define ('BF_TYPE_EVENT','event');
define ('BF_TYPE_MSG','message');
define ('BF_TYPE_LOC','location');
define ('BF_EXT','.json');
class BoredFile {
public $id;
public $type;
protected $file;
// function to set Object Type
public function isPerson() {
$this->type = ... | true |
ce3c118ef5f66d7a47dec9787655be45b7fd5aba | PHP | Challenge-Uenoyama/highschool_searcher | /inc/error_check.php | UTF-8 | 963 | 3.15625 | 3 | [] | no_license | <?php
if(empty($_POST['title'])) {
echo "タイトルは必須です。";
exit;
}
if(!preg_match('/\A[[:^cntrl:]]{1,200}\z/u',$_POST['title'])) {
echo "タイトルは200文字までです。";
exit;
}
if(!preg_match('/\A\d{0,13}\z/', $_POST['isbn'])) {
echo "ISBN は数字13桁までです。";
exit;
}
if(!preg_match('/\A\d{0,6}\z/u', $_POST['price'])) {
... | true |
07a1db05fe188801c5c3e7eb43c8aefcd0771069 | PHP | pjordaan/PHP_CodeSniffer | /src/Standards/Hostnet/Sniffs/Commenting/AuthorIsFormattedCorrectlySniff.php | UTF-8 | 1,032 | 2.625 | 3 | [] | no_license | <?php
class Hostnet_Sniffs_Commenting_AuthorIsFormattedCorrectlySniff implements PHP_CodeSniffer_Sniff
{
public function register()
{
// TODO: Auto-generated method stub
return PHP_CodeSniffer_Tokens::$commentTokens;
}
public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr)
{
$toke... | true |
dc6df71ca2620749ef01ff8a717a8fa8ef0585a4 | PHP | sahilp7/DS_Project_MSIS20 | /app/public/api/members/member_insert.php | UTF-8 | 925 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
require 'common.php';
// Step 1: Get a datase connection from our helper class
$db = DbConnection::getConnection();
// Step 2: Create & run the query
$stmt = $db->prepare(
'INSERT INTO members (first_name,last_name,is_active,gender,date_of_birth,mobile_number,work_number,street_address,city,state,zip_code,emai... | true |
58fd318aa849554c5209895dd6123700197094b4 | PHP | vitkutny/piglatin | /src/PigLatin/Translator.php | UTF-8 | 380 | 2.953125 | 3 | [] | no_license | <?php
namespace VitKutny\PigLatin;
use VitKutny\PigLatin;
final class Translator {
public function translate($string) {
$words = [];
preg_match_all('/[a-zA-Z]+/', $string, $words);
foreach ($words[0] as $word) {
$string = preg_replace('/' . $word . '/', new PigLatin\Word($wor... | true |
918d7703f9736a01faaae18d2c36a44c5f1cf967 | PHP | sobiemir/otter | /src/Routes/RouteCollector.php | UTF-8 | 2,005 | 2.6875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Otter\Routes;
use FastRoute\RouteCollector as FRRouteCollector;
use FastRoute\RouteParser;
use Otter\DataGenerator\DataGeneratorInterface;
class RouteCollector extends FRRouteCollector
{
/** @var DataGeneratorInterface */
protected $dataGenerator;
public function __construct(RouteParser ... | true |
8488bdbac8850f48ad26e755e5d2e9ead4afb98a | PHP | waynebaylor/reggie | /src/public_html/action/ValidatorAction.php | UTF-8 | 830 | 3.015625 | 3 | [] | no_license | <?php
/**
* Action for when a page needs to be validated.
* @author wtaylor
*
*/
abstract class action_ValidatorAction extends action_BaseAction
{
function __construct() {
parent::__construct();
}
/**
* Perform the validation. If fieldNames is non-empty, then only the fields
* specified will be validat... | true |
b5a7fbbae9250d72ac0f0ea90bb1993a3e63d351 | PHP | andrixh/BeniCMS | /Classes/Component.php | UTF-8 | 2,107 | 2.59375 | 3 | [] | no_license | <?php
class Component
{
protected $type;
protected $custom = false;
public $content;
protected $context;
public function __construct($componentID = null, $context=[]) {
$classNameParts = explode('\\',get_called_class());
$this->type = array_pop($classNameParts);
$this->con... | true |
81bd3768649fe52712e052fee267e67b20e4720d | PHP | Daivir/Framework | /src/Virton/Actions/CrudAction.php | UTF-8 | 6,000 | 2.703125 | 3 | [] | no_license | <?php
namespace Virton\Actions;
use Virton\Database\Hydrator;
use Virton\Database\Table;
use Virton\Renderer\RendererInterface;
use Virton\Router;
use Virton\Session\FlashHandler;
use Virton\Validator;
use Psr\Http\Message\RequestInterface as Request;
use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\Server... | true |
d140d87d5f8d5f365a638da22bf68bea842f9331 | PHP | cgaxtr/Melomania | /modelo/mensaje.php | UTF-8 | 982 | 3.140625 | 3 | [] | no_license | <?php
class Mensaje{
private $id;
private $usuOrigen;
private $usuDestino;
private $grupo;
private $titulo;
private $texto;
private $leido;
public function __construct($id, $usuOrigen, $usuDestino, $grupo, $titulo, $texto, $leido){
$this->id = $id;
$this->usuOrigen = $usuO... | true |
185328d33dbab7fa739279c55947b75ff57d4d83 | PHP | lukasic/ansible-role-ispconfig | /files/ispconfig/custom.inc.php | UTF-8 | 1,154 | 2.546875 | 3 | [
"WTFPL"
] | permissive | <?php
class remoting_custom extends remoting {
public function sites_database_user_get_id_by_name($session_id, $username)
{
global $app;
$app->uses('remoting_lib');
# todo: fix sql injection
$sql = "select database_user_id from web_database_user where database_user = '$username'";
$records = $app->db->q... | true |
afb677d25f2e456f411147783a602a2862addfef | PHP | new-inventor/transformers | /src/Transformer/DateTimeToString.php | UTF-8 | 865 | 2.828125 | 3 | [] | no_license | <?php
/**
* Project: TP messaging service
* User: george
* Date: 29.08.17
*/
namespace NewInventor\Transformers\Transformer;
use NewInventor\Transformers\Transformer;
use NewInventor\TypeChecker\TypeChecker;
class DateTimeToString extends Transformer
{
/**
* @var string
*/
private $format;
... | true |
a1a6692cb5675234ec33a6f97cba5df260e446fe | PHP | CLSA/php_util | /util.class.php | UTF-8 | 8,250 | 2.78125 | 3 | [] | no_license | <?php
class util
{
// -+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-
private final function __construct(){}
// -+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-+#+-
public static function initialize()
{
ini_set( 'display_errors', '1' );
error_reporting(... | true |
f7158187de73c3037b5342a7ead853d422dcd586 | PHP | Mydong/onenice | /vendor/xenice/wp-framework/model/ArticleModel.php | UTF-8 | 2,434 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* @name Xenice Article Model
* @author xenice <xenice@qq.com>
* @version 1.0.0 2019-10-13
* @link http://www.xenice.com/
* @package xenice
*/
namespace xenice\model;
use xenice\theme\Theme;
class ArticleModel extends Model
{
public $query;
public $pages;
public... | true |
664005fa2fa7b686ef8ddf206d2cb5bafe27b7f4 | PHP | juankamiloc93/gestor-inventarios | /console/migrations/m191220_210423_create_tables.php | UTF-8 | 1,470 | 2.609375 | 3 | [] | permissive | <?php
use yii\db\Migration;
/**
* Class m191220_210423_create_tables
*/
class m191220_210423_create_tables extends Migration
{
/**
* {@inheritdoc}
*/
public function safeUp()
{
$this->createTable('categoria', [
'id_categoria' => $this->primaryKey(),
'nombre' => ... | true |
7df3043b3793bc17b2096163274e780172147359 | PHP | service-boiler/prf | /Site/Http/Controllers/ParticipantController.php | UTF-8 | 902 | 2.53125 | 3 | [
"Unlicense"
] | permissive | <?php
namespace ServiceBoiler\Prf\Site\Http\Controllers;
use Illuminate\Routing\Controller;
use ServiceBoiler\Prf\Site\Models\Country;
use ServiceBoiler\Prf\Site\Repositories\ParticipantRepository;
class ParticipantController extends Controller
{
/**
* @var ParticipantRepository
*/
private $partici... | true |
d8c8801367025c9db6b5e041ba247b6cf05f4c3f | PHP | mariano/email | /email_app_model.php | UTF-8 | 2,199 | 3 | 3 | [] | no_license | <?php
class EmailAppModel extends AppModel {
/**
* Behaviors
*
* @var array
*/
public $actsAs = array('Containable');
/**
* Validates that at least one of the given fields is not empty
*
* @param array $value Array in the form of $field => $value
* @param array $fields List of fields where to check
... | true |
b2ef5f848e64542bafc6fcf1c35852ddfbbab363 | PHP | guymers/bugfree-dangerzone | /src/main/bugfree/annotation/Docblock.php | UTF-8 | 5,295 | 3.046875 | 3 | [] | no_license | <?php
namespace bugfree\annotation;
use Doctrine\Common\Annotations\DocLexer;
/**
* Use Doctrine annotation lexer to work out type information. We don't really care about anything other then
* the types at this point.
*
* Note that this will generate a lot of false positives so failing to resolve a type here pro... | true |
ef279a9eeda9b20d43664c8f7732d70bc9e70f26 | PHP | fatihg80/odooApiXmlRpc | /api/CustomerController.php | UTF-8 | 2,120 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: ANICET ERIC KOUAME
* Date: 09/12/2017
* Time: 04:33
*/
require_once $_SERVER['DOCUMENT_ROOT'].'/odooApiXmlRpc/helpers/ripcord.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/odooApiXmlRpc/manager/CustomerManager.php';
require_once $_SERVER['DOCUMENT_ROOT'].'/odooApiXmlRp... | true |
aeee649773679b34ab309f3efb18110cf6768b1e | PHP | bjdore12/cis355 | /As05/m_create.php | UTF-8 | 5,671 | 2.921875 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION["employee_id"])) { // if "user" not set,
session_destroy();
header('Location: login.php'); // go to login page
exit;
}
$sessionID = $_SESSION['employee_id'];
require 'database.php';
if ( !empty($_POST)) {
// keep track validation errors
$hostError =... | true |
315d61b733b51a2fcedd3a8f751eee361b5e0514 | PHP | aarti21bhardwaj/cb | /src/Controller/EventsController.php | UTF-8 | 4,641 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Controller;
use App\Controller\AppController;
/**
* Events Controller
*
* @property \App\Model\Table\EventsTable $Events
*
* @method \App\Model\Entity\Event[]|\Cake\Datasource\ResultSetInterface paginate($object = null, array $settings = [])
*/
class EventsController extends AppController
{
... | true |
e80b17775542b92ac57f90d79caea9f27850804c | PHP | zuiyangqingzhou/hdcms | /database/seeds/EduTagSeeder.php | UTF-8 | 428 | 2.578125 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class EduTagSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$data = [
['name' => 'PHP'],
['name' => 'Laravel'],
['name' => 'HDCMS'],
];
fo... | true |
a7e437ccc50044c79d042d8de381f92e7dd320a5 | PHP | bkkalana/emp-backend | /app/Http/Controllers/CityController.php | UTF-8 | 4,586 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\City;
use App\State;
use Illuminate\Http\Request;
class CityController extends Controller
{
/**
* Display a listing of the cities.
*
* @return Response
*/
public function index()
{
$cities = City::join('states', 'states.id', '=', ... | true |
9e8cd699a15cc414033970be68ce84ba0ccc8b9a | PHP | skycrazyk/labx | /build/action.php | UTF-8 | 1,512 | 2.546875 | 3 | [] | no_license | <?php
error_reporting(0);
$subject = 'Заказ с сайта Livelab.pro'; // Тема письма
$email_from = 'support@livelab.pro'; // От кого - Мыло
$from_name = 'Сайт Livelab.pro'; // От кого - Имя отправителя
$email_to = 'support@livelab.pro'; // От кого - Мыл... | true |
47be62cd04050fb77b195af8d3f02805ee6e8ab3 | PHP | ankithbala/forum | /May10/app/src/main/assets/edu/eu7.php | UTF-8 | 1,683 | 2.703125 | 3 | [] | no_license | <?php
include "conn2.php";
$sql="SELECT Id,Name,Email,Query FROM forumtable";
$tab_menu = '';
$result = $conn->query($sql);
if ($result->num_rows > 0) {
// output data of each row
while($row = $result->fetch_assoc()) {
// echo "id: " . $row["id"]. " - Name: " . $row["firstname"]. " " . $row["la... | true |
b1cc6e0c537b3c3085a4e8bf5e1d9b02a21f4f68 | PHP | ruderude/pronami_php | /staff_edit_check.php | UTF-8 | 1,763 | 2.953125 | 3 | [] | no_license | <?php
// var_dump($_POST);
$staff_code = trim($_POST["code"]);
$staff_name = trim($_POST["name"]);
// $staff_pass1 = trim($_POST["pass1"]);
// $staff_pass2 = trim($_POST["pass2"]);
$staff_code = htmlspecialchars($staff_code, ENT_QUOTES, 'UTF-8');
$staff_name = htmlspecialchars($staff_name, ... | true |
394d7eaa28a28ba884a6d9b6cd8c6b16f75b1cdb | PHP | OndrejSlamecka/LogWatcher | /app/models/PlaintextLogProcessor.php | UTF-8 | 1,607 | 2.84375 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
/**
* LogWatcher
*
* @link https://github.com/OndrejSlamecka/LogWatcher
* @copyright (c) 2012 Ondrej Slamecka (http://www.slamecka.cz)
*
* License can be found in license.txt file located in the root folder.
*/
use Nette\Utils\Strings;
class PlaintextLogProcessor extends Nette\Object
{
/**
* En... | true |
66e75b343e6ba4a4b4799964aedbb6418f2ab161 | PHP | angeliquerudd/20160512frontend | /app/Models/Hello.php | UTF-8 | 257 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
#File: app/models/Hello.php
namespace Furbook\Models;
class Hello {
public static function message($one = 'default1', $two = 'default2') {
echo "First Param: $one", "\n<br>\n";
echo "Second Param: $two", "\n<br>\n";
echo "\n<br>\n";
}
}
| true |
6a50016238937d9d1d35f8b4cf366f1aa01b7dce | PHP | wf3team-tshirt/web-symfony | /src/Service/TranslateService.php | UTF-8 | 3,023 | 2.9375 | 3 | [] | no_license | <?php
namespace App\Service;
use Doctrine\Common\Persistence\ObjectManager;
class TranslateService {
public function __construct () {}
// NO TIME for translate !!! (To convert in arrays)
// Translate English to French to display
public function translateXXtoYY( $wordXX ) {
$wordYY = '';
... | true |
f73884b3cfa0dc82461504952c019df163befd28 | PHP | Kirillvlom/myuniver | /app/controllers/controller_signin.php | UTF-8 | 719 | 2.515625 | 3 | [] | no_license | <?
class Controller_signin extends Controller
{
function __construct()
{
$this -> model = new Model_signin();
$this -> view = new View();
}
function action_index()
{
if ($_SESSION['user']) {
header("location: /my");
}
$this -> view -> generate('signin_view.php', 'template_view.php','Авторизация',[0... | true |
50c37389e133c4bf8a2a6aafceabc829648d59bf | PHP | vimeo/psalm | /tests/NamespaceTest.php | UTF-8 | 3,424 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Psalm\Tests;
use Psalm\Tests\Traits\InvalidCodeAnalysisTestTrait;
use Psalm\Tests\Traits\ValidCodeAnalysisTestTrait;
class NamespaceTest extends TestCase
{
use ValidCodeAnalysisTestTrait;
use InvalidCodeAnalysisTestTrait;
public function providerValidCodeParse(): iterable
{
r... | true |
754ad1c6c26baba43ddd98e48bc5a0fb77ae8ca4 | PHP | sintret/yii2-basic-easy | /components/SintretUrlManager.php | UTF-8 | 1,034 | 2.71875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\components;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
use yii\web\UrlManager;
class SintretUrlManager extends UrlManager {
public function createUrl... | true |
3f61d340d4761f38fc30110497bcb95f7cf71b89 | PHP | Reexon/WP-Client-Management | /endpoint/check_permission.php | UTF-8 | 1,384 | 2.53125 | 3 | [] | no_license | <?php
$plugin_dir = dirname(dirname(__FILE__));
include_once $plugin_dir.'/includes/inc.php';
$parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
require_once( $parse_uri[0] . 'wp-load.php' );
global $wpdb;
$table_column = array ('active','url','article','media','pages','comments','portfolio',
... | true |
7e13d1dea953226b212425eedebd7f7343f5e8ca | PHP | riha112/NotusCoreWEB | /Notus/modules/mail/Mail.php | UTF-8 | 332 | 2.671875 | 3 | [] | no_license | <?php
namespace Notus\Modules\Mail;
class Mail
{
public static function mail($to, $subject, $message) : void {
$headers = array(
'From: webmaster@example.com',
'Reply-To: webmaster@example.com',
'X-Mailer: PHP/' . phpversion()
);
mail($to, $subject, $mes... | true |
b4daf24b4dea11609e599d09b72567e50aa54a49 | PHP | nikvkov/diploma | /app/Http/Controllers/SubscribeController.php | UTF-8 | 3,049 | 2.890625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\PersonData;
use Auth;
use Illuminate\Http\Request;
use App\Subscriber;
use Log;
use Mockery\Exception;
class SubscribeController extends MainController
{
//получение все email подписчиков
public function getAllEmails(){
$subscriber = new Subscriber();
... | true |
086f330993dc8859e8af17542427a3c91d630cf1 | PHP | aleafs/aleafs-lab | /lib52/class/debug/coverage.php | UTF-8 | 1,874 | 2.515625 | 3 | [] | no_license | <?php
/* vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker: */
// +--------------------------------------------------------------------+
// | 代码覆盖率类 |
// +--------------------------------------------------------------------+
// | Copyright (c) 2010 Aleafs.com. All Rights Reserved |
// +... | true |
f15819ef4545e4d88ddb9edbb34290436debf83d | PHP | Ikesambo/Covid_19_screening | /database/fetchData.php | UTF-8 | 369 | 2.65625 | 3 | [] | no_license | <?php
class fetchData{
function fecthDataFun($conn,$tableName,$userCode){
$query="select * From $tableName where userCode = '$userCode'";
$results=mysqli_query($conn,$query);
if($results){
return $results;
}
else{
echo"Something Went wrong in f... | true |
79b7e7eeaed2ec85cb04532f9ee75a663d1d5a8e | PHP | eya93/MEMBER_AREA | /form_signup.php | UTF-8 | 11,721 | 3.25 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Eya'sPC
* Date: 17/08/2018
* Time: 14:55
*/
//*********validation des inputs et ajouter le nv utilisateur à la BD********************************
require_once 'functions.php';
if (isset($_SESSION['member_id'])) {
header ( 'Location: home.php');
exit();
}
// define ... | true |
2a38c9bd1d76b799ac2b8801aacb71872198477e | PHP | markino79/studioamf | /Controllers/Image.php | UTF-8 | 2,181 | 2.546875 | 3 | [] | no_license | <?php
namespace Controllers;
use Amf\Application;
/**
* @default_action view
*/
class Image {
/**
* @action
*/
public function view($filename, $w=0, $h=0) {
$request = Application::get('request');
$response = Application::get('response');
$_cacheImages = Application::$basedir.'/var/cache/images/';
if... | true |
174eb834dc6b81fd591dd3f14fcb60c1db4a8dfe | PHP | gzeinnumer/mastering-codeigniter | /application/controllers/Web.php | UTF-8 | 2,187 | 2.921875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
//todo 4
//buat file baru
class Web extends CI_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -... | true |
83f17845a6dc7a96545e6d64971092c8ad1ab43d | PHP | jakflo/users | /app/model/users_tab_manager.php | UTF-8 | 1,896 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Model;
use app\entities\DBwrap;
use Nette\Security\Passwords;
use app\entities\users_list_ent_fact;
use App\Model\mask_email_address;
class users_tab_manager {
protected $DBwrap;
protected $data;
public function __construct($data) {
$this->data = $data;
$this->DB... | true |
bc555e65efcd2ba916aba7ca1c9835a973d82802 | PHP | vannatter/armorylite.com | /app/models/item_stats.php | UTF-8 | 1,135 | 2.578125 | 3 | [] | no_license | <?
class ItemStats extends AppModel {
var $name = 'ItemStats';
var $useTable = 'item_stats';
var $useDbConfig = 'default';
var $primaryKey = 'id';
function getItemStat($item_id) {
$i = $this->find('first', array('conditions' => array('ItemStats.item_id' => $item_id)));
r... | true |
e68a6c2c6b839e286ec09d1263e39106c0b0651f | PHP | infection/infection | /tests/phpunit/Console/OutputFormatter/FormatterFactoryTest.php | UTF-8 | 3,859 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* This code is licensed under the BSD 3-Clause License.
*
* Copyright (c) 2017, Maks Rafalko
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code... | true |
d582a3c99f165b4b1c4ad22edf9c73a62151f064 | PHP | mrfoh/projectstitches | /app/Models/Image.php | UTF-8 | 461 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
class Image extends Model{
use SoftDeletes;
protected $fillable = ['user_id','path','mime','size'];
/**
* Get all of the owning imageable models.
*/
public function imageable(... | true |
8a532e01871a8c48551a4fcd41cb28737131d52a | PHP | LucSmeulders/repository | /php/index003.php | UTF-8 | 2,577 | 2.578125 | 3 | [] | no_license | <?php
ini_set('display_error', 5);
error_reporting(E_ALL);
$name1[1] = "Dimphy Vogtschmidt";
$name1[2] = "Erden Ozyalcin";
$name1[3] = "Dorien Huishagen";
$name1[4] = "Frederik Wiame";
$name1[5] = "laurents Bijlhout";
$name1[6] = "Luc Smeulders";
$name1[7] = "Mathias Zabot";
$name1[8] = "Tim Rodeyns... | true |
167e2fc324f9b008e4f04bcf008f458934dd9611 | PHP | mangesh1409/PHP-Tuts | /023_MysqlConnectPHP.php | UTF-8 | 562 | 3.046875 | 3 | [] | no_license | <?php
echo "<h2> MySQL and PHP Connectivity </h2>";
/* Ways to connect MySQL Database
1. MySQLi extension (only for MySQL) (Procedural and Object Orientation)
2. PDO (use for all database) */
// Connecting to database
$severname="localhost";
$username="root";
$password="";
// Create Connection
$con=my... | true |
a7bb93cbf91c670ce9e0e46829306ed486d53782 | PHP | baagas0/buku-induk | /app/Imports/PrestasiImport.php | UTF-8 | 1,016 | 2.578125 | 3 | [] | no_license | <?php
namespace App\Imports;
use App\Kegiatan;
use App\Prestasi;
use App\Student;
use Illuminate\Support\Collection;
use Maatwebsite\Excel\Concerns\ToCollection;
use Maatwebsite\Excel\Concerns\WithHeadingRow;
class PrestasiImport implements ToCollection, WithHeadingRow
{
/**
* @param Collection $collection
... | true |
8fcc4f2b92ddd4a4db30c2d40a43fc084de06877 | PHP | ercet/api_base | /app/Events/Event.php | UTF-8 | 1,075 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Events;
use Illuminate;
class Event
{
use Illuminate\Queue\SerializesModels;
/**
* the private variables
*/
private $request;
private $results;
private $entity;
private $exception;
/**
* @return mixed
*/
public function getEntity()
{
... | true |
42a39eb5aa5fa39ad5d686538946bc909048ae6f | PHP | agred/douyin | /src/functions.php | UTF-8 | 3,872 | 2.515625 | 3 | [] | no_license | <?php
namespace ByteDance;
if (!function_exists('is_bytelocale')) {
/**
* @title 是否抖音客户端
* @return bool
*/
function is_bytelocale()
{
return strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'bytelocale') !== false;
}
}
if (!function_exists('is_iphone')) {
/**
* @title 是... | true |
0ba587ad5ceec3ee13a52a810931bea69a919150 | PHP | jrltt/PHPM07 | /POO/base.php | UTF-8 | 1,925 | 3.15625 | 3 | [] | no_license | <?php
require_once('persona.php');
class Base
{
//statico, por muchas conexiones que hagamos, siempre sera la misma
protected static $conexion;
/*
* metodo para conectar a la BBDD
* @return la conexion con el la bbdd
*/
public static function conectar()
{
if ( self::$conexion == null ) { //co... | true |
1900d75d8ed03ca1febf950b6e2edb22e63e0e7d | PHP | AlainNiessen/POO | /POO - EXCEPTION/operation.php | UTF-8 | 785 | 3.5625 | 4 | [] | no_license | <?php
namespace CalculOperation;
abstract class Operation {
//DECLARATION ATTRIBUTS NOMBRE1 + NOMBRE2 EN PRIVATE
private $nombre1;
private $nombre2;
//CONSTRUCTOR
public function __construct ($nombre1, $nombre2) {
$this -> nombre1 = $nombre1;
$this -> nombre2 = $nombre2;
}
... | true |
4277643b483b00d3ac0d6a22883515fb1a6e4158 | PHP | KingOfBone/fire_protection | /Auto_System/auto_select_kolom_from_informationschema.php | UTF-8 | 3,111 | 2.703125 | 3 | [] | no_license |
<title>Cari Kolom</title>
<form method='post' action=''>
<table>
<tr>
<td>Database</td>
<td>:</td>
<td>
<select onChange='cari_table(this.value)' name='nama_database'>
<option value='kosong'> --- </option>
<option value='apar'>Apar</option>
<option value='fire_protection'>Fire Protectio... | true |
08d73ee5e777b0d8df85021f0b59df00d6aae131 | PHP | programster/package-docker-compose | /src/LoggingConfiguration.php | UTF-8 | 1,026 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
namespace Programster\DockerCompose;
class LoggingConfiguration implements \JsonSerializable, InterfaceArrayable
{
private... | true |
aa4ffd216a1e82c54bb34803ad8c235f4d0b4bdd | PHP | Mirovinger/Noted | /upload/library/XenDevelop/Noted/DataWriter/Note.php | UTF-8 | 2,334 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
class XenDevelop_Noted_DataWriter_Note extends XenForo_DataWriter
{
/**
* Gets the fields that are defined for the table. See parent for explanation.
*
* @return array
*/
protected function _getFields()
{
return array(
'xf_user_notes' => array(
... | true |
70faa07ee7823bd6b73fdae8e7ec2ca72d0f9b44 | PHP | rsolidum/ramlis-laravel-sample-app | /app/models/Micropost.php | UTF-8 | 1,184 | 2.8125 | 3 | [] | no_license | <?php
use LaravelBook\Ardent\Ardent;
class Micropost extends Ardent {
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'microposts';
/**
* Properties that can be mass assigned
*
* @var array
*/
protected $fillable = array('body, user_id');
public functio... | true |
913f48c0180ecc5f76bd013c36f908ef7c9a6391 | PHP | gitter-badger/oauth2-server-library | /tests/Stub/RefreshTokenManager.php | UTF-8 | 3,740 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2015 Spomky-Labs
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace OAuth2\Test\Stub;
use OAuth2\Client\ClientInterface;
use OAuth2\Configuration\ConfigurationInterface;... | true |
29f3bf3626970ab802cee95c9505eff35fb5b7b2 | PHP | Roko2/WPSP | /LV1_WPSP_Zadatak9.php | UTF-8 | 573 | 2.765625 | 3 | [] | no_license | <?php
function Ispis($redak,$stupac,$polje){
global $matrica;
for($i=0;$i<$redak;$i++){
for($j=0;$j<$stupac;$j++){
$matrica[$i][$j]=0;
}
}
for($a=0;$a<4;$a++){
$rdk=$polje[$a][0];
$stpc=$polje[$a][1];
$broj=$polje[$a][2];
$matrica[$rdk][$stpc]=$broj;
}
for($i=0;$i<$re... | true |
a7f5e2619c14727af5e196c624e3ccb410a25fa6 | PHP | BOUCHRA-ui/shifumi | /shifumi.php | UTF-8 | 1,492 | 2.953125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Shifumi</title>
</head>
<body>
<h1>Jeu du Shifumi</h1>
<form action="" method="post">
<?php
//var_dump($_POST); voit la valeur quapere avoir fait... | true |
f096b7e4a28aeb60e35999c8668706b487201efb | PHP | eaglecrazy/PHP | /server/authorisation.php | UTF-8 | 941 | 2.625 | 3 | [] | no_license | <?php
require_once('db-config.php');
if (isset($_POST)) {
if (isset($_POST['login']) && $_POST['login'] != '') {
$login = strip_tags($_POST['login']);
} else {
die('Вы ввели некорректный логин.');
}
if (isset($_POST['password']) && $_POST['password'] != '') {
$password = strip_ta... | true |
da23711fad83c0dbf1df730d0975d02dec1eab45 | PHP | legiris/php-mvc | /app/controllers/BaseController.php | UTF-8 | 600 | 2.53125 | 3 | [] | no_license | <?php
class BaseController
{
protected $data = [];
protected $view = 'test';
protected $header = [
'title' => '',
'keywords' => '',
'description' => '',
];
function handleParams($parameters)
{
}
public function render()
{
... | true |
8f5b39cd452b12ac8a72ab2810cc472b011a5231 | PHP | pedrohsxavier/pwebI-4th-semester | /Aula 2018-10-22 Sistema/Sistema/Classes/Traits/Logger.php | UTF-8 | 127 | 2.765625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Traits;
trait Logger{
public function exibeMensagem(String $msg){
echo "<br> $msg<br>";
}
} | true |
ea0c635251b837ea89a3d0b2f1e7aba99b0ca45b | PHP | mwpodgorni/simplephpwebsite-Secure_Programming | /sepr_webapp/pages/xhr.php | UTF-8 | 3,233 | 2.578125 | 3 | [] | no_license | <?php
include "../includes/server.php";
include "../includes/notify.php";
include_once "../objects/notificationtypes.php";
// delete account
if (isset($_POST['userId']))
{
$conn = OpenConnection();
$query = "DELETE from users WHERE id = ?";
$stmt = $conn->prepare(... | true |
496d5bea44e28afb23b09c0f4ac2a6051811ae9d | PHP | Animaxx/TF-PHP | /TFCore/lib/TFModel.php | UTF-8 | 6,746 | 2.8125 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* The data model base
*
* @author Animax
*/
class TFModel {
/**
* Databse access
* @var IDBAccess
*/
protected $db;
private $table_name;
private $need_table_tag = TRUE;
protected function get_tableName(){
if ($this->need_table_tag)
return "`$this->table_name`";
else
... | true |
b415559557a069b8d4477cce072ec4b519baacfd | PHP | asdbaihu/crawl-anywhere | /web/search/src/pub/getdropbox.php | UTF-8 | 3,822 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
$rootpath = dirname(__FILE__);
require_once("../init.inc.php");
/*
* Login ?
*/
$login = ($config->getDefault("login", "0")=="1");
if ($login && $user->getName()=="")
{
$login_page = $config->getDefault("login.page", "");
if (!empty($login_page)) {
//ob_clean();
header("Status: 301 Moved Permanently", fa... | true |
925909bc32d84c0e00365671772fd1bfa43bce36 | PHP | Romydev/p4_blog | /controllers/controleurAdmin.php | UTF-8 | 794 | 2.640625 | 3 | [] | no_license | <?php
require_once 'model/Billet.php';
require_once 'model/Commentaire.php';
require_once 'views/Vue.php';
class ControleurAdmin {
private $billet;
private $commentaire;
public function __construct() {
$this->billet = new Billet();
$this->commentaire = new Commentaire();
}
// Affiche les articl... | true |
6e5e317d62ea59384f3a89e00085064a88309e0d | PHP | odecharette/Becowo | /src/Becowo/MemberBundle/Repository/MemberRepository.php | UTF-8 | 3,482 | 2.578125 | 3 | [] | no_license | <?php
namespace Becowo\MemberBundle\Repository;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Query\ResultSetMapping;
class MemberRepository extends EntityRepository
{
public function findNewMembers($nb)
{
// Récupère uniquement les derniers inscrits actifs, non supprimés limité à $nb résultats
$qb = $th... | true |
d0e3140307431d7851de3d6dcc7960c71c0bad47 | PHP | pimpmypixel/confirmit-authoring | /src/StructType/ExportSurveyWithHTMLRemovedResponse.php | UTF-8 | 2,545 | 2.65625 | 3 | [] | no_license | <?php
namespace Confirmit\Authoring\StructType;
use \WsdlToPhp\PackageBase\AbstractStructBase;
/**
* This class stands for ExportSurveyWithHTMLRemovedResponse StructType
* @subpackage Structs
*/
class ExportSurveyWithHTMLRemovedResponse extends AbstractStructBase
{
/**
* The ExportSurveyWithHTMLRemovedRe... | true |
d6074466834af4e53e11166546f0422154ac36d6 | PHP | PatriNavarro/WebApp-GraceAge | /application/libraries/AccountViewModel.php | UTF-8 | 1,943 | 2.609375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: kymeng
* Date: 07/11/2017
* Time: 20:21
*/
date_default_timezone_set('UTC');
class AccountViewModel {
public function createViewModel($row) {
$temp = array(
'id' => $row->id,
'username' => $row->username,
'display_name' => $... | true |
02b19b1f01176e19270a748763c6deb6cabb87b8 | PHP | jobsonjose/TECLOG_Hackthon | /php/usuario/edite.php | UTF-8 | 909 | 2.625 | 3 | [] | no_license | <?php
include '../../Bd/conexao.php';
$id = $_GET['id'];
$_SESSION['edite'] = $id;
$strm = $pdo->query("SELECT * FROM users WHERE id = '$id'");
$result = $strm->fetchAll();
$nome = $result[0]['name'];
$password = $result[0]['password'];
$username = $result[0]['username'];
$register = $result[0]['register']... | true |