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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ed3b6a981fb422cb6ef0f058613b1b41e49ac002 | PHP | haroon97/Login-form-using-PHP | /register.php | UTF-8 | 5,010 | 2.859375 | 3 | [] | no_license | <?php
require_once "config.php";
$username = $password = $confirmPassword = "";
$usernameErr = $passwordErr = $confirmPasswordErr = "";
if ($_SERVER['REQUEST_METHOD'] === "POST") {
// Check if username is empty
if (empty(trim($_POST["username"]))) {
$usernameErr = "Username cannot be empty";
} else ... | true |
f8f4212ed95245a57496bb02439efd05b117aebd | PHP | dasturchiuz/keriolaravel | /examples/connect/getInactiveUsers.php | UTF-8 | 2,220 | 2.6875 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Administration API for Kerio Connect - Sample Application.
*
* Get inactive users.
*
* @copyright Copyright © 2012-2012 Kerio Technologies s.r.o.
* @version 1.4.0.234
*/
require_once(dirname(__FILE__) . '/../config.php');
require_once(dirname(__FILE__) . '/../class/MyApi.php');
require_once(dir... | true |
54ef9e7095ceb5913a9fb715172c9c66472b6c55 | PHP | dharmaelms/elmstest | /app/Services/Report/DirectQuizPerformanceByIndividualQuestionService.php | UTF-8 | 1,095 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Services\Report;
use App\Model\Report\IDirectQuizPerformanceByIndividualQuestionRepository;
class DirectQuizPerformanceByIndividualQuestionService implements IDirectQuizPerformanceByIndividualQuestionService
{
private $dir_quiz_per_ind_repo;
public function __construct(
IDirectQu... | true |
39b5c0b3579799c8f2a1d10c777eed73ef944611 | PHP | TenguMask/webLabs | /Lab11/4-5.php | UTF-8 | 2,304 | 3.015625 | 3 | [] | no_license | <!doctype html>
<html>
<head>
<link rel="stylesheet" href="style.css"> </head>
<body>
<?php
error_reporting(E_ERROR | E_PARSE);
$c = 0;
$pattern = "/[а-яёіА-ЯЁІa-zA-Z]/";
$a = $_POST['name'];
$b = $_POST['last_name'];
if (preg_match($pattern, $b) > 0)
{
if (strlen($_POST['last_name']) > 1)
{
... | true |
8499f8dea34f13fc05c1b739c083e75ec12b4f43 | PHP | johnchan215/Major-Project | /Web Application/profile.php | UTF-8 | 5,040 | 2.84375 | 3 | [] | no_license | <?php
// Starting a session
session_start();
require 'functions.php';
require 'database.php';
// If the user_id is set then there is a current user
if( isset($_SESSION['user_id']) ){
// If the ID is the same as the user's ID
$records = $conn->prepare('SELECT * FROM users WHERE id = :id');
$records->bindParam(':i... | true |
21cb79d4d7d7d2bb087485f2d8fefaec43f59aaf | PHP | lciamp/Quasar | /rss.php | UTF-8 | 24,176 | 2.671875 | 3 | [] | no_license | <?php
require "config.php";
//while(1)
//{
$db = dbConnect();
//F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1 F1
$stack = array();
$source = array();
$url2 = "http://www.formula1.com/rss/news/headlines.rss";
$rss = simplexml_load_file($url2);... | true |
cffe7b35cf9e75aa7dd73ce8caf1e6d01b61a898 | PHP | Feeligo/plugin-socialengine-4.0-feeligo | /application/modules/Feeligo/Model/Selector/ActionTypes.php | UTF-8 | 3,414 | 2.796875 | 3 | [] | no_license | <?php
/**
* Feeligo
*
* @category Feeligo
* @package Feeligo_Api
* @copyright Copyright 2012 Feeligo
* @license
* @author Davide Bonapersona <tech@feeligo.com>
*/
/**
* @category Feeligo
* @package Feeligo_Model_Selector_ActionTypes
* @copyright Copyright 2012 Feeligo
* @license
*/... | true |
a313f50ff055a04cedd28646439d6558a5358968 | PHP | ExceedingLife/PHP_CRUD | /delete.php | UTF-8 | 3,597 | 2.828125 | 3 | [] | no_license | <?php
// Process DELETE after confirmation.
if(isset($_POST["id"]) && !empty($_POST["id"])) {
// Include sql config
require_once "php/config.php";
// Prepare a DELETE statement
$sql = "DELETE FROM users WHERE id=:id";
if($stmt = $pdoConnect->prepare($sql)) {
// Bind varia... | true |
82086dacbc00077a3257f882bf03adde07a00109 | PHP | Vibius/Abstract-Templating | /src/Engines/Jade.php | UTF-8 | 1,382 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
namespace Vibius\AbstractTemplating\Engines;
use Vibius\AbstractTemplating\EngineInterface;
use Everzet\Jade\Dumper\PHPDumper as PHPDumper;
use Everzet\Jade\Visitor\AutotagsVisitor as AutotagsVisitor;
use Everzet\Jade\Filter\JavaScriptFilter as JavaScriptFilter;
use Everzet\Jade\Filter\CDATAFilter as CDATAFilt... | true |
c4037c56c19a6e959f4da9d7494d0dea9ae977ca | PHP | gilangpr/final.itmg | /public/library/MyIndo/Ext/ModelFields.php | UTF-8 | 317 | 2.5625 | 3 | [] | no_license | <?php
class MyIndo_Ext_ModelFields extends MyIndo_Ext_Abstract
{
protected $_name = 'MODEL_FIELDS';
protected $_id = 'MODEL_FIELD_ID';
public function parser($data)
{
$json = array();
foreach($data as $k=>$d) {
$json[$k]['name'] = $d['NAME'];
$json[$k]['type'] = $d['TYPE'];
}
return $json;
}
} | true |
cf8961f079902af244e5ae0445c3353f034a2a07 | PHP | openclassify/streams-platform | /src/Ui/Form/FormAuthorizer.php | UTF-8 | 1,176 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php namespace Anomaly\Streams\Platform\Ui\Form;
use Anomaly\Streams\Platform\Addon\Module\ModuleCollection;
use Anomaly\Streams\Platform\Support\Authorizer;
/**
* Class FormAuthorizer
*
* @link http://pyrocms.com/
* @author PyroCMS, Inc. <support@pyrocms.com>
* @author Ryan Thompson <ryan@pyrocms.com>
*/
cl... | true |
a40b45b584c41c761e17c92deb5f59b291a0fadb | PHP | lTaozi/SkyVote | /VotePages/api/getLoaction.php | UTF-8 | 1,181 | 2.609375 | 3 | [] | no_license | <?php
include_once '../../lib/DataBase.class.php';
$db = new DataBase('votesystem');
$db->query("SELECT vote_ip FROM record WHERE vote_area = ''");
$res = $db->results;
$i = 0;
foreach ($res as $key => $value) {
$city = getCity($value[0]);
if (!$city['city'] && !$city['region']) {
echo $city['country... | true |
8c67dbbbc78c95e174f42ca4d6535ace0cc35106 | PHP | gkathir15/catmis | /data/widgets/last.fm/lastfm.php | UTF-8 | 2,234 | 2.6875 | 3 | [] | no_license | <?php
global $settings;
/*
blogscrobbler v1.3 by amkdesign.co.uk
- caches the recent tracks text feed
- you can choose how many songs to display
- gets updates for cache if it's X minutes old or empty, where
X is 30 seconds minimum track length times the number of tracks
- cache is still output if update... | true |
a672e94a4f6e0991ff6677179b1a0d4db18243eb | PHP | t2t2/draft-alpha | /app/database/seeds/LeagueMovieUserSeeder.php | UTF-8 | 1,032 | 2.59375 | 3 | [] | no_license | <?php
class LeagueMovieUserSeeder extends Seeder {
public function run() {
$this->command->info("Adding movies to users...");
$league = League::find(1);
$players = $league->players;
foreach (array(1, 3, 18, 20, 30) as $movieid) {
$players->find(2)->movies()->attach($movieid, array("league_id" => $league->... | true |
8d01ecaa74a7c3962ee19f262b4f9ec0a4939615 | PHP | rock-canyon/weight_app | /index.php | UTF-8 | 2,713 | 2.8125 | 3 | [] | no_license | <?php
require_once('config.php');
require_once('functions.php');
session_start();
// ログインしてなければログイン画面へ
if (empty($_SESSION['me'])) {
header('Location: '.SITE_URL.'login.php');
}
// ログイン情報を変数に格納
$me = $_SESSION['me'];
if ($_SERVER['REQUEST_METHOD'] != "POST") {
// 投稿前
// CSRF対策
setToken();
} else {
// 投稿後
... | true |
1130f41b448fe06f5520249ef017ea4731c0e5bd | PHP | mochtioui/projets | /front-office/assets/php/message.php | UTF-8 | 691 | 2.859375 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "siteweb1";
$name1 = $_POST['nom'];
$name2 = $_POST['prenom'];
$email = $_POST['email'];
$Phone = $_POST['phone'];
$message = $_POST['message'];
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check c... | true |
cf874e6e1ca87cf388a93ae7f0c52bab129cfba2 | PHP | Jiangshanshi5/doYiiTest | /curl.php | UTF-8 | 4,459 | 3.28125 | 3 | [] | no_license | <?php
/**
* 本文件主要用于CURL的使用复习
* 目标:将curl整合为可继承的class类,便于以后工作中的使用,无需再次上网查找。
* 姜珊 2019/12/21
*/
/**
* 创建一个入口方法
* $type:curl传输类型:GET/POST
* $url:目标网址
*/
class linkCurl{
function __construct(){
}
public function linkUrlByPHP($type,$url,$data=""){
... | true |
e47ffc507787555893d833df55a1eb23dca61762 | PHP | void-type/gloriousPC_PHP | /admin/account/index.php | UTF-8 | 2,512 | 2.75 | 3 | [
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] | permissive | <?php
// needed on all pages
require_once('../../config.php');
require_once('server/util/form.php');
require_once('server/database/users.php');
// authenticate that they are admin, if not then show forbidden page
if (!isset($_SESSION['admin'])) {
forbidden();
}
// Get all values this page might use, ... | true |
f0001812348f0c50d35ccfcc7b7df13433bdd5d4 | PHP | hi-noikiy/project | /91ns/skeleton/frameworks/Logic/Investigator/InvModule.php | UTF-8 | 3,379 | 2.640625 | 3 | [] | no_license | <?php
namespace Micro\Frameworks\Logic\Investigator;
//客服后台--模块类
class InvModule extends InvBase {
public function __construct() {
parent::__construct();
$this->checkLogin();
}
//获得模块列表
public function getModuleList() {
$newList = array();
try {
$info = \M... | true |
fa3818804cbfd8d1250cefe49b32ee5e9685d01c | PHP | WeitingWei/eecs448-lab4 | /Quiz.php | UTF-8 | 1,150 | 3.21875 | 3 | [] | no_license | <?php
$day = $_POST["day"];
$vacation = $_POST["vacation"];
$color = $_POST["color"];
$major = $_POST["major"];
$food = $_POST["food"];
echo "Question 1: Which day you like best?<br>";
echo " You answered: " . $day . "<br>";
echo " Correct answer: Wedesday <br><br>";
echo "Question 2: Where are you going to spend you... | true |
880a1cc6f0950382391d782b14fc790b6c4b6fd6 | PHP | cunnan/phpnote1611 | /php文件/php培训资料/04_MySQL/day02/demo/variable.php | UTF-8 | 132 | 2.828125 | 3 | [] | no_license | <?php
$mlist = '';
$mlist.= "1 3 4"; //mlist = 123
$mlist.= "4"; //mlist = 1234
$mlist.="5 6 7 "; //mlist = 1234567
echo $mlist; | true |
0859c5aceab9b6fabdbe5b617ceb80e54e95dc27 | PHP | ppantelakis/b2badmin | /apps/customhelpers/MyCustomHelperStringTools.php | UTF-8 | 1,931 | 2.78125 | 3 | [] | no_license | <?php
class MyCustomHelperStringTools extends \Phalcon\Tag {
public static function startsWith($haystack, $needle) {
$length = strlen($needle);
return (substr($haystack, 0, $length) === $needle);
}
public static function endsWith($haystack, $needle) {
$length = strlen($needle);
... | true |
d8c8ee857c1256aedce1baaac59c3903a79ce00e | PHP | koubykoub/RecetteDuCNAM | /src/vues/commun/GererCategories.inc.php | UTF-8 | 6,498 | 2.71875 | 3 | [] | no_license | <!-- categorie -->
<h2>Catégories et sous catégories</h2>
<?php foreach ($dVueGererCategories['categories'] as $nCat => $cat) { ?>
<!-- inputs categorie -->
<form method="post" action="">
<input type="hidden" name="page" id="page" value="gerer_categorie" />
<input type="hidden" name="action" id="action" value="... | true |
43d9ae1e2517c7645ed74fb2c144095bc42ba752 | PHP | send2deb/php_learning_example | /proj_vehicle/SubmitCar.php | UTF-8 | 1,255 | 3.1875 | 3 | [] | no_license | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Car Insert</title>
</head>
<body>
<?php
// Add database connection
require('dbconfig.php... | true |
d5ad0bbfc21e19fe45d20581a73815945c2637f9 | PHP | robmachado/kosten | /database/migrations/2018_02_14_181651_add_integralvalue_to_rawmaterials_table.php | UTF-8 | 775 | 2.5625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class AddIntegralvalueToRawmaterialsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table(... | true |
3d1f4f3e078af4d8d585bed9b1822ed1457552c7 | PHP | flank911/ownfin | /frontend/models/Operations.php | UTF-8 | 977 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "operations".
*
* @property integer $id
* @property integer $uid
* @property string $date
* @property double $summ
* @property integer $cat_id
* @property string $comment
*/
class Operations extends \yii\db\ActiveRecord
{
/**
... | true |
3dde20319326f31210b39d5babcbd366637aa66d | PHP | taysevirgulino/cinemateca | /administracao/class/BannerAcesso.class.php | UTF-8 | 1,499 | 2.859375 | 3 | [] | no_license | <?
class BannerAcesso extends AbstractEntity implements EntityInterface {
protected $id_banner_acesso, $identificador, $id_banner, $datahora, $click, $view;
public function setBannerAcesso($IdBannerAcesso, $Identificador, $IdBanner, $Datahora, $Click, $View){
$this->setIdBannerAcesso( $IdBannerAcesso );
... | true |
dd9e7b44841d9c3b28000cadcc1ead9dd1a0c786 | PHP | ksomemo/algorithm | /src/lecture2/Tree.php | UTF-8 | 2,069 | 3.546875 | 4 | [] | no_license | <?php
class Tree
{
private $root;
public function getRoot()
{
return $this->root;
}
public function replace(TreeNode $parent = null, TreeNode $oldNode = null, TreeNode $newNode = null)
{
if ($parent === null) {
$this->root = $newNode;
return;
}... | true |
25fd80641b8b63ff2696dfe6b6b3cea653bed462 | PHP | akmalmstfa/Ujikom-141510167 | /app/Http/Controllers.old/Api/AuthenticateController.php | UTF-8 | 2,048 | 2.671875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use JWTAuth;
use Tymon\JWTAuth\Exceptions\JWTException;
use Auth;
class AuthenticateController extends Controller
{
public function authenticate(Request $request)
{
// grab credentials from the... | true |
a99ea703a4a7056076b4fe0e439bfe62acae9883 | PHP | shockyrow/PopcornMan | /database/seeds/GenresTableSeeder.php | UTF-8 | 835 | 2.59375 | 3 | [] | no_license | <?php
use App\Genre;
use Illuminate\Database\Seeder;
class GenresTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$genres = ["Action","Adventure","Animation","Biblical Movies","Biography","Comedy","Courtroom","Crime","Disast... | true |
9b5c430cae0ce2beed737b5b268dbf77b60e81b7 | PHP | muhammadsheraz/zce7prep | /basics/Library.php | UTF-8 | 291 | 2.796875 | 3 | [] | no_license | <?php
namespace Base;
/**
* Created by PhpStorm.
* User: msher
* Date: 20/07/2019
* Time: 12:04 PM
*/
class Library
{
public $books = ['Quantum Physics', 'Discrete Maths', 'Linear Algebra'];
public function showAllBooks () {
echo implode('<br>', $this->books);
}
} | true |
62263f9fd1284acc1cd154746b57b095c4936257 | PHP | EquuleusCapstone/Capstone-PHP | /AttendMeeting.php | UTF-8 | 847 | 2.921875 | 3 | [] | no_license | <?php
/*This page, AttendMeeting.php, is used to confirm attendance to a specific meeting.
* It requires 2 arguments: meeting_id and user_id
*/
$connection = mysql_connect("localhost", "dataOnly", "PASSWORD");
//This query changes the accepted field to be '1', to signify attendance
$query="UPDATE Attendees SET accep... | true |
8a8c0f73f8db5bf734109dc207b072c7e8ef253f | PHP | wp-plugins/tiny-quick-e-mail | /Tqe/Ajax.php | UTF-8 | 3,681 | 2.625 | 3 | [] | no_license | <?php
//Disable direct view.
if (!defined('IN_PLUGIN'))
die('You can not access this file directly.');
/**
* Ajax class.
*
* @author Marijan Šuflaj <msufflaj32@gmail.com>
* @category Tqe
* @package Tqe_Ajax
*/
class Tqe_Ajax
{
/**
* Body value.
*
* @var int
*/
... | true |
af4b3c3d0e2e810864e924353fc55ed4c3c413d3 | PHP | jeam7/RevalidasYEquivalencias | /Database/migrations/2019_02_23_231801_create_schools_table.php | UTF-8 | 5,733 | 2.546875 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateSchoolsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('schools', funct... | true |
03dbd247919c42fb564dd58696f5d22d0a13c059 | PHP | neokdev/EarlyBirds | /src/UI/Action/Api/TogglePostLike.php | UTF-8 | 1,984 | 2.578125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Neok
* Date: 21/07/2018
* Time: 09:55
*/
namespace App\UI\Action\Api;
use App\Domain\Models\User;
use App\Domain\Repository\PostRepository;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Co... | true |
6ca165886b7e3f162ebecb1bdb86230683a1c76a | PHP | whitepenny/emerson | /wp-content/plugins/autoupdater/lib/Upgrader/Task/Base.php | UTF-8 | 482 | 2.578125 | 3 | [] | no_license | <?php
defined('AUTOUPDATER_LIB') or die;
abstract class AutoUpdater_Upgrader_Task_Base
{
/** @var AutoUpdater_Task_ExtensionUpdate */
protected $task;
/**
* @param AutoUpdater_Task_ExtensionUpdate $task
*/
public function __construct($task)
{
$this->task = $task;
}
/**
... | true |
dc2b0b8d5baba5126525b6cb1b8708976c69849c | PHP | omenology/latihanMvc | /app/models/Mahasiswa_model.php | UTF-8 | 1,602 | 2.796875 | 3 | [] | no_license | <?php
Class Mahasiswa_model{
private $tabel = 'mahasiswa';
private $db;
public function __construct(){
$this->db = new Database;
}
public function getAllMhs(){
$this->db->query("SELECT * FROM $this->tabel");
return $this->db->resultSet();
}
public function getMahasiswa($npm){
$this->db->query("SELE... | true |
2ab3ce1a8089bd0971bde089e2f0e20a68b61438 | PHP | malko/simpleMVC | /includes/cacheManager.php | UTF-8 | 15,228 | 2.5625 | 3 | [] | no_license | <?php
/**
* @since 2009-11-19
* @package cacheManager
* @changelog
* - 2011-07-26 - cacheManager::saveItem() remove item if empty value
* - 2010-11-10 - cacheManager::setEnd() doesn't need name parameter any more as we use $cacheStack property to get it
* - 2010-10-06 - fileCacheBackend now manage file extensions and c... | true |
6bc940b856811789d7bfd1267aa14ebb9cfd7b55 | PHP | buthallk/geocoder | /tests/Location/Polygon/PolygonSimpleTest.php | UTF-8 | 1,445 | 2.828125 | 3 | [] | no_license | <?php
namespace Tests\Location\Polygon;
use App\Modules\Location\Builders\PolygonBuilder;
use App\Modules\Location\Polygon\Point;
use App\Modules\Location\Polygon\Polygon;
use JetBrains\PhpStorm\Pure;
use Tests\TestCase;
class PolygonSimpleTest extends TestCase
{
/**
* @dataProvider pointsProviderForSimpleP... | true |
c2bbebf4fe2e708e0e8d2d21397bce5cc6c0e596 | PHP | viany-aspl/store | /catalog/model/account/api.php | UTF-8 | 1,427 | 2.53125 | 3 | [] | no_license | <?php
class ModelAccountApi extends Model {
public function login($username, $password) {
$query = $this->db->query("SELECT * FROM `" . DB_PREFIX . "api` WHERE username = '" . $this->db->escape($username) . "' AND password = '" . $this->db->escape($password) . "' AND status = '1'");
return $query->row;
}
publi... | true |
f701603461d85aa27209a17b70dadaa8de3df93a | PHP | warkol66/anmaga | /WEB-INF/classes/modules/orders/actions/OrdersDoEditAction.php | UTF-8 | 2,545 | 2.625 | 3 | [] | no_license | <?php
require_once("BaseAction.php");
require_once("OrderPeer.php");
require_once("BranchPeer.php");
class OrdersDoEditAction extends BaseAction {
// ----- Constructor ---------------------------------------------------- //
function OrdersDoEditAction() {
;
}
// ----- Public Methods -------... | true |
499c911516e1b11f7de1985ff8bf162ef014faea | PHP | YannickDeiss/WE-roomie | /view/search_result.php | UTF-8 | 1,874 | 2.546875 | 3 | [] | no_license | <?php
use view\TemplateView;
?>
<main class="content">
<div class="listing-grid">
<div class="section-heading">
<h2>Search Results <?php echo " — We found <strong style='color: #f96f5d;'>" . sizeof($this->listings) . " </strong> rooms"?></h2>
</div>
<?php
foreach ($... | true |
e0a0d66343058e243f8a88c4b250a2d8cc8b75c5 | PHP | pravinjha/boldinbox-01 | /beta/sitecode/models/diy/page_model.php | UTF-8 | 2,527 | 2.796875 | 3 | [] | no_license | <?php
/*
Model class for page
*/
class Page_Model extends CI_Model
{
//Constructor class with parent constructor
function Page_Model()
{
parent::__construct();
}
//function to create page
function create_page($input_array)
{
$this->db->insert('red_diy_pages',$input_array);
return $this->db->insert_id();... | true |
3cc4cedd92202bad97969656b2e1957cbe1f20cc | PHP | fight2escape/My-Projects | /imoocphp/app/ctrl/indexCtrl.php | UTF-8 | 821 | 2.5625 | 3 | [] | no_license | <?php
/**
* 基础控制器类
*/
namespace app\ctrl;
use core\imooc;
use core\lib\model;
// 需要继承才能实现模板复制
class indexCtrl extends imooc
{
public function index(){
$model = new \app\model\adminModel();
$title = "twig test ";
$data = "this is just a test234.";
$this->assign('title',$title);
$this->assign('data',$data);... | true |
6be1f4dfcfa7c004537ca82f324f6a16706ecbb2 | PHP | dlp2230/school-book | /app/Models/UserModel.php | UTF-8 | 2,105 | 2.609375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: wangyang
* Date: 2018/9/14
* Time: 10:11
*/
namespace App\Models;
use DB;
class UserModel extends BaseModel
{
protected $table;
public function __construct(array $attributes = [])
{
parent::__construct($attributes);
$this->table = $this->pre... | true |
d75fb200a659b65f75037814abf0be2227de68e0 | PHP | phpfyi/cobra-framework | /Interfaces/Html/HtmlElementInterface.php | UTF-8 | 3,525 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace Cobra\Interfaces\Html;
/**
* HTML Element interface
*
* @category HTML
* @package Cobra
* @author Andrew Mc Cormack <webmaster@ddmseo.com>
* @copyright Copyright (c) 2019, Andrew Mc Cormack
* @license https://github.com/phpfyi/cobra-framework/issues
* @version 1.0.0
* @link htt... | true |
5aa221efef330ed635918d10149f3e536d35ec74 | PHP | augustowebd/php-jwt | /src/Cryptography/Signer.php | UTF-8 | 479 | 3.015625 | 3 | [
"MIT"
] | permissive | <?php
namespace MiladRahimi\Jwt\Cryptography;
use MiladRahimi\Jwt\Exceptions\SigningException;
/**
* Interface Signer
*
* @package MiladRahimi\Jwt\Cryptography
*/
interface Signer
{
/**
* Get algorithm name
*
* @return string
*/
public function getName(): string;
/**
* Sign ... | true |
769e1c20655259fa944ce66b7f6c90e7cf68ac7d | PHP | hoseinnadali/todo-complete | /main.php | UTF-8 | 3,934 | 3.296875 | 3 | [
"MIT"
] | permissive | <?php
//define constants for server connection configure
define("serverName","localhost");
define("userName","root");
define("password","");
define("dbName","tododb");
define("tableName","todolist");
#define a function to setting the sequrity for variables that responsed...
function setSequrity($data){
$data = trim(... | true |
d695e7238abf3a9e9fcd062bd1f6871bec4c2333 | PHP | 3appy/test_base | /view/view/presentation/class/compile.php | UTF-8 | 3,343 | 2.59375 | 3 | [] | no_license | <?php
$files =
[
"class.member_presentation.php",
"class.team_presentation.php",
"class.event_presentation.php",
"class.member_list_presentation.php",
"class.event_member_list_presentation.php",
"class.team_member_list_presentation.php",
"class.search_member_list_presentation.php",
"class.team_list_presentation.php"... | true |
047b84f35dee4dd7b41ee54ad75793ca75a83764 | PHP | carinconhe/tambourine-backend | /app/controllers/GameController.php | UTF-8 | 554 | 3.265625 | 3 | [] | no_license | <?php
class GameController {
protected $restrictions = [
'rock' => 'scissors',
'paper' => 'rock',
'scissors' => 'paper'
];
public function playRockPaperScissors( $player1, $player2 ){
... | true |
ee7e4e100096cd7ac76a2044267388f5bf1ad5ad | PHP | BenConstable/laravel-localize-middleware | /src/Localize/DeterminerManager.php | UTF-8 | 3,252 | 2.53125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace BenConstable\Localize;
use Illuminate\Support\Manager;
use Illuminate\Support\Collection;
use BenConstable\Localize\Determiners;
/**
* Manager class for the different locale determiners.
*/
class DeterminerManager extends Manager
{
/**
* Get a cookie determiner instance.
*
* @ret... | true |
cf7915f593d8c7c093aff5a3132c569d98520aac | PHP | jianxianxy/phpDemo | /imgcut/creat.php | UTF-8 | 515 | 2.546875 | 3 | [] | no_license | <?php
header("Content-type:text/html;charset=utf-8;");
include 'ImageHandle.php';
$path = isset($_GET['path']) ? $_GET['path'] : '1.jpg';
$width = isset($_GET['w']) ? $_GET['w'] : 200;
$height = isset($_GET['h']) ? $_GET['h'] : 200;
$ic=new ImageHandle('base.jpg',$path);
//$ic->Cut(200,200,0,0); //图片裁切
//$ic->SaveAl... | true |
e8dba4bb0af21ccbd610aecd58c65f3f9dbd3915 | PHP | rowej83/ShipAdmin | /app/controllers/LordAndTaylorController.php | UTF-8 | 10,949 | 2.796875 | 3 | [] | no_license | <?php
class LordAndTaylorController extends \BaseController
{
function __construct()
{
// include(app_path().'/includes/fpdf_tpl.php');
// include(app_path().'/includes/tcpdi.php');
// include(app_path().'/includes/tcpdf_filters.php');
// include(app_path().'/includes/tcpd... | true |
7126c18c0624eedc8af8676100754174599da1aa | PHP | dead142/AsthmaCare | /modules/lk/controllers/ExaminationController.php | UTF-8 | 7,063 | 2.546875 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\lk\controllers;
use app\models\Examination;
use app\models\ExaminationSearch;
use app\models\ExamStandart;
use app\models\Profile;
use Yii;
use yii\filters\VerbFilter;
use yii\web\Controller;
use yii\web\NotFoundHttpException;
/**
* ExaminationController implements the CRUD actions for E... | true |
c93616fd8725747481f60952550ec37fd96f5897 | PHP | RishabhJain96/RoboWebProj | /other/development/finals_site_code/FinalsImprov/display.php | UTF-8 | 1,054 | 2.578125 | 3 | [] | no_license | <?PHP
session_start();
include("includes/ConnectMysql.php");
include("includes/variables.php");
if(isset($_SESSION['logged_in'])) {
}
else {
header("Location: http://cytopic.net/semester2finals/login.php");
exit;
}
$class_array = array("English", "Spanish", "Japanese");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHT... | true |
213f1566322a79af52ec621ee37b9ea427376a53 | PHP | decodelabs/df-r7-base | /libraries/opal/rdbms/variant/sqlite/Database.php | UTF-8 | 1,033 | 2.59375 | 3 | [] | no_license | <?php
/**
* This file is part of the Decode Framework
* @license http://opensource.org/licenses/MIT
*/
namespace df\opal\rdbms\variant\sqlite;
use DecodeLabs\Glitch;
use df\opal;
class Database extends opal\rdbms\Database
{
public function getTableList()
{
$stmt = $this->_adapter->prepare('SELECT ... | true |
63c1372f04a7d3af842c3ae442f176a175a97825 | PHP | hasanagha/geo_distance | /classes/Geo.php | UTF-8 | 1,973 | 3.390625 | 3 | [] | no_license | <?php
// base class with member properties and methods
class Geo {
var $earth_radius = 6371000;
public function greatCircleDistance($latitude_from, $longitude_from, $latitude_to, $longitude_to) {
# Great circle / orthodomic distance calculation
# Ref: https://en.wikipedia.org/wiki/Great-circle... | true |
07efcb1888e2323bd57c2129f44fb2ea0e7bbfb8 | PHP | leachiM2k/sipgate-settings-mobile | /proxy.php | UTF-8 | 979 | 2.53125 | 3 | [] | no_license | <?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
include 'httpful-0.2.0.phar';
$url = "https://api.sipgate.net";
$post = $_POST;
//$post = $_GET;
if(!isset($post) || count($post) < 1)
{
die("Method not allowed");
}
if(!isset($post['method']) || !in_array($post['method'], array('get','post','put','delete'... | true |
5791e2dcc84d5cf43b9147e6c5ea7d9a47bf0bfc | PHP | ekwholesale/ccp-php | /src/output/productService/WarehouseBay.php | UTF-8 | 5,954 | 3.109375 | 3 | [] | no_license | <?php
class WarehouseBay
{
/**
* @var WarehouseBayType $WarehouseBayTypeEnum
*/
protected $WarehouseBayTypeEnum = null;
/**
* @var string $WarehouseName
*/
protected $WarehouseName = null;
/**
* @var int $AvailableStock
*/
protected $AvailableStock = null;
... | true |
b3ee69937f9e250de640aa797cf40fb857dded11 | PHP | fariashen/campus-express | /phpServer/PIedit.php | GB18030 | 1,068 | 2.625 | 3 | [] | no_license | <?php
/**
* Ϣҳĺ̨php
* ҪյIJΪûĺĸϢ
* ijɹ1ʧܷ0
* **/
include 'conn.php';
//տͻ˷ĸϢ
$userName=str_replace(" ","",$_POST['userName']);
$userName=mb_convert_encoding($userName,"UTF-8");
$passWord=str_replace(" ","",$_POST['passWord']);
$phone=str_replace(" ","",$_POST['phone']);
... | true |
62ac6f7403d6fd1b4c09c6063056ce3b7bf9e5ef | PHP | GordanaP/laraoffice | /app/Http/Requests/ProfileRequest.php | UTF-8 | 1,135 | 2.59375 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use App\Rules\AlphaNumSpace;
use Illuminate\Foundation\Http\FormRequest;
class ProfileRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return true;... | true |
1e2221ab7a8ab50474ab57de992dd140f36bb8ce | PHP | cappelleMedia/farao | /php/dao/dao.php | UTF-8 | 298 | 2.5625 | 3 | [] | no_license | <?php
//require_once dirname(__FILE__) . '/../errorhandling/dbexception.php';
interface Dao {
public function add($daoObject);
public function remove($id);
public function containsId($id);
public function get($id);
public function getByString($identifier);
}
| true |
5ed8765b941a1416b7691d494bd3d14d219d6467 | PHP | WuJiY/dcrypt | /src/Huffman.php | UTF-8 | 5,658 | 3.140625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Huffman.php
*
* PHP version 5
*
* @category Dcrypt
* @package Dcrypt
* @author Michael Meyer (mmeyer2k) <m.meyer2k@gmail.com>
* @license http://opensource.org/licenses/MIT The MIT License (MIT)
* @link https://github.com/mmeyer2k/dcrypt
*/
namespace Dcrypt;
/**
* Huffman compression ... | true |
f13127e19d84a845ebf26dd5a8c628cbea5bc4a8 | PHP | juanferrer/mafia | /scripts/mafia.php | UTF-8 | 9,946 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
//ini_set('display_errors', 1);
require_once 'private.php';
// Inform PHP that we're using UTF-8 strings
mb_internal_encoding('UTF-8');
mb_language('uni');
require_once 'cors.php';
// Server-side analytics
define('SLEEP_TIME', 5);
//region Base logic
// Handle no parameters
if (!isset($_POST['type']) || $_P... | true |
1e89934deab8c7228da9babdfdeb1af97748fe48 | PHP | shohanshohan/study_log | /PHP/设计模式/Iterator.php | UTF-8 | 1,837 | 3.953125 | 4 | [] | no_license | <?php
//+--------迭代器模式---------+
//+------让对象变得可迭代并表现得像对象集合------+
//+------例如:在文件中的所有行上逐行处理文件------+
/**
* 继承 PHP 自带的用于日常任务的迭代器 Countable, Iterator
*/
class Book
{
private $author;
private $title;
public function __construct(string $title, string $author)
{
$this->author = $author;
$this->title = $... | true |
4ea8b34f9f0d5abc631d8ebfdc31215752eae5e1 | PHP | MichaelsPlayground/cross_platform_crypto | /McryptMigration/Phpseclib_Des_Tdes_Ecb_Cbc_Ctr_Encryption.php | UTF-8 | 8,947 | 2.78125 | 3 | [
"Unlicense"
] | permissive | <?php
include 'vendor/autoload.php';
use phpseclib3\Crypt\DES;
use phpseclib3\Crypt\TripleDES;
function getFixedIv8Byte()
{ // ### security warning - never use this in production ###
return "\x00\x00\x00\x00\x00\x00\x00\x00";}
function base64Encoding($input){return base64_encode($input);}
function bas... | true |
5f7c78bf654d1e2e2006679563493881d66299dc | PHP | github-s1/mapchat | /data/www/chat.taxiavenue.com/taxichat/protected/config/components/Customers.php | UTF-8 | 7,639 | 2.546875 | 3 | [] | no_license | <?php
class Customers
{
public static function Сreate() {
$user = new Users;
$user->id_type = 2;
return $user;
}
public static function GetAllCustomersByCriteria($pageSize = 0, $search = null, $order_str = null) {
$criteria=new CDbCriteria();
$criteria->mergeWith(array(
'join'=>'INNER JOIN users cus... | true |
fa862b484fcdabe958bbd7a3d80f96cc263f07e7 | PHP | legalthings/data-enricher | /src/DataEnricher/Processor.php | UTF-8 | 616 | 3.0625 | 3 | [
"MIT"
] | permissive | <?php
namespace LegalThings\DataEnricher;
use LegalThings\DataEnricher\Node;
/**
* A processor does a single type of data enrichment
*/
interface Processor
{
/**
* Class constructor
*
* @param string $property Property key with the processing instruction
*/
public function __construct... | true |
b88952a46e7474441d9fae890e9ab3ea7f474677 | PHP | baquintero/twitterClone | /app/Http/Controllers/TweetController.php | UTF-8 | 3,280 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Firebase\JWT\JWT;
use Illuminate\Support\Facades\DB;
use App\Http\Controllers\UserController;
use App\Tweet;
class TweetController extends Controller{
public function tweet(Request $request){
/* $json = $request->input('json', ... | true |
88e5fc5dbd58a40ca00c8bffa0c188cdfee0503a | PHP | limesquare-nl/activecampaign | /src/controllers/ContactsController.php | UTF-8 | 1,552 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
/**
* Active Campaign Contacts plugin for Craft CMS 3.x
*
* Create and update Active Campaign contacts. This can be use for newsletter subscriptions, for example.
*
* @link https://limesquare.eu
* @copyright Copyright (c) 2018 Jurgen Krol
*/
namespace limesquare\activecampaign\controllers;
use lime... | true |
cce53a6eb4e05471c0712937aba9f388e9feb80e | PHP | pythcon/CineRex | /dmz/testRabbitMQServer.php | UTF-8 | 1,308 | 2.515625 | 3 | [] | no_license | #!/usr/bin/php
<?php
require_once('path.inc');
require_once('get_host_info.inc');
require_once('rabbitMQLib.inc');
require_once('login.php.inc');
function doLogin($username,$password)
{
// lookup username in databas
// check password
$file = __FILE__.PHP_EOL;
$PathArray= explode("/", $file);
$login = ... | true |
09a4e855ce996412f3c0d09574cb2742926e1257 | PHP | bitpay/bitpay-checkout-for-woocommerce | /vendorPrefixed/vendor/phpcsstandards/phpcsutils/PHPCSUtils/Tokens/TokenHelper.php | UTF-8 | 2,221 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
/**
* PHPCSUtils, utility functions and classes for PHP_CodeSniffer sniff developers.
*
* @package PHPCSUtils
* @copyright 2019-2020 PHPCSUtils Contributors
* @license https://opensource.org/licenses/LGPL-3.0 LGPL3
* @link https://github.com/PHPCSStandards/PHPCSUtils
*/
namespace PHPCSUtils\Token... | true |
c583ddebfff844ffd80a0f7224e05eaf3ceb84c0 | PHP | Phenix789/RATP-Surface | /plugins/surfaceStatPlugin/lib/model/DiscreteFieldID.php | UTF-8 | 4,607 | 2.78125 | 3 | [] | no_license | <?php
/**
* @brief Valeur discrete (ID)
* @class DiscreteFieldID
* @package Plugin
* @subpackage surfaceStatPlugin
*
* @author Claude <claude@elogys.fr>
* @date 17 nov. 2009
* @version 1.1
* @license LGPL
*
*/
class DiscreteFieldID extends DiscreteField {
/***************************************************... | true |
d66d7f9d82fed6bb2627ee089a04bb53ac339c7f | PHP | jgrugru/SE-IV-Project | /utilities/database.php | UTF-8 | 14,981 | 2.875 | 3 | [] | no_license | <?php
require 'medoo.php';
require './objects/employee.php';
require './objects/customer.php';
require './objects/company.php';
require './objects/intersection.php';
require './objects/street.php';
require './objects/user.php';
require './objects/ticket.php';
use Medoo\Medoo;
c... | true |
7498f4f5d2a6cc701089edb413600181348a0242 | PHP | ChrisdAutume/billeterie | /app/Mail/OrderValidated.php | UTF-8 | 1,834 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Mail;
use App\Models\MailTemplate;
use App\Models\Order;
use Illuminate\Bus\Queueable;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Contracts\Queue\ShouldQueue;
use App\Traits\BilletParsing;
class OrderValidated exten... | true |
cead4382831189c6732c53fe5148d330fa2f25bd | PHP | rahulyhg/PHP_CMS-2 | /system/cms/model/m_cms_login.php | UTF-8 | 3,391 | 2.59375 | 3 | [] | no_license | <?php
class m_CMS_LOGIN extends Model_CMS
{
function gen_code($user_id)
{
$dbh = DB_GetConnection();
$array = array();
$rand1 = substr(md5(uniqid(rand(), true)), 0, 12);
$ip = $_SERVER['REMOTE_ADDR'];
$select = "SELECT * FROM ".DB_PREFIX."sessions WHERE user_id=:user_id";
$sth1 = $dbh->prepare($sele... | true |
48caa5da6552b86f926a9f5dd677166375addf9c | PHP | kavyann/enterprise | /Http/Controllers/Auth/LoginController.php | UTF-8 | 9,306 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
use Illuminate\Http\Request;
use Socialite;
use App\User;
use Auth;
use App\Model\Personal_details;
use App\Model\Last_login;
class LoginController extends Controller
{
/*
|-----... | true |
3cc5ff42b4d24d41c1c8b9530f8d1be4769a5270 | PHP | cerenbilgeseferoglu/hu-bby361-2020 | /cerenbilgeseferoglu_final/yazar.php | UTF-8 | 3,410 | 2.703125 | 3 | [] | no_license | <?php
/* Bağlantı bilgilerinin alınması*/
require_once("baglanti.php");
/* Veritabanı sorgulama */
$sorgu = mysqli_query($baglanti, "SELECT * FROM yazar");
?>
<html lang "en">
<head>
<title>YAZAR LİSTESİ</title>
<meta charset="utf-8"/>
<meta name="viewport" co... | true |
7912ff2ea4bfc17d299d275e2bf78aff57465ec5 | PHP | Jugendhackt/AIOSecurity | /todb.php | UTF-8 | 635 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
require('dbconnector.php');
$mac = $_POST['macaddr'];
$tor=$blockunenc=$blockad=0; // set everything to 0
if (!empty($_POST['tor'])) {
$tor="1";
}
if (!empty($_POST['bssl'])) {
$blockunenc="1";
}
if (!empty($_POST['blad'])) {
$blockad="1";
}
$protocol = $tor . $blockunenc . $blockad;
$in... | true |
e55b3e6f942d81d1d07b6195ec2cbce898c63fe0 | PHP | solec0der/omni-board | /api/v1/src/utilities/data-access-objects/access-control/UserRoleDAO.php | UTF-8 | 5,511 | 3 | 3 | [] | no_license | <?php
class UserRoleDAO {
private $conn;
public function __construct() {
$dbConn = new DBConnection();
$this->conn = $dbConn->conn;
}
public function assignUserToRole(int $userId, int $roleId) {
try {
$response = array();
$sql = "INSERT INTO user_roles... | true |
e407ecf27a9b37e7926b9f842d146fcea71ba3bc | PHP | cadoyi/istudy | /backend/form/RoleSelector.php | UTF-8 | 626 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace backend\form;
use Yii;
use yii\base\Model;
use yii\base\DynamicModel;
class RoleSelector extends Model
{
public static function getModel($user)
{
$roles = Yii::$app->authManager->getRoles();
$attributes = [];
$assignments = $user->roles;
foreach($rol... | true |
f49e3d67af96e846781f260234d12a27cbc99798 | PHP | codenetix-ltd/document-management-system-backend | /app/Contracts/Services/Tag/ITagUpdateService.php | UTF-8 | 300 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Contracts\Services\Tag;
use App\Contracts\Models\ITag;
use App\Contracts\Repositories\ITagRepository;
interface ITagUpdateService
{
public function __construct(ITagRepository $repository);
public function update(int $id, ITag $tagInput, array $updatedFields) : ITag;
} | true |
11550c319f8639e1f9737274e21f1ddb20d13ede | PHP | pinktrink/DBSession | /dbsess_5.3.php | UTF-8 | 7,047 | 2.78125 | 3 | [] | no_license | <?php
class DBSession{
const DRIVER = 'mysql'; //Database driver
const HOST = 'localhost'; //Server hostname or IP
const USER = 'root'; //Server username
const PASS = 'root'; //Server password
const DB = 'mydb'; //Server database
const MEM_TBL = 'sess_mem'; //Table for memory session storage
const DISK_TBL... | true |
1c8ced8eb95c86d7c9ac284b25e78c34a6acd289 | PHP | begusibrahim000/Laravel-Skeleton | /app/Domain/User/Repositories/UserRepository.php | UTF-8 | 760 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Domain\User\Repositories;
use Domain\User\Http\Resources\UserResource;
use Domain\User\Models\User;
use Support\Repositories\AbstractRepository;
final class UserRepository extends AbstractRepository
{
public function getModelClass(): string
{
return User::class;
}
public func... | true |
033da9d4bbba14cc1b5450770470bccd9beb1e0f | PHP | icubix/BM | /application/libraries/account_instance.php | UTF-8 | 1,870 | 2.78125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Account_Instance extends Domain {
function __construct() {
$this->dict = array(
'account_id' => 0,
'entry' => new Account_Entry(),
'recurring' => new Account_Recurring(),
... | true |
224d72ae3b8eb253152bee8541b6467bdf3a9fd4 | PHP | faycito/tidua | /content.php | UTF-8 | 2,645 | 2.625 | 3 | [] | no_license | <?php
session_start();
if(isset($_SESSION['usuario'])){
}else header('Location: index.php');
?>
<?php
include_once('server/connection.php');
$query = rellenarTabla();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Auditoria</title>
<meta name="viewport" content="wid... | true |
f4409df45b5c177bca62969b20785565e7d4b1bc | PHP | Tiana-NDG/siteCommande.cg | /admin/Pages/Marque/ModifierMarque.php | UTF-8 | 1,043 | 2.796875 | 3 | [] | no_license | <?php
if(isset($_POST['submit']))
{
require_once("../database.php");
$code = $_POST['id'];
$designation = $_POST['designation'];
if((!empty($designation)))
{
//Modification des données dans la base de donnée
... | true |
e73c5062848f11af41fcc491f063732b2c7af071 | PHP | wdda/laravel-uikit-form | /src/LaravelUikitForm.php | UTF-8 | 3,623 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace WDDA\LaravelUikitForm;
use Illuminate\Contracts\View\Factory as ViewFactory;
class LaravelUikitForm
{
protected $view;
protected $helper;
public function __construct()
{
$this->view = app(ViewFactory::class);
$this->view->addNamespace('uikitForm', base_path('vendor/wdd... | true |
4fe63c79f8da54e0a785020f1e652f8e54a47b98 | PHP | VanillaPackage/vanilla-validation | /tests/VanillaValidation/ValidationFieldRuleListTest.php | UTF-8 | 9,542 | 2.546875 | 3 | [] | no_license | <?php
namespace Rentalhost\VanillaValidation;
use PHPUnit_Framework_TestCase;
use Rentalhost\VanillaValidation\Result\Fail;
use Rentalhost\VanillaValidation\Result\FailBreakable;
use Rentalhost\VanillaValidation\Result\Success;
/**
* Class ValidationFieldRuleListTest
* @package Rentalhost\VanillaValidation
*/
cla... | true |
818bbedca70e8d0065d5d7ecf9d4bf4677b4e0e4 | PHP | ben199131837575/webcoursework | /app/Http/Controllers/EmailClient.php | UTF-8 | 1,470 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Input;
use App\User;
use Auth;
/**
* This controller handles request from the user to send emails to organiser
*
* @author Ben Owen
*/
class EmailClient extends Controller
{
/**
* Returns a form (view) for the u... | true |
8a2e0ae55274792942bc4bc85a6f588a7ed63aa6 | PHP | DanielCendales0821/trabajoUniversidad2 | /anuncios/app/Models/Usuario.php | UTF-8 | 616 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Usuario extends Model
{
//tabla selecionada
protected $table='usuario';
//campos de la tabla
protected $fillable = [
'id',
'nombre',
'correo',
'clave',
'rol',
'eliminado'
];
//Llave prima... | true |
205fe25a586059b693eac953530aa7454f921174 | PHP | kix/shop-example | /spec/DiscountSpec.php | UTF-8 | 1,604 | 2.546875 | 3 | [] | no_license | <?php
namespace spec\App;
use App\Discount;
use Money\Currency;
use Money\Money;
use PhpSpec\ObjectBehavior;
use Prophecy\Argument;
class DiscountSpec extends ObjectBehavior
{
function let()
{
$this->beConstructedThrough('forPercent', [10]);
}
function it_is_initializable()
{
$th... | true |
1ae4d62ca3f1eab7462ce4b945d773526210ed07 | PHP | JosephCM2110/AromasCoffee | /Data/CoffeeTourData.php | UTF-8 | 2,289 | 2.875 | 3 | [] | no_license | <?php
include_once 'Data.php';
include './Domain/CoffeeTour.php';
class CoffeeTourData extends Data {
public function insertTBCoffeeTour($coffeeTour) {
$conn = mysqli_connect($this->server, $this->user, $this->password, $this->db);
$conn->set_charset('utf8');
//Get the last id
... | true |
2815a484319af2b9e63ca767144f99b945f3d331 | PHP | EBRD-Digital-Transformation-MTenderCode/sync-cdb-service | /src/console/models/complaints/Complaint.php | UTF-8 | 1,133 | 2.765625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace console\models\complaints;
/**
* Class Complaint
* @package console\models\complaints
*/
class Complaint
{
const TABLE = 'complaints';
/**
* @param $id
* @param $tenderId
* @param $hash
* @param $response
* @return bool
*/
public static function handleDb($i... | true |
e660294056cf19692cf85e9dd0433c396b1aa105 | PHP | SimpleUsername/ticket-sys | /sandbox.php | UTF-8 | 934 | 2.984375 | 3 | [] | no_license | <?php
$place_id = 10000;
for ($sector_id = 1; $sector_id <= 25; $sector_id++ ) {
echo "INSERT INTO `place` (`place_id`, `place_no`, `row_no`, `sector_id`) VALUES".PHP_EOL;
for ($row_no = 1; $row_no <= 20; $row_no++) {
for ($place_no = 1; $place_no <= 50; $place_no++) {
$place_id++;
... | true |
067db4250bb8c492e5e24d41a579c5c23312676d | PHP | jgalarza101/mingleMeet | /register.php | UTF-8 | 7,771 | 2.75 | 3 | [] | no_license | <?php
include "includes/db.php";
$username = $firstName = $lastName = $age = $email = $password = $cityName = $stateName = $aboutMe = $gender = "";
$usernameErr = $fnameErr = $lnameErr = $ageErr = $emailErr = $passErr = $imgErr = $cityNameErr = $stateNameErr = $aboutErr = $genderErr = "";
$registerDone = "";
if(isset(... | true |
1361e3c671e8aef5ec85e502413017bad90010c8 | PHP | gibboncms/pages | /tests/PagesTest.php | UTF-8 | 1,076 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace GibbonCms\Pages\Test;
use GibbonCms\Pages\Pages;
use GibbonCms\Pages\Page;
use GibbonCms\Gibbon\Filesystems\PlainFilesystem;
use GibbonCms\Gibbon\Filesystems\FileCache;
class PagesTest extends TestCase
{
function setUp()
{
$this->pages = new Pages(
new PlainFilesystem($thi... | true |
1e0c5fa4743c9bb5a07a20f8362d3d909fb8d9e6 | PHP | Planview/product-demos | /app/controllers/pvadmin/RolesController.php | UTF-8 | 4,131 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace pvadmin;
use Input;
use Redirect;
use View;
use Permission;
use Role;
class RolesController extends \BaseController {
/**
* Display a listing of the roles.
*
* @return Response
*/
public function index()
{
$roles = Role::orderBy('name', 'asc')->get();
... | true |
6d6772c4d6dc6cd4912f680138583cf968d273a7 | PHP | Codetym/law-firm-webApp | /law-firm/includes/update.php | UTF-8 | 7,603 | 3.15625 | 3 | [] | no_license | <?php
// Include config file
require_once "connection.php";
// Define variables and initialize with empty values
$phone = $appDate = $appTime = $email = "";
$phone_err = $appDate_err = $appTime_err = $email_err = "";
// Processing form data when form is submitted
if(isset($_POST["appointment_ID"]) && !empty($_P... | true |
52c33a95f888a03b10e06c7712fe68b87de081d9 | PHP | makokhavictor/website | /lib/classes/dashboard_menu.php | UTF-8 | 1,076 | 2.546875 | 3 | [] | no_license | <?php
class dashboard_menu {
protected $menu;
protected function dashboard_menu_array () {
require_once ( USER_ABSPATH . TEMPLATES . 'dashboard-menu.php' );
return $this->menu = $dashboard;
}
protected function construct_dashboard_menu () {
$menus = $this->dashboard_menu_array ();
if... | true |