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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
d7b0d9d62ef06dc57b1093c04ed80f016240276b | PHP | montayrekj/monitoring | /app/Models/Attendance.php | UTF-8 | 4,027 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
/**
* @property int $id
* @property int $studentId
* @property int $scheduleId
* @property string $date
* @property string $timeIn
* @property int $timeInRemarks
* @property string $timeOut
* @property int ... | true |
5ebddcd14d2161a2ca7d4701653a25683528b9f3 | PHP | imsol/caviteundiscoveredplaces.github.io | /CURS/accountmodule/register.php | UTF-8 | 4,168 | 2.71875 | 3 | [] | no_license | <?php require_once 'dbcon.php';?>
<?php
//if form submitted, insert values into the database
if(isset($_REQUEST['Submit2']))
{
$password=$_POST['password'];
$confirmpassword=$_POST['confirmpassword'];
//removes backslashes
if ($password == $confirmpassword) {
$image=$_FILES['image']['name'];
$fname... | true |
14b267270f0148de23e684a3798f78f4db93ab8a | PHP | sherafatinia/laravel-ddd-2 | /app/Domains/Users/Models/Traits/UserRelationship.php | UTF-8 | 1,140 | 2.546875 | 3 | [] | no_license | <?php
namespace App\Domains\Users\Models\Traits;
use App\Units\Auth\Login;
use App\Domains\Users\Models\Role;
use App\Domains\Companies\Models\Company;
use App\Domains\Suppliers\Models\Supplier;
trait UserRelationship
{
/**
* Belongs-to relations with Login.
*
* @return \Illuminate\Database\Eloque... | true |
6fb4b1438ab33fa5e5fdb20c0af65a86aa0b57de | PHP | tianyagit/PhpStudy | /05-laravel/13-数据表迁移与填充*.php | UTF-8 | 2,016 | 2.984375 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
* 需要创建试卷的数据表,假设数据表的名字叫做paper。迁移文件名:create_paper_table
* $ php artisan make:migration create_paper_table
* 如果在当前的项目中第一次执行迁移文件,则需要先去执行:
* $ php artisan migrate:install
* up方法执行
... | true |
3b3d0b1b10dd30505c9749b61adb7af703314fba | PHP | zarasyversen/PHP-Project | /Controller/Register.php | UTF-8 | 2,104 | 2.828125 | 3 | [] | no_license | <?php
namespace Controller;
use Repository\UserRepository;
use Helper\Session as Session;
class Register extends \Controller\Base {
public function view()
{
// Redirect if already logged in
if (Session::isLoggedIn()) {
return $this->redirect("/welcome");
}
//Define Variables
$username ... | true |
83fe7fd1e0d7577276961f5e3b125955e6b21803 | PHP | igor-popravka/sql-builder | /src/SQLException.php | UTF-8 | 506 | 3.0625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace SQLBuilder;
class SQLException extends \Exception {
const E_MSG_NO_TABLE_USED = 'No tables used';
const E_CODE_NO_TABLE_USED = 1096;
/**
* @param string $message
* @param int $code
* @param \Throwable|null $previous
* @return SQLException
... | true |
7d779aa022c9cb9034e8c72978176990fb25425e | PHP | baileyherbert/horizon | /src/Database/Migration/Schema/Grammar.php | UTF-8 | 5,383 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
namespace Horizon\Database\Migration\Schema;
/**
* Utility class to assist with building SQL statements.
*/
class Grammar {
/**
* Compiles a name for use in a query. Works with names for tables, columns, and keys.
*
* @param string $columnName
* @return string
*/
public static function compileNam... | true |
b93739b2eaeb1f6703c711bf163ef041b38a3166 | PHP | iamapen/dbunit-CommentableDataSet | /src/DbUnit/DataSet/ExcelCsvDataSet.php | UTF-8 | 2,262 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
namespace Iamapen\CommentableDataSet\DbUnit\DataSet;
use PHPUnit\DbUnit\InvalidArgumentException;
/**
* Excel-friendly CSV DataSet. (multibyte locale)
*
* UTF-16(LE+BOM) converting to UTF-8.
*
* @author Yosuke Kushida <iamapen@studiopoppy.com>
* @copyright 2010-2014
*/
class Exc... | true |
3e3f68074441d80de3bd7d0b341d902d69c75406 | PHP | Scrudufrudufru/Projet | /creation.php | UTF-8 | 6,176 | 2.53125 | 3 | [] | no_license | <!--Importation du java script pour l'editeur de texte-->
<script src="./tinymce/js/tinymce/tinymce.min.js"></script>
<!--Configuration de l'éditeur de texte-->
<script type="text/javascript"> tinymce.init({
selector: '#mytextarea', //C'est l'id de l'element html qui sera remplace par l'editeur
menubar: false, ... | true |
7160c72224b9c26aaeb820e8c7602d0028db0864 | PHP | schuob/csv_parser_test | /grabpost.php | UTF-8 | 2,978 | 2.5625 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
date_default_timezone_set('America/Los_Angeles');
// listening for callbacks
$cb_payload = '';
$cb = fopen('php://input', 'r');
$cb_payload = fgets($cb);
// parsing $cb_payload into a array
$pieces = explode('&', $cb_payload);
foreach ($pieces as &$piece) ... | true |
c26ed6ac0a78ed55f35b9cc0bb8164aba31a2b9a | PHP | mhmudAl-aloul1995/evaluation | /aptient/Weapon.php | UTF-8 | 595 | 2.8125 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
/**
* @property int $id
* @property string $name
* @property string $deleted_at
* @property string $created_at
* @property string $updated_at
* @property PatientMedical[] $patientMedicals
*/
class Weapon extends Model
{
/**
* @var array
... | true |
c07cc1e64f6f7dc1000d39c03a07ccf08a976238 | PHP | cordoval/chamilo_phpperu | /user/php/reporting/blocks/user_platfrom_statistics_reporting_block.php | UTF-8 | 3,440 | 2.5625 | 3 | [] | no_license | <?php
namespace user;
use reporting\Reporting;
use reporting\ReportingManager;
use common\libraries\Translation;
use common\libraries\EqualityCondition;
use common\libraries\AndCondition;
use common\libraries\Utilities;
require_once dirname(__FILE__) . '/../user_reporting_block.class.php';
class UserPl... | true |
b4c541c446222fa48d61897d65bcf77c1f518498 | PHP | jphacks/TK_1622 | /jpserver/server/database/FinalRecordMachine.php | UTF-8 | 21,299 | 2.8125 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html >
<html>
<head>
<title>書き込みマシン</title>
</head>
<body>
<?php
define('DB_DATABASE', 'jp_data');
define('DB_USERNAME', 'jigenjisk');
define('DB_PASSWORD', '41567sk');
define('PDO_DSN', 'mysql:dbhost=localhost;dbname='.DB_DATABASE);
class RecordMachine
{
protected $db = null;
functi... | true |
6867258f28c34a1c55f18f296b4cbc9bc5f387c8 | PHP | mikaeloduh/html-php-sql-fullstack | /schedule.php | UTF-8 | 3,671 | 2.546875 | 3 | [] | no_license | <!--
Written by: Adam Marshall
-->
<html>
<head>
<title>TBD Schedule</title>
<?php include("header.php"); ?>
<div id="main">
<br><br><br>
<?PHP
//Connects to database
$dbc = DBConnect();
$sort = (isset($_GET['sort']) ) ? $_GET['sort'] : 'gm';
switch ($sort)
{
case 'rf' :
... | true |
7e167e376f2e8a5be5ac6e423568d2beaf7c11b3 | PHP | bpurtz/bpdogtraining | /httpdocs/php/total_mysql_commands.php | UTF-8 | 36,862 | 3.28125 | 3 | [] | no_license | <?php
session_start();
/**
* Created by PhpStorm.
* User: admin
* Date: 11/22/17
* Time: 4:01 PM
*/
/* Development and Debugging */
/*************** MYSQL TRANSACTION CLASS *******************/
class my_mysql extends mysqli {
const hn = 'localhost';
const db = 'training';
const un = 'purtzerb';
con... | true |
3306e62edd464150304edcdf49c0d840825d8d56 | PHP | guyanyouyou/PHPstudy | /oop/mysql.class.php | UTF-8 | 2,552 | 3.203125 | 3 | [] | no_license | <?php
/**
* 目标:
连接数据库
发送查询
对于select型,返回查询数据
关闭mysql连接
*/
class Mysql{
private $host;
private $usesr;
private $pwd;
private $dbName;
private $charset;
private $conn = null; //保存连接的资源
function __construct(argument){
//应该是在构造方法里,读取配置文件
//然后根据配置文件来读取私有属性
//此处还... | true |
49aa03643bd631150b34aba404c0c0c5f829c43a | PHP | DimkaInc/invent | /migrations/m201103_133111_create_models_table.php | UTF-8 | 5,044 | 2.609375 | 3 | [] | no_license | <?php
use yii\db\Migration;
use app\models\Models;
use app\models\Types;
use app\models\Items;
/**
* Handles the creation of table `{{%models}}`.
* Has foreign keys to the tables:
*
* - `{{%type}}`
*/
class m201103_133111_create_models_table extends Migration
{
/**
* {@inheritdoc}
*/
public fun... | true |
ed5c8fc505c08f32813f63d33ac299fd961da152 | PHP | alfianpurnomo/KitchenBuAs | /x-adm/application/hooks/FAT_Layout.php | UTF-8 | 9,273 | 2.578125 | 3 | [] | no_license | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Layout Class
* @author ivan lubis <ivan.z.lubis@gmail.com>
* @version 3.0
* @category Hook
* @desc hook class that load to display layouts
*
*/
class FAT_Layout {
protected $CI;
/**
* print layout based on contro... | true |
e0329321e9696a6f6b342394d0125fa1bc3c3f0d | PHP | erzaliator/Zenfox-New | /application/models/GmsMenuLink.php | UTF-8 | 2,938 | 2.546875 | 3 | [] | no_license | <?php
class GmsMenuLink extends BaseGmsMenuLink
{
public function getLinkData()
{
$conn = Zenfox_Partition::getInstance()->getMasterConnection();
Doctrine_Manager::getInstance()->setCurrentConnection($conn);
$query = Zenfox_Query::create()
->from('GmsMenuLink');
$result = $query->fetchArray();
... | true |
bf82f66e1daf74c850ede8dff352ad595bac2910 | PHP | imath/wp-manual | /includes/classes.php | UTF-8 | 7,054 | 2.765625 | 3 | [] | no_license | <?php
// Exit if accessed directly
if ( !defined( 'ABSPATH' ) ) exit;
/**
* WP_Manual_Page Class
*
* @package WP Manual
* @subpackage WP Manual query class
* @since 1.0
*
* Used to query manual pages
*/
class WP_Manual_Page {
public $id;
public $name;
public $title;
public $content;
publ... | true |
4c9ce1e7db9d88f9206ff92726f2c934b3bcdede | PHP | hungtv1501/PHP-1808E | /buoi4/index.php | UTF-8 | 1,464 | 3.0625 | 3 | [] | no_license | <?php
// xay dung banng categories
$categories = [
[
'id' => 1,
'name' => 'Bong Da',
'parentID' => 0,
],
[
'id' => 2,
'name' => 'Thoi Trang',
'parentID' => 0,
],
[
'id' => 3,
'name' => 'Bong Da Anh',
'parentID' => 1,
],
[
'id' => 4,
'name' => 'Bong Da Phap',
'parentID' => 1,
],
[
'id'... | true |
f8dbf071f56bda92c2ff5ff08f576c4887bd5413 | PHP | rskgithub/albatross | /lib/error.class.php | UTF-8 | 925 | 2.859375 | 3 | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | <?php
/*
* Albatross Manager
*
* Error Log class
*
* Description:
* Contains error logging functions
*
* Copyright 2011 Samuel Bailey
*/
?>
<?php
class error2
{
public $log = 'default';
public function __construct()
{
// Do nothing.
}
public function __destruct()
{
// Do nothi... | true |
66ad0c557c38baa048c8d60ba4c1b63b6ffec2f9 | PHP | victoriaBulson/cs313-php | /web/rotation_app/initialize_list.php | UTF-8 | 1,509 | 3.03125 | 3 | [] | no_license | <?php
//Vars
$skip = [];
$slots = [];
$slots_counter = 0;
$skip_counter = 0;
//populate slots with members
foreach($members as $member){
if (!in_array($member['email'], $skip)){
$query='SELECT member1, member2 FROM partners
WHERE member1=:member OR me... | true |
eb93790acfc14719e8df337d827a9fdf418023be | PHP | galaxydeveloperz/a | /admin/control/classes/class.pages.php | UTF-8 | 4,247 | 2.53125 | 3 | [] | no_license | <?php
/* CLASS FILE
----------------------------------*/
class csPages {
public $settings;
public function rebuildSequence($t = 'pages') {
$seq = 0;
$q = mswSQL_query("SELECT `id` FROM `" . DB_PREFIX . $t . "` ORDER BY IF(`orderBy`>0,`orderBy`,9999)", __file__, __line__);
while ($RB = mswSQL_fetch... | true |
61b94539a496133b26436f4d271c8a5204b6cd21 | PHP | dalewang1995/query_grade | /php/connect.php | UTF-8 | 528 | 2.59375 | 3 | [] | no_license | <?php
$server="localhost";//主机
$db_username="root";//数据库用户名
$db_password="";//数据库密码
$con = mysqli_connect($server,$db_username,$db_password);//链接数据库
if(!$con){
die("can't connect".mysqli_error());//如果链接失败输出错误
}
$result = mysqli_select_db('test',$con);//选择数据库
var_dump($result);
//$query = 'SELECT * FROM t_grade WHER... | true |
4dfcc680a7094312a893a05146e4aab28a4b9c8b | PHP | slepic/http-transfer | /src/Log/Log.php | UTF-8 | 1,153 | 2.875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace Slepic\Http\Transfer\Log;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseInterface;
class Log implements LogInterface
{
public function __construct(
private RequestInterface $request,
private float $startTime,
private float $endTime,
private ?R... | true |
a0b57726c593bb3055c104ab555dbd05d9066634 | PHP | rjaoun/rjaoun.github.io | /database/career/DatabaseEmployeesCareer.php | UTF-8 | 1,072 | 2.875 | 3 | [] | no_license | <?php
class DatabaseEmployeesCareer{
private static $user='root'; // it call clas level property
private static $pass= ''; //static property is belongs to class
private static $dsn = 'mysql:host=localhost;dbname=service_u_need';//(database:host=localhost;)
private static $dbcon;
private function __construct()... | true |
4b670432d44c0c85abfcdae54cf4f7719984d25a | PHP | bytekj/ad-exchange | /trunk/public/editaccount.php | UTF-8 | 5,588 | 2.578125 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
require_once '../Classes/UserInfo.php';
require_once '../Classes/Session.php';
require_once '../Classes/Content.php';
require_once '../Classes/UIForm.php';
require_once '../Db/DataHandler.php';
require_once '../inc... | true |
669baec64350dbb05338179a1c809640aee35b1b | PHP | quyquoc/rmt-studio.com | /apps/backend/forms/Login.php | UTF-8 | 1,166 | 2.5625 | 3 | [] | no_license | <?php
namespace Modules\Backend\Forms;
use Phalcon\Forms\Form;
use Phalcon\Forms\Element\Text;
use Phalcon\Forms\Element\Password;
use Phalcon\Forms\Element\Submit;
use Phalcon\Forms\Element\Check;
use Phalcon\Forms\Element\Hidden;
use Phalcon\Validation\Validator\PresenceOf;
use Phalcon\Validation\Validator\Email;
u... | true |
cae843723b93d85fc0573cf3b20c15beaa45b997 | PHP | LouisLoode/Kdocode | /image.php | UTF-8 | 1,488 | 2.671875 | 3 | [
"Unlicense"
] | permissive | <?php
/**
* Index du site
*
* Génère l'image du code contenu dans le fichier caches/divers/code.ini
*
*
* @authors Loode
*/
function image($mot)
{
$size = 32;
$marge = 5;
$box = imagettfbbox($size, 0, 'images/smartie.ttf', $mot);
$largeur = $box[2] - $box[0];
$hauteu... | true |
19039dae7bf473f474403da2a35141635547fef2 | PHP | jetstreamlabs/foundation | /src/Console/Wizard/Command/Generators/GenerateWizardWizard.php | UTF-8 | 1,477 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Serenity\Console\Wizard\Command\Generators;
use Serenity\Console\Wizard\Command\Generators\Subwizards\StepSubwizard;
use Serenity\Console\Wizard\Command\GeneratorWizard;
use Serenity\Console\Wizard\Contracts\Step;
use Serenity\Console\Wizard\DataTransfer\WizardSpecification;
use Serenity\Console\Wizar... | true |
6e73f7847b75eeebe68ace7f1a77568cb669518e | PHP | justmakeboss/ylg | /application/common/util/Log.php | UTF-8 | 453 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\common\util;
class Log
{
// 打印log
function log_result($file,$content)
{
// $fp = fopen($file,"a");
// flock($fp, LOCK_EX) ;
// fwrite($fp,"执行日期:".strftime("%Y-%m-%d-%H:%M:%S",time())."\n".$word."\n\n");
// flock($fp, LOCK_UN);
// fclose(... | true |
7ae267f573c6201d164ba5709e2dc60b517bab6d | PHP | modshi/First-PHP-Project | /insert.php | UTF-8 | 1,650 | 3.3125 | 3 | [] | no_license | <?php
// when we want to add new data
if (isset( $_POST["insert"])) {
$username = $_POST["title"];
$email = $_POST["email"];
$add = "INSERT INTO person (username, email) VALUES ('$username', '$email');";
if(empty($username)) {
echo "Username is empty!!";
}
if(empty($email)) {
... | true |
eb8a9e325fae4131a21a534147157380b0e69e48 | PHP | mmewen/mewen.fr | /kirby/src/Http/Uri.php | UTF-8 | 9,581 | 3.03125 | 3 | [
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-proprietary-license",
"LicenseRef-scancode-commercial-license",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Kirby\Http;
use Kirby\Cms\App;
use Kirby\Exception\InvalidArgumentException;
use Kirby\Toolkit\Properties;
use Throwable;
/**
* Uri builder class
*
* @package Kirby Http
* @author Bastian Allgeier <bastian@getkirby.com>
* @link https://getkirby.com
* @copyright Bastian Allgeier
* @li... | true |
1102f291a8c46025510be64dabb01348db770d36 | PHP | DerekOverlock/uwsn-viewer | /classes/GPSCoordinates.php | UTF-8 | 750 | 3.609375 | 4 | [] | no_license | <?php
class GPSCoordinates {
const EARTH_RADIUS = 6378.137; // meters
private $lat;
private $lon;
private $alt;
public function __construct($lat, $lon, $alt) {
$this->lat = $lat * pi()/180;
$this->lon = $lon * pi()/180;
$this->alt = $alt;
}
public function getX() {... | true |
075d10182272caaf16a38f2185cbe303898c05b4 | PHP | t-sumisaki/UE4Plugin_WebApi | /DemoServer/web/04_JsonParse.php | UTF-8 | 182 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
$arr = [
"int" => 1,
"float" => 5.5,
"str" => "test",
"bool" => true,
"array" => [1, 2, 3, 4],
"object" => [
"foo" => 2,
"bar" => 4,
],
];
echo json_encode($arr);
| true |
c02b8c00c478cf4f12b25ef2fc84d6c4dbad7706 | PHP | Paasky/kuvia.io | /app/Traits/Paginates.php | UTF-8 | 3,247 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Traits;
use App\Models\KuviaModel;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Pagination\Paginator;
trait Paginates
{
use BuildsQueries;
public static $page = 'page';
public static $perPage = 'per_page';
public static $search ... | true |
efe6bcc5c43c79fb55960afbc2ae5cdb2efcfbec | PHP | rstgroup/zf-grafana-dashboards-module | /tests/Unit/Dashboard/DashboardTest.php | UTF-8 | 1,057 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace RstGroup\ZfGrafanaModule\Tests\Unit\Dashboard;
use RstGroup\ZfGrafanaModule\Dashboard\Dashboard;
use PHPUnit\Framework\TestCase;
use RstGroup\ZfGrafanaModule\Dashboard\DashboardDefinition;
class DashboardTest extends TestCase
{
public function testItTellsItsNotEqualToAnotherDashboardByDefinitio... | true |
2b3dd1f526f24f77ef7ff776a2afb213f8470108 | PHP | palmic/lbox | /lBox/lib/classes/forms/filters/abstract.LBoxFormFilterFloatDecimalPlaces.php | UTF-8 | 628 | 2.828125 | 3 | [] | no_license | <?php
abstract class LBoxFormFilterFloatDecimalPlaces extends LBoxFormFilter
{
/**
* kolik desetinnych mist
* @var int
*/
protected $decimalPlaces;
public function filter(LBoxFormControl $control = NULL) {
try {
if (!is_int($this->decimalPlaces) || $this->decimalPlaces < 1) {
throw new LBoxException... | true |
070a7a0b124c74362560200b0c774d4dd6b68a20 | PHP | KNIGHTTH0R/news_portal-2 | /database/seeds/NewsTagTableSeeder.php | UTF-8 | 1,251 | 3.046875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class NewsTagTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
for($i = 1; $i <= 1000; $i++) {
$array = $this->rand_diff();
for($j = 0; $j < 3; $j++) {
... | true |
ffdfdccd9532581f7f64b94ad5fd4390dc08dc59 | PHP | oscarAgbasi/shopping-List | /Form_Validation.php | UTF-8 | 3,684 | 2.765625 | 3 | [] | no_license | <html>
<?php
Session_start();
?>
<head>
<meta charset="UTF-8">
<title>Index Validation</title>
<style type="text/css">
.error { color:red;}
.good {color:green;}
</style>
</head>
<body>
<?php
//FIRST PARAMETER
$name1 ... | true |
8a6407f6907e9e812f5646f42427426687882c00 | PHP | essamsaber/easy-finance | /app/Http/Controllers/HomeController.php | UTF-8 | 3,516 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\ExpenseItem;
use App\SourceOfIncome;
use App\Transaction;
use Carbon\Carbon;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
class HomeController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
... | true |
c72be3d8aeac55138e0a2ef860d29a97dd5163a4 | PHP | Malgosiatobiasz1/CMS-projZesp | /admin/includes/edit-post.php | UTF-8 | 5,149 | 2.609375 | 3 | [] | no_license | <?php
if(isset($_GET['p_id'])) {
$url_post_id = $_GET['p_id'];
}
$query = "SELECT * FROM posts WHERE post_id = {$url_post_id}";
$select_posts_by_id = mysqli_query($dbconnect, $query);
while ($row = mysqli_fetch_assoc($select_posts_by_id)) {
$post_id = $row['post_id'];
$post_author ... | true |
8870de58e7008d5dde91955c8acde0afb3538d4b | PHP | pqrs/csv | /src/Reader.php | UTF-8 | 3,015 | 3.125 | 3 | [
"MIT"
] | permissive | <?php
namespace Wilgucki\Csv;
/**
* Class for reading CSV files
*
* @package wilgucki/csv
* @author Maciej Wilgucki <mwilgucki@gmail.com>
* @license https://github.com/wilgucki/dbrepository/blob/master/LICENSE
* @link https://github.com/wilgucki/csv
*/
class Reader
{
protected $handle = null;
protected... | true |
49ca5d7b48a74e293e00f1dd7ac77a021fd9832c | PHP | dwdraugr/PHP-Piscine | /day01/ex12/search_it!.php | UTF-8 | 332 | 2.875 | 3 | [] | no_license | #!/usr/bin/env php
<?php
if ($argc <= 2)
exit();
$search_key = $argv[1];
$elems = array_slice($argv, 2);
$mass = array();
foreach ($elems as $elem)
{
$mass[] = explode(":", $elem);
}
$mass = array_reverse($mass);
foreach ($mass as $elem)
{
if ($elem[0] == $search_key)
{
echo("$elem[1]\n");
exit(... | true |
1760658eae3d60a195a82da3156bda33df4d6307 | PHP | sharmaghanshyam/mobile-apis | /testlink/ipAddress.php | UTF-8 | 927 | 2.546875 | 3 | [] | no_license | <?php
include('header.php');
if($_POST)
{
$url = "http://".$_SERVER['SERVER_NAME']."/api/ipAddressapi.php";
$ch = curl_init();
$timeout = 0;
curl_setopt ($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
//curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6... | true |
60f8b9b439e5aae66e79975771733659b5b67b86 | PHP | Arawipacha/fc | /app/Http/Controllers/DipendenteController.php | UTF-8 | 2,021 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Support\Facades\DB;
use Illuminate\Http\Request;
use App\Models\Dipendente;
class DipendenteController extends Controller
{
public function index(){
$data=Dipendente::all();
return $this->crearRespuesta($data,200);
}
public function sto... | true |
7cc3124a9c20831f9b59faaa8418639f99f879c0 | PHP | SanketChheladiya/College-Management-System | /lms/sms1/script/subject/subject.php | UTF-8 | 901 | 2.9375 | 3 | [] | no_license | <?php
/**
*
*/
class subject
{
public function __construct(){
$this->db=new database();
$this->conn=$this->db->conn;
}
public function select($query){
return $this->result=$this->db->select($query);
}
public function get_subject_info(){
$info=array();
$sub=array();... | true |
aa123c159d8b4923ea090ab55a80f547715bf49b | PHP | flightaware/firehose_examples | /php/example1/example1.php | UTF-8 | 1,450 | 2.703125 | 3 | [] | permissive | <?php
#Always use this example if you are not using compression
#Also use this example if you are using compression, and expecting a high volume of messages
$username = 'XXXXXXXXXX';
$apikey = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
$compression = 0;
// Open the TLS socket connection to FlightAware.
$fp = fsockop... | true |
ef80862225f96ef07f520e701e88af31e5ce1160 | PHP | Northie/XF2 | /app/utils/XSession.php | UTF-8 | 1,033 | 2.671875 | 3 | [] | no_license | <?php
namespace utils;
class XSession {
public static $instance;
private $namespace = '_X';
private $default_namespace = '_X';
public function __construct($namespace, $prep = false) {
if ($namespace == '') {
$namespace = $this->default_namespace;
}
$this->namespace = $namespace;
if (!is_array($_SESSI... | true |
8a5b58df0df100d0864104cf695ad266472cdbbd | PHP | herich11/PHP-Dasar | /pertemuan6/latihan2a.php | UTF-8 | 2,594 | 3.109375 | 3 | [] | no_license | <?php
// $mahasiswa = [
// ["Heri Cahyono", "180710830101052", "hericahyononew@gmail.com", "Teknik Informatika"],
// ["Verrel Bramasta", "180710830101053", "bramastaverrel@gmail.com", "Teknik Informatika"]
// ];
// Array Assosiative
// definisinya sama seperti array numerik, kecuali
// key-nya adalah string ya... | true |
c58896ae5f798ac358352b82627f9c3ec3ad5468 | PHP | tomyqg/knxBase | /lib/apps/erm/erp/TravExDoc.cls.php | UTF-8 | 6,260 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
require_once( "global.inc.php") ;
require_once( "option.inc.php") ;
require_once( "iListDoc.inc.php") ;
require_once( "iPrintable.inc.php") ;
require_once( "iArchivable.itf.php") ;
require_once( "TravEx.php" );
require_once( "User.php") ;
/**
*
*/
class TravExDoc extends TravEx implements iListDoc, iPrintable... | true |
97fc2e55c05d0e403984385ae750acaba637f98e | PHP | barbyq/GNSHelpDesk | /configuracion/tipos/insertTipo.php | UTF-8 | 393 | 2.578125 | 3 | [] | no_license | <?php
include('../../includes/clases.php');
$obj = json_decode($_POST['json']);
$tipoDAO = new tipoDAO();
$type = $_POST['type'];
try{
if ($type == 'insert'){
$tipoId = $tipoDAO->insertarTipo($obj);
echo $tipoId;
}
else if ($type == 'update'){
$tipoDAO->actualizarTipo($obj);
echo $obj->tipoId;
... | true |
0561f90f7c49e4f7fec87cf84e91dc66f213bded | PHP | venveo/craft-hubspot-toolbox | /src/models/Settings.php | UTF-8 | 2,428 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* HubSpot Toolbox plugin for Craft CMS 3.x
*
* Turnkey HubSpot integration for CraftCMS
*
* @link https://venveo.com
* @copyright Copyright (c) 2018 Venveo
*/
namespace venveo\hubspottoolbox\models;
use venveo\hubspottoolbox\HubSpotToolbox;
use Craft;
use craft\base\Model;
use craft\validators\... | true |
2296250966dad3afeaf79834bb35622dcd527674 | PHP | ITS-Digital-Technology/kernl-ui-blade | /src/Components/Alert/FullWidth.php | UTF-8 | 1,000 | 2.65625 | 3 | [] | no_license | <?php
namespace Northeastern\Blade\Components\Alert;
use Illuminate\Support\Facades\View;
use Illuminate\View\Component;
use InvalidArgumentException;
class FullWidth extends Component
{
public $label;
public $closeable;
public $remember;
public $colorClasses;
protected $colors = [
'red' ... | true |
5bf39fa1ee7fdb17bec4893a653f24ddf7d8aae3 | PHP | Lolo33/CMR---Site-resto | /Classes/Panier.php | UTF-8 | 2,915 | 3.015625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Niquelesstup
* Date: 03/10/2018
* Time: 20:21
*/
class Panier
{
private $listeProduits = array();
private $prixTotal = 0;
function __construct(){}
public function ajouterProduitListe(Produit $produit) {
$this->listeProduits[] = $produit;
... | true |
15664b6912679086f03f3a0a297a1e60f77f746a | PHP | coala0906/shoppingcart | /app/Http/Controllers/Shoppingcart/Session_new.php | UTF-8 | 2,016 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Shoppingcart;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\Model\Shoppingcart\members as members;
use Auth;
use Exception;
use Hash;
use Session;
/**
* 購物車後臺 Session
*/
class Session_new extends Controller
{
/**
* 登入
* @param Request $... | true |
129a2724cb0e655c21d3e11c4939d926f5b85167 | PHP | NobuyukiMorii/botti2 | /Model/User.php | UTF-8 | 9,248 | 2.6875 | 3 | [] | no_license | <?php
class User extends AppModel {
public $name = 'User';
public $uses = array('User','Attachment','Bar');
public $hasMany = array(
'Image' => array(
'className' => 'Attachment',
'foreignKey' => 'foreign_key',
),
);
/*
*上記記述より下の方が良さそうなので、置き換えた。
... | true |
315e194e6ded5af1836800f47cce1246a92a15d2 | PHP | Baoanh2003199/LapTrinhWeb | /admin/addSupplier.php | UTF-8 | 1,821 | 2.515625 | 3 | [] | no_license | <?php
include_once 'inc/header.php';
include_once '../classes/supplier.php';
include_once '../helper/format.php';
include_once '../lib/database.php';
include_once '../lib/session.php';
?>
<?php
$supp = new supplier();
if ($_SERVER['REQUEST_METHOD'] == "POST") {
$SupplierName = $_POST['SupplierName'];
$SuppAddress =... | true |
67b4774e1f141a757dd3b3c1598544dd526d71ce | PHP | adit33/insta | /app/Action.php | UTF-8 | 1,002 | 2.6875 | 3 | [] | no_license | <?php
/**
*
*/
namespace App;
use Crypt;
class Action
{
public function uploadPhoto($schedules){
/////// CONFIG ///////
$username = '';
$password = '';
$debug = true;
$truncatedDebug = false;
//////////////////////
/////// MEDIA ////////
$photoFilename = '';
$captionText = '';
///////////////... | true |
c3fdcb625db30d446d75b90168b71e51418ed5de | PHP | Zeanger/Diplomarbeit-Forstinger | /Prototyp/devTools/simulateDataPerTime.php | UTF-8 | 763 | 2.96875 | 3 | [] | no_license | <?php
date_default_timezone_set('Europe/Berlin');
ini_set('max_execution_time', 4000);
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "measurements";
$tablename = "temperature_1";
$valuemin = -10;
$valuemax = 5;
// Create connection
$conn = new mysqli($servername... | true |
d283f3f6ed2530a2795530b2f6446bbc3eb99b0e | PHP | MohamedElorabi/auto_parts | /database/migrations/2021_09_07_011922_create_settings_table.php | UTF-8 | 663 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSettingsTable extends Migration {
public function up()
{
Schema::create('settings', function(Blueprint $table) {
$table->increments('id');
$table->text('about', 255);
$table->text('privacy_... | true |
ff3c8247e197397b9ed1ea2535ee102524686fa6 | PHP | John-Bob-DIRIENZO/blog_crud_MT-4 | /src/model/AbstractManager.php | UTF-8 | 204 | 2.671875 | 3 | [] | no_license | <?php
namespace Model;
use Vendor\PDOFactory;
abstract class AbstractManager
{
protected $db;
public function __construct()
{
$this->db = PDOFactory::getMysqlConnexion();
}
} | true |
4d8b4822f81652ec8386d30fdb3a1426c5f57049 | PHP | dileepmaurya/design-patterns | /Adapter/EBookAdapter.php | UTF-8 | 360 | 2.78125 | 3 | [] | no_license | <?php
namespace App\Adapter;
use App\Adapter\BookInterface;
/**
*
*/
class EBookAdapter implements BookInterface
{
private $ebook;
public function __construct(EBookInterface $ebook)
{
$this->ebook = $ebook;
}
public function open()
{
return $this->ebook->pressStart();
}
public function turnpage()
{
... | true |
84ae2b8fc5c793d711bee26864efa985a1c03eaa | PHP | AnotherFoxGuy/Ritsema-Banck | /lib/models/QA.php | UTF-8 | 359 | 2.953125 | 3 | [] | no_license | <?php
namespace RitsemaBanck\models;
class QA
{
public string $Question;
public string $Answer;
/**
* QA constructor.
* @param string $Question
* @param string $Answer
*/
public function __construct(string $Question, string $Answer)
{
$this->Question = $Question;
... | true |
ca69627bc735abf10bb3e1227300cb2c9997a412 | PHP | chac0/cchan-prj | /3/index.php | UTF-8 | 15,659 | 2.546875 | 3 | [] | no_license | <?php
// Initialize Variables
$page_flag = 0;
$clean = array();
$error = array();
if( !empty($_POST) ) {
foreach( $_POST as $key => $value ) {
$clean[$key] = htmlspecialchars( $value, ENT_QUOTES);
}
}
if( !empty($clean['btn_confirm']) ) {
$error = validation($clean);
if( empty($error) ) {
$page_flag = 1;
}
... | true |
c16a2237a98f675044f9990ac5e7516d06343cba | PHP | davidsodrelins/QuebraCabecaEducativo | /php/cadastra_professor.php | UTF-8 | 405 | 2.53125 | 3 | [] | no_license | <?php
include("data.php");
$nome = $_GET['nome'];
$senha = md5($_GET['senha']);
$cpf = $_GET['cpf'];
$busca = @mysqli_query($_SG['link'], "SELECT * FROM professor WHERE cpf = '$cpf'");
$query1 = @mysqli_num_rows($busca);
if ($query1 == 0){
@mysqli_query($_SG['link'], "INSERT INTO professor (nome,senha,cpf)... | true |
72a7cc857814b35c3fb2ac9afbec0d4ae1c85a52 | PHP | shinout/jpfindr11 | /web/register.php | UTF-8 | 3,356 | 2.578125 | 3 | [] | no_license | <?php
//セッションを有効にする
session_start();
$script_dir = dirname(__FILE__);
require("${script_dir}/../keys.php"); // make your own key file.
require("${script_dir}/../lib/twitteroauth/twitteroauth/twitteroauth.php");
//////////Twitter OAUTH/////////////////////////
////////////////////////////////////////////////
/... | true |
c80f0eb5bd64c1e1c1ae20a5746818fb2f30f79e | PHP | namdongvando/php246-27012020 | /Code/phpcanban/Model/DB.php | UTF-8 | 2,805 | 2.859375 | 3 | [] | no_license | <?php
namespace Model;
class DB
{
private static $DB;
public static $tableName;
function __construct()
{
global $mysqli;
if (self::$DB == null)
self::$DB = $mysqli;
}
public function DeleteDB($where)
{
$tableName = self::$tableName;
$sql = "DELE... | true |
dcb648a8bfd8433d4ab4da827027450c91420efe | PHP | gud3/executor | /ExecuteAbstract.php | UTF-8 | 1,618 | 3.046875 | 3 | [] | no_license | <?php
namespace gud3\executor;
/**
* Class ExecuteAbstract
* @package gud3\executor
*/
abstract class ExecuteAbstract
{
public $result;
/**
* getter result by array key
* @return mixed
*/
public function getResult($key = null)
{
if ($key) {
if (!isset($this->resu... | true |
6c12da221c0c8f3f0b774b963293c9438081c652 | PHP | jord7700/GMAT | /dropDatabase.php | UTF-8 | 911 | 2.796875 | 3 | [] | no_license | <?php
include 'dbconnect.php';
$characterData = "drop table characterData";
$monsterData = "drop table monsterData";
$smw = "drop table simpleMeleeWeapons";
$srw = "drop table simpleRangedWeapons";
$mmw = "drop table martialMeleeWeapons";
$mrw = "drop table martialRangedWeapons";
$startingArea = "drop table start... | true |
70b81751d331cdfacb141bf2e3f8e81324c31bad | PHP | Nikita1342/PHP | /index.php | UTF-8 | 6,097 | 2.53125 | 3 | [] | no_license | <html>
<head>
<title>
SAIT
</title>
</head>
<body>
<?php $days=array(1=>'Понеділок','Вівторок','Середа','Четвер','Пятноця','Субота','Неділя');
asort($days);
?>
<table border="1" width="200" height="200" cellspacing="0">
<tr heigth="50%">
<td width="50%" >
<img src="photos/table.png" usema... | true |
cccfe647d24c721e8ad829c38edd94d4d16ddfe5 | PHP | VCHSRobots/AttendanceMachine | /Server/badges_showall.php | UTF-8 | 4,159 | 2.609375 | 3 | [] | no_license | <?php
// --------------------------------------------------------------
// badges_showall.php -- Shows all Badges
//
// Created: 12/31/14 DLB
// --------------------------------------------------------------------
require_once 'libs/all.php';
session_start();
log_page();
CheckLogin();
CheckEditor();
$loc = 'badges_sho... | true |
0e56e70f2e90e82889bca3abf1d1381c5e65a37c | PHP | marcosrole/SCRM2016 | /protected/extensions/LabsMobileSMS/LabsMobileSms.php | UTF-8 | 3,807 | 2.953125 | 3 | [] | no_license | <?php
/**
* Simple Application Component that allows you to send SMS messages using LabsMobile Gateway.
* Yii::app()->sms()->send(array('to'=>'+40746xxxxxx','message'=>'hello world!');
*
* More info about API, params, results: http://www.labsmobile.com/en/api
*/
class LabsMobileSms extends CApplicationComponent {... | true |
93fd164b56da6ee0a2bfad99b76aacb78abef550 | PHP | pablodelamora/webUbiquitous | /parcial2/Otros/Tabla de Multiplicar/tablaMultiplicar.php | UTF-8 | 579 | 3.90625 | 4 | [] | no_license | <!doctype html>
<html>
<head>
<title> Multiplication Table</title>
<h1>Multiplication Table</h1>
</head>
<body>
<?php
$numero1 = $_REQUEST['numero1'];
$numero2 = $_REQUEST['numero2'];
for ($i = 0; $i <= 10; $i++)
{
if ($i == 0)
print ("<p> ");
else
print (" $i ");
... | true |
1dc127cd49778768e4c2675e95fea1bd92a65d7f | PHP | opulencephp/Opulence | /src/Opulence/Authorization/Permissions/PermissionRegistry.php | UTF-8 | 2,045 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
/*
* Opulence
*
* @link https://www.opulencephp.com
* @copyright Copyright (C) 2021 David Young
* @license https://github.com/opulencephp/Opulence/blob/1.2/LICENSE.md
*/
namespace Opulence\Authorization\Permissions;
/**
* Defines the permission registry
*/
class PermissionRegistry implements IPe... | true |
fc95206dbd6a70b2ef73bcfbde164aeaf4d21b08 | PHP | hoanganhit1997/onthilaixe | /bin/features/bootstrap/FeatureContext.php | UTF-8 | 2,869 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
use Behat\Behat\Context\Context;
use Behat\Gherkin\Node\PyStringNode;
use Behat\Gherkin\Node\TableNode;
use Behat\Behat\Tester\Exception\PendingException;
/**
* Defines application features from the specific context.
*/
class FeatureContext implements Context
{
/**
* Initializes context.
*
*... | true |
36e38a21559079ebdd7eacf409d2da28cafc8230 | PHP | gaelanlloyd/laika | /functions/writeChart.php | UTF-8 | 5,254 | 3.015625 | 3 | [
"LicenseRef-scancode-public-domain",
"MIT"
] | permissive | <?php
function writeChart( $atts ) {
$defaults = array(
"chartID" => NULL,
"chartType" => NULL,
"reportData" => NULL,
"chartSeriesLabels" => NULL,
"chartAxisLabels" => NULL,
"axisYMaxValue" => NULL,
"chartTitle" => NULL,
"backgroundColor" => NULL,
... | true |
60ba9b277fd47a8e2febbca2d350a3ac150093cd | PHP | Shiva108/CTF-notes | /Web-CTF-Cheatsheet/scripts/backdoor/bypass_mail_shellshock.php | UTF-8 | 1,148 | 2.546875 | 3 | [] | no_license | <?php
# Exploit Title: PHP 5.x Shellshock Exploit (bypass disable_functions)
# Google Dork: none
# Date: 10/31/2014
# Exploit Author: Ryan King (Starfall)
# Vendor Homepage: http://php.net
# Software Link: http://php.net/get/php-5.6.2.tar.bz2/from/a/mirror
# Version: 5.* (tested on 5.6.2)
# Tested on: Debian 7 ... | true |
135831e174c2d3b5bc827527a548b9ceda73fe80 | PHP | IEFXProjects/PeerFinder | /website backup/convert.php | UTF-8 | 379 | 3.359375 | 3 | [] | no_license | <?php
$string= "! # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | }";
$array= str_split($string);
echo $array;
$length= length($string);
$count=0;
while ($count<=$length) {
$array[$count]... | true |
38e0e6bdbdbefbc368cde7df9e572c47f70f4666 | PHP | LucasRakotomalala/Applications-du-Web | /php-tp1/exo12.php | UTF-8 | 2,250 | 2.609375 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="utf-8">
<title>TP 1 - Exo 12</title>
<meta name="author" content="Marc Gaetano">
<meta name="viewport" content="width=device-width; initial-scale=1.0">
<link rel="stylesheet" href="css/tp1.css">
</head>
<body>
<h1>TP 1 - Exo 12</h1>
<hr>
<?php
... | true |
6070a1a254aab6a9061178c3d7c6c564ac0cf224 | PHP | IndigitousID/wanget | /app/Http/Controllers/CMS/ArticleController.php | UTF-8 | 2,857 | 2.578125 | 3 | [] | no_license | <?php namespace App\Http\Controllers\CMS;
use App\Http\Controllers\Controller;
use App\Models\Article;
use Input, DB, Redirect, Auth, Carbon\Carbon;
use Illuminate\Support\MessageBag;
class ArticleController extends Controller
{
/**
* Instantiate a new Article Controller instance.
*/
public function __con... | true |
246329f949a86144ca383f3d6a3f55f62fd503f2 | PHP | mujtahid-akon/ADACT | /App/Controllers/Controller.php | UTF-8 | 7,725 | 2.703125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Hp User
* Date: 4/19/2017
* Time: 9:15 PM
*/
namespace ADACT\App\Controllers;
use ADACT\App\HttpStatusCode;
use ADACT\App\Models\Model;
use ADACT\App\Views\Template;
use ADACT\App\Route;
use ADACT\Config;
/*
* Common Constants used in controllers
*/
define('ACTIVE_TAB'... | true |
67f201f9f3861805925d7ebeba65560911faf126 | PHP | medinadato/test | /cookies.php | UTF-8 | 754 | 2.765625 | 3 | [] | no_license | <?php
ini_set('display_error', 1);
// Setting a cookie in PHP is easy
//set_cookie('name', 'value', time()+10, null, null, false, true);
setcookie('name_of_my_cookie', 'value_of_my_cookie');
// Name is what your cookie will be stored as.
// Value is the value that will be stored in your cookie.
// Expiration is whe... | true |
47c66c0118d99a04fafa7aff07b8fa87703968de | PHP | Shah-zaib44/E-commerce-web-application | /include/db.php | UTF-8 | 493 | 2.609375 | 3 | [] | no_license | <?php
class db{
private static $instance =null;
private function __construct(){}
public static function getInstance(){
if (self::$instance == null)
{
self::$instance = new db();
}
return self::$instance;
}
public function getConnection(){
$serverName = "DESKTOP-QD0QT2L\SQLEXPRESS";
$con... | true |
7ec6603dc7467b86cf3478c38bd5f0082b08b64b | PHP | baptl/minichat | /php/minichat_post.php | UTF-8 | 1,020 | 2.953125 | 3 | [] | no_license | <?php // ouverture de session (pour mémoriser le pseudo *)
session_start();
// vérification de l'input : s'il est conforme aux attendus...
if (isset($_POST['pseudo']) AND isset($_POST['message']) AND $_POST['pseudo'] != '' AND $_POST['message'] != '')
{
// ... mémorisation du pseudo pour la session en cours
$_SESSIO... | true |
e7c3e0ac1a3e9fb6d0fe813468c4f16aaf411870 | PHP | bonndan/webnoth | /src/Webnoth/Renderer/Transition.php | UTF-8 | 4,763 | 3.125 | 3 | [] | no_license | <?php
namespace Webnoth\Renderer;
use Webnoth\WML\Element\TerrainType;
/**
* Class representing the transition between two different terrains.
*
* @author Daniel Pozzi <bonndan76@googlemail.com>
* @package Webnoth
*/
class Transition
{
/**
* the terrain type the transition is responsible for
* @v... | true |
dc187baf7e72854f1d536e84a4ebf9525b1282b2 | PHP | W0kest/bap | /Periode1.2/opdracht7/verwerkingUit.php | UTF-8 | 1,409 | 2.734375 | 3 | [] | no_license | <?php
//FORMULIEREN UITLEZEN (DATA BINNENHALEN)
$Mailadres = $_POST['Mailadres'];
echo $Mailadres;
//CONNECTIE MAKEN MET DE DATABASE
$host = 'localhost';
$username = 'root';
$password = '';
$database = '24853_db';
$dbc = mysqli_connect($host, $username, $password, $database) or die ('Error connecting.');... | true |
d643cd949f634fd791ed77e56236d70f6f9b37bf | PHP | titanaruto/mycalendar | /src/BL/DecoderJson.php | UTF-8 | 613 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: Админ
* Date: 08.10.2018
* Time: 1:44
* class decodes json and inserts data into the database
*/
class DecoderJson
{
//get json notes
public function getNoteWithFile($file)
{
$string = file_get_contents($file);
$json_note = json_decode($string... | true |
5d9878c246811b1975b48ce94085f3a620bb1510 | PHP | PouyaPour/path-converter | /tests/RemovePathWithPointPointSlashTest.php | UTF-8 | 3,129 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace unit;
use PHPUnit\Framework\TestCase;
use seosazi\PathConverter\ConvertToAbsolutePath;
use seosazi\PathConverter\RemovePathWithPointPointSlash;
class RemovePathWithPointPointSlashTest extends TestCase
{
private $removePathWithPointPointSlash;
public function setUp(): void
{
paren... | true |
8af6461df8658ab8a81572e6e6e736529972fd2d | PHP | Furiduri/tooth_software | /application/helpers/asset_helper.php | UTF-8 | 1,032 | 2.78125 | 3 | [] | no_license | <?php defined('BASEPATH') or exit('No direct script access allowed');
/**
* Assets URL helper function.
*
* This function will create an asset file URL that includes a cache busting parameter in order
* to invalidate the browser cache in case of an update.
*
* @param string $uri Relative URI (just like the one... | true |
40a8f57055991d32d68d0b94099a3005a260bd03 | PHP | Andrelua/conexao-ajuda | /src/Conex/Persistencia/Entidades/Eventos.php | UTF-8 | 1,978 | 2.765625 | 3 | [] | no_license | <?php
namespace Conex\Persistencia\Entidades;
class Eventos extends AbsId
{
protected $nome;
protected $descricao;
protected $idOng;
protected $idArea;
protected $uf;
protected $cidade;
protected $data;
public function __construct(
$id = 0,
$nome = '',
$descric... | true |
16e346e0916d5bacd5c03e0c15a55bad05b3800e | PHP | FabricaAppU9/SiteOficial | /painel/classe/DepoimentoProfessor.php | UTF-8 | 574 | 2.890625 | 3 | [] | no_license | <?php
class DepoimentoProfessor{
private $texto;
private $data_inclusao;
private $data_update;
public function setTexto($texto){
$this->texto = $texto;
}
public function setDataInclusao($data_inclusao){
$this->data_inclusao = $data_inclusao;
}
public function setDataUpdate($data_update... | true |
5dba5501c8a8de354c6951e9808a5bd63089e417 | PHP | enmanuel115/Proyecto-Final-Cuentas-x-Pagar | /guarda_cuenta.php | UTF-8 | 544 | 2.5625 | 3 | [] | no_license | <?php
require('conexion.php');
$descripcion=$_POST['descripcion'];
$estado=$_POST['estado'];
$query="INSERT INTO cuentas (descripcion, estado) VALUES ('$descripcion','$estado')";
$resultado=$mysqli->query($query);
?>
<html>
<head>
<title>Guardar concepto</title>
</head>
<body>
<center>
<... | true |
0843aaf7e925b174101de2919412a4fa86f13ba9 | PHP | wlp1979/finance | /application/models/DbTable/Allocations.php | UTF-8 | 2,186 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
class App_Model_DbTable_Allocations extends Standard_Db_JoinTable
{
/**
* @var string Name of the database table
*/
protected $_name = 'allocations';
public function total($user_id, $end, $start = null, $expense_id = null)
{
$select = $this->getAdapter()->select();
$columns = array('sum(... | true |
6796d1f61fd99bb5df34a8ef875ffe64d68ae907 | PHP | jasonbronson/louisbronson.com | /themes/ljb/libraries/posts.php | UTF-8 | 3,217 | 2.78125 | 3 | [] | no_license | <?php
/**
* Posts Class
*
* This class handles all the methods for retrieving posts.
**/
namespace Libraries;
use Libraries\Options;
class Posts {
protected $dataObject;
protected $authorData;
protected $options;
protected $args = array(
'post_type' => 'post',
'post_status' => 'publish');
public functi... | true |
7f5c5580f12097b256c7fe6bc47c97b69f49ac4b | PHP | joshJLB/shazam | /plugins/extend-widgets-bundle/extra-widgets/jlb-logo-hover/jlb-logo-hover.php | UTF-8 | 3,130 | 2.578125 | 3 | [] | no_license | <?php
/*
Widget Name: JLB Logo Hover
Description: This is for the logo hover module displayed on the Child Page Mockup.
Author:JLB (Bill Goff)
*/
class JLB_Logo_Hover extends SiteOrigin_Widget {
function get_template_name($instance) {
return 'jlb-logo-hover-template';
}
function get_template_dir($instan... | true |
1ef2c11811881bfac54897da4ae5e3afc130b34f | PHP | michalwa/wiibd | /include/Database/Query/Update.php | UTF-8 | 1,870 | 3.09375 | 3 | [] | no_license | <?php
namespace Database\Query;
use Database\Result;
/**
* An UPDATE query
*/
class Update extends TableQuery {
/**
* The values to update
*/
private $record = [];
/**
* Constructs an UPDATE query
*
* @param string $tableName The name of the table to update
*/
public... | true |
0ba93d381121bfcabacfea90d0b52535df84d69a | PHP | khandillu96/All-By-Dilshad- | /1-PHP by Mam/B--21may21/data type/string.php | UTF-8 | 162 | 2.703125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<?php
$x="hello world ";
$y='hello world';
echo $x;
echo"<br><br>";
print $y;
?>
</body>
</html> | true |
634b3b5509fc0041b16f99b5d9437cff2d1f50b0 | PHP | ulfanuroktaviana575/phpDasar | /2.php | UTF-8 | 171 | 3.171875 | 3 | [] | no_license | <?php
$a = ["satu" => "ayam", "dua" => "enak"];
$b = [1, 2, 3, 4, 5];
echo $b[2];
print_r($a);
var_dump($a);
//echo ($a);
echo $a["satu"];
echo "<br>";
echo $a["dua"];
| true |