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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
04a1122834593861dd405edabae5ad85ace387e5 | PHP | ThomGardet/WEB-Project | /Monument Go/model/UsersManager.php | UTF-8 | 2,741 | 3.078125 | 3 | [] | no_license | <?php
require_once('User.php');
class UsersManager
{
private $_db;
public function __construct($db)
{
$this->setDb($db);
}
public function setDb(PDO $db)
{
$this->_db = $db;
}
public function get($idUser)
{
$id = (int) $idUser;
$q = $this->_db->query('SEL... | true |
adfa92ebc20baf04b028b5cf3e4b557ae47301f1 | PHP | canhminhdo/Query-Parser | /CustomVisitor.php | UTF-8 | 3,658 | 2.703125 | 3 | [] | no_license | <?php
class CustomVisitor extends searchBaseVisitor {
public $search;
public $exprs;
public $tags;
public $model;
const KEY_NAME = ['name:', 'テストケース名:'];
const KEY_PRECONDITION = ['precondition:', '前提条件:'];
const KEY_PURPOSE = ['purpose:', '目的:'];
const KEY_EXPECT_RESULT = ['expect_res... | true |
a2b7958cb064fb93e694c89e08608f391e77067b | PHP | aprili1u/Projet_de_BD_Houillon_Aprili | /installation.php | UTF-8 | 520 | 2.609375 | 3 | [] | no_license |
<?php
$link = mysqli_connect('localhost', 'root', '');
if (!$link) {
die('Connexion impossible : ' . mysql_error());
}
$sql = 'CREATE DATABASE Projet';
if (mysqli_query ($link,$sql)) {
echo "Base de donnees creee correctement\n";
} else {
echo 'Erreur lors de la création de la base de donné... | true |
12958ae2eb5df42c4f92b57311a8f99de1fc6221 | PHP | xiaocaimi/short_url | /core/core.php | UTF-8 | 4,704 | 3.046875 | 3 | [] | no_license | <?php
// +----------------------------------------------------------------------
// | Author: XiaoCaiMi <info@xiaocaimi.org> <https://www.xiaocaimi.org>
// +----------------------------------------------------------------------
// + 核心类
class core {
protected $className;
protected $functionName;
protected... | true |
55d4fce816c51524fbc664e175b996c459d81fe7 | PHP | arpite/arpite | /src/Component/Rules/DeepExistInRule.php | UTF-8 | 910 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
namespace Arpite\Component\Rules;
use Exception;
use Illuminate\Contracts\Validation\Rule;
/**
* @description
* Validates that submitted value exists
* in given array
*/
class DeepExistInRule implements Rule
{
/**
* Create a new rule instance.
*
* @param array<mixed> $in
* @return void
... | true |
e040aa0dcbd433f306e065b2021740e4d72f90db | PHP | Dheia/october-blade | /llaravel/controllers/LanguageController.php | UTF-8 | 1,530 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Lonban\Llaravel\Controllers;
use Lonban\Llaravel\Classes\LanguageClasses;
use Lonban\Llaravel\Introduce\CCLanguages as CCSHOP;
class LanguageController extends CommonController
{
public $language_m = null;//语言与货币对象
private $CCSHOP = null;
public function __construct()
{
$this... | true |
86304af33afe70c5596b18cd3796316a6079ab23 | PHP | Roberto-Rabelo/lojaphpunitantigo | /tests/DAO/DAOClienteTest.php | UTF-8 | 807 | 2.6875 | 3 | [] | no_license | <?php
use PHPUnit\Framework\TestCase;
use LOJA\Model\Cliente;
use LOJA\DAO\DAOCliente;
class DAOClienteTests extends TestCase{
/**
* @before
*/
public function setUpDeleteAll(){
$DAO = new DAOCliente();
$DAO->deleteAll();
}
public function testCadastro(){
$c = new Cl... | true |
04b3f62c8dbfa1ada6cdd8917ec7c985e843fce7 | PHP | jclapp23/cms_demo | /classes/fixMagicQuotes.php | UTF-8 | 600 | 3 | 3 | [] | no_license | <?php
/*
* Strips all slashes from an array or a string
* @param mixed A string or array from which to strip slashes
* @param mixex A value matching the first argument with slashes stripped
*/
function stripSlashesDeep($value)
{
$value = is_array($value) ? array_map('stripSlashesDeep', $value) : stripslashes($val... | true |
2e86a186d49494fa66675fe23c256e2db61e866d | PHP | arif-ak/bimmertech-test | /src/AppBundle/Serializer/Normalizer/InstallerNormalizer.php | UTF-8 | 1,298 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace AppBundle\Serializer\Normalizer;
use AppBundle\Entity\Installer;
use Symfony\Component\Serializer\Normalizer\NormalizerInterface;
/**
* Class ProductReviews
* @package AppBundle\Serializer\Normalizer
*/
class InstallerNormalizer implements NormalizerInterface
{
/**
* @param mixed $object
... | true |
6efcd384828414b54a701772ac31e08cc854cc0c | PHP | rcanto/s7cefireTdd | /PracticaPHPUnit/tests/unit/BookCar/BookCarTest.php | UTF-8 | 1,106 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Test\Unit\BookCar;
use PHPUnit\Framework\TestCase;
use UseCase\BookCar;
use Model\User;
use Model\Booking;
use Service\CarFinder;
use Model\Car;
use Service\DbConnection;
class BookCarTest extends TestCase {
/**
* @test
*/
public function adultsCanBookAvailableCars() {
... | true |
cb343d38f06553f74c533bd14be3e7631dbdb94c | PHP | woshijibei/ggd | /vendor/symfony/translation/Loader/ArrayLoader.php | UTF-8 | 813 | 2.828125 | 3 | [
"MIT"
] | permissive | <?php
namespace Symfony\Component\Translation\Loader;
class ArrayLoader implements LoaderInterface
{
public function load($resource, $locale, $domain = 'messages')
{
$this->flatten($resource);
$catalogue = new \Symfony\Component\Translation\MessageCatalogue($locale);
$catalogue->add($resource, $domain);
re... | true |
86e9249a34056b2243af39a5356c81a8a460dbec | PHP | git-lm/motion | /application/pt/model/ProductModel.php | UTF-8 | 3,442 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace app\pt\model;
use think\Model;
use think\Db;
class ProductModel extends Model
{
public $error;
protected $autoWriteTimestamp = 'timestamp';
// 定义时间戳字段名
protected $createTime = 'create_at';
protected $table = 'pt_product';
/**
* 获取单个会员
*/
public function list($pa... | true |
8570332c35ae3141bc62e88bf32e6254b8ebd4f1 | PHP | wolveszhu/nginx-tgwu | /ThinkPHP/Library/Think/UserAgent.class.php | UTF-8 | 771 | 3.046875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Think;
/**
* Class UserAgent 客户端检测类
* @package Think
*/
class UserAgent {
private static $IS_MOBILE = false;
private static $IS_WECHAT = false;
public static function init() {
$useragent = "";
if(isset($_SERVER['HTTP_USER_AGENT'])){
$useragent = $_SERVER['HTTP... | true |
19b9857c8c519ae48e35c3e35956f0a69240e1b9 | PHP | alexfurr/imperial-network | /classes/class-draw.php | UTF-8 | 16,790 | 2.71875 | 3 | [] | no_license | <?php
class imperialNetworkDraw
{
static function drawProfileDropdown()
{
$homeURL = network_home_url();
$html='';
$username="";
$userType=4;
$fullName="";
if(isset($_SESSION['username']) )
{
$username = $_SESSION['username'];
$userType=$_SESSION['userType'];
$fullName = $_SESSION... | true |
80afa97735fe1c5f0d8923cd99f56b6470e69063 | PHP | salazarcode/inmall | /html/app/plugins/dokan-pro/includes/Module.php | UTF-8 | 37,400 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace WeDevs\DokanPro;
use WeDevs\Dokan\Traits\ChainableContainer;
class Module {
use ChainableContainer;
/**
* The wp option key which contains active module ids
*
* @since 3.0.0
*
* @var string
*/
const ACTIVE_MODULES_DB_KEY = 'dokan_pro_active_modules';
/... | true |
145302b28885f81ab0c0aa8cefc44726f471b735 | PHP | Aldirhezaldi/web | /utsci/application/controllers/api/DataKategori.php | UTF-8 | 3,207 | 2.609375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
defined('BASEPATH') OR exit('No direct script access allowed');
require APPPATH . '/libraries/REST_Controller.php';
require APPPATH . 'libraries/Format.php';
use Restserver\Libraries\REST_Controller;
class DataKategori extends REST_Controller {
function __construct() {
parent::__... | true |
45647aafcedbbba322d2da2494618bb98e48b47d | PHP | hrarnob07/bd-gym | /Laravel/app/repo/Repository.php | UTF-8 | 1,172 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\repo;
use Illuminate\Database\Eloquent\Model;
class Repository
{
protected $model;
/**
* Repository constructor.
* @param $model Model
*/
public function __construct(Model $model)
{
$this->model = $model;
}
public function create($data=[])
{
... | true |
156c4399cf9ac19e5785c3466e8c8837791a5daa | PHP | MarinaChizh/cripto | /OOP/person.1.php | UTF-8 | 1,216 | 3.828125 | 4 | [] | no_license | <?php
class Person
{
protected $name;
protected $age;
protected $city;
function __construct($name, $age, $city)
{
$this->setName($name);
$this->setAge($age);
$this->setCity($city);
}
function setName($name)
{
if (strlen($name) > 2) {
return ... | true |
8feca2e4bfcf6e4f4e56817c3f7d1ec94bd28554 | PHP | omartypo3/projectTypo3 | /silcoplast_product/Classes/Domain/Model/Product.php | UTF-8 | 3,183 | 2.640625 | 3 | [] | no_license | <?php
namespace Silcoplastproduct\SilcoplastProduct\Domain\Model;
/***
*
* This file is part of the "Silcoplast_Product" Extension for TYPO3 CMS.
*
* For the full copyright and license information, please read the
* LICENSE.txt file that was distributed with this source code.
*
* (c) 2019 ons <ons.chaari@soft... | true |
f6944196628b667b2ad9bf17194810796f26e140 | PHP | ichoukou/z.h.i-h.u.i-t.u | /server_member_v1/Application/MerAdmin/Model/TagsModel.class.php | UTF-8 | 1,162 | 2.5625 | 3 | [] | no_license | <?php
namespace MerAdmin\Model;
use common\MSDaoBase;
class TagsModel extends MSDaoBase{
const TABLENAME = 'total_tags';
const ISDEL_0 = 0;//显示
const ISDEL_1 = 1;//删除
public $db;
public function __construct()
{
$this->db = M(self::TABLENAME);
}
/**
* 获取标签信... | true |
413aff58f8238dfc7e5bb7c00126d461007c28f0 | PHP | darrennolan/Styler | /src/DarrenNolan/Styler/Compilers/Css.php | UTF-8 | 432 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php namespace DarrenNolan\Styler\Compilers;
class Css extends FilesystemCompiler implements iCompiler
{
public function serve($file_path)
{
$file_path = $this->config['serve_from'] . '/' . $this->sanitiseFilePath($file_path);
if (file_exists($file_path)) {
return $this->serveCs... | true |
7f0cbec91b1dbb619083e9e81806dadcea2cef35 | PHP | aalexandru/calendar | /src/Calendar/Calendar.php | UTF-8 | 827 | 3.203125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Author: Andrei ALEXANDRU <contact@andreialexandru.com>
*/
namespace Calendar;
use Calendar\Event\AbstractEvent;
/**
* Class Calendar
*
* @package Calendar
*/
class Calendar
{
/**
* @var string
*/
protected $name;
/**
* @var AbstractEvent[]
*/
protected $events;
... | true |
aef672e04fd109f44aca5311c4a89852d4292050 | PHP | RarOks1008/009-shopedia | /app/Models/Item.php | UTF-8 | 1,261 | 3 | 3 | [] | no_license | <?php
namespace App\Models;
use App\Config\DATABASE;
class Item {
private $database;
public function __construct(DATABASE $database) {
$this->database = $database;
}
public function getItems($user_id) {
return $this->database->executeQueryAll("SELEC... | true |
6124ad650acc0002b0146a353af070d5d379d9b3 | PHP | sasbass/base-url | /url.php | UTF-8 | 3,330 | 3.265625 | 3 | [] | no_license | <?php
class Url {
const DATE_FORMAT = "Y-d-m H:i:s";
private function __construct(){}
private static function getURI(){
return explode('/', $_SERVER['REQUEST_URI']);
}
private static function getName(){
return explode('/',$_SERVER['SCRIPT_NAME']);
... | true |
b479665bcc5df86c3419487c09b50b919226e5f6 | PHP | chipslays/collection | /src/Collection.php | UTF-8 | 11,752 | 3.28125 | 3 | [
"MIT"
] | permissive | <?php
namespace Chipslays\Collection;
use Chipslays\Arr\Arr;
use Countable;
use ArrayAccess;
use Iterator;
use stdClass;
class Collection implements Countable, ArrayAccess, Iterator
{
/**
* @var array
*/
protected $data = [];
protected $position = 0;
/**
* @param array|stdClass $item... | true |
a696a43d06af724a53c9cce2af41bd53e95cdc2d | PHP | TMcManus/Twimletize | /index.php | UTF-8 | 1,479 | 2.875 | 3 | [] | no_license | <?php
/**
* Download the Twilio PHP Helper Library from this page:
* https://github.com/twilio/twilio-php
*
* After unzipping and opening the file, copy the entire 'Services' folder
* into the same directory as this file.
*/
require_once('Services/Twilio.php');
/**
* Using the Twilio Helper Library will require... | true |
6c23850c339b7c2f67029f4976d86500605a9821 | PHP | Ribster/NoWire | /NoWire_v1/web/register_mmt.php | UTF-8 | 1,375 | 2.984375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Robbe Van Assche
* Date: 29/10/15
* Time: 19:03
*/
//start the session
session_start();
require 'dbconn.php';
$userFirst = $conn->real_escape_string(($_POST["inputFirst"]));
$userLast = $conn->real_escape_string(($_POST["inputLast"]));
$userEmail = $conn->real_escape_stri... | true |
9f1e8cceadc56cfe1696d91589f4acfb6cf2f2e1 | PHP | marvinlabs/laravel-html-bootstrap-4 | /tests/HtmlTestCase.php | UTF-8 | 2,883 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace MarvinLabs\Html\Bootstrap\Tests;
use Illuminate\Contracts\Support\Htmlable;
use MarvinLabs\Html\Bootstrap\Contracts\FormState;
use MarvinLabs\Html\Bootstrap\Tests\Support\FakeFormState;
use Symfony\Component\DomCrawler\Crawler;
abstract class HtmlTestCase extends TestCase
{
protected function ass... | true |
f3f2a3da10d38f9a6c1254c05b7d4fdd2b92c5fd | PHP | JackeviciusR/Simple-Tasks | /API_currance/app/Rest.php | UTF-8 | 1,257 | 2.703125 | 3 | [] | no_license | <?php
//$curl = curl_init();
class Rest {
//step1
// $cSession = curl_init();
// //step2
// curl_setopt($cSession,CURLOPT_URL,"http://www.google.com/search?q=curl");
// curl_setopt($cSession,CURLOPT_RETURNTRANSFER,true);
// curl_setopt($cSession,CURLOPT_HEADER, false);
// //step3
// ... | true |
608ec19cf41acffcb51215ce4a02da8b5dffb537 | PHP | ifpb/php-guide | /web/dynamic-pages/codes/heroes/index.php | UTF-8 | 605 | 2.765625 | 3 | [] | no_license | <?php require('heroes.php'); ?>
<!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>Document</title>
</head>
<body>
<table>
<thead>
<tr>
<th>Nome</th... | true |
45f8e046fe2d560b8fb52953d62450a76834aad8 | PHP | LangVan/php | /daily/18/1_wannianli.php | UTF-8 | 650 | 2.890625 | 3 | [] | no_license | <?php
$week = empty($_GET['week'])?'2':$_GET['week'];
$day = empty($_GET['day'])?'31':$_GET['day'];
function data($week,$day){
echo '<table border="1" width="800" align="center">';
echo '<tr>';
echo '<th>星期日</th>';
echo '<th>星期一</th>';
echo '<th>星期二</th>';
echo '<th>星期三</th>';
echo '<th>星期四</th>';
echo '<t... | true |
6f1bb6d79084bf0df0f7e94bbf476990fd77a9f1 | PHP | phplesson/phpacademy | /sashok32/22042018/arrays_loops_tasks/17.php | UTF-8 | 291 | 3.375 | 3 | [] | no_license |
<?php
$arr = array ('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December');
$month = date('F');
foreach ($arr as $arrs) {
if ($arrs == $month ) {
echo "<b>$arrs</b>".PHP_EOL;
continue;
}
echo "$arrs".PHP_EOL;
}
?>
| true |
1b44cc46b1eac0e52ae00013ac2af5b2aa128e30 | PHP | anoblet/php-framework | /Framework/Module/XML/XML.php | UTF-8 | 2,983 | 2.546875 | 3 | [] | no_license | <?php
NameSpace Framework\Module
{
Require_Once 'XML\Serializer.php';
Class XML Extends \Framework\Module/* TODO \Data\Format*/
{
Public $Model = "Models\XML";
Protected $Models = Array
(
"Document" => "Models\Document",
"Element" => "Models\Element"
);
Public $Data;
Public Functio... | true |
7d0c9bb8d9984aad087e1739a4a619a838e85b83 | PHP | mirkosalaris/reverse | /public/settings.php | UTF-8 | 7,022 | 2.78125 | 3 | [] | no_license | <?php
// common configuration
require("../includes/common.php");
// set the title
$render_ops["title"] = "settings";
// default form: the user didn't choose what action to take, yet
$render_ops["form"] = NULL;
// if user reached page via GET (as by clicking a link or via redir... | true |
9b17fa4db3b3dd381838f9c997351e8c6f4396f6 | PHP | safaeee/ChatApp | /connectdb.php | UTF-8 | 200 | 2.53125 | 3 | [] | no_license | <?php
try{
@$con=mysqli_connect('localhost','root','','users');
if(!$con) throw new Exception('Erreur de Connexion : '.mysqli_connect_error(),1);
}
catch(Exception $e){
die($e->getMessage());
}
?> | true |
9af567cab31d778dba5194d216623b34cf018955 | PHP | Ashkas/CAT | /lib/custom.php | UTF-8 | 13,430 | 2.546875 | 3 | [] | no_license | <?php
//Get link from ACF fields
function get_cta_link( $text = '', $url = '', $class = NULL ) {
if(!is_admin()):
$output = '';
if(!empty($url) && !empty($text)) {
$output = '<a href="'. $url .'" class="cta_button '.$class.'">'. $text .'</a>';
}
return $output;
endif;//is_admin
}
function get_cta_... | true |
ef27a257bd5522d6ea1f74104f050e69fdf056a6 | PHP | mojibakeo/php-crawler-app-sample | /timeline.php | UTF-8 | 738 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: bko
* Date: 2017/12/03
* Time: 23:18
*/
require_once __DIR__ . '/vendor/autoload.php';
use App\Services\Mixi\FetchRecentTimeLine;
if (PHP_SAPI != "cli") {
say("cli からつかってね");
exit;
}
if ($argc < 2) {
say("ログインメールアドレスとパスワードを引数に指定してね");
exit;
}
list($scri... | true |
d994e847f2b459e08df2a0dc0ca7840463666c6c | PHP | danilor/TQP | /database/migrations/2016_06_05_211745_create_registro_productos_table.php | UTF-8 | 1,227 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateRegistroProductosTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('registro_productos', function (Blueprint $ta... | true |
fc3935865663b76fc3f9b7d04dd9e73fe09caa98 | PHP | ITAAcademy/IntITA | /protected/models/accountancy/services/serviceAccess/VisitorAccessBehavior.php | UTF-8 | 586 | 2.5625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: anton
* Date: 28.11.16
* Time: 22:13
*/
interface VisitorAccessBehavior extends IBehavior {
/**
* Provide access for visitor to service
* @param $service
* @return mixed
*/
function grantVisitorAccess($service);
/**
* Revoke access fo... | true |
43b79cc13eddb7af1672e44a20a96b86d4593b57 | PHP | engrmukul/delllliverydot | /database/migrations/2020_07_00_122659_create_business_categories_table.php | UTF-8 | 956 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use App\Traits\TableCommonColumn;
class CreateBusinessCategoriesTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
use TableCommonColumn... | true |
83640bb900d097714177992a1df4de4b5dab8625 | PHP | chathurangaprojects/LCS_IMS | /application/models/ItemMainCategory/.svn/text-base/itemmaincategoryservice.php.svn-base | UTF-8 | 805 | 2.734375 | 3 | [] | no_license | <?php
class ItemMainCategoryService extends CI_Model {
function __construct()
{
// Call the Model constructor
parent::__construct();
}//constructor
public function loadItemCategories()
{
$this->db->from('ta_ims_main_category');
$this->db->order_by("Category_Name", "asc");
$query = $this->... | true |
3b0cbdf7cc1ac78c7fb3b286536f892a47168b7b | PHP | zimbura/elka1c | /app/Providers/PermissionsServiceProvider.php | UTF-8 | 1,348 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use App\Models\Permission;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\Gate;
class PermissionsServiceProvider extends ServiceProvider
{
/**
* Register services.
*
* @return void
*/
public funct... | true |
835b1647a661ac212ac3db7aa64c70053ea3be87 | PHP | adam-kicsak/multimedia-web-portal | /mwp/Controller/Media.php | UTF-8 | 20,953 | 2.5625 | 3 | [] | no_license | <?php
namespace Controller;
class Media implements \MVC\iController {
const PAGINATOR = 8;
public $paginator;
public $mediaRemover;
private $userId;
private function ffmpegParseTime($time) {
$time = explode(':', $time);
return ($time[0] * 60 + $time[1] ) * 60 + $time[2];
... | true |
354accb76b5a8adfee8ae49e0674f32131ddaea6 | PHP | vernayloic/sdk-php-shop | /src/Mirakl/MMP/FrontOperator/Request/Payment/Refund/GetOrderRefundsRequest.php | UTF-8 | 1,437 | 2.515625 | 3 | [] | no_license | <?php
namespace Mirakl\MMP\FrontOperator\Request\Payment\Refund;
use Mirakl\Core\Request\AbstractRequest;
use Mirakl\Core\Request\PageableTrait;
use Mirakl\Core\Response\Decorator;
use Mirakl\MMP\FrontOperator\Domain\Collection\Payment\Refund\RefundOrderCollection;
use Psr\Http\Message\ResponseInterface;
/**
* (PA12... | true |
ee08e50cfa707d4a04dae12f370406ba0dae62d1 | PHP | Tyrese919/Round-the-world-round-the-world-9720c058 | /wisselgeld.php | UTF-8 | 566 | 3.1875 | 3 | [] | no_license | <?php
$geld = $argv[1];
$geld = round(($geld*100)/5)*5/100;
define("BILJETEN", array(50, 20, 10, 5, 2, 1, 0.50, 0.20, 0.10, 0.05, 0.02, 0.01));
foreach (BILJETEN as $biljet) {
$geld = round ($geld, 2);
$floor = floor ($geld / $biljet);
$geld = $geld - ($floor * $biljet);
... | true |
ebdf1824d084eab4b5d0b08a767e50cee4e98711 | PHP | bertearazvan/rominality | /users/change_password.php | UTF-8 | 2,689 | 2.8125 | 3 | [] | no_license | <?php
session_start();
require_once('../classes/User_class.php');
$showError = false;
$user = new User();
$active = "changePasswordPage";
$id = $_SESSION['user']['id'];
if (!empty($_POST)) {
$oldPassword = $_POST["old_password"];
$newPassword = $_POST["new_password"];
if ($oldPassword === $newPassword) {... | true |
97af4de495d70e8081706efb28066ad840c51606 | PHP | BertW007/Coderslab_from_beginnig- | /Podstawy_PHP/2_Kontrola_przeplywu_programu/zadanie03.php | UTF-8 | 186 | 3.234375 | 3 | [] | no_license | <?php
function skrypt ($liczba){
$array = [];
for ($i = $liczba;$i>=1;$i--){
if ($i%2!=0 ? $array[]=$i : false );
}
return array_sum($array);
}
echo skrypt(10); | true |
e5ebff5d04d40e47e119b99eacfa99acbb11bfeb | PHP | sargisshahinyan/store | /categories.php | UTF-8 | 3,367 | 2.734375 | 3 | [] | no_license | <?php
include "Functions.php";
$navs = get_nav(2);
include "header.php";
$category = new Category($db);
if(count($_POST)) {
$id = !empty($_POST["id"]) ? $_POST["id"] : null;
$name = !empty($_POST["name"]) ? $_POST["name"] : null;
$action= !empty($_POST["action"]) ? $_POST["action"] : null;
if(!$name)... | true |
7f5f9196d0afe17f5e30472141fd2c74a88b4fdd | PHP | Psaproxy/demo | /app/Http/Controllers/BooksCatalog/BookAuthorController.php | UTF-8 | 3,136 | 2.5625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\BooksCatalog;
use App\Http\Controllers\Controller;
use Core\BooksCatalog\Author\Actions\Add;
use Core\BooksCatalog\Author\Actions\Delete;
use Core\BooksCatalog\Author\Actions\Get;
use Core\BooksCatalog\Author\Actions\ListAll;
use Core\BooksCatalog\Author\Actions\Update;
use Illumi... | true |
9b278e2d50decb9526444090c13727655601727a | PHP | Britgo/Tournament-reg | /delclub.php | UTF-8 | 3,084 | 2.515625 | 3 | [] | no_license | <?php
// Copyright 2016 John Collins
// *****************************************************************************
// PLEASE BE CAREFUL ABOUT EDITING THIS FILE, IT IS SOURCE-CONTROLLED BY GIT!!!!
// Your changes may be lost or break things if you don't do it correctly!
// *****************************************... | true |
ac42c56d6965963e5b64daf8df5362fa330fc750 | PHP | linuxserver/Heimdall | /vendor/facade/ignition-contracts/src/SolutionProviderRepository.php | UTF-8 | 525 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace Facade\IgnitionContracts;
use Throwable;
interface SolutionProviderRepository
{
public function registerSolutionProvider(string $solutionProviderClass): self;
public function registerSolutionProviders(array $solutionProviderClasses): self;
/**
* @param Throwable $throwable
* @... | true |
a6774a2902fa600ab69e62008a5b86119a360908 | PHP | mbcraft/piol | /src/Mbcraft/Piol/StorageDrivers/XMLStorage.php | UTF-8 | 1,757 | 3.265625 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file contains the XMLStorage class definition.
*/
namespace Mbcraft\Piol\StorageDrivers {
use \Mbcraft\Piol\Storage;
use \Mbcraft\Piol\StorageFactory;
/**
* This class contains operations available only for XML storages : reading and writing the
* whole xml content. It uses... | true |
39b23ac16fb40482cfe80e0dd93965f1d428bc0f | PHP | josefelipetto/process-management-system | /app/File.php | UTF-8 | 444 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
/**
* Class File
* @package App
*/
class File extends Model
{
/**
* @var string[]
*/
protected $fillable = [
'path',
'state_id'
];
/**
* @return Belong... | true |
e984b58132ab0af41cd5b1ebc564519f76ce1ab9 | PHP | AngelSanz1/quieroundocv1 | /app/TipoSangre.php | UTF-8 | 576 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Class TipoSangre
* @package App\Models
* @author GrupoBECM
* @copyright 2016
* @version 1.0.0.
*/
class TipoSangre extends Model
{
protected $table = 'tipo_sangre'; //Table name
protected $guarded = ['id']; //Black list
prote... | true |
11b09f88742b383005775b245e855d745ceb40c3 | PHP | andrewjamesbibby/project-demo | /app/Company.php | UTF-8 | 586 | 2.734375 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use App\Traits\RecordsActivity;
class Company extends Model
{
use RecordsActivity;
/**
* The attributes that are mass assignable.
*
* @var array
*/
protected $fillable = [
'name', 'email', 'logo', 'website'
];
... | true |
47a065361584f4726496b0c787ccb362d8e98e3f | PHP | DavidHavl/Ajasta | /module/AjastaCore/src/Ajasta/Core/Form/Element/LocaleSelect.php | UTF-8 | 819 | 2.671875 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
namespace Ajasta\Core\Form\Element;
use Collator;
use Locale;
use Zend\Form\Element\Select;
class LocaleSelect extends Select
{
/**
* @param string[] $selectableLocales
* @param string $defaultLocale
*/
public function __construct(array $selectableLocales, $defaultLocale)
{
... | true |
1ed1edc4ed0f67d078f0ef2177ec96294d5b41bb | PHP | FourDesigners/FourDesigners | /CS/Risolutori/auth.php | UTF-8 | 1,401 | 2.59375 | 3 | [] | no_license | <?php
ini_set('display_errors', 0);//disabilita l'output degli errori php
ini_set('display_startup_errors', 0);
if(!isset($_SESSION))
{
session_start();
}
require_once ("../common/connessione.php");
$sruolo = 'SESS_RUOLO';
$semail = 'SESS_EMAIL';
if (! isset($_SESSION[$sruolo]) || trim($_SESSION[$sruolo]) == '')... | true |
abe0fb96796ea876172619b7bb35451443de4098 | PHP | emma-laprevote/boutique | /app/Controllers/Controlleradmin.php | UTF-8 | 10,291 | 2.625 | 3 | [] | no_license | <?php
namespace app\controllers;
class Controlleradmin extends \app\models\Modeladmin
{
// Properties
/**
* total_product
*
* @var mixed
*/
private $total_product;
/**
* prod_by_page
*
* @var mixed
*/
private $prod_by_page;
/**
* offset
*
* @var mixed
*/
private $o... | true |
e54adb7ad88a6dd93ac2838cc978610212841d19 | PHP | ngie-mp/Framework-MVC | /Core/Controllers/Controller.php | UTF-8 | 252 | 2.5625 | 3 | [] | no_license | <?php
class Controller
{
public $vars = array();
public function render($filename, $d = array())
{
$this->vars = array_merge($this->vars, $d);
extract($this->vars);
require(ROOT.'Views/'.$filename.'.php');
}
}
| true |
2c6f8d7036501fef7cfa883148cf36f840b0278b | PHP | MaksIgnatchenko/btw | /app/Modules/Users/Merchant/Rules/PasswordRule.php | UTF-8 | 788 | 2.859375 | 3 | [] | no_license | <?php
/**
* Created by Ilya Kobus, Appus Studio LP on 20.11.2018
*/
namespace App\Modules\Users\Merchant\Rules;
use Illuminate\Contracts\Validation\Rule;
class PasswordRule implements Rule
{
/** @var string */
protected $pattern = '/^(?=.*[0-9])(?=.*[a-zA-Z])(.+)$/';
/**
* Determine if the valida... | true |
4066272044cd48a0bca1f7a02e480106e68851e5 | PHP | aramirez-es/softonic-workshop-silex | /src/OpenTonic/Services/WorklogsRepository.php | UTF-8 | 1,555 | 2.765625 | 3 | [] | no_license | <?php
namespace OpenTonic\Services;
use Doctrine\DBAL\Connection;
class WorklogsRepository
{
private $db;
public function __construct(Connection $db)
{
$this->db = $db;
}
public function getList()
{
return $this->db->fetchAll("SELECT w.worklog_id, w.text, u.name FROM `worklo... | true |
687d8f704a73d922460863eebbdba1659e06e34a | PHP | brunomairey/PHP-day02-Bruno | /exercise7.php | UTF-8 | 460 | 2.515625 | 3 | [] | no_license | <?php
$host= "localhost";
$username = "root";
$pw = "";
$db = "phpday02airlines";
$conn = mysqli_connect($host, $username, $pw, $db);
if(!$conn) {
echo "error";
}
$fname = $_POST["first_name"];
$lname = $_POST["last_name"];
$email = $_POST["email"];
$sql = "INSERT INTO users (firstname, lastname, email... | true |
c5b6dd2154f1db6f58bbc798e869a093a45404f3 | PHP | AymericLY/intranetV3 | /src/MesClasses/Excel/MyExcelMultiExport.php | UTF-8 | 6,931 | 2.734375 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: davidannebicque
* Date: 21/06/2018
* Time: 07:33
*/
namespace App\MesClasses\Excel;
use App\MesClasses\MyAbsences;
use App\MesClasses\MySerializer;
use PhpOffice\PhpSpreadsheet\Exception;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Worksheet\Pag... | true |
a456019c23de5f81e14a34ee5e0ba10ce3d24d29 | PHP | dumistoklus/salon | /Orgup/Common/Hash.php | UTF-8 | 595 | 3.171875 | 3 | [] | no_license | <?php
namespace Orgup\Common;
class Hash {
static public function password( $password ) {
for ( $i = 0; $i < 100; $i++ ) {
$password = md5( $password );
}
return $password;
}
static public function genPassword($pass_length = 8)
{
$symbols = 'QqWwEeRrTtYyUu... | true |
6f17478c1b3cea1d02504ef5f26dc1b5ebafd8bd | PHP | iSchool-Company/ischool-sir-tan | /database/gc/create.php | UTF-8 | 1,715 | 2.65625 | 3 | [] | no_license | <?php
require '../connection.php';
if (
$_SERVER['REQUEST_METHOD'] === 'POST'
&&
isset($_POST['user_id'],
$_POST['name'],
$_POST['members'])
) {
$userId = $_POST['user_id'];
$name = $_POST['name'];
$members = $_POST['members'];
$value = $_POST['value'];
$dateNow = date('Y-m-d H:i:s');
$isSender... | true |
3977236c8c67aea7677a7c905a4262085e5eee88 | PHP | ManYaka314/iFORA | /core/feedback.php | UTF-8 | 3,266 | 3.0625 | 3 | [] | no_license | <?php
include "connection.php";
$name = trim($_POST['name']);
$email = trim($_POST['email']);
$date = trim($_POST['date']);
$time = trim($_POST['time']);
$fbObj = new FeedbackRec;
$fbObj->feedbackGen($name, $email, $date, $time, $host, $uname, $pass, $database);
class FeedbackRec
{
// php dockblocker перестал н... | true |
d87ec2aad8c757d4507900e4f575f2d85853be64 | PHP | atsushiKomiya/acro-system | /ReadtimeSystem_SRC/app/Domain/Repositories/IrregularDepoRepositoryInterface.php | UTF-8 | 965 | 2.734375 | 3 | [] | no_license | <?php
namespace App\Domain\Repositories;
use App\Domain\Entities\IrregularDepoEntity;
interface IrregularDepoRepositoryInterface
{
/**
* イレギュラー設定の取得
*
* @return array
*/
public function findIrregularDepo(
$irregularId
): array;
/**
* イレギュラーデポ登録
*
* @return ... | true |
e550d7ed3fe4b6326ef503191c29f60c7441b755 | PHP | OpenStackweb/openstack-org | /survey_builder/code/model/SurveyManager.php | UTF-8 | 32,437 | 2.5625 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* Copyright 2015 OpenStack Foundation
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed ... | true |
055b795a65d2c6a75778641d6eb88a584ef0dbd8 | PHP | avinashmz/webbee-test | /app/Repository/Eloquent/BaseRepository.php | UTF-8 | 1,407 | 2.890625 | 3 | [] | no_license | <?php
namespace App\Repository\Eloquent;
use Illuminate\Support\Collection;
use Illuminate\Database\Eloquent\Model;
use App\Repository\EloquentRepositoryInterface;
class BaseRepository implements EloquentRepositoryInterface
{
/**
* @var Model
*/
protected $model;
/**
* BaseRepository co... | true |
e0492bf546318f2af3488e0776d397145c446632 | PHP | phpWmt/mycoming | /vendor/shmilyzxt/yii2-queue/failed/FileFaildProvider.php | UTF-8 | 854 | 2.53125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* 文件记录方式进行任务失败处理
* User: shmilyzxt 49783121@qq.com
* Date: 2017/1/26
* Time: 10:17
*/
namespace shmilyzxt\queue\failed;
use yii\base\Component;
class FileFaildProvider extends Component implements IFailedProvider
{
public $filePath=null;
public function log(... | true |
8682e349c9eaea7c8ac0e63b937962d250d5369f | PHP | ericsalerno/slzbot-irc | /src/Commands/Part.php | UTF-8 | 498 | 2.71875 | 3 | [
"MIT"
] | permissive | <?php
/**
* Perform the Uptime Command
*
* @package SlzBot
* @subpackage IRC
* @author Eric
*/
namespace SlzBot\IRC\Commands;
class Part implements CommandInterface
{
/**
* Perform the command
*
* @param \SlzBot\IRC\Bot $bot
* @param \SlzBot\IRC\User $user
* @param $channel
* @p... | true |
70c558586b79d2240ab6511a27e8fa6829770ade | PHP | lucotmo/mercohogar | /backend/models/gestorClientes.php | UTF-8 | 1,746 | 2.796875 | 3 | [] | no_license | <?php
require_once "conexion.php";
class GestorClientesModel{
#VISUALIZAR PERFILES
#------------------------------------------------------
public function verClientesModel($tabla){
$stmt = Conexion::conectar()->prepare("SELECT id_cliente, celular, nombre, apellidos FROM $tabla");
$stmt -> execut... | true |
be13451d8411e6eec99747dd694f2d5357fef004 | PHP | ducthe103/bantayphai.io | /HCSA/home/datprs.edu.vn/public_html/src/addons/DBTech/Credits/Entity/EventTrigger.php | UTF-8 | 6,494 | 2.59375 | 3 | [] | no_license | <?php
namespace DBTech\Credits\Entity;
use XF\Mvc\Entity\Entity;
use XF\Mvc\Entity\Structure;
/**
* COLUMNS
* @property string event_trigger_id
* @property string title
* @property string description
* @property bool active
* @property string callback_class
* @property int multiplier
* @property string multi... | true |
cdcfa864157eb7f84964dda5b5d5a1e4f4ac3b15 | PHP | Docente2018/G800 | /WebService Juan Villabona/PruebaWS/App/Models/Clientes.php | UTF-8 | 762 | 2.921875 | 3 | [] | no_license | <?php
namespace App\Models;
use PDO;
class Clientes extends \Core\Model
{
public static function getAllCustomers()
{
$db = static::getDB();
$stmt = $db->query('SELECT * FROM clientes');
return $stmt->fetchAll(PDO::FETCH_ASSOC);
}
public static function insertCustomer($custome... | true |
89a851f4442ab7e9129bcc2285f8f61e76c19e0a | PHP | mohammad19khodaei/R1_VOD | /app/Transaction.php | UTF-8 | 582 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
class Transaction extends Model
{
protected $fillable = ['type', 'amount'];
/**
* Get the user that owns the transaction.
*
* ... | true |
a2c74949278771ce32e35b3ab89b93ea3faf6f4c | PHP | zubinho5/applied-security-lab-project | /certdata/core/functions.php | UTF-8 | 1,165 | 2.765625 | 3 | [] | no_license | <?php
function print_json($content) {
header("Content-type: application/json");
$json = json_encode($content, JSON_NUMERIC_CHECK | JSON_PRETTY_PRINT);
if($json === FALSE) error_500("Operation completed, but could not print json");
else echo $json;
}
function error($code, $reason, $additional) {
header("Content-t... | true |
13e66a647088f2bf868cbddf9f62e0951c86f07d | PHP | jairorodrigues/facom-task | /web/app/module/module.php | UTF-8 | 2,488 | 2.5625 | 3 | [] | no_license | <?php
function buscar_usuario_por_identificador($identificador) {
return R::findOne('usuario', 'id=? or login=?', array($identificador, $identificador));
}
function buscar_tarefas_do_usuario($usuario) {
return R::getAll(
'select
id, nome, prioridade, feita
from
tarefa
where
usuario_id=?
order by
... | true |
d0595a7883a0aeeb9d396d30688bc2d4abc24aa6 | PHP | mloberg/Tea-Fueled-Does | /tfd/db/mysql.php | UTF-8 | 8,632 | 3.296875 | 3 | [
"Unlicense"
] | permissive | <?php namespace TFD\DB;
class MySQL implements Database{
private static $connection;
private static $info = array();
private $table;
private $params = array();
private $query = array();
function __construct($table = null){
$this->table = $table;
if(!is_object(self::$connection)){
self::c... | true |
213438b04ce7efef91443dafe87f89365ac76283 | PHP | 04187362/concours | /entites/ClsUniteEnseignement.php | UTF-8 | 1,990 | 3.109375 | 3 | [] | no_license | <?php
class UniteEnseignement
{
//les proprietes de la classe.
private $id_uniteEnseignement;
private $lib_uniteEnseignement;
private $abreviation;
//le constructeur de la classe
public function __construct(){
}
//les getters et les setters
public function getId_uniteEnseignement()... | true |
8c211a10dda37804f18f1e1266ae229ecd1dcfaa | PHP | fangorn/TimeFeatures | /src/Timer.php | UTF-8 | 3,742 | 3.265625 | 3 | [] | no_license | <?php
namespace Fangorn;
use DateTime;
use DateInterval;
use DateTimeZone;
class Timer extends DateTime {
// TODO: Сделать константы для падежей
private const TIME_WORD_FORMS = [
'y' => ['Nominative' => 'год', 'Genitive Singular' => 'года', 'Genitive Plural' => 'лет'],
'm' => ['Nomina... | true |
fc41a5b6b5195059bf46b16f9348d0a4be4a4215 | PHP | lordofthebombs/CPSC-471 | /php/searchClient.php | UTF-8 | 2,825 | 2.609375 | 3 | [] | no_license |
<?php
if($_SERVER["REQUEST_METHOD"] == "POST") {
include('dbconnection.php');
$searchValue = $_POST['searchingValue'];
$query = "SELECT * FROM `client` WHERE CONCAT(`client_id`, `email`, `street`, `city`, `province`, `country`, `phone_number`, `first_name`, `last_name`) LIKE '%".$searchV... | true |
5187c5214a051f595ec5e5882c178139be1b7903 | PHP | fahadbillah/flyerbdweb | /app/news/nayadiganta.php | UTF-8 | 1,522 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
include("simple_html_dom.php");
// Retrieve the DOM from a given URL
$html = file_get_html('http://www.dailynayadiganta.com/');
//$c = 0;
$allLink = array();
$AllContent = array();
// Find all SPAN tags that have a class of "myClass"
foreach($html->find('#tab1 ul li a') as $e){
$pos = $e->href;
array_pus... | true |
5c538cd30d968e83d3e35171917927b752d5c7f3 | PHP | qingqiang/phpCode | /thinkphp/Application/Home/Controller/SwlClientController.class.php | UTF-8 | 932 | 2.546875 | 3 | [] | no_license | <?php
namespace Home\Controller;
use Think\Controller;
class SwlClientController extends Controller
{
private $client;
private $swoole_server_bind;
public function index()
{
}
public function run()
{
$this->initSwlClient();
$this->scan();
}
private function scan... | true |
03f33df639735584c05abb788c60298dfb91a772 | PHP | janbarasek/maw-html | /minmax3d-examples.php | UTF-8 | 1,212 | 2.828125 | 3 | [] | no_license | <?php
examples("1,2,3,4,5");
function bind_examples($id, $tex, $math, $checkbox, $xs, $ys, $points)
{
echo '$("#e-' . $id . '").tooltip({ content: \'<img src="http://um.mendelu.cz/mathtex/mathtex.php?' . $tex . '">\' });';
echo '$("#e-' . $id . '").bind("click", function() {';
echo '$("#exampleform")[0].reset();';... | true |
2ff674db6646836378938f64d2074a0df2004211 | PHP | lloy0076/searchable | /src/Jedrzej/Searchable/Constraint.php | UTF-8 | 8,701 | 2.859375 | 3 | [
"MIT"
] | permissive | <?php namespace Jedrzej\Searchable;
use Illuminate\Database\Eloquent\Builder;
use InvalidArgumentException;
class Constraint
{
const OPERATOR_EQUAL = '=';
const OPERATOR_NOT_EQUAL = '<>';
const OPERATOR_GREATER_EQUAL = '>=';
const OPERATOR_GREATER = '>';
const OPERATOR_LESS_EQUAL = '<=';
con... | true |
2448b867b6df43890b40da8f93b9d5b2f2de8996 | PHP | armohamm/Company-Website-3 | /admin/includes/edit-frontpage-img.inc.php | UTF-8 | 2,022 | 2.859375 | 3 | [
"Unlicense"
] | permissive | <?php
function editImgStart() { // Funktio, joka muuttaa etusivun aloitus kuvaa
$dir = "../../img/";
$file = $_FILES['file0']['name'];
$temp_name = $_FILES['file0']['tmp_name'];
$info = pathinfo($file);
$fileExt = $info['extension'];
$newFilename = "section-start" . "." . "jpg";
$path = $d... | true |
fa41c1d2bd421b24fbf10d7853cf9980795dba35 | PHP | carolinahagman/hacker-news | /public/app/posts/editPost.php | UTF-8 | 1,625 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
require __DIR__ . '/../autoload.php';
// die(var_dump($_POST));
$postId = $_GET['id'];
// $delete = $_GET['delete-post'];
?>
<script>
console.log(<?php $postId ?>)
</script>
<?php
// die(var_dump($postId));
if (isset($_POST['updated-title'])) {
$updatedTitle = filter_var($_POST... | true |
2403f3c378aba1c24e5264abd4f012d7bb9341df | PHP | kredoteacherkurt/dec-adv | /classes/Books.php | UTF-8 | 1,465 | 3.09375 | 3 | [] | no_license | <?php
include 'Database.php';
class Books extends Database{
public function addBook($bkName,$bkDesc){
$sql = "INSERT INTO books(book_name,book_desc)VALUES('$bkName','$bkDesc')";
$result = $this->conn->query($sql);
if($result == TRUE){
header('location:homepage.php');
... | true |
de60b1558984d7c2867435504c500aaa59a081c4 | PHP | congvt305/htc-hrm | /app/Services/UserService.php | UTF-8 | 734 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use App\Repositories\UserRepository;
class UserService extends ServiceImpl
{
protected $userRepository;
public function __construct(UserRepository $userRepository)
{
$this->userRepository = $userRepository;
}
public function getAll()
{
return ... | true |
55f072021b359f51d1ac0ac72e2ce4effb494ed3 | PHP | leejungsu6389/2018cauCapstone_webMarketPlatform | /search_item(name).php | UTF-8 | 1,327 | 2.578125 | 3 | [] | no_license | <?php
function search_item_name($itemName){
/* import db connection header */
require_once("./db_connect.php");
/* using prepared statement */
/* block the SQL injection */
$sql = "SELECT *
FROM item
WHERE itemName LIKE ?";
/* prepare */
$stmt = $s->prepa... | true |
f0469b042dfd7a149a0b26321318014345fc26f5 | PHP | RobertFlunger/FSWD80-CodeReview-11-Robert | /components/cards.php | UTF-8 | 3,858 | 2.625 | 3 | [] | no_license | <?php
function displayConcerts($sql) {
/*$sql = "SELECT * FROM concerts INNER JOIN location ON concerts.locationID = location.ID";*/
global $conn;
$result = $conn->query($sql);
if ( $result -> num_rows > 0) {
while ( $row = $result->fetch_assoc()) {
echo '<div class="card">
<h5 class="card-header bg-prim... | true |
862b3229a1808698315e6d78cf41a7486834268f | PHP | sharmabharti2011/project | /html/wp_api/app/app/Entities/User.php | UTF-8 | 8,767 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace Entities;
use Doctrine\ORM\Mapping as ORM;
/**
* @Entity @Table(name="users")
*/
class User
{
/**
* @Id @GeneratedValue @Column(type="integer")
* @var integer
*/
private $id;
/**
* @Column(type="string")
* @var string
*/
private $userName;
/**
... | true |
b69f8764afc1521753727fa98670e7ba06ff553b | PHP | nvlight/yii2-mgstr | /modules/str/models/Jobtypes.php | UTF-8 | 1,108 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\modules\str\models;
use Yii;
/**
* This is the model class for table "str_job_types".
*
* @property int $id
* @property string $name
* @property double $price1
* @property double $price2
* @property double $price3
* @property string $measure
* @property string $note
*/
class Jobtypes ex... | true |
5ce321f8efc1fe0c47bd89de9164a5296e1c3e39 | PHP | Martejada/apiRest | /src/rutas/productos.php | UTF-8 | 5,214 | 2.734375 | 3 | [] | no_license | <?php
use \Psr\Http\Message\ServerRequestInterface as Request;
use \Psr\Http\Message\ResponseInterface as Response;
$app = new \Slim\App;
$app->get('/productos/neumaticos', function(Request $request, Response $response){
$sql = "SELECT * FROM stockneumaticos where 1";
try{
$db = new db();
$db = $db->conec... | true |
62faa47588b53a1458894bc10e3f9585ecd08c7c | PHP | akashsprakash/CodeIgniter | /controllers/profilepagecontroller.php | UTF-8 | 2,079 | 2.703125 | 3 | [] | no_license | <?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class ProfilepageController extends CI_Controller
{
/**
*function to load profile page view
*@param void
*@return null
*/
public function profilepageDisplay()
{
... | true |
99fe7089f0b0ec2f9abb593e8ea90ab3533f2994 | PHP | ExePtion31/PHP- | /Conexion_DB/index.php | UTF-8 | 648 | 2.828125 | 3 | [] | no_license | <?php
$server = "localhost";
$user = "root";
$password = "";
$baseDatos = "Prueba2";
$conexion = mysqli_connect($server, $user, $password) or die ("No se puede conectar a la DB");
$db = mysqli_select_db($conexion, $baseDatos) or die ("Problema de conexion con la DB");
$consulta = "SELECT * FROM estudiantes";
... | true |
8077ee68b17cf0c41b85cceca295094725362bc9 | PHP | Ndu-Systems/dok-io-api-beta | /models/User.php | UTF-8 | 5,488 | 3.109375 | 3 | [] | no_license | <?php
class User
{
//DB Stuff
private $conn;
private $table = 'user';
//Return properties
public $UserId;
public $Email;
public $Password;
//Constructor to DB
public function __construct($db)
{
$this->conn = $db;
}
//Get a user
public function read($emai... | true |
c6780dd1f77a88809807d212799de7e7492a14ca | PHP | BitoGx/tubes_mppl | /php/tampil_barang.php | UTF-8 | 1,167 | 2.84375 | 3 | [] | no_license | <?php
//Memanggil Connection.php
require_once "connection.php";
//Memilih database
mysqli_select_db($conn,"dellaria");
//Mempersiapkan Command Query untuk mengambil data IdUser,Nama,Level berdasarkan Username dan Password
$sql="select b.IdBarang,b.NamaBarang,b.Jumlah,sb.Baik,sb.Maintenance,sb.Rusa... | true |
cfc84a366515c10a74d265ff37ba66bca0095730 | PHP | QuincyC379/BlackQQuery | /www.api.com/system/core/cache/cpSaeMemcache.class(1).php | UTF-8 | 1,593 | 2.84375 | 3 | [] | no_license | <?php
class cpSaeMemcache
{
private $mmc = NULL;
private $group = '';
private $ver = 0;
public function __construct($memConfig = array())
{
$this->mmc = memcache_init();
$this->group = $memConfig['SAE_MEM_GROUP'];
$this->ver = intval(memcache_get($this->mmc, $this->group . ... | true |
58c372ad4254a921d694741e3df3e59a66de91e6 | PHP | neatlife/php-nacos | /src/alibaba/nacos/request/naming/ListInstanceNaming.php | UTF-8 | 1,630 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace alibaba\nacos\request\naming;
class ListInstanceNaming extends NamingRequest
{
protected $uri = "/nacos/v1/ns/instance/list";
protected $verb = "GET";
/**
* 服务名
*
* @var
*/
private $serviceName;
/**
* 命名空间ID
*
* @var
*/
private $namespa... | true |