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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
6286b43e7baf7fa49f5125172a0b63f955335578 | PHP | Funtoprogram111/dates-ghabane | /app/Http/Controllers/UserController.php | UTF-8 | 923 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests\UserProfileRequest;
use Auth;
use Image;
use App\Models\User;
class UserController extends Controller
{
public function edit(User $user)
{
$user = Auth::user();
return view('frontend.profile', compact('user')... | true |
1e292f8e971946e81b9ae508e59bf22ed28fefd8 | PHP | PerfectTechCoding/crud-php | /dbconnect.php | UTF-8 | 1,501 | 2.671875 | 3 | [] | no_license | <?php
session_start();
$mysqli = new mysqli("localhost","root","","crud") or die(mysqli_error());
$name = "";
$location ="";
$update=false;
$id = "";
// Inserting a new record
if (isset($_POST["save"])) {
# code...
$name = $_POST["name"];
$location = $_POST["location"];
$mysqli->query("INSERT INTO ... | true |
5190ce872872eb2f750a21ee10ffdc933642832a | PHP | GBozhilov/PHP-Web-Development-Basics | /20. EXERCISE INTERFACES AND ABSTRACTION/InterfacesAndAbstractionEx/11.Vehicles/Car.php | UTF-8 | 588 | 3.609375 | 4 | [] | no_license | <?php
/**
* Class Car
*/
class Car extends Vehicle
{
private const CONSUMPTION_FACTOR = 0.9;
/**
* @param float $consumption
*/
protected function setConsumption(float $consumption): void
{
$this->consumption = $consumption + self::CONSUMPTION_FACTOR;
}
/**
* @param f... | true |
bf57217b3be49cafdbee81b7bccfd794c3d8dcb7 | PHP | Moonlightsculptor88/ERP-System | /admin/dash-search.php | UTF-8 | 2,427 | 2.515625 | 3 | [] | no_license | <?php
session_start();
require_once '../includes/config.php';
if(isset($_POST["action"]))
{
//echo $_POST['batch'];
?>
<div class="row">
<table id="example" >
<thead>
<tr>
<th>Name</th>
<th>Registration Number</th>
<th>Branch</th>
<th>Section</th>
<t... | true |
deaa9be11791d973827aac84b0a1b2d06a1dcb47 | PHP | drazgow/advent-of-code-2020 | /src/PassportProcessing/Parser.php | UTF-8 | 907 | 3.375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Aoc\PassportProcessing;
class Parser
{
private int $validPassport = 0;
public function parse(array $input): array
{
$passports = [];
$current = "";
foreach ($input as $line) {
if ($line === "" && $current !== "") {
... | true |
4e1098cda90c1da94a4c672b864e72acf66ad0e8 | PHP | uditabose/OfflineWebBackup | /OfflineWeb/OfflineWebFE/library/Utility.php | UTF-8 | 4,809 | 2.578125 | 3 | [] | no_license | <?php
//require_once 'WikiParser.php';
class Utility {
private static $appLogger = NULL;
public static function getSession() {
return new Zend_Session_Namespace("searchSession");
}
public static function getLogger() {
if (self::$appLogger == NULL) {
$logPath = self::getC... | true |
dae5ea151ef4b2e1a4aad36307194a0ee9eef971 | PHP | philipbjorge/TVFanatic | /application/server/tv-fanatic-api/prepopulate_shows.php | UTF-8 | 4,358 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file dynamically generates our database schema by
* inserting stub data for test purposes.
* Using Redbean PHP
*
* NOTE: No dependencies (aka cascade deletes) for maintaing key integrity
* are in place yet.
*/
require_once('db_config.php');
R::nuke();
$file = fopen("shows.txt", "r");
while (!... | true |
46d5dc546ef29d82ac9cc491a5d3636119f234db | PHP | OmarDakkak/ProjAWA | /vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/VersionCommand.php | UTF-8 | 8,243 | 2.609375 | 3 | [
"CC0-1.0",
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Doctrine\Migrations\Tools\Console\Command;
use Doctrine\Migrations\Exception\UnknownMigrationVersion;
use Doctrine\Migrations\Tools\Console\Exception\InvalidOptionUsage;
use Doctrine\Migrations\Tools\Console\Exception\VersionAlreadyExists;
use Doctrine\Migrations\Tools\Consol... | true |
47ae40e8f325aa118248e7c5bf200555800a230a | PHP | workleo/OvsX | /src/ovsx/classes/console/Game.php | UTF-8 | 5,499 | 3.34375 | 3 | [] | no_license | <?php
namespace console;
class Game
{
private const REGEX = "/[,.:;-]+/";
private const TEXTHELP =
"Enter Your move. For example : A1 or 2b or 1-C or a:2 and etc...\n"
. "If You wrong - You will see this text again.\n"
. "P.S Letter [E] is a quit of programm.";
private const START... | true |
4b24de1b42dee85ca39f98b8b605e43fa9255d00 | PHP | villocillok/SACI | /control_panel/forms/manage_faculties_edit.php | UTF-8 | 2,514 | 2.578125 | 3 | [] | no_license | <?php
session_start();
require_once('../requests/connection.php');
$connection = new Connection();
$connection->open();
$id = $connection->escape_string($_POST['id']);
$connection->query("SELECT * FROM accounts INNER JOIN librarian ON accounts.Account_ID=librarian.Librarian_ID WHERE accounts... | true |
b3043e657c9ec34af4414f60e1332891e3731f42 | PHP | malikhijazi/ta-app | /registerProf.php | UTF-8 | 2,795 | 2.53125 | 3 | [] | no_license | <?php
require_once("htmlStructure.php");
$body = <<<BODY
<h1>Register as a Faculty</h1>
<form action="addProf.php" method="post">
<div class="form-group">
<label for="email">Email address</label>
<input type="email" name="pro... | true |
d314374bc1cfaea478686050a91caa1ad2ef6ed2 | PHP | taytortot/capstone-1 | /public_html/grades/grade_edit_assignment.php | UTF-8 | 2,187 | 2.71875 | 3 | [] | no_license | <?php
//works
include_once('../header.php');
if(isset($_POST['submitted'])) //already updated
{
$ass_id = $_POST['ass_id'];
$student_id = $_POST['student_id'];
$sec_id = $_POST['sec_id'];
$points = $_POST['points'];
$points_poss = $_POST['points_poss'];
$sql = "update ass_grades set
ass_id = '$a... | true |
5c6bd1b6e2fb6bd6573b07b74264b9224ffd745e | PHP | tatianakobayashi/progweb | /Database/usuario-database.php | UTF-8 | 1,828 | 2.953125 | 3 | [] | no_license | <?php
require_once('connect.php');
require_once('Models/Usuario.php');
function getUsuario($email, $senha) {
$query = "select * from usuarios where email='{$email}'";
$resultado = mysqli_query($connection, $query);
$arr = mysqli_fetch_assoc($resultado);
if(!password_verify ($senha, $arr["senha"]))... | true |
169d8e95cca535156ace31290f9aefe8fb40acd4 | PHP | fortifi/ui | /src/ContentElements/Avatar/TextAvatar.php | UTF-8 | 864 | 2.984375 | 3 | [] | no_license | <?php
namespace Fortifi\Ui\ContentElements\Avatar;
use Packaged\Helpers\Strings;
class TextAvatar extends Avatar
{
protected $_text;
/**
* @return mixed
*/
public function getText()
{
return $this->_text;
}
/**
* @param mixed $text
*
* @return TextAvatar
*/
public function setTex... | true |
d105aa200897aa022663da41b8c936fca726f888 | PHP | sahartak/laravel-vue-material | /app/Http/Controllers/Api/UserController.php | UTF-8 | 1,042 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\Http\Requests\SignupRequest;
use App\Models\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
class UserController extends Controller
{
public function index()
{
$users = User::all()->toArray()... | true |
f2442999abc1e3d7a155e7523fab55acdbe1525b | PHP | woharmon14/milestone1.5 | /login2.php | UTF-8 | 1,092 | 2.6875 | 3 | [] | no_license | <?php
function display_content(){
?>
<?php
$string = file_get_contents("users.json");
$users = json_decode($string, true);
if(isset($_POST['login'])){
$username = $_POST['username'];
$password = $_POST['password'];
foreach ($users as $user) {
if($username==$user['username'] && $password==$user['passw... | true |
62465c5f29abff4f1980cf004b7a53d70eaaada1 | PHP | rathodviral/quotation-builder-server | /school/delete.php | UTF-8 | 589 | 2.5625 | 3 | [] | no_license | <?php
include_once '../header.php';
include_once 'school.php';
$dbclass = new DBClass();
$connection = $dbclass->getConnection();
$obj = new School($connection);
if (isset($_GET['id'])) {
$obj->school_id = intval($_GET['id']);
}else{
$error = new ErrorHandler();
$error->errorHandling('id');
return;
}... | true |
2da18cd5421d5e93285b0fe8491c9ec78eca2f9b | PHP | mamglezcom/master-php | /aprendiendo-php/19-validacion/procesarformulario.php | UTF-8 | 941 | 2.765625 | 3 | [] | no_license | <?php
$error = 'valores incompletos';
if(!empty($_POST['nombre']) && !empty($_POST['apellidos']) && !empty($_POST['edad'])
&& !empty($_POST['email']) && !empty($_POST['password'])){
echo 'entro if';
$error = 'ok';
$nombre = $_POST['nombre'];
$apellidos = $_POST['apellidos'];
$edad = $_POST... | true |
a81885208cf1a51a888a3fe472fc7bdaf97ad76a | PHP | raulbelmont/AESB | /model/ElencoModel.php | UTF-8 | 7,496 | 2.953125 | 3 | [
"MIT"
] | permissive | <?php
require_once 'CRUD.php';
class ElencoModel extends CRUD{
private $codigoElencado;
private $fotoDePerfil;
private $nome;
private $funcao;
private $tipo;
private $apelido;
private $fotos;
private $dataNascimento;
private $naturalidade;
private $nacionalidade;
protec... | true |
3d15e4a1c43182a3bc676a2e005c10c6de56d243 | PHP | tautvydascoding/2020-02-10 | /dirbame_cia/PROJEKTAI/Vita/models/funkc-meistrai.php | UTF-8 | 4,108 | 2.859375 | 3 | [] | no_license | <?php
// include('loginas.php');
// ===========================================================
function getApiemus() {
$manoSQL = "SELECT * FROM apiemus ";
// $rezultataiOBJ - Mysql Objektas
$rezultataiOBJ = mysqli_query(getPrisijungimas(), $manoSQL);
return $rezultataiOBJ;
}
// $visiTeigApiemus... | true |
d87ece089b423c33b12b2510988d22b241f465f5 | PHP | dhgovuk/engage | /dh-campaign/inc/widgets/widget_spotlight_spacer.php | UTF-8 | 1,753 | 2.671875 | 3 | [] | no_license | <?php
/**
* DH Campaign: Horizontal Spacer
*
* Inherits from DH_Campaign_Super_Widget
*
* @see super_widget.php
* @author Shajidul.Alom
*
*/
class DH_Campaign_Widget_Spotlight_Spacer extends DH_Campaign_Super_Widget {
/**
* Constructor.
*/
public function __construct( $id_bas... | true |
ffb308a452d8adb2a2cf93d729be3189aead7047 | PHP | Bogdan-zh/Homework | /shop/functions/functions.php | UTF-8 | 10,051 | 2.625 | 3 | [] | no_license | <?php
require 'data/data_pages.php';
require 'data/data_categories.php';
require 'data/data_products.php';
/*--------------------------------------------------------------------*/
function getPages($data_pages) {
if (file_exists('data/data_pages.php')) {
return unserialize($data_pages);
}
}
$pages = getPages... | true |
d284ea7aa245484008828ce484d99c625652abc9 | PHP | chromedia/online-distribution | /upload/system/utilities/UrlUtil.php | UTF-8 | 1,284 | 3.046875 | 3 | [
"CC0-1.0"
] | permissive | <?php
/**
* Provides helper methods for url manipulation
*/
class UrlUtil
{
private static $instance;
private $curlUtil;
const GOOGLE_ENDPOINT = 'https://www.googleapis.com/urlshortener/v1/url';
const API_KEY = 'AIzaSyCHZN0KrjzT-6I7vM39OdK8JNXKkkoslCc';
/**
* Returns instance
*/
... | true |
b20159a06a8a9a986b5fccc4783e34b75bc52513 | PHP | ahmeddhouib/treafik-proxy-projects | /project1/public/index.php | UTF-8 | 635 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php declare(strict_types=1);
ini_set( 'session.name', 'SIDP1' );
ini_set( 'session.save_handler', 'redis' );
ini_set( 'session.save_path', 'tcp://redis:6379?weight=1&database=0' );
ini_set( 'session.gc_maxlifetime', '84400' );
session_set_cookie_params( 84400, '/', 'dev.project1.com', true, true );
session_start()... | true |
f1022e223e1c11d0287aaf393dd4826194778014 | PHP | vsemoth/cat | /app/Http/Controllers/PostController.php | UTF-8 | 3,252 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;
use App\Post;
use Intervention\Image\ImageManager;
use Image;
class PostController extends Controller
{
/**
* Display a listing of the resource.
*
* @re... | true |
cf1456babf4a18329c06f3b812cd3a2c4e5a0de3 | PHP | Foxentry/PHP-knihovna | /src/Curl.php | UTF-8 | 2,354 | 2.765625 | 3 | [] | no_license | <?php
namespace Foxentry;
class Curl
{ // BEGIN class Curl
private $timeout = 5;
private $apiUrl = "https://api.foxentry.cz/v1/";
function __construct()
{ // BEGIN function __construct
$this->base = new Base();
} // END function __construct
function setApiUrlByVersion($apiVersion)... | true |
25f5fd132e782fca606be6ec1d98795fc86eea83 | PHP | speedneeder/SAEChannel.Chatbox | /chat.php | UTF-8 | 5,990 | 2.75 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
$channel = new SaeChannel();
//聊天记录保存在mysql之中
$mysql = new SaeMysql();
//uid的生成和用户列表的保存直接抄钝刀的老王大大的代码
$uid = $_COOKIE['uid'];
if (empty($uid))
{
$uid = mt_rand();
setcookie('uid', $uid, time()+3000, '/', 'chatbox.sinaapp.com', FALSE, TRUE);
}
//用户列表保存在kvdb之中
$kv = new SaeKV();
$kv->init();
$user_list = ... | true |
1fa08ad42d9c0e55230d1967b6e82f2977de3d26 | PHP | roberts/law | /app/Person.php | UTF-8 | 1,858 | 2.640625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Database\Eloquent\Builder;
class Person extends Model
{
/**
* The table associated with the model.
*
* @var string
*/
protected $table = 'contacts';
/**
* Th... | true |
bde3bc01b055a97ced45dbce946fec35709cea25 | PHP | jameshollenbeck/apostleio-swiftmailer-transport | /Apostle/StreamContexts/StreamContexts.php | UTF-8 | 1,001 | 2.859375 | 3 | [] | no_license | <?php
namespace Apostle\StreamContexts;
use Apostle\Exceptions\StreamContextException;
use Apostle\Interfaces\StreamContextWrappable;
/**
* Custom wrapper for stream_context_* functions. This allows for us
* to use these functions as we are accustomed in PHP, but also aids in
* controlling errors and response in... | true |
98779e6de66d6785cc1e606c88d4aeb4a64dd27f | PHP | taufiq33/crud-tutorial | /crud/delete.php | UTF-8 | 1,032 | 2.625 | 3 | [] | no_license | <!--
/**
*
* FILE 'delete.php'
* Digunakan untuk menangani action delete dari user
*/
-->
<?php
/* Cek ketersediaan id pada url */
if (isset($_GET['id'])) :
/* Menyertakan file konfigurasi */
require_once('config.php');
$id = $_GET['id'];
/* Ambil data berdasarkan id , lalu a... | true |
a72ae2880542e8cbaf69073dad294feff2a63e4d | PHP | mdesilva/wooter | /app/Wooter/Transformers/Qnap/QnapOrganizationLeagueTransformer.php | UTF-8 | 668 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Wooter\Wooter\Transformers\Qnap;
use Wooter\Wooter\Transformers\Transformer;
class QnapOrganizationLeagueTransformer extends Transformer
{
public function transform($qnapLeagues)
{
$organizationLeagues = array();
foreach($qnapLeagues as $organizationId => $orgLeagues)
... | true |
7d4111119d30cfb4c7b579817759d1e165b76be1 | PHP | mantas-done/subtitles | /tests/formats/DfxpTest.php | UTF-8 | 2,179 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Tests\Formats;
use Done\Subtitles\Code\Converters\DfxpConverter;
use Done\Subtitles\Code\Helpers;
use Done\Subtitles\Subtitles;
use PHPUnit\Framework\TestCase;
use Helpers\AdditionalAssertionsTrait;
class DfxpTest extends TestCase {
use AdditionalAssertionsTrait;
public function testRecogni... | true |
96c280bf264349f2659f0cebec422e31c67345cf | PHP | jongotlin/ArbetsformedlingenAds | /tests/ClientTest.php | UTF-8 | 2,458 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace JGI\ArbetsformedlingenAds\Tests;
use JGI\ArbetsformedlingenAds\Client;
use JGI\ArbetsformedlingenAds\HRXMLDocumentCreator;
use JGI\ArbetsformedlingenAds\Model\ArbetsformedlingenJob;
use JGI\ArbetsformedlingenAds\Model\Result;
use JGI\ArbetsformedlingenAds\Model\Transaction;
u... | true |
c81693c2665fa48c8ec578566df3809152b6db94 | PHP | PoppySeedStrudel/project2 | /balance.php | UTF-8 | 941 | 3.015625 | 3 | [] | no_license | <?php
require "common.php";
function balance($b, $u, $art){
// find out the users balance before this function was called
$sql = "SELECT `money` FROM `users` WHERE `username` = '$u'";
$result = mysql_query($sql);
if (!$result) {
$message = 'Ungültige Abfrage: ' . mysql_error() . "\n";
$messag... | true |
c522e0c21fdcbd97539f67e6e4b6527c726b7698 | PHP | bharath13/DcmsFoodandwine | /sites/all/modules/custom/ti_amg_fwrd_recipe/templates/modules/recipe-reviews.tpl.php | UTF-8 | 1,319 | 2.65625 | 3 | [] | no_license | <?php
/**
* @file
* Contains Recipe Ratings and Reviews.
*/
?>
<div id = "recipe_ratings_reviews" class="hide">
<div id = "recipe_ratings">
<p>Aggregate Rating value: <?php print $recipe_reviews['aggregate_rating']; ?></p>
<p>Review Count: <?php print $recipe_reviews['review_count']; ?></p>
<p>Worst Ra... | true |
ad5ff78d41dd75eeaeaade801462cb359cdb8f84 | PHP | linuxserver/Heimdall | /vendor/laravel/framework/src/Illuminate/Console/Scheduling/CommandBuilder.php | UTF-8 | 2,237 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace Illuminate\Console\Scheduling;
use Illuminate\Console\Application;
use Illuminate\Support\ProcessUtils;
class CommandBuilder
{
/**
* Build the command for the given event.
*
* @param \Illuminate\Console\Scheduling\Event $event
* @return string
*/
public function bui... | true |
f0e48648a69d46a015ad461a84a512045e231631 | PHP | AnneDreuille/blogjf | /admin/index.php | UTF-8 | 1,097 | 2.640625 | 3 | [] | no_license | <?php //index routeur sur les fonctions backController
//charger le fichier config avec définition des constantes d'accès à la db
require_once(__DIR__.'/../app/config.php');
//charger les fichiers controllers et leurs fonctions
require_once(__DIR__.'/../controller/backController.php');
//tester le paramètre action p... | true |
2e8c22047d1a8dbde5781783fde674524b368a88 | PHP | alfredtan/universe | /protected/models/FacebookWrapper.php | UTF-8 | 2,977 | 2.625 | 3 | [] | no_license | <?php
require('facebook/facebook.php');
class FacebookWrapper
{
private $facebook;
public function FacebookWrapper()
{
$this->facebook = new Facebook(array(
'appId' => Yii::app()->params['facebookAppId'],
'secret' => Yii::app()->params['facebookAppSecret']
));
$signed_request = $this->fac... | true |
caf9786ad4a1960a36b8039a883c6a278c62d6a8 | PHP | Ziva86/VSTSSC | /includes/student.php | UTF-8 | 581 | 2.703125 | 3 | [] | no_license | <?php
require_once("database.php");
class Student extends DatabaseObject
{
protected static $table="studenti";
protected static $fields=array("index","ime","prezime","pol","iroditelja","pol","jmbg","fiksni","mobilni","grad","adresa","mail");
public $indeks;
public $ime;
public $prezime;
public $... | true |
099b96bfb788709bb83ca40a1d6af70392e800d6 | PHP | anujjaha/samacharnew | /application/controllers/Ajax.php | UTF-8 | 17,613 | 2.53125 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Ajax extends CI_Controller {
public function __construct() {
parent::__construct();
$this->load->model('user_model');
$this->load->model('company_model');
$this->load->model('subscriber_model');
$this->load->model('advertisement_m... | true |
d2ffbaab70dfcb4093e010970c7b6d7eb5d27dbd | PHP | Akswii/ski_vm | /php_funksjoner.php | UTF-8 | 5,451 | 2.71875 | 3 | [] | no_license | <?php
class Ovelse {
private $db;
function __construct($db_inn) {
$this->db = $db_inn;
}
public function slett_o($slett_valg) {//slette øvelse
$this->db->query("DELETE FROM ovelser where ovelses_id = '$slett_valg'");
return true;
}
public function oppdater_o($inn_nav... | true |
6108700f2dd2d30ba92ff8434730aad47cbb57c2 | PHP | Chwegner/LaKitaOrga | /views/fibu/index.php | UTF-8 | 2,955 | 2.53125 | 3 | [] | no_license | <div>
<br><br>
<form action="<?php echo URL; ?>fibu/getDaten/true" method="post">
<label>Jahr:</label>
<select name="jahr" size="1">
<option>alle</option>
<option>2019</option>
<option>2018</option>
<option>2017</option>
... | true |
90c4f56d80ff1a02bf3ad820535bff72f447789f | PHP | on2media/shore | /lib/MapObject.php | UTF-8 | 822 | 3.140625 | 3 | [] | no_license | <?php
/**
* Map Object
*
* @package core
*/
/**
* Map Object abstract class
*/
abstract class MapObject extends Object
{
/**
*
*/
protected $_values = array();
/**
* Defines an ArrayCollection to store a data set of records.
*/
public function __constr... | true |
b472b967d3af2e98a4a5e6ca77f746334d881f60 | PHP | mueenali/designerHouseApi | /app/Repositories/Eloquent/Criteria/SearchDesigns.php | UTF-8 | 1,100 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Eloquent\Criteria;
use App\Helpers\DesignSearchParams;
use App\Repositories\Criteria\ICriterion;
class SearchDesigns implements ICriterion
{
private DesignSearchParams $params;
public function __construct(DesignSearchParams $params)
{
$this->params = $params;
... | true |
bdcc0ee8e0b4ca23a9db4322f9ad1151e60efc3c | PHP | radhikasarda/DR3MS | /application/views/embankment_detailed_info_view.php | UTF-8 | 927 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
echo "<tbody>";
$blank = "0";
echo "<tr>";
echo "<th>"; echo "<strong>Name Of Embankment</strong>"; echo "</th>";
echo "<th>"; echo "<strong>Status</strong>"; echo "</th>";
echo "<th>"; echo "<strong>Village Coverage</strong>"; echo "</th>";
echo "</tr>";
foreach($dat... | true |
5cf533a9d47b14bbeedc5937795341a5336941cc | PHP | atnamus/eropagnil | /protected/modules/admin/models/NewsletterSubscriber.php | UTF-8 | 2,663 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This is the model class for table "{{newsletter_subscriber}}".
*
* The followings are the available columns in table '{{newsletter_subscriber}}':
* @property string $id
* @property string $email
* @property string $create_at
* @property string $update_at
* @property integer $status
*/
class Newsle... | true |
1d342107d3f303efa0cf8423cf38fd44799775d1 | PHP | mijgame/lighthouse | /src/Support/Exceptions/ValidationError.php | UTF-8 | 694 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Nuwave\Lighthouse\Support\Exceptions;
use GraphQL\Error\Error;
class ValidationError extends Error
{
/**
* The validator.
*
* @var \Illuminate\Validation\Validator
*/
protected $validator;
/**
* Set validator instance.
*
* @param mixed $validator
*... | true |
f7ae3862ec9f87e04b0eff5129ce6befd324b91c | PHP | hasanslaravelproject/ecommerce | /app/Policies/ProductPolicy.php | UTF-8 | 2,479 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Policies;
use App\Models\User;
use App\Models\Product;
use Illuminate\Auth\Access\HandlesAuthorization;
class ProductPolicy
{
use HandlesAuthorization;
/**
* Determine whether the product can view any models.
*
* @param App\Models\User $user
* @return mixed
*/
... | true |
7655a58f18d59cd70d1827b16efe14f7fc4b7a82 | PHP | azuya/Wi3 | /app/latest/classes/wi3/html/base.php | UTF-8 | 5,623 | 3 | 3 | [
"BSD-3-Clause"
] | permissive | <?php defined('SYSPATH') or die ('No direct script access.');
/**
* Htmlobject Base class
* @author Willem Mulder
*/
class Wi3_Html_Base extends Wi3_Base
{
// Arbitrary settings that the component can use
public $settings;
// Tagname and attributes of the open and close tag
public $tagname;
public $a... | true |
bacfcbde512e4a952b9b43d089cc5af715483f1e | PHP | AJakif/Blog-App-Laravel | /database/seeders/UserSeeder.php | UTF-8 | 685 | 2.53125 | 3 | [] | no_license | <?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
class UserSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$data=array(
array(... | true |
7e15cc0f28a1e2748bcee0e68d127738d8855f6e | PHP | Gelembjuk/WebAppSample | /app/app/Routers/DefaultRouter.php | UTF-8 | 5,776 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace app\Routers;
class DefaultRouter extends \Gelembjuk\WebApp\Router {
protected $adminview = false;
public function init() {
if (!is_dir($this->options['languagespath'])) {
throw new \Exception('Languages directory not found');
}
$this->controllername = 'DefaultController';
}
publ... | true |
1b9b380394c1ecfdc3e01f29adce475daae9f21c | PHP | AMEENASHAHEEN1998/eCommerce | /login.php | UTF-8 | 5,565 | 2.640625 | 3 | [] | no_license | <?php
ob_start(); // output buffering start
session_start();
$pageTitle = 'LogIn|SignUp';
if(isset($_SESSION['user'])){
header('location:index.php');
}
include 'init.php'; // include init file
//check if user come from http request
if($_SERVER['REQUEST_METHOD'] == 'POST'... | true |
a6690928672b97c87776c74bfdc4bd95f404c6b4 | PHP | newsay/495Final | /master_project/site/setup.php | UTF-8 | 4,677 | 2.765625 | 3 | [] | no_license | <?php
/**
* Build script
* @author Andrew Ritchie
*/
$htdocs = getenv("htdocs");
$cd = getcwd();
$sqluser = getenv("sqluser");
$sqlpass = getenv("sqlpass");
$sqldb = getenv("sqldb");
$sqlloc = getenv("sqlloc");
$dbready = false;
$_SERVER['DOCUMENT_ROOT'] = $cd;
function file_build_path($name) {
return... | true |
6e1dbebf2e6e2582c92baf0fa06e7c14afacb08f | PHP | laborci/PhlexDev | /modules/Phlex/RedFox/Model/Field/SetField.php | UTF-8 | 427 | 2.53125 | 3 | [] | no_license | <?php
/**
* Author: Laborci Gergely
* Copyright: 365 Media Ltd. (www.365media.hu)
* Created: 02/05/16 21:48
*/
namespace Phlex\RedFox\Model\Field;
use Phlex\RedFox\Model\Field;
class SetField extends Field{
protected $options;
/**
* @param array $value
*
* @return int
*/
protected function typevalida... | true |
7d55b686d78dcf55558f624330961839a6f8f9b6 | PHP | pinkf88/ofa_public | /Webpages/NewOfaApp/public/inc/import_tickets.php | UTF-8 | 1,205 | 2.765625 | 3 | [] | no_license | <?php
include_once "ofa_DbConsts.php";
include_once "ofa_Database.php";
ofa_db_connect($db_ofa_server, $db_ofa_user, $db_ofa_password, $db_ofa_database);
$sql = "SELECT ID, Datum, YEAR(Datum) AS Jahr, TO_DAYS(Datum) AS Tage, Nr, OrtID, Beschreibung, Bemerkung FROM ticket ORDER BY Datum, Nr";
echo $sql . '<br>';
$resu... | true |
2f29a7ea22cf06b1da49cbc68b39689a6e0d0dbb | PHP | ChampemeDylan/UPOP | /online/old/v0/php/editMdp.php | UTF-8 | 1,267 | 2.5625 | 3 | [] | no_license | <?php
//session_start();
$loginUser = $_SESSION['loginUser'];
$passwordUser = htmlentities($_POST['passwordUser'], ENT_QUOTES, "ISO-8859-1");
$passwordUser2 = htmlentities($_POST['passwordUser2'], ENT_QUOTES, "ISO-8859-1");
try
{
// connexion à MySQL avec l'adresse du serveur, l'identifiant et le mot de passe
$bdd ... | true |
9e1e274cda9a0e6b7efeedcbe12ecca6f9acd9cf | PHP | krdeepa7/Web-CMS | /un.php | UTF-8 | 1,295 | 2.828125 | 3 | [] | no_license |
<!-- <?php
if($_SERVER['REQUEST_METHOD'] == "POST") {
$username = trim($_POST['username']);
$email = trim($_POST['email']);
$password = trim($_POST['password']);
$error = [
'username'=> '',
'email'=>'',
'password'=>''
];
if(st... | true |
6e30e91eda47ee5546189ab4bc9ca2581e920f05 | PHP | yradwan147/OnlineStoreDemo | /UGRF_Website_Final/UGRF_Website_Final/includes/productregister.inc.php | UTF-8 | 2,411 | 2.703125 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "ugrf_db";
// Create connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
function emptyInputProduct($product_name, $product_price, $productdesc){
$result;
if (empty($product_name) || empty($... | true |
8eecc3abfc3a315256589c506ff67497fcdceec5 | PHP | loulichki-dev/Gestionde | /verifie.php | UTF-8 | 1,473 | 2.6875 | 3 | [] | no_license | <?php
session_start();
if(isset($_POST['username']) && isset($_POST['password']))
{
$db_username = 'root';
$db_password = '';
$db_name = 'tangermarket';
$db_host = 'localhost';
$conn = mysqli_connect($db_host, $db_username, $db_password,$db_name)
or die('could not connect to data... | true |
f27722ad4c28f771a62c55f8eb1e13a8fc21dd96 | PHP | lacoolman/exporter | /lib/Exporter/Writer/XlsWriter.php | UTF-8 | 4,639 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the Sonata package.
*
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Exporter\Writer;
use Exporter\Exception\InvalidDataFormatExce... | true |
933d8f8c7f29036cd47df4d26e6e5916b2a381bc | PHP | odurusphp/inventory_app | /app/controllers/post/Useraccounts.php | UTF-8 | 11,354 | 2.640625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: oduru
* Date: 10/7/2019
* Time: 3:01 PM
*/
class Useraccounts extends PostController
{
public function create(){
$rs = new RestApi();
$requiredfieldnames = ['firstname', 'lastname', 'email', 'role'];
$firstname = isset($_POST['firstname']) ?... | true |
16985b5864498de906e6a91edad203ef852894d2 | PHP | DEVSENSE/Phalanger | /Testing/Tests/Strings/mb_strlen.php | UTF-8 | 136 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | [expect php]
[file]
<?php
$str = 'test';
print 'mb_strlen(): '.mb_strlen($str).'<br />';
print 'strlen(): '.strlen($str).'<br />';
?> | true |
ea560cfc23d252e39516f8e55deeaa4dcbcb5046 | PHP | vankatwijk/CustomFramework-php | /models/user.php | UTF-8 | 710 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
class UserModel extends Model{
public function register(){
// sanitize POST
$post = filter_input_array(INPUT_POST,FILTER_SANITIZE_STRING);
$password = md5($post['password']);
if(isset($post['submit'])){
$this->query('INSERT INTO users (name,email,password) VALU... | true |
f236773ea14a39c8868d8df8e7a209ac4fe90f27 | PHP | cuongpd/vncoder-core | /src/Helper/Telegram.php | UTF-8 | 814 | 2.71875 | 3 | [] | no_license | <?php
namespace VnCoder\Helper;
class Telegram
{
public static function sendMessage($message, $chatId = "")
{
if (!$chatId) {
$chatId = env('TELEGRAM_ID');
}
$telegramUrl = "https://api.telegram.org/bot".env('TELEGRAM_TOKEN')."/sendMessage";
$params = [
... | true |
d265ab271ef93da4406a619be72d2c001587883a | PHP | sungbum1004/php_blog_2021 | /usr/article/list.php | UTF-8 | 1,537 | 2.53125 | 3 | [] | no_license | <?php
require_once $_SERVER['DOCUMENT_ROOT'] . '/webInit.php';
$sql = "
SELECT *
FROM article AS A
ORDER BY A.id DESC
";
$articles = DB__getRows($sql);
?>
<?php
$pageTitle = "게시물 리스트";
?>
<?php require_once __DIR__ . "/../head.php"; ?>
<div>
<?php if (isset($_SESSION['loginedMemberId'])) {
echo... | true |
b446531f8c270b7931115d4c388f70d0ebe42a52 | PHP | recca0120/PokemonGoAPI-PHP | /src/Api/Player/Data/Journal/Pokemon.php | UTF-8 | 1,959 | 2.828125 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace NicklasW\PkmGoApi\Api\Player\Data\Journal;
use NicklasW\PkmGoApi\Api\Data\Data;
use NicklasW\PkmGoApi\Api\Player\Data\Inventory\PokedexItem;
use NicklasW\PkmGoApi\Api\Pokemon\Data\PokemonMeta;
use NicklasW\PkmGoApi\Api\Pokemon\Data\PokemonMetaRegistry;
use NicklasW\PkmGoApi\Api\Support\MakeApiResource... | true |
9a360dd58ea9ce6d26eecb24686cbdaa7bdca56a | PHP | thinktomorrow/chief | /src/Shared/Concerns/Morphable/MorphableContract.php | UTF-8 | 874 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace Thinktomorrow\Chief\Shared\Concerns\Morphable;
interface MorphableContract
{
/**
* Unique identifier of the collection this item belongs to. This refers to the class name or to
* the morph key as set by the \Illuminate\Database\Eloquent\Relations\Relation::morph... | true |
0823216897e1f3d96c9db8e506e32e2fa6e00201 | PHP | franki63/phpbbgallery | /core/block.php | UTF-8 | 19,965 | 2.578125 | 3 | [] | no_license | <?php
/**
*
* @package phpBB Gallery
* @version $Id$
* @copyright (c) 2007 nickvergessen nickvergessen@gmx.de http://www.flying-bits.org
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
namespace phpbbgallery\core;
class block
{
public function __construct($mode = f... | true |
4c6b5302e085e2ae704638958438b1d579ea7ff0 | PHP | jmcgraw159/isthatoutyet | /api/app/controllers/GiantBombController.php | UTF-8 | 2,317 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
header('Access-Control-Allow-Origin: *');
class GiantBombController extends BaseController {
// API Call to get the recent games for the slider
public function getRecent($date)
{
$key = 'cdb456f4a15c4052a419f97b568218a2b50634c9';
$format = 'json';
$call = file_get_contents('http://www.giantbomb.com/... | true |
d4ea835e07a898b3a888e90bdb9cdc465356678a | PHP | EwaKozicka/CL_Twitter_workshop | /src/User.php | UTF-8 | 7,264 | 3.171875 | 3 | [] | no_license | <?php
require_once '../connection.php';
class User {
private $id, $username, $hashPass, $email;
public function __construct() {
$this->id = -1;
$this->username = "";
$this->hashPass = "";
$this->email = "";
}
function getUsername() {
return $this->username;
... | true |
1eb88cb10e7d67c14bfac87f32b4e14a099e278f | PHP | franiglesias/mh13 | /legacy/cantine/controllers/cantine_regulars_controller.php | UTF-8 | 6,433 | 2.625 | 3 | [] | no_license | <?php
App::import('Model', 'School.Section');
class CantineRegularsController extends CantineAppController {
var $name = 'CantineRegulars';
var $components = array('Filters.SimpleFilters');
var $helpers = array('Ui.Csv');
public function beforeFilter()
{
parent::beforeFilter();
$this->selectionActions = a... | true |
664e4acb3d06a5aa8b2b412d32a5668f72399171 | PHP | jlaso/my-simple-web | /app/models/Entity/ContactFormType.php | UTF-8 | 2,438 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Entity;
use app\models\core\Form\FormListTypeInterface;
use app\models\core\Form\FormListBase;
use app\models\core\Form\FormBase;
use app\models\core\Form\FormSearchTypeInterface;
use Validate;
class ContactFormType
implements FormListTypeInterface, FormSearchTypeInterface
{
/**
* for... | true |
f691effa8a02cbda0f4ff7a05ef2f00c12418fb4 | PHP | hellockl/pay | /PayBase.class.php | UTF-8 | 1,017 | 2.703125 | 3 | [] | no_license | <?php
/**
* 支付基础
* @author Administrator
*
*/
namespace Pay;
interface PayBase {
/** 获取订单详细信息
* @param array $data 订单信息
* @param string $payType 支付类型(wxpay微信支付、alipay支付宝支付、unpay银联支付)
* @param string $callType 调起支付页面的类型(app、h5、native)
* @param string $serviceType 服务类型(recharge充值【虚拟】、bay购买【实体】)
*/
public ... | true |
d2c5b20615f1cba5ebf57f547afc93623681449b | PHP | christiantenefrancia/decision-support-system-for-online-scholarship-application | /admin/ajax/delete_account.php | UTF-8 | 1,381 | 2.609375 | 3 | [] | no_license | <?php
include('../connect.php');
$size = $_POST['size'];
$index = json_decode($_POST['array']);
for($i = 0; $i < $size; $i++){
$hold = $index[0];
$query = mysql_query("select accountID from staff where staffID = $index[$i]");
$row = mysql_fetch_array($query);
$... | true |
bfaca7d53a5e6cfff5232f01d8ab01e13673386a | PHP | ktom/reggae-finder | /packages/php/domain/artists/src/Queries/BrowseArtistsModel.php | UTF-8 | 320 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace ReggaeFinder\Domain\Artists\Queries;
class BrowseArtistsModel
{
private function __construct(private string $name) {}
public static function create(string $name): self
{
return new self($name);
}
public function getName(): string
{
return $this->name;
}
}
| true |
a5d21d6b35c895932cb885957d7468445c59f518 | PHP | KIMMYOUNGCHAN/PHP | /practice2.php | UTF-8 | 1,454 | 3.203125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title>PHP를 이용한 WEB SITE</title>
</head>
<body>
<!--5-(2)-->
<?php print (1+1); ?><br>
<?php print ('1+1'); ?><br>
<?php print 'hel\'l\'o'; ?><bR>
<?php print ('안녕'.'하세요'); ?><br>
<?php print strlen('hello'); ?><br>
<!--7-(1)-->
<?... | true |
7479a089388a2da29b9aad3ccc8c51461c925a1b | PHP | hi-noikiy/project | /91ns/apps/rest/controllers/RankController.php | UTF-8 | 1,461 | 2.515625 | 3 | [] | no_license | <?php
namespace Micro\Controllers;
use Phalcon\DI\FactoryDefault;
class RankController extends ControllerBase
{
/*
* 获取排行
* */
public function getRank(){
if($this->request->isGet()){
$type = $this->request->get('type');
$timeType = $this->request->get('dtype');
... | true |
de16a370be0a50fdc7195fd21dc3ec198b85c428 | PHP | BM-Tien/php2104_php | /ManhTien/08_BT_Mysql/users.php | UTF-8 | 1,829 | 2.8125 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Thêm dữ liệu vào mysql</title>
<link href="style.css" rel="stylesheet">
</head>
<body>
<form action="... | true |
6703db270f1e5a1486185c2113c6ea80a1b6ab56 | PHP | cjango/rulong-dwz | /src/Commands/MakeCommand.php | UTF-8 | 2,241 | 2.59375 | 3 | [] | no_license | <?php
namespace RuLong\Panel\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Str;
class MakeCommand extends Command
{
protected $signature = 'admin:make {controller}';
protected $description = 'Make Admin Controller and Model';
private $directory;
public function handle()
{
... | true |
813799e2810d40813fd573da0ad41684eab9c1b1 | PHP | IanHogan1998/SullimaryAcademyOfMusic | /SaomWebProject/application/models/User.php | UTF-8 | 1,231 | 2.59375 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
class User extends CI_Model {
function validUser() {
// check if a user with fname and lname exist
$user_details['emailAddress'] = $this->input->post('emailAddress');
$user_details['password'] = $this->input->post('password');
//call stored procedure to ... | true |
fc9172c5dd63b159460ea55cb75deb04df558164 | PHP | Megendrio/RunnersCount | /RunnerSetup.php | UTF-8 | 7,115 | 2.765625 | 3 | [] | no_license | <?php
/**
* Created by Stefan De Raedemaeker
* Date: 14/09/2016
* Name: RunnerSetup.php
* Description: - Scan student number
* - Search student in database
* - Show student information in form
* - Update student information
* - Add user to database
*/
include... | true |
2536c20a5ec8bc119b40314fad411fe25c45c9da | PHP | gagasus/newper | /functions/functions.php | UTF-8 | 6,862 | 2.5625 | 3 | [] | no_license | <?php
/* ===Редирект=== */
function redirect($http = false){
if($http) $redirect = $http;
else $redirect = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : PATH;
header("Location: $redirect");
exit;
}
/* ===Редирект=== */
function clear($var){
$var = strip_tags($var);
$var = htmlsp... | true |
851592afda8e500babe6c0d7c3edc515cbcb8f7c | PHP | fmunoz88/codeandohtml_M | /php/insert-article.php | UTF-8 | 4,801 | 2.78125 | 3 | [] | no_license | <?php
include_once '../config/conexion.php';
include_once '../php/funciones.php';
$db = db_connect();
header("Content-Type:text/html; charset=utf-8");
header("Access-Control-Allow-Origin: *");
//Setear ID false
$id = false;
$idPreview = false;
$date = new DateTime();
$fech... | true |
e8d756e08507c098f023c0b97989a477d4226b26 | PHP | gummmibear/fapi | /tests/Mongo/Document/Factory/FlightItineraryFactoryTest.php | UTF-8 | 1,680 | 2.546875 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Test\Mongo\Document\Factory;
use App\CsvImport\CsvLineKeyMap;
use App\Mongo\Document\DocumentCollection;
use App\Mongo\Document\Factory\FlightItineraryFactory;
use PHPUnit\Framework\TestCase;
class FlightItineraryFactoryTest extends TestCase
{
/** @var FlightItinerar... | true |
30accb39a5d8dcc4086976ef0d341de0c9b62333 | PHP | farwaj1/elive_1 | /includes/update_account.php | UTF-8 | 5,882 | 2.546875 | 3 | [] | no_license | <?php
require_once("includes/database.php");
session_start();
$error_message = "";
if (!isset($_SESSION["login_user"])) {
$e = "**Please Log in to have further action**";
include("./index.php");
exit();
}
if ($_SESSION["user_status"] == "User") {
$user_id = $_SESSION['login_user_id'];
} else {
$use... | true |
31b8dea5b4546127017526230d47d95144209920 | PHP | Referly/better_sqs_php | /src/BetterSqsPhp/Queue.php | UTF-8 | 224 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace BetterSqsPhp;
class Queue
{
protected $queueName;
protected $queueUrl;
protected $sqsQueue;
protected $client;
public function __construct(Client $client, $queueName)
{
$this->client = $client;
}
} | true |
87d17fe8f712608db633f4b05a2748ee0ff43ef9 | PHP | AwkwardDev/Yekta-Cms | /application/modules/auctionhouse/models/arkcore_model.php | UTF-8 | 9,027 | 2.625 | 3 | [] | no_license | <?php
class Arkcore_model extends CI_Model
{
public $realm;
private $realmId;
private $connection = false;
private $WorldConnection = false;
private $autoIndexStore = array();
private $runtimeCache;
const AH_SORT_TIME_DESC = 0;
const AH_SORT_TIME_ASC = 1;
const AH_SORT_SELLER_DESC = 2;
const AH_SORT_SELL... | true |
9c1ae73a6c381eee886ec9f0ed343d419320b341 | PHP | VytDz/kaunas_coding_oct-nov | /public_html/pages/admin_page/index.php | UTF-8 | 2,552 | 2.59375 | 3 | [] | no_license | <?php
include_once __DIR__."/../../components/header/index.php";
include_once __DIR__."/../../components/categories_tab/index.php";
session_start();
if ( $_SESSION["user"] !== 'admin'){
header("Location: ../../index.php");
session_write_close();
}
?>
<div class="article-wrapper">
<form class="article-f... | true |
3e608b75206f6ffc389efb79a7412fc24ec3ad2c | PHP | stankiewiczpl/php-rest | /src/Requests/PostRequest.php | UTF-8 | 432 | 2.671875 | 3 | [] | no_license | <?php
namespace Stankiewiczpl\PhpRest\Requests;
class PostRequest extends RequestAbstract implements RequestInterface
{
protected $method = 'POST';
public function __construct(array $options = [])
{
parent::__construct($options);
$this->set_option('curl_options', [CURLOPT_POST => true])... | true |
68d9e2187adf7536aa559b165a9388a5505bb250 | PHP | Deradon/Facebook-GraphAPI-Parser | /output/php/Message.php | UTF-8 | 1,197 | 3.125 | 3 | [] | no_license | <?php
# An individual message in the new Facebook messaging system. Every message has a message ID that represents an object in the Graph. To get access to read a user's messages, you should request the read_mailbox Extended Permission.
class Message{
/*
* This Object hast the following attributes
*/
/*
... | true |
bf94a581a8eb9cb5ac65324d01fbae867b0ed5ba | PHP | atadi96/felev4 | /web2/bead2/model/mapEnumerator.php | UTF-8 | 861 | 2.546875 | 3 | [] | no_license | <?php
@include_once('etc.php');
@include_once('gameMap.php');
@include_once('../model/etc.php');
@include_once('../model/gameMap.php');
@include_once('model/etc.php');
@include_once('model/gameMap.php');
class MapEnumerator implements Iterator {
private $map_iterator;
private $index;
public function __c... | true |
d57d45f68e3ad60efcd17a9fcc96ed2e730a05d2 | PHP | Shenliuran/web-class-design | /php/recruiter.php | UTF-8 | 1,070 | 2.625 | 3 | [] | no_license | <?php
header("Content-type:text/html;charset=UTF-8");
$conn=mysql_connect("localhost","root","") or die("不能连接服务器!") ; //连接数据库服务器
// echo "$conn";
mysql_query("set names utf8"); //设置字符集
mysql_select_db("recruit_database",$conn) or die("不能连接数据库");
$result = mysql_query("select * from work_info", $conn);
$row ... | true |
1a9b6fed8aeb55c7a1100274ca1e97fa2faa19ac | PHP | asciisd/zoho-v3 | /src/Models/Zoho.php | UTF-8 | 575 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace Asciisd\Zoho\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\MorphTo;
/**
* @property string zohoable_type
* @property int zohoable_id
* @property string zoho_id
*/
class Zoho extends Model
{
/**
* The attributes that are mass assignable.
*... | true |
ca9181a25e87f7a0f6a6c3abb0d550940cfb6397 | PHP | derhecht/rn_base | /util/class.tx_rnbase_util_Strings.php | UTF-8 | 7,186 | 2.90625 | 3 | [] | no_license | <?php
/***************************************************************
* Copyright notice
*
* (c) 2011 Rene Nitzsche
* Contact: rene@system25.de
* All rights reserved
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as... | true |
55ea67eebaf104948ed6c6ac9b2456e5dd85c584 | PHP | zeynali900/Ticketing | /userpanel.php | UTF-8 | 1,933 | 2.515625 | 3 | [] | no_license | <?php
session_start();
?>
<!DOCTYPE html>
<html lang="fa" dir="rtl">
<head>
<meta charset="utf-8">
<style>
* {
box-sizing: border-box;
font-family: Tahoma;
}
table, th, td {
border: 1px solid #111;
border-collapse:collapse;
... | true |
64daa84b1cb5b76877894edad5b14adf77890a29 | PHP | aiconoa/PHP-Symfony2-Blog | /src/AppBundle/Entity/ArticleRepository.php | UTF-8 | 1,383 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Entity;
use Doctrine\ORM\EntityRepository;
/**
* ArticleRepository
*
* This class was generated by the Doctrine ORM. Add your own custom
* repository methods below.
*/
class ArticleRepository extends EntityRepository
{
const ENTITY_CLASS_NAME = "AppBundle\Entity\Article";
const... | true |
0a70cdc20c389f5bd6e0e60cd4df9f64a5e46fb5 | PHP | juanmaluzzi/ProduccionWEB2 | /clases/productos.php | UTF-8 | 6,166 | 2.671875 | 3 | [] | no_license |
<?php
class Productos{
private $con;
function __construct($con){
$this->con = $con;
}
public function crearProducto($nombreProducto, $desc, $catID, $cepaID, $bodID, $precio){
$query = "INSERT INTO productos(id_producto, nombre, descripcion, categoria_id, cepa_id, marcas_id, precio, activo, destaca... | true |
0df75fd9a89cd4df09265032f9c8a229480969c3 | PHP | fouad-git/gestion-achat-materiel | /supprimer.php | UTF-8 | 545 | 2.8125 | 3 | [] | no_license | <?php
require_once('db.php');
//Tester l'existence de la variable d'url
if(isset($_GET['id'])){
//Requête sql de suppression avec marqueur de paramètre
$sql = "delete from materiel where id = :id";
//Prépare la requête
$sth = $dbh->prepare($sql);
//Lien entre marqueur nommé et une variable en préc... | true |
38b378ad4036e8da94290b5a271a0d682cf6951f | PHP | StasPiv/norse_digital_reader | /src/AppBundle/Parser/Facebook.php | UTF-8 | 647 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Parser;
class Facebook implements IParser
{
/**
* @param string $content
* @return array
*/
public function getItems($content)
{
$data = json_decode($content, true);
$items = [];
foreach ($data['data'] as $item) {
if (isset($it... | true |
68a23c8820c4a92795c9e64ed45e09d640203c97 | PHP | litstack/litstack | /src/Support/Migration/MigratePermissions.php | UTF-8 | 1,901 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace Ignite\Support\Migration;
use Spatie\Permission\Models\Permission;
use Spatie\Permission\Models\Role;
trait MigratePermissions
{
/**
* Create permissions and give the to admin.
*
* @return void
*/
protected function upPermissions()
{
$admins = Role::where('guar... | true |