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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
d26fa9ec746cea94f9d218dbd7f7b4cc1d73ac83 | PHP | maxxou65/SuiviSIO | /connexion/connexion_by_id.php | UTF-8 | 892 | 2.953125 | 3 | [] | no_license | <?php
// NE PAS UTILISER CE CODE !! //
function getConnexion($identifiant, $mdp) {
$connexion ="";
$PARAM_nom_bd = 'suivisio'; // le nom de votre base de données
$PARAM_utilisateur = $identifiant; // nom d'utilisateur pour se connecter
$PARAM_mot_passe = $mdp; // mot de passe de l'utilisateur pour se c... | true |
573f1ffcccd4727c9330997d39b248cb1c8100ed | PHP | adam-godfrey/operation-braveheart | /models/forum_model.php | UTF-8 | 3,199 | 2.78125 | 3 | [] | no_license | <?php
class Forum_Model extends Model {
private $getcount = NULL;
private $total_pages = NULL;
private $forum = NULL;
private $words = NULL;
public function __construct() {
parent::__construct();
$this->forum = new OBForum();
$this->words = new Words();
$this->getcount;
$this->total_pa... | true |
2497c00db150806612211af732dcacac6e0a73fe | PHP | rekcuFniarB/forum-theprodigy-ru | /lib/rekcuFniarB/arrayQuery/arrayObject.php | UTF-8 | 760 | 3.171875 | 3 | [
"MIT"
] | permissive | <?php
// Same as queriedArray but stores data indide self
// instead of referencing to outer array.
//
// Usage:
// $aq = new arrayObject($arr);
// $aq->set('foo.bar.baz', 'qwerty');
// echo $aq->get('foo.bar.baz');
// $dq->del('foo.bar.baz');
namespace rekcuFniarB\arrayQuery;
class arrayObject exte... | true |
4b78f4e0ce98f5da1ad60299427a36e4b147aa3d | PHP | donwilson/Destiny.dev | /templates/main/weapons.php | UTF-8 | 2,201 | 2.5625 | 3 | [] | no_license | <?php
// pull manifest
$raw_manifest = get_current_manifest();
$db_file = (isset($raw_manifest['mobileWorldContentPaths']['en'])?basename($raw_manifest['mobileWorldContentPaths']['en']):false);
if(empty($db_file) || empty($raw_manifest['version']) || !is_file(MANIFEST_DIR . $raw_manifest['version'] ."/". ... | true |
29e386e16293f8bf3debb8068599196b23b9b7f3 | PHP | reboot329/Inquiry-Ticket-System | /Database/submit.php | UTF-8 | 3,345 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
session_start();
function __autoload($class)
{
require_once $class . '.php';
}
date_default_timezone_set('America/New_York');
if(isset($_SESSION['option']))
{
}
else
{
header('Location: index.php');
}
?>
<?php
$type = $_POST["type"];
$date = new DateTime();
$time = $date->format('F j Y g:i... | true |
91c34a67c5fc7f5b8472112769f025aa5a2c5e2d | PHP | deargonaut/paypal-csv-to-mt940 | /src/Dialects/Dialect.php | UTF-8 | 5,652 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
namespace Deargonaut\PaypalCsvToMt940\Dialects;
abstract class Dialect implements DialectInterface
{
public $iban;
public $reference = "PAYPAL TO MT940";
public $index = 00000;
private $previousBalance = 0;
private $calcStartBalance = 0;
public $startBalance = 0;
public $balance = 0;
... | true |
7ebffd04137345b7043a9a7774b0647dfd1ba4df | PHP | sandeb/Poo-One_exo | /index.php | UTF-8 | 1,616 | 2.875 | 3 | [] | no_license | <?Php
require_once 'Bicycle.php';
require_once 'Car.php';
require_once 'Truck.php';
require_once 'Skateboard.php';
require_once 'MotorWay.php';
require_once 'PedestrianWay.php';
require_once 'ResidentialWay.php';
require_once 'Speedometre.php';
$bike = new Bicycle('black',2);
$bike->setCurrentSpeed(15);
echo $bike->f... | true |
167ab913c0f42361134bbc66ee3d549ce662a4fa | PHP | cvexa/hack2020 | /count_patients.php | UTF-8 | 540 | 2.5625 | 3 | [] | no_license | <?php
include 'php/functions-schedule.php';
$sql = 'SELECT user_id, name, age FROM user_codes WHERE finished IS NULL';
$resultTwo = mysqli_query($conn, $sql);
if ($resultTwo){
$patients = array();
while ($row = mysqli_fetch_assoc($resultTwo)) {
$patients[$row['user_id']] = array('id' => $row['user_id'],... | true |
739d6eebf1c6d68aa61aba155e8af6fa85b14604 | PHP | brandonceja/inovomed | /includes/catalogue-manager/update-med.php | UTF-8 | 2,288 | 2.8125 | 3 | [] | no_license | <?php
/*Database connection*/
include "../dbh.php";
/*POST variables*/
$id = $_POST["key"];
$nombre = mysqli_real_escape_string($conn, $_POST["nombre"]);
$laboratorio = mysqli_real_escape_string($conn, $_POST["lab"]);
$precio = mysqli_real_escape_string($conn, $_POST["precio"]);
$cant... | true |
19259d72b58d7171983924647e196daaffe37ae6 | PHP | vaisakhpc/HackerEarthSolutions | /src/migratory-birds.php | UTF-8 | 703 | 3.421875 | 3 | [] | no_license | <?php
// Complete the migratoryBirds function below.
function migratoryBirds($arr)
{
$countArray = [];
for ($i = 5; $i >= 1; $i--) {
$countArray[$i] = 0;
}
for ($i = 0; $i < count($arr); $i++) {
$countArray[$arr[$i]]++;
}
$max = 5;
for ($i = 5; $i >= 1; $i--) {
if (... | true |
13c70e4c0b8f14a1e6186141486c0c7aff999aa5 | PHP | wenjingn/zhanhd-game | /zhanhd/ReqRes/Guild/SimpleInfo.php | UTF-8 | 1,146 | 2.6875 | 3 | [] | no_license | <?php
/**
* $Id$
*/
/**
*
*/
namespace Zhanhd\ReqRes\Guild;
/**
*
*/
use System\ReqRes\Box,
System\ReqRes\Str,
System\ReqRes\Int\U16,
System\ReqRes\Int\U32,
System\ReqRes\Int\U64;
/**
*
*/
use Zhanhd\ReqRes\LeaderInfo;
/**
*
*/
class SimpleInfo extends Box
{
/**
* @return void
... | true |
92befa1ed4b7aa17c015058c5be0969f11ef10bf | PHP | OITWPsupport/documentation | /woocommerce_import.php | UTF-8 | 7,407 | 2.6875 | 3 | [] | no_license | <?php
$mysqli = new mysqli('localhost:3306', 'wp_radarcart_test', '*******', 'wp_radarcart_test');
if ($mysqli->connect_errno) {
echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error;
}
$query_text = "select product_to_category.category_id, product_description.product... | true |
7180650fce8085533574f291b182726bdaf960b5 | PHP | enovision/october-cms-intervention | /classes/filters/Base.php | UTF-8 | 4,949 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: jvandemerwe
* Date: 9/23/18
* Time: 1:59 PM
*/
namespace Enovision\Intervention\classes\filters;
use Config;
use Exception;
use Illuminate\Support\Facades\Storage;
use Intervention\Image\ImageManagerStatic as ImageManager;
abstract class Base
{
static $args;
st... | true |
a1cb9b2f2bdef1a39831f07266ee29abbae24769 | PHP | StemateF/blog | /app/Category.php | UTF-8 | 424 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class Category extends Model
{
protected $fillable = ['name'];
public function scopeByName($query, $name)
{
return $query->whereNormalized(str_slug($name));
}
public function setNameAttribute($value)
{
$this->attri... | true |
894d8289e4bdde4da0330f089e09177df485d838 | PHP | denisgmuriithi/qmms | /mms-master/leads/add.php | UTF-8 | 6,307 | 2.515625 | 3 | [] | no_license | <?php
session_start();
if (!isset($_SESSION["user"])) {
header("Location: ../index.php");
exit;
} else {
$user = $_SESSION["user"];
//var_dump($_SESSION["user"]);
}
require_once "../config/database.php";
$db = new Database();
$pdo = $db->getConnection();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<... | true |
c4ceba1adfb02750a858bbf64a54818e3dc4cf73 | PHP | jiechengyang/Office2Pdf | /app/Office2pdf/Protocols/XmlProtocol.php | UTF-8 | 932 | 2.921875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* XmlProtocol
* @Authors jiechengyang (2064320087@qq.com)
* @Link http://www.boomyang.cn
* @addTime 2019-05-31 15:08:43
*/
namespace Protocols;
class XmlProtocol
{
const HEAD_DATA_LEN = 10;
public static function input($buffer)
{
if ( self::HEAD_DATA_LEN > strlen( $buffer ) ) {
return 0;/... | true |
d587e57589298418c3c7560c7516bfb5d002ea36 | PHP | beatlejute/ship | /pickpoint/allocates.php | UTF-8 | 6,220 | 2.640625 | 3 | [] | no_license | <?php
namespace pickpoint;
class allocates extends \abstracts\allocates {
public function courier($FIO, $Phone, $Date, $TimeStart='', $TimeEnd='', $City='', $Address='', $Number='', $Weight='', $ordersDateFrom='', $ordersDateTo='') { //Вызов курьера для отгрузки
$batches = new batches($this->authorizati... | true |
522ed7b66ddb49ea14e55308a18524d2b4c87b7f | PHP | gumbautorrat/TFG-Federacion-Agencias | /Agencia2/client/clienteOperaciones.php | UTF-8 | 994 | 2.6875 | 3 | [] | no_license | <?php
class ClienteWSOperaciones
{
/***************************************************************
Metodo que hace una peticion al Servicio Web de Operaciones para
que actualize el atributo compartir de una operacion determinada
****************************************************************... | true |
8c766e3e5526df4531902bc8b9db0505cb931fa2 | PHP | MyBBStuff/MyAlerts | /inc/tasks/myalerts.php | UTF-8 | 981 | 2.546875 | 3 | [] | no_license | <?php
/**
* MyAlerts alert cleanup task
*
* A simple notification/alert system for MyBB
*
* @author Euan T. <euan@euantor.com>
* @package MyAlerts
*/
if (!defined('IN_MYBB')) {
die('Direct initialization of this file is not allowed.<br /><br />Please make sure IN_MYBB is defined.');
}
function task_mya... | true |
87574d3ea7a0a4090b3d3a82aa6ca685f6e36842 | PHP | Josimar/cakephp | /htdocs/src/Model/Table/StaffsTable.php | UTF-8 | 460 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Model\Table;
use Cake\ORM\Table;
class StaffsTable extends Table{
public function initialize(array $config): void{
$this->setTable("staffs");
$this->belongsTo("staffCollege", [
"className" => "Colleges",
"foreignKey" => "collegeid",
]);
... | true |
f9c0c312c26baf8cee8455e35e39c6f742529bab | PHP | 00dav00/marcadores-minimal | /app/Http/Requests/TorneoRequest.php | UTF-8 | 2,469 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Requests;
use App\Http\Requests\Request;
class TorneoRequest extends Request {
public static $rules = [
'tor_nombre' => 'required|string|min:3',
'tor_anio_referencia' => 'required|integer',
'tor_fecha_inicio' => 'required|date_format:Y-m-d',
'tor_fecha_fin' => 'required|date_format:... | true |
3e6681aa36fe56c492c85c354e1ee18616117bee | PHP | TheFaro/simple_ride_api | /register_user/upload_profile_image.php | UTF-8 | 2,678 | 2.578125 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS");
header("Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With");
header('Content-Type: application/json');
// array holding allowed Origin domains
$allowedOrigins = array(
'(... | true |
c49732bfb27ffed3d26a9e4005efadbc5702db26 | PHP | jasoncases/pa_preview | /src/Proaction/Domain/Payroll/Resource/Record.php | UTF-8 | 4,594 | 2.578125 | 3 | [] | no_license | <?php
namespace Proaction\Domain\Payroll\Resource;
use Proaction\Resource\Payroll\Summary;
class Record
{
protected $_shifts;
protected $_paid;
protected $_break;
protected $_lunch;
protected $_clock;
protected $_rate;
protected $_reg;
protected $_ot;
protected $_intRate;
pro... | true |
b9772dc89449ac83e07128b660eb2392876a8620 | PHP | cubaguest/CubeCMS | /lib/debug/debug.class.php | UTF-8 | 4,436 | 2.796875 | 3 | [] | no_license | <?php
/**
* Třída pro výpisy a debug kódu
*
* @copyright Copyright (c) 2010 Jakub Matas
* @version $Id: $ VVE 6.4 $Revision: $
* @author $Author: $ $Date: $
* $LastChangedBy: $ $LastChangedDate: $
* @abstract Třída pro obsluhu debug
*/
//require_once('FirePHPCore/FirePHP.class.p... | true |
506f18806b495f7bb9ec4f60b7cfdc2bf65a2037 | PHP | xiaobinghhh/LaravelPing | /app/Http/Controllers/Teacher/ReportController.php | UTF-8 | 21,681 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Teacher;
use App\Application\Course;
use App\Http\Requests\UploadFileRequest;
use App\Http\Requests\UploadNewFolderRequest;
use App\Services\ReportUploadsManager;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\DB;
use Illuminate\Su... | true |
cfacccdde772bdf0e8926522725d25426106fde2 | PHP | dwoods447/NDCWebRequestSystem | /coordinators.inc.php | UTF-8 | 4,572 | 2.59375 | 3 | [] | no_license |
<?php
if(isset($_POST['delete']) && isset($_POST['coordinatorID'])) :
require_once 'connect.php';
$coordinatorID = $_POST['coordinatorID'];
$deleteCoord = "DELETE FROM coordinators WHERE coordinatorID = {$coordinatorID}";
$result = mysqli_query($conn, $d... | true |
d9256d3d6699fd76bc4a17b64d46a3ac0f66ef6f | PHP | RafaelCecilio/isabels | /mail/contact_me.php | UTF-8 | 1,176 | 2.78125 | 3 | [
"Apache-2.0"
] | permissive | <?php
// Check for empty fields
if(empty($_POST['name']) ||
empty($_POST['email']) ||
empty($_POST['phone']) ||
empty($_POST['message']) ||
!filter_var($_POST['email'],FILTER_VALIDATE_EMAIL))
{
echo "No arguments Provided!";
return false;
}
require_once 'swift/lib/swift_required.php';
// p... | true |
7df6c1bd251eca41196dfd06b506e4621c72e190 | PHP | 2j0ye/SlimBlogDemo | /app/inc/menu.php | UTF-8 | 967 | 3.09375 | 3 | [] | no_license | <?php
/**
* Get the Primary Menu Items
*/
function menuGetPrimaryItems() {
$items = array();
$items[] = array('title' => 'Home', 'url' => '/');
$items[] = array('title' => 'Blog', 'url' => '/Blog');
$items[] = array('title' => 'Archive', 'url' => '/Archive');
return menuPrepareItems($items);
}
... | true |
e7b8842340b756998ea299030b55c1341c172342 | PHP | Rajeshwarikrish/refactor_act | /classes/db/dbConn.php | UTF-8 | 707 | 2.859375 | 3 | [] | no_license | <?php
namespace classes\db;
use \PDO;
define('DATABASE', 'rk633');
define('USERNAME', 'rk633');
define('PASSWORD', 'LKVWAEKo');
define('CONNECTION', 'sql.njit.edu');
final class dbConn {
protected static $db;
private function __construct() {
try {
self::$db = new PDO( 'mysql:host=' . CONNECTION . ';db... | true |
274f14e86675d0c808b822ac387fa0942b1939d1 | PHP | 64robots/laravel-thinq | /src/Thinq.php | UTF-8 | 1,780 | 2.5625 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
namespace R64\LaravelThinq;
use Exception;
use Illuminate\Support\Facades\App;
class Thinq
{
public $config;
public $thinqMessage;
public function __construct(ThinqConfig $config)
{
$this->config = $config;
}
public function withMessage(ThinqMessage $message)
{
$th... | true |
29f945abb61f35ddb41d89f6f05269c5b10e8d00 | PHP | hayato-nishiyama/kadai-tasklist | /app/Http/Controllers/TasksController.php | UTF-8 | 3,696 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Task;
class TasksController extends Controller
{
/**
* リソースのリストを表示します。
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//未ログインだとwelcomeページに遷移
if(!\Auth::check()){
... | true |
54ef697497a265b7fc67d47cecc6de599f13ee32 | PHP | umjinsun12/woocommerce-plugin | /mshop-point-ex/includes/class-msps-point-wallet.php | UTF-8 | 3,026 | 2.875 | 3 | [] | no_license | <?php
if ( ! class_exists( 'MSPS_Point_Wallet') ) {
include_once ( 'abstracts/abstract-msps-wallet-item.php' );
class MSPS_Point_Wallet {
protected $user_id;
protected $wallet_items = null;
public function __construct ( $user_id ) {
$this->user_id = $user_id;
}
public function get_wallet_class_name... | true |
c9c51550d0d6a1e699a39c52414fb4ecba6761da | PHP | greatMoyuvan/cecewsn | /app/Http/Controllers/AdminController.php | UTF-8 | 2,519 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\User;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Input;
class AdminController extends Controller
{
/**
* List All user in database
*
* @return array
*/
public function getUserList() {
$users = DB::select("select ... | true |
48496c8946d125f0ad862a4ef18ee13e5b7b3cb0 | PHP | shamim-web/newuser.github.io | /deletedata.php | UTF-8 | 629 | 2.515625 | 3 | [] | no_license | <?php
$size=sizeof($_POST);
$j=1;
for($i=1;$i<=$size;$i++,$j++)
{
$index="sd".$j;
if(isset($_POST[$index]))
$s_no[$i]=$_POST[$index];
else
$i--;
}
$con=mysqli_connect('localhost','root');
mysqli_select_db($con,'final');
for($k=1;$k<=$size;$k++)
{
$q="delete from data where s_no=".$s_no[$k];
my... | true |
2f2bda981dcb6e4e6957e88f1ddb59c1977ceddf | PHP | sultugamer7/gorgeous-snaps | /login.php | UTF-8 | 3,243 | 2.609375 | 3 | [] | no_license | <?php
if(isset($_POST['Submit'])){
include("database.php");
// Getting values from log in form fields
$username = urlencode(utf8_encode($_POST['username']));
$password = $_POST['password'];
// Escape User Input to help prevent SQL Injection
$username = mysqli_real_escape_string($con,$username);
... | true |
2000266d2200e5c2357c793ea1417b60735d7da0 | PHP | ozymaxx/libman | /visitroom.php | UTF-8 | 4,914 | 2.734375 | 3 | [] | no_license | <?php
include_once( './lib/sql_connection.php');
include_once( './lib/funcs.php');
session_start();
display_page_head( 'LibMan | Visit Any Room ');
echo '<body>';
$con = connectToSql();
if( !isset( $_SESSION['visitor_id'] ) )
{
header( 'Location: index.php' ) ;
}
$visitor_id = $_SESS... | true |
2b65e3ca1a1cd7e842ba26253c600e2192aefed6 | PHP | AlexAndries/speed-theme-wp | /wp-json/register.php | UTF-8 | 1,150 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace SpeedTheme\WpJson;
class Register {
const NAMESPACE_NAME = 'speed-rest';
const VERSION = 'v1';
private $rests = array();
public function __construct() {
add_action('rest_api_init', array($this, 'registerREST'));
}
public static function getNamespace() {
return self::NAM... | true |
04c6a4d89877ce32b08df8c3ac1c565f10ae92e5 | PHP | softwinner813/foras-backend-master | /app/helpers.php | UTF-8 | 882 | 2.984375 | 3 | [] | no_license | <?php
if (! function_exists('distance')) {
function distance($lat1, $lng1, $lat2, $lng2, $unit, $round) {
$result = 0;
if (($lat1 == $lat2) && ($lng1 == $lng2)) {
$result = 0;
}
else {
$theta = $lng1 - $lng2;
$dist = sin(deg2rad($lat1)) * sin(deg2rad($lat2)) + cos(deg2rad(... | true |
0e74f36839e743f872af819b050bab23afa76938 | PHP | slevomat/coding-standard | /SlevomatCodingStandard/Sniffs/Functions/StrictCallSniff.php | UTF-8 | 3,445 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types = 1);
namespace SlevomatCodingStandard\Sniffs\Functions;
use PHP_CodeSniffer\Files\File;
use PHP_CodeSniffer\Sniffs\Sniff;
use SlevomatCodingStandard\Helpers\TokenHelper;
use function array_key_exists;
use function count;
use function in_array;
use function ltrim;
use function sprintf;
use ... | true |
327331b7869613c2c1175a68d3f52c77cf39ce2c | PHP | DeepakSinghGitHubAccount/php-socket-and-web-socket | /workin_socsoc1.php | UTF-8 | 5,113 | 3.046875 | 3 | [] | no_license | <?php
error_reporting(~E_NOTICE);
set_time_limit (0);
$address = "127.0.0.1";
$port = '9000';
$max_clients = 10;
$null = NULL;
if(!($sock = socket_create(AF_INET, SOCK_STREAM, 0)))
{
$errorcode = socket_last_error();
$errormsg = socket_strerror($errorcode);
die("Couldn't create socket: [$err... | true |
6b699bf01b6a3d6d0ecddf3775c8c1c6eed55f78 | PHP | davof91/prituk | /rest/get_suggestions.php | UTF-8 | 2,154 | 2.625 | 3 | [] | no_license | <?php
header('Content-Type: application/json');
//Receive the RAW post data.
$content = trim(file_get_contents("php://input"));
//Attempt to decode the incoming RAW post data from JSON.
$decoded = json_decode($content, true);
include 'db.php';
$errors = [];
$error = FALSE;
$top = 10;
$bottom = 0;... | true |
b5a2bc0f76678d1221edad2cd9f49edd30895306 | PHP | robinsparky/tennis | /wp-plugins/tennisevents/includes/manage-urls.php | UTF-8 | 2,011 | 2.53125 | 3 | [] | no_license | <?php
/**
* This file provides example of how to setup query vars
* and include them into the WP_Query querying
* NOT USED so far.:-)
*/
/**
* Register custom query vars
*
* @param array $vars The array of available query variables
*
* @link https://codex.wordpress.org/Plugin_API/Filter_Reference/query_vars
... | true |
11ca2e0b4311f53f1c6ac2fea58f0ef42dc00d5f | PHP | Kenshirosan/cassandra | /cassandra.php | UTF-8 | 1,431 | 2.71875 | 3 | [] | no_license | <?php
$config = require 'config.php';
$cluster = Cassandra::cluster()
->withCredentials($config['cassandra']['user'], $config['cassandra']['password'])
->build(); // connects to localhost by default
$keyspace = 'webcreation';
$session = $cluster->connect($keyspace); ... | true |
13c46a1da689a7affa189e993355c351389cbcf9 | PHP | richardmwaba/NSFAS | /app/Http/Controllers/PasswordController.php | UTF-8 | 2,063 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Http\Response;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Hash;
use App\User;
use Illuminate\Support\Facades\Validator;
class PasswordController extends Controller
{
//
... | true |
6561ebb05509fa94379207e85811c52085cfe5ed | PHP | aowsr/KV6002-Team-Project | /FINAL/Master2/categories.php | UTF-8 | 5,032 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
session_start();
// Check if the user is logged in, if not then redirect to login page
if (!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true) {
header("location: login.php");
exit;
}
//if the user is a admin account
if (($_SESSION["userType"] == 'Admin')) {
header("location: home_admin.... | true |
e131d2b80b076e85a13ed59980423b5fc8abd97b | PHP | trudmeta/affiliate | /wp-content/plugins/affiliate-links/pro/class-affiliate-links-pro-settings.php | UTF-8 | 2,108 | 2.59375 | 3 | [] | no_license | <?php
// If this file is called directly, abort.
if ( ! defined( 'ABSPATH' ) ) {
die();
}
require_once AFFILIATE_LINKS_PLUGIN_DIR . 'admin/class-affiliate-links-settings.php';
class Affiliate_Links_Pro_Settings {
public function __construct() {
$this->add_fields();
$this->update_tabs();
}
public function add... | true |
77f9127d6b6c866bd4d8733358d06ac4f3d55d9f | PHP | CMKoge/Business-network | /includes/classes/mail.php | UTF-8 | 1,445 | 3.15625 | 3 | [] | no_license | <?php
/**
* Send Mails
*/
class Mail {
private $_mail;
private $_username = 'charunaent@gmail.com';
public function __construct($mail) {
$this->_mail = $mail;
$this->_mail->SMTPDebug = 0; // Enable verbose debug output change this to 1 on production
$this->_mail->isSMTP(); // Set mai... | true |
ebe5236a1b032af0516599eccd01a24373959384 | PHP | Blue-Bytes/e-store | /src/main/models/DataValidation.php | UTF-8 | 825 | 2.953125 | 3 | [] | no_license | <?php
class DataValidation
{
public static function client_name(String $name) {
$valid_name='/^([a-z][ ]?)+$/i';
return preg_match($valid_name, $name);
}
public static function client_email(String $email) {
return filter_var($email, FILTER_VALIDATE_EMAIL);
}
// date format m... | true |
61397eee711aa0e86536ff970e8d9b26b5b235ca | PHP | ferdn4ndo/arctouch | /backend/class/EndpointHandler.php | UTF-8 | 9,633 | 3.0625 | 3 | [] | no_license | <?php
/**
* ArcTouch TMDb Interface
*
* Main endpoint requests handler
*/
class EndpointHandler {
private $endpointURL = ""; #Used to store current endpoint URL
private $apiKey = ""; #Used to store API key
private $requestLang = ""; #Used to store language for requests
#List of available endpoints
public $a... | true |
8e4dec22baede7a0c7cfd2d51b64356abe9f17a3 | PHP | bagelbyte/surveyApp_v2 | /app/Http/Controllers/SurveyController.php | UTF-8 | 2,237 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class SurveyController extends Controller
{
public function getAllSurveys(){
return response()->json(\App\Survey::all());
}
public function getSurvey($id){
echo \App\Survey::find($id);
}
public function getAllUse... | true |
32e68d9f66a8fa6bb12d576f75d3f6950ac0ca59 | PHP | lertify/lastfm-api | /src/Lertify/Lastfm/Api/Data/Track.php | UTF-8 | 4,872 | 2.78125 | 3 | [] | no_license | <?php
namespace Lertify\Lastfm\Api\Data;
class Track
{
/**
* @var string
*/
protected $name;
/**
* @var string
*/
protected $url;
/**
* @var string
*/
protected $mbId;
/**
* @var int (seconds)
*/
protected $duration;
/**
* @var bool
*/
protected $streamable = false;
/**
* @var boo... | true |
d3f0bdba187b6f666a3be8b28bc4b2d9e7d369c1 | PHP | dmileyko/ferguson | /application/model/ticket.php | UTF-8 | 2,532 | 2.703125 | 3 | [] | no_license | <?php
if (!class_exists('TicketModel')) {
class TicketModel
{
function __construct($db)
{
//try {
$this->db = $db;
//} catch (PDOException $e) {
// exit('Database connection could not be established.');
//}
}
/**
* Get all songs from ... | true |
8e90ea03f25bf65317781873e372159efe61c2f8 | PHP | bondkirik/laravel-dms | /app/Models/Tag.php | UTF-8 | 2,453 | 2.625 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class Tag
*
* @package App
* @property User createdBy
* @property string name
* @property string color
* @property integer created_by
* @property string custom_fields
* @property int $id
* @property \Illuminate\Support\Carbon|null $c... | true |
146a38f5d85bc9f5383104ae4bddf3583d4c3d16 | PHP | ticdenis/hotelplex | /src/HotelPlex/Application/Service/Payment/PaymentListService.php | UTF-8 | 928 | 2.6875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace HotelPlex\Application\Service\Payment;
use HotelPlex\Application\Presenter\Payment\PaymentListPresenter;
use HotelPlex\Application\Service\EmptyRequest;
use HotelPlex\Application\Service\Service;
use HotelPlex\Domain\Repository\Payment\PaymentQueryRepository;
class PaymentLi... | true |
ef20669550d0dc064b79219bd35aec6b58905efe | PHP | enigma-dev/EDC | /cloud/upload.php | UTF-8 | 1,537 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
//The general code to upload a file from a user's computer.
//Copyright (C) 2013 IsmAvatar <IsmAvatar@gmail.com>
//This file is licensed under the MIT license. See LICENSE for details.
var_dump($_FILES);
$fi = reset($_FILES);
if (isset($fi['error']) && ($fi['error'] !== UPLOAD_ERR_OK)) {
if ($fi['error'] == UP... | true |
66270199f923d388642eafa5cf0482ee00f98276 | PHP | artempetrovskiy/myproject | /DZ2208.php | UTF-8 | 3,975 | 4.03125 | 4 | [] | no_license | <?php
// Exercise 1
/**
* @param $arg
* @return int
*/
function getPlus10($arg)
{
$res = $arg + 10;
echo $res . "\n";
return $res;
}
getPlus10(10);
getPlus10(true);
getPlus10(-10);
getPlus10(false);
getPlus10(0.00001);
getPlus10(null);
// Exercise 2
$myArr = ["first" => 45, "second" => 76, "third" ... | true |
9ce781af450e3bec937035a864f4063dc298f38c | PHP | nkleinstra/kleinstramaasbracht | /contactform.php | UTF-8 | 1,848 | 2.515625 | 3 | [] | no_license | <?php
//start de sessie
session_start();
require_once 'security.php';
$errors= isset($_SESSION['errors']) ? $_SESSION['errors'] : [];
$fields= isset($_SESSION['fields']) ? $_SESSION['fields'] : [];
?>
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Contact form</title>
<!-- contact f... | true |
ac922737fc8dceb91bce0d8a1f3228a5ade62891 | PHP | Andy-Den/magento1-Aoe_LogViewer | /app/code/community/Aoe/LogViewer/Model/Command/Collection.php | UTF-8 | 1,530 | 2.578125 | 3 | [] | no_license | <?php
/**
* Command collection
*
* @author Fabrizio Branca
* @since 2013-01-22
*/
class Aoe_LogViewer_Model_Command_Collection extends Aoe_LogViewer_Model_AbstractCollection
{
/**
* @var Aoe_LogViewer_Model_Log_Abstract
*/
protected $_log;
/**
* Constructor
*
* @param array ... | true |
0c260eeedf1be177128c8f8083bcf6837076e51e | PHP | flycj/mea | /database/migrations/2017_08_17_085417_create_columns_table.php | UTF-8 | 1,279 | 2.609375 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateColumnsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('columns', funct... | true |
20ed710c6abe175748a0af0d65a01d32f0f6ea2b | PHP | G4-software/wunderzeitung | /check_login.php | UTF-8 | 1,053 | 2.6875 | 3 | [] | no_license | <?php
require_once 'db.php';
if(isset($_COOKIE['wz-user']) && isset($_COOKIE['wz-session']))
{
$username = $_COOKIE['wz-user']; //get data from cookie
$session = $_COOKIE['wz-session'];
//get data from database
$db_query = $db->prepare("SELECT `id`, `last_session_hash`, `name` FROM `users` WHERE... | true |
37b9d1ffd3a44964e302dc3b43b55a64144a799d | PHP | albertdiones/add-framework | /classes/dom/dom_wrapper.class.php | UTF-8 | 6,520 | 3.0625 | 3 | [] | no_license | <?php
/**
* DOM wrapper for dom and html elements manipulation, with CSS like searching (see find())
* Based on the function names of Jquery
*
* @author albertdiones@gmail.com
*
* @package ADD MVC DOM Tools
* @since ADD MVC 0.0
* @version 0.0
*/
ABSTRACT CLASS dom_wrapper {
/**
* The $ins... | true |
0c256218222aa2d1d1bea1e64a8e861bf63f560d | PHP | vysak/redwine-logger | /RabbitMQExchangeFactory.php | UTF-8 | 1,493 | 3.03125 | 3 | [] | no_license | <?php
require_once 'RabbitMQConfiguration.php';
class RabbitMQExchangeFactory{
private $connection;
public function __construct(){
$this->connection = new AMQPConnection();
$this->connection->setLogin(RabbitMQConfiguration::USER);
$this->connection->setPassword(RabbitMQConfiguration::PASSWORD);
$this->conne... | true |
8d3b5671a038a8b603c82302df170f69560f8753 | PHP | foxycode/forum | /app/Presenters/HomepagePresenter.php | UTF-8 | 1,163 | 2.71875 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace App\Presenters;
use App\Model\ThreadRepository;
final class HomepagePresenter extends BasePresenter
{
/**
* @var ThreadRepository
*/
private $threadRepository;
public function __construct(ThreadRepository $threadRepository)
{
parent::__const... | true |
02f3b5b3fb4734be6e5096a0c1b90dfc3ea2311f | PHP | jaysonp/convictionmain | /contactform.php | UTF-8 | 966 | 2.9375 | 3 | [] | no_license | <?php
$Name = htmlspecialchars($_POST['Name']);
$Email = htmlspecialchars($_POST['Email']);
$Comment = htmlspecialchars($_POST['Comment']);
/*
echo "name: $Name<br />";
echo "email: $Email<br />";
echo "comment: $Comment<br />";
/* Test stuff
$name = "Jayson";
$email = "jays@test.com";
$comment = "testing test stu... | true |
635688d04b4c440f79539e2b66dd4415cc2fb38d | PHP | zjjzjw/web_fangquan | /fangquan/core/app/Src/Content/Infra/Repository/ContentCategoryRepository.php | UTF-8 | 6,115 | 2.625 | 3 | [
"MIT"
] | permissive | <?php namespace App\Src\Content\Infra\Repository;
use App\Foundation\Domain\Repository;
use App\Src\Content\Domain\Interfaces\ContentCategoryInterface;
use App\Src\Content\Domain\Model\ContentCategoryEntity;
use App\Src\Content\Domain\Model\ContentCategorySpecification;
use App\Src\Content\Infra\Eloquent\ContentCatego... | true |
3d89db04c6baed5b149fdf1a97b34f8c0b213edd | PHP | ashah-kaira/laravel-4.2-Test | /app/models/infrastructure/common.php | UTF-8 | 3,791 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Infrastructure;
use Illuminate\Support\Facades\DB;
use \Mail;
use \stdClass;
class Common
{
public static function SendEmail($bodyTempate, $bodyData,$subject, $toEmail,$toEmailName)
{
try
{
$dataModel=new StdClass();
$dataModel->Subject=$subject;
$dataModel->ToEmail=$toEmail;
... | true |
3f9881590136817853181e177799f1c9ebc4bb73 | PHP | jacksongomesbr/livro-web-codigo-fonte | /front-end/sistema-eventos/g1/api/index.php | UTF-8 | 4,213 | 2.53125 | 3 | [
"CC0-1.0"
] | permissive | <?php
require_once 'vendor/autoload.php';
require_once 'database.php';
use Symfony\Component\HttpFoundation\Request;
date_default_timezone_set('America/Araguaina');
setlocale(LC_ALL, 'pt_BR.utf-8');
$app = new Silex\Application();
$app->register(new JDesrosiers\Silex\Provider\CorsServiceProvider(), array(
"cors.... | true |
4a575c486a54b55eef3d2eccc9c3b1dbf230a04e | PHP | guoyu07/Weblibre | /src/app/presenters/SignPresenter.php | UTF-8 | 2,913 | 2.71875 | 3 | [] | no_license | <?php
/**
* This file is part of the Weblibre
*
* Copyright (c) 2012 Radim Kocman (xkocma03)
* @author Radim Kocman
*/
use Nette\Application\UI,
Nette\Security as NS;
/**
* Sign in/out presenter
*
* @author Radim Kocman
*/
final class SignPresenter extends BasePresenter
{
/**
... | true |
bd5dcea6fa1574587f86bb40022ba1b352c97d49 | PHP | brino/larablog | /app/Http/Controllers/Admin/ArticleController.php | UTF-8 | 5,768 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\Article;
use App\Category;
use App\Http\Requests\ArticleRequest;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Gate;
use Illuminate\Support\Facades\Session;
use App\Tag;
/**
* Class ArticleController
* @p... | true |
dfc4268134bccf5b22e94f8ad8a3228f4e110b9b | PHP | cloud-wu/ChunkedSum | /tests/ChunkedSumTest.php | UTF-8 | 1,260 | 2.703125 | 3 | [] | no_license | <?php
namespace App;
use App\ChunkedSum;
use PHPUnit\Framework\TestCase;
class ChunkedSumTest extends TestCase
{
private $collect = [
['cost' => 1, 'revenue' => 11, 'sellprice' => 21],
['cost' => 2, 'revenue' => 12, 'sellprice' => 22],
['cost' => 3, 'revenue' => 13, 'sellprice' => 23],
['cost' => 4, 'reven... | true |
4f2a0b8644dbd6cbb2cb567d7bad7ff307717748 | PHP | norbertogomez/Elastica | /test/Elastica/Connection/Strategy/CallbackStrategyTest.php | UTF-8 | 2,483 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace Elastica\Test\Connection\Strategy;
use Elastica\Connection\Strategy\CallbackStrategy;
use Elastica\Test\Base;
/**
* Description of CallbackStrategyTest.
*
* @author chabior
*/
class CallbackStrategyTest extends Base
{
/**
* @group unit
*/
public function testInvoke()
{
... | true |
ef655b0685c9f69ccc76c9ecd52e05ef12a2336a | PHP | titledk/silverstripe-calendar | /code/calendars/EventCalendarExtension.php | UTF-8 | 568 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Event Calendar Extension
* Allowing events to have calendars
*
* @package calendar
* @subpackage calendars
*/
class EventCalendarExtension extends DataExtension
{
public static $has_one = array(
'Calendar' => 'Calendar',
);
public function updateFrontEndFields(FieldList $fields)
... | true |
fe6f3b0c08de055dd97d21697e4ecb3792b1f303 | PHP | nurielmeni/memad3-save | /models/ApplyForm.php | UTF-8 | 633 | 2.640625 | 3 | [] | permissive | <?php
namespace app\models;
use yii\base\Model;
use yii\web\UploadedFile;
class ApplyForm extends Model
{
/**
* @var UploadedFile
*/
public $cvFile;
public function rules()
{
return [
[['cvFile'], 'file', 'skipOnEmpty' => false, 'extensions' => 'docx, d... | true |
5de7d3aae27674f302cf5d928621a2aff145e2d0 | PHP | hlfcoding/hlf-feb | /html/index.php | UTF-8 | 1,157 | 2.921875 | 3 | [] | no_license | <?php
/**
* FrontEnd Builds Framework
* For when you just need the frontend done and the backend solution is unknown
*
* HTML Directory Index
* - written with CodeIgniter syntax conventions
* - unless you want to change application behavior, do not modify this file
*
* @version 1.0
* @author ... | true |
c494e2d2ec3d389b37be003f3ffe1203ef3f1a88 | PHP | alibabouche/portfolioPhoto | /contact.php | UTF-8 | 1,424 | 2.71875 | 3 | [] | no_license | <?php
$header ="MIME-Version: 1.0\r\n";
$header.='From:"Youssef Kheroua"<kheroua.s@gmail.com>'."\n";
$header.='Content-Type:text/html; charset="uft-8"'."\n";
$header.='Content-Transfer-Encoding: 8bit';
$beginHtml = "<html><body style='background-color: #0e64ea;'><p>";
$endHtml = "</p></body></html>";
if(!emp... | true |
52ec80da0b711b0697390fe6feaef523cff9e488 | PHP | juandevia/IOT-pagina-web | /logout.php | UTF-8 | 398 | 2.609375 | 3 | [] | no_license | <?php
// Basado en https://www.tutorialrepublic.com/php-tutorial/php-mysql-login-system.php
// Inicializa una nueva sesión o identifica la sesión actual
session_start();
// Se limpian todas las variables de la sesion con un nuevo arreglo vacío
$_SESSION = array();
// Se destruye la sesion.
session_destroy();
// S... | true |
322bc7a2bd4d0aadd7672171a89441a2171764c6 | PHP | xWazzo/kunai | /lib/fen-admin-page-framework.3.8.15/library/admin-page-framework/custom-field-types/path-custom-field-type/PathCustomFieldType.php | UTF-8 | 20,885 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Admin Page Framework
*
* Facilitates WordPress plugin and theme development.
*
* @author Michael Uno <michael@michaeluno.jp>
* @copyright 2013-2017 (c) Michael Uno
* @license MIT <http://opensource.org/licenses/MIT>
* @package fen_AdminPageFramework
*/
if ( ! class_exist... | true |
84f9e7786780cfe54ab11f253c892343e6cd451d | PHP | pborreli/Geotools | /tests/Geotools/Tests/Point/PointTest.php | UTF-8 | 7,783 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file is part of the Geotools library.
*
* (c) Antoine Corcy <contact@sbin.dk>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Geotools\Tests\Point;
use Geotools\Tests\TestCase;
use Geotools\Point\Point... | true |
ca3dba70bcf09f2bfba3dcd1a84206dfbe4df2de | PHP | bettershop/LaikeTui | /php/app/keengine/smarty/internals/core.rm_auto.php | UTF-8 | 2,286 | 2.625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Smarty plugin
* @package Smarty
* @subpackage plugins
*/
/**
* delete an automagically created file by name and id
*
* @param string $auto_base
* @param string $auto_source
* @param string $auto_id
* @param integer $exp_time
* @return boolean
*/
// $auto_base, $auto_source = null, $auto_id = n... | true |
e38bdcb2c6cf996b62a6641707847dfc8f5241f7 | PHP | zern3w/optimumtent_uk | /inc/gettimestamp.php | UTF-8 | 4,526 | 2.8125 | 3 | [] | no_license | <?php
$query=mysqli_query("SELECT LastUpdate from all_tents WHERE Asin='B016N7DFMI'");
while($res=mysqli_fetch_array($query))
{
$LastUpdate = $res['LastUpdate'];
}
echo $LastUpdate;
$TimeNow = date("Y-m-d H:i:s");
$recentupdate = date("M jS, Y", strtotime(substr($LastUpdate, 0, -9)));
$timestamp = substr($La... | true |
14b70da8ea971f0d7b0dbc6496b3d33ea68a434b | PHP | rattanaksar/Partie-1-Exo-3-php | /Exo 3.php | UTF-8 | 483 | 3.5 | 4 | [] | no_license | <?php
$km = 1;
$km2 = 3;
$km3 = 125;
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Exo 3 : Les variables PHP</title>
</head>
<bo... | true |
4b3677e2c5bd0f1a6b354b2256fdc91a74b7feb0 | PHP | beta-eto-code/bx.model | /tests/Stubs/Error.php | UTF-8 | 504 | 3 | 3 | [] | no_license | <?php
namespace Bitrix\Main;
class Error
{
/**
* @var string
*/
private $message;
private $code;
private $customData;
public function __construct(string $message, $code = null, $customData = null)
{
$this->message = $message;
$this->code = $code;
$this->custo... | true |
1818a61e0851d49de494591b11a990e61f130d57 | PHP | jakxid/test | /main.php | UTF-8 | 1,514 | 3.9375 | 4 | [] | no_license | <?php
class Farm {
static $id = 1;
public $numberAnimal = 0;
public function getProduct() {}
public function getNameClass() {
return get_class($this);
}
}
class Chicken extends Farm {
pub... | true |
0f7d3d2070313503dd8b2693861920c6315c17cb | PHP | eugene-mindset/Poli-Interactive | /public_html/PartisanBills.php | UTF-8 | 1,212 | 2.734375 | 3 | [
"MIT"
] | permissive | <!-- Anderson Adon, aadon1 | Eugene Asare, easare3 -->
<head>
<title>Bill with most Senate Yes Votes</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<?php
// Open a connection to dbase server
include 'open.php';
echo "<h2>Bills That Were Completely Partisan</h2>";
// Create pre... | true |
8dd39aa9d46cc4009f13a8de44b0b6579ee0131f | PHP | jdupak/school | /leden6_sorting.php | UTF-8 | 843 | 3.40625 | 3 | [] | no_license | <?php
function randArray($n = 100)
{
for ($i=0; $i < $n; $i++) {
$array[] = rand(1,1000);
}
return $array;
}
function quicksort($array)
{
function cut($array){
$pivot = $array[0];
foreach ($array as $key => $value) {
if ($value < $pivot) {
$array_s[] = $value;
}
... | true |
f9f612a16416771338f7b3f65666f640a62ad7bd | PHP | blue32a-sandbox/tdd-part1-php | /src/Part01TheMoneyExample/Ch05FranclySpeaking/Franc.php | UTF-8 | 453 | 3.609375 | 4 | [] | no_license | <?php
declare(strict_types=1);
namespace TDDPHP\Part01TheMoneyExample\Ch05FranclySpeaking;
class Franc
{
private int $amount;
public function __construct(int $amount)
{
$this->amount = $amount;
}
public function times(int $multiplier): Franc
{
return new Franc($this->amount ... | true |
a56ec07e167e2dd406ad6c0bb21911754ccfa8d2 | PHP | Wolfhounds227/QuizMaster-master | /preferences.php | UTF-8 | 2,543 | 2.609375 | 3 | [] | no_license | <?php
require 'db_config.php';
session_start();
if(isset($_POST['topics']) && isset($_POST['questions_to_show'])){
$sql = "update preferences set value=".$_POST['topics']." where name='NO_OF_TOPICS_PER_ROW';";
run_sql($sql);
$sql = "update preferences set value=".$_POST['questions_to_show']." where name='NO_OF... | true |
58756637fe3f8c3a14735dfe1cd60c10a4e69387 | PHP | DrNixx/yii2-kendo | /src/dataviz/ui/ChartLegend.php | UTF-8 | 2,743 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace kendo\dataviz\ui;
use kendo\SerializableObject;
class ChartLegend extends SerializableObject {
/**
* The background color of the legend. Any valid CSS color string will work here, including hex and rgb.
* @param string $value
* @return \kendo\dataviz\ui\ChartLegend
*/
pub... | true |
9fed9578dcce5221500b12ebade8b286528478d6 | PHP | PauliusVaisvilas/crud | /process.php | UTF-8 | 1,756 | 2.75 | 3 | [] | no_license | <?php
session_start();
//prisijungimas prie DB
$mysqli = new mysqli('localhost', 'root', 'mysql', 'crud') or die(mysqli_error($mysqli));
$id = 0;
$update = false;
$name = '';
$project = '';
//duomenu idejimas
if (isset($_POST['save'])){
$name = $_POST['name'];
$project = $_POST['project'];
... | true |
8e02bda7dc95fe71af6fc16d70cb899569d2b718 | PHP | JessicaLavoredo/TCC--Gerenciamento-de-Pedidos | /Backend/Controller/PedidoController.class.php | UTF-8 | 3,915 | 2.671875 | 3 | [] | no_license | <?php
class PedidoController extends BaseController {
function buscarPorId($id){
$pedido = (New PedidoData())->buscarPorId($id);
if (!isset($pedido)) {
return null;
}
$ret = $this->converterParaResponse($pedido);
... | true |
ec7e7b5e5198b3ab493beae995e6fcd864bb2402 | PHP | abbasCoder51/GuestBook | /getGuestDetails.php | UTF-8 | 1,189 | 2.9375 | 3 | [] | no_license | <?php
$guestPostDetails = new ArrayObject();
class GuestDetails{
private $guestId;
private $guestName;
private $guestDate;
private $guestEvent;
private $guestOccasion;
private $guestComments;
private $guestStatus;
public function __construct($enterGuestId, $enterGuestName, $enterGuestDate, $ente... | true |
3d5e439d373c4064c722ef5f276b9111634a4ec9 | PHP | alto4/WEBD2201Portfolio | /lab4/lab4comments.php | UTF-8 | 1,381 | 3.0625 | 3 | [] | no_license | <?php
$title = "Lab #4: Comments";
$file = "lab4.php";
$description = "Part of Lab #4 is captured in this page, and demonstrates the use of comments in PHP.";
$date = "February 17, 2020";
$banner = "Lab #4: PHP Chapter Files from Textbook";
include '../header.php';
?>
<div class="container">
<p>This pag... | true |
003d57ca16793baa45e9b9e8ad525b29c58a380a | PHP | tighten/tlint | /src/Config.php | UTF-8 | 2,958 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace Tighten\TLint;
use InvalidArgumentException;
use Tighten\TLint\Presets\PresetInterface;
use Tighten\TLint\Presets\TightenPreset;
class Config
{
public $paths = [];
public $excluded = [];
protected $preset;
protected $linters;
protected $formatters;
public function __construc... | true |
2f5e54c3b79d06e6adbb4a6aa4a65b5e16acf9b3 | PHP | artisanphil/coding_challenges | /2-3/php/index.php | UTF-8 | 755 | 3.53125 | 4 | [] | no_license | <?php
class symbolDrawings
{
private $symbol;
public function __construct($symbol)
{
$this->symbol = $symbol;
}
public function createHalfX($row)
{
echo str_repeat(" ", $row - 1);
echo str_repeat($this->symbol, $row);
//total size of grid is 15.
$padding... | true |
96947f7d8e170c05fb7057e8c9ffab9e49b75ef0 | PHP | zorto-pwa-group/magento2-blog-graphql | /Model/Resolver/BlogTags.php | UTF-8 | 4,964 | 2.5625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace ZT\BlogGraphQl\Model\Resolver;
use Exception;
use Magento\Framework\GraphQl\Exception\GraphQlInputException;
use Magento\Framework\Api\SearchCriteriaBuilder;
use Magento\Framework\Exception\LocalizedException;
use Magento\Framework\GraphQl\Config\Element\Field;
use Magento\Fra... | true |
c55d959821ef6a1f248201f90d086ae61cefd85f | PHP | advaitk13/HoosCleanin | /session.php | UTF-8 | 858 | 2.875 | 3 | [] | no_license | <?php
// Establishing Connection with Server by passing server_name, user_id and password as a parameter
$servername = "localhost";
$username = "advait";
$password = " ";
$dbname = "hooscleanin";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect... | true |
35f77230bcc18e7ec532e2d4535d30b17f39fb64 | PHP | lindicell/CadastroFornecedores | /exemplos/arquivoescreve.php | UTF-8 | 171 | 2.671875 | 3 | [] | no_license | <?php
$nome = "Lindice";
$endereco = "rua teste";
$fp = fopen("teste.txt", "a");
$escreve = fwrite($fp,"nome=" .$nome."endereco=".$endereco);
fclose($fp);
?> | true |
3794119021e4806ab8f7c1731e7243eb5eca3713 | PHP | tuansuzu/lipzo_phase1 | /app/controllers/AuthController.php | UTF-8 | 20,712 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
class AuthController extends \BaseController {
public function getUserLogin() {
return View::make('users.login')
->with('pageTitle','Đăng nhập');
}
public function postUserLogin() {
//let's first validate the form
$validation = Validator::make(Input::all(),User::$login_rules);
//if the v... | true |
29e4d6560fc608fd27442282493ab2eefdcebebc | PHP | Ryuki467/htdocs | /YPHPSample/06/Sample8.php | UTF-8 | 496 | 3.203125 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<title>サンプル</title>
</head>
<body>
<?php
$city = array("東京","名古屋","京都","大阪","福岡");
array_push($city, "長崎","鹿児島");
array_pop($city);
array_unshift($city,"札幌","仙台");
array_shift($city);
unset($city[2]);
?>
<table border="2">
<tr bgcolor="#AAAAAA">
<th>番号</th>
<th>都市名</th>
</tr>
<?php
... | true |
63b3dc8e193a79546b21be3103f2103d8e1587fb | PHP | chriscchen426/Jolt | /Testconductor/add_student.php | UTF-8 | 21,344 | 2.671875 | 3 | [] | no_license | <?php
//USER Story: Client want to search student information from existing student database when register student for the course..
//Version: OES1.2
//Developed by: DIPAKKUMAR PATEL
session_start();
if(!isset($_SESSION['tcname'])){
header('Location: index.php');
}
error_reporting(E_ALL ^ E_NOTICE);
include '../mysq... | true |