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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
6fd0efe256a1374177fc9af1b15131da4f360d3e | PHP | ccmxy/Multiplayer-Mancala-Online | /joinGameAction.php | UTF-8 | 1,923 | 2.5625 | 3 | [] | no_license | <?php
ob_start();
session_start();
require_once 'dbconnect.php';
if( !isset($_SESSION['user']) ) {
header("Location: index.php");
exit;
}
// select loggedin users detail
$res=mysql_query("SELECT * FROM users WHERE userId=".$_SESSION['user']);
$userRow=mysql_fetch_array($res);
$user_id = $userRow['userId... | true |
2c66cdd98fc3f250dc0cd652371592022a02f7c4 | PHP | Antoine14/helpdesk | /app/controllers/Faqs.php | UTF-8 | 2,445 | 2.578125 | 3 | [] | no_license | <?php
class Faqs extends \_DefaultController {
public function Faqs(){
parent::__construct();
$this->title="Foire aux questions";
$this->model="Faq";
}
public function article($id=null) {
if(Auth::isAuth()) {
$article = DAO::getOne($this->model, $id[0]);
if (empty($articl... | true |
7a4faf4596972b219cbbf05dd9af5ed6cd4f466d | PHP | GaryJones/daterange | /src/DateRange.php | UTF-8 | 6,052 | 3.109375 | 3 | [
"MIT"
] | permissive | <?php
/**
* Gamajo Date Range.
*
* Display a range of dates, with consolidated time parts.
*
* @package Gamajo\DateRange
* @author Gary Jones
* @license MIT
* @link https://gamajo.com
* @copyright 2018 Gary Jones, Gamajo
*/
declare(strict_types=1);
namespace Gamajo\DateRange;
use DateTimeInterf... | true |
dff7ec6aaa41cf67e4bbc4869e22bd2798e84a5e | PHP | kris-kuiper/Validator | /src/Error.php | UTF-8 | 2,675 | 2.84375 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
namespace KrisKuiper\Validator;
use KrisKuiper\Validator\Blueprint\Rules\AbstractRule;
use KrisKuiper\Validator\Fields\Field;
use KrisKuiper\Validator\Translator\Path;
class Error
{
private ?Field $field;
/**
* Constructor
*/
public function __construct(private ... | true |
1e72095eec10efcc926257fdf44c92fe7bd1eb39 | PHP | limosek/zaf-plugins | /csv/get_rows.php | UTF-8 | 1,131 | 2.53125 | 3 | [] | no_license | #!/usr/bin/php
<?php
require_once(__DIR__ . "/functions.inc.php");
$csv = getenv("csv");
$range = parse_colnum(getenv("columns"));
$rows = parse_colnum(getenv("rows"));
$rowsf = array_flip($rows);
$rangef = array_flip($range);
$head = getenv("header");
$delim = getenv("delimiter");
$c = fopen($csv, "r");
$header = A... | true |
a943d891e33f46f27496c1820d3e0d8f1249883e | PHP | dev-nstecnologia/NSNFePHPLib | /v4_00/src/ICMSUFDest.php | UTF-8 | 1,899 | 2.53125 | 3 | [] | no_license | <?php
namespace br\ns\newssystems\nfe\struct;
class ICMSUFDest {
public $vBCUFDest;
public $vBCFCPUFDest;
public $pFCPUFDest;
public $pICMSUFDest;
public $pICMSInter;
public $pICMSInterPart;
public $vFCPUFDest;
public $vICMSUFDest;
public $vICMSUFRemet;
functi... | true |
a030bd33f804e36140cc849a5a178c00ae16d369 | PHP | yndtmy/09_30_yonedatomoyo | /PHP/update.php | UTF-8 | 2,759 | 2.703125 | 3 | [] | no_license | <?php
// 関数ファイル読み込み
include('functions.php');
// var_dump($_POST);
// exit();
//入力チェック(受信確認処理追加)
if (!isset($_POST['name']) || $_POST['name']=='' ||//nameOKじゃない(!)ときORnameが空の時
!isset($_POST['address']) || $_POST['address']==''||
!isset($_POST['url']) || $_POST['url']==''||
!isset($_POST['toilet']) || $_POS... | true |
be0d20b76751f23d46e2228ecaeac84c9f08ae12 | PHP | an-liu1/Liu_An_HW3_InfoGrapgic | /admin/connect.php | UTF-8 | 646 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
$host = "localhost";
$user = "root";
$pass = "";
$db = "movieinfo";
$conn = mysqli_connect($host, $user, $pass, $db);
if (!$conn) {
echo 'sumpin done busted!';
exit;
}
//echo "connected!";
//select all of the data from the table
$myquery = "SELECT title, fullcontent FROM movies";
$result = mysqli_query... | true |
958ad3ef53b3696a47d6ec8a8f7932cd5ee6570e | PHP | strikles-zz/php | /Laravel/aldadata/app/controllers/alda/PicturesController.php | UTF-8 | 2,153 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
class PicturesController extends BaseController {
public function __construct() {
$this->name = 'pictures';
$this->modelName = 'Picture';
$this->singleName = 'picture';
$this->validationRules = [
];
$this->validationMessages = [
];
}
/**
* Remove company pag... | true |
90efb243a96d0632d6598104bd64649a16f1c71f | PHP | doowzs/Vireo | /app/Http/Controllers/BlogController.php | UTF-8 | 2,053 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Models\Post;
use Carbon\Carbon;
use Illuminate\Http\Request;
class BlogController extends Controller
{
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Show the in... | true |
af2be7c650da614489a45c7e3477ea42b438a44d | PHP | cybanjar/backend-appsbusiness-lara8 | /app/Http/Controllers/UserController.php | UTF-8 | 3,164 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\User;
use Illuminate\Support\Facades\Hash; // encript dengan hash
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Storage; // upload data gambar ke server
class UserController extends Controller
{
public f... | true |
a77ad6ddc842d9e20304e11e90ec62692d74ca5f | PHP | oleg-webdev/alicelf_theme | /wp-content/themes/blank-wptheme/ajax.php | UTF-8 | 1,303 | 2.671875 | 3 | [] | no_license | <?php
/**
* Load ajax posts
*/
add_action( 'wp_ajax_nopriv_alice_ajax_posts', 'alice_ajax_posts' );
add_action( 'wp_ajax_alice_ajax_posts', 'alice_ajax_posts' );
function alice_ajax_posts()
{
$numPosts = get_option( 'posts_per_page' );
$page = ( isset( $_POST[ 'pageNumber' ] ) ) ? $_POST[ 'pageNumber' ] : 0;
q... | true |
18c455ed6cf16d1a0903643081f94939d3a111e6 | PHP | hillmediakft/freyaszalon | /system/core/application.php | UTF-8 | 2,325 | 2.71875 | 3 | [] | no_license | <?php
class Application {
private $registry;
public function __construct($registry) {
$this->registry = $registry;
$this->request = $this->registry->request;
// Beállítjuk, hogy az üzenetek melyik modulra vonatkozzanak (message_site vagy message_admin)
Message::set_area($this... | true |
bc23fcab00c739d498b01bec2eb665bc4de02baf | PHP | Cellard/throttle | /app/ThrottleService.php | UTF-8 | 4,199 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace Cellard\Throttle;
use Cellard\Throttle\Exceptions\ThrottlingException;
use Illuminate\Support\Carbon;
use Illuminate\Support\Collection;
abstract class ThrottleService
{
use ManagesFrequencies;
/**
* Value to filter records in database
* @var string
*/
protected $action;
... | true |
08d4f9ee1342b4af5883f1d969e7fd390ae44679 | PHP | btoplak/starship | /src/Console/BuildCommand.php | UTF-8 | 2,542 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace Starship\Console;
use Starship\Builder;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Output\OutputInterface;
use Symf... | true |
fca94f06a9c12959dcd86131d9aa61829b8e4c58 | PHP | hrlindse/N413 | /dayplanner/src/php/auth.php | UTF-8 | 2,878 | 2.96875 | 3 | [] | no_license | <?php
//workaround for older version of PHP (older than 5.5) that does not support password_hash()
//require "lib/password.php";
include("n413connect.php");
function sanitize($item){
global $link;
$item = html_entity_decode($item);
$item = trim($item);
$item = stripslash... | true |
706bca629d0b5ceb7ccf40b2a3715bd2e513b8f4 | PHP | thangarajarvind/Exam-Alteration-Helper | /dashboardAdmin/php/alloc.php | UTF-8 | 1,927 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
session_start();
$dno = '';
if(isset($_POST['dno'])){
$dno = $_POST['dno'];
}
else{
$m = "Select a duty";
$l = "../html/alloc.php";
$t = "error";
pop($l,$m,$t);
}
$freestaff = [];
$conn = mysqli_connect("localhost", "root", "", "se");
// Check connection
if ($conn->connect_error) {
die... | true |
c355973e40cde8fea3ed5c161d85843b928c11ca | PHP | MarinaVVsoftware/Novonautica-old | /src/AppBundle/Controller/Contabilidad/SatClavesController.php | UTF-8 | 1,720 | 2.578125 | 3 | [] | no_license | <?php
/**
* User: inrumi
* Date: 9/20/18
* Time: 15:07
*/
namespace AppBundle\Controller\Contabilidad;
use AppBundle\Entity\Contabilidad\Facturacion\Concepto\ClaveProdServ;
use AppBundle\Entity\Contabilidad\Facturacion\Concepto\ClaveUnidad;
use Doctrine\ORM\EntityManagerInterface;
use Symfony\Component\HttpFounda... | true |
5d172b8ab6b3cdd11573f8749fbf8c7ff0053fc4 | PHP | CE-KMITL-OOAD-2014/online_shopping_system | /app/core/Product.php | UTF-8 | 6,264 | 3.015625 | 3 | [] | no_license | <?php
namespace core;
class Product
{
protected $id;
protected $product_name;
protected $price;
protected $category;
protected $description;
protected $size;
protected $color;
protected $suplier;
protected $amount;
protected $imgPath = "";
protected $has_promotion = false; //Is this product has... | true |
3b040978dc0cc08a4f50c7ad71f525456bb20556 | PHP | webong/laravel-group-saving-api | /app/Http/Controllers/GroupController.php | UTF-8 | 2,797 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use DB;
use Auth;
use Exception;
use Throwable;
use App\{Group, GroupUser};
use Illuminate\Http\Response;
use Illuminate\Http\JsonResponse;
use App\Http\Requests\CreateGroup;
use App\Http\Requests\DeleteGroup;
use App\Http\Requests\UpdateGroup;
use App\Http\Resources\GroupResourc... | true |
663555541c87dccc30d79819c762481d021680a1 | PHP | boli-dev/test_backend_laravel | /app/Services/Game.php | UTF-8 | 4,486 | 3.1875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services;
use Carbon\Carbon;
use Illuminate\Support\Arr;
use phpDocumentor\Reflection\Types\This;
class Game {
public $total;
public $baseline;
public $date1;
public $date2;
public $randomValues;
public function __construct(int $total, int $baseline, string $date1, stri... | true |
a1e84775893875a0df2e9472803629edfaa10d00 | PHP | leftfelt/LeftFelt | /web/service/common/lib/model/MemcacheModel.class.php | UTF-8 | 984 | 3.15625 | 3 | [] | no_license | <?php
require_once dirname(__FILE__)."/../core/Model.class.php";
require_once dirname(__FILE__)."/../core/Cache.class.php";
/**
* memcacheを扱うモデル
*/
class MemcacheModel extends CacheModel{
protected $memcache;
private $flag;
public function initialize()
{
$this->flag = 0;
}
/**
* 接続する
* @param array $c... | true |
fb628ea6e121ce939b3d8d0153abaa0de6419bc3 | PHP | Jimenoza/store-refactor | /app/Exceptions/Handler.php | UTF-8 | 2,350 | 2.59375 | 3 | [] | no_license | <?php
namespace tiendaVirtual\Exceptions;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*
* @var array
*/
protected $dontReport = [
//
];
... | true |
3a7a0b3229e32bd1d3eba024dc6c1627346cb223 | PHP | Blanc0807/exercise | /php7/php7base/61 正则.php | UTF-8 | 1,602 | 3.515625 | 4 | [] | no_license | <?php
// 正则表达式定界符可以使用/ 也可以使用@
var_dump(preg_match('/a/', 'abc'));
var_dump(preg_match('@/@', '/asd'));
// \d 0-9 | \D ^0-9
// \w a-zA-Z0-9 | \W ^a-zA-Z0-9
// \s 匹配任意空白 | \S
// \n \t
// 原子匹配 [abc]
preg_match('/[12]/', '123'); //return 1;
// 原子组 (12) 一组
preg_match('/\.(com)/', 'baidu.com, replace.com, google.com'); /... | true |
c3d02e290159d5c109dede3710ccd416774d67ea | PHP | faqcovid/FAQ-Covid19-Taskforce | /api_test/resultat.php | UTF-8 | 1,541 | 2.8125 | 3 | [] | no_license | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Tuto PHP API</title>
</head>
<body>
<?php
function cleanString($strin... | true |
140a02d4ee5228b7e9c2475c21b60019afa6838a | PHP | nicolau-np/inscritor | /database/seeds/TipoDocsSeeder.php | UTF-8 | 576 | 2.53125 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class TipoDocsSeeder extends Seeder
{
static $tipo_docs = [
[
'tipo'=>"Certificado",
'estado'=>"on",
],
[
'tipo'=>"Declaração",
'estado'=>"on",
],
[
... | true |
58faba20d86d46682e2d6df2ab963d9d0724b835 | PHP | jasonclark/worldcat-local-search-mobile | /views/local.php | UTF-8 | 2,387 | 2.609375 | 3 | [] | no_license | <?php
//set default value for oclc number
$id = isset($_GET['id']) ? strip_tags((int)$_GET['id']) : null;
//set default value for library collection to search - list available at http://www.oclc.org/contacts/libraries/
$library = isset($_GET['lib']) ? trim(strip_tags($_GET['lib'])) : 'MZF';
//set default value for... | true |
ae8e282effc2ff2d3b3e970f259620ca596ecb4d | PHP | amre/pansophy | /Pansophy/interface/archive.php | UTF-8 | 5,798 | 2.8125 | 3 | [] | no_license | <?php
/*
This page gives an administrator the option to archive database contents that occurred on or before a given year.
*/
//+-----------------------------------------------------------------------------------------+
include('../include/header.inc');
include('../DataAccessManager.inc.php');
$dam = new DataAccessMa... | true |
252ed35a793d50343f792ae6c67989bd6aff3e0b | PHP | ZNotorious/Zhukov | /Equation.php | UTF-8 | 388 | 3.125 | 3 | [] | no_license | <?php
namespace Zhukov;
use core\EquationInterface;
Class Equation implements EquationInterface {
protected $x;
public function solve($a, $b, $c):array{
if($a == 0){
throw new ZhukovException("Determined that the equation doesn't exist\n");
}
\Zhukov\MyLog::log("Determined that is a linear equation\n");
... | true |
b1cd25cb9c25d8fed21ba6a91bc96ed7e389583c | PHP | php-/meloman | /src/musapp/model/UserModel.php | UTF-8 | 1,556 | 2.828125 | 3 | [] | no_license | <?php
declare (strict_types=1);
namespace Musapp\Model;
use Musapp\Model;
/**
* Description of User
*
* @author User
*/
class UserModel extends Model
{
protected $id;
protected $username;
protected $password;
public function getFieldValues(): array {
return [
'id' => $th... | true |
38d8cb2c12e46640404bea070f2a0998df49ff3b | PHP | robinklaassen/aas2 | /app/Policies/CommentPolicy.php | UTF-8 | 2,069 | 2.5625 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Policies;
use App\Models\Comment;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;
class CommentPolicy
{
use HandlesAuthorization;
public function viewAny(User $user)
{
return $user->hasCapability('comments::show');
}
/*... | true |
4f0c22f5fccf7d7b156aa134a77554ac87d24f28 | PHP | dlin172/Plange | /documentation/syntax/INVOCATION.php | UTF-8 | 1,882 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <meta charset='utf-8'/>
<meta name="viewport" content="width=device-width, initial-scale=0.6">
<html>
<head>
<title>INVOCATION - Syntax Pages - Plange</title>
<link rel=StyleSheet href='../../css/general.css' type='text/css' />
</head>
<body>
<?php require('../../header.php') ?>
<p>invoke a function, type-... | true |
644cb7b1a067e0caeb28e3709c2eaccfd2fa2f1e | PHP | SacbeMaya/Practicas | /php/script_form_mensajes.php | UTF-8 | 1,472 | 2.8125 | 3 | [] | no_license | <?php
header("Content-type: application/json; charset=utf-8");
//Decodificar la informacion obtenida del Cliente
$informacion=json_decode(file_get_contents("php://input"),true);
$nom=$informacion["_nombre"];
$coment=$informacion ["_comentario"];
//variable de conexión a la BD
$host="localhost";
$bd="bd_sac"... | true |
c24a0f52dec738e4d8e737f9c4c7b487db1cc0ca | PHP | benrkia/ur-web-coding-challenge | /backend/app/User.php | UTF-8 | 1,228 | 2.625 | 3 | [] | no_license | <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable
{
use Notifiable;
/**
* The attributes that are mass assignable.
*
* @var array
*/
p... | true |
efebdf044e59c5bcaf2f4b1ca6904ff191754b43 | PHP | tkawai9999/mytool | /fuel/app/classes/model/util.php | UTF-8 | 1,197 | 3.03125 | 3 | [] | no_license | <?php
class Model_Util
{
/**
* 残り日数(終了日と現在日の差)を取得
*
* @param date $end_data 終了日
* @return integer $remain_day 残り日数(終了日未指定ならNULL)
*/
public static function getRemainDay($end_date)
{
if ($end_date==NULL) return NULL;
$now_day= date('Y-m-d');
$end_day= substr($en... | true |
8e37ca3411432f600e84e4a8cfb4bda48e50fd22 | PHP | SilentBob62/DWWM-Mederic | /Ajax/formulaire+ajax/php/model/PersonneManager.Class.php | UTF-8 | 2,650 | 3.265625 | 3 | [] | no_license | <?php
class PersonneManager
{
public static function add(Personne $obj)
{
$db = DbConnect::getDb();
$q = $db->prepare("INSERT INTO personne (nom,prenom,dateNaissance, adresse, ville, code, email) VALUES(:nom, :prenom, :dateNaissance, :adresse, :ville, :code, :email)");
$q->bindValue(":no... | true |
3d25f341199bdbdf76b63156fa6129c8af1e6f34 | PHP | vladimirantos/PiServer | /app/presenters/HomepagePresenter.php | UTF-8 | 962 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Presenters;
use Nette;
class HomepagePresenter extends BasePresenter {
public function startup() {
parent::startup();
$this->template->weather = $this->getWeather();
}
public function actionWeather(){
$this->sendData($this->getWeather());
}
public... | true |
d5e1a854fc507ebfd764d9453866eab81e8917ab | PHP | bfg-s/admin | /src/Components/Fields/ChecksField.php | UTF-8 | 2,059 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace Admin\Components\Fields;
use Illuminate\Contracts\Support\Arrayable;
use Lar\Layout\Abstracts\Component;
use Lar\Layout\Tags\INPUT;
use Admin\Components\Cores\CheckBoxFieldCore;
use Admin\Components\FormGroupComponent;
class ChecksField extends FormGroupComponent
{
/**
* @var array
*/
... | true |
9d588794f1cc949aa717fcb1b1d3d11e966f6018 | PHP | ArneVerleyen/webdev-I | /app/models/BookModel.php | UTF-8 | 1,036 | 2.859375 | 3 | [] | no_license | <?php
class BookModel {
public function __construct()
{
require_once '../app/db.php';
$this->db = new PDO(DB_DSN, DB_USER, DB_PWD);
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
}
public $timestamps = ['created_at', 'updated_at'];
protecte... | true |
42676e4a9aff8d431d378670b26e10082c00502b | PHP | dapperkop/guest-book | /App/View/IView.php | UTF-8 | 164 | 2.65625 | 3 | [] | no_license | <?php
namespace App\View;
interface IView
{
public function __construct();
public function render(string $view, array $data, array $mergeData): string;
}
| true |
7888a86734438eed94ba057b627f4d805b014d0a | PHP | anilmomin/Anil-Projects-PHP | /DTP-5-11-2012/application/models/admin/usermanager.php | UTF-8 | 8,262 | 2.5625 | 3 | [] | no_license | <?php
require_once 'adminmodel.php';
class UserManager extends AdminModel
{
public function __construct()
{
parent::__construct();
$this->tableName = TABLE_USERS;
$this->addPrimaryKey('id');
}
/**
* get_data
* Returns the new wine request from the user
*
* @param ... | true |
f752060dfb7e6cca43f0a795d7b16c79e5a98e3b | PHP | ttzhanghuiyuan/Design-patterns | /Creational/StaticFactory/index.php | UTF-8 | 706 | 2.78125 | 3 | [] | no_license | <?php
namespace Creational\StaticFactory\Tests;
use Creational\StaticFactory\StaticFactory;
include('../../reload.php');
class StaticFactoryTest
{
public function testCanCreateNumberFormatter()
{
var_dump(StaticFactory::factory('number'));
}
public function testCanCreateStringFormatter()
... | true |
57c81a9186894a6a9b2b80d25f0d8dc59ab7ba8c | PHP | sburlington6/friendorum | /site/includes/upload.process.php | UTF-8 | 6,507 | 2.8125 | 3 | [] | no_license | <?php
$newAlbumName = isset($_POST['newAlbum']) ? $_POST['newAlbum'] : "";
$caption = isset($_POST['caption']) ? $_POST['caption'] : "";
$albumId = isset($_POST['albumId']) ? $_POST['albumId'] : "";
$imageError = array();
if (isset($_POST['upload']))
{
if (($albumId == "" OR $albumId == "0") AND $newAlbumName == "" A... | true |
85dc354b81e8c1a7e092040aea8bdd7ab8e755e8 | PHP | HazemHa/TwitterClone | /app/Tweet.php | UTF-8 | 711 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Cog\Laravel\Love\Likeable\Models\Traits\Likeable;
use Cog\Contracts\Love\Likeable\Models\Likeable as LikeableContract;
class Tweet extends Model implements LikeableContract
{
use Likeable;
protected $table = 'tweets';
protected $primaryKey ... | true |
64b7590ddb2f3ecfeff492918b069f695f201c3c | PHP | shoharto/crud | /store.php | UTF-8 | 1,706 | 2.640625 | 3 | [] | no_license | <?php
require_once("db.php");
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$email_id = $_POST['email_id'];
$query = "INSERT INTO student_info(first_name,last_name,email_id) values('{$first_name}','{$last_name}','{$email_id}')";
$insert = mysqli_query($connection,$query);
if($inse... | true |
55d2c2c45d37e6908c3d551f3527b11daa4da5cb | PHP | spatie/scheduled-tweets-app | /app/Services/Twitter/Twitter.php | UTF-8 | 156 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Twitter;
interface Twitter
{
public function account(string $name): Twitter;
public function tweet(string $text);
}
| true |
9a7b5a35c1984c4a73318757afdb95ad86955c11 | PHP | nguyenduyphuc/Murga-mandi | /api/userupdate.php | UTF-8 | 5,002 | 2.6875 | 3 | [] | no_license | <?php
include_once('db_con.php');
$input = (object)$_POST;
$error=array();
$return = array();
if(isset($input) && (isset($input->user_id))){
$sql = "select * from user where id='".$input->user_id."' and activated = '1' ";
$res = mysqli_query($con,$sql);
$result1 = mysqli_fetch_assoc($res);
if( isset($re... | true |
6a1170955581d6857f048820842b0fbf5f24db09 | PHP | Nycto/Round-Eights | /src/classes/Form/Visitor/Formatter.php | UTF-8 | 6,673 | 2.75 | 3 | [
"Artistic-2.0"
] | permissive | <?php
/**
* @license Artistic License 2.0
*
* This file is part of Round Eights.
*
* Round Eights is free software: you can redistribute it and/or modify
* it under the terms of the Artistic License as published by
* the Open Source Initiative, either version 2.0 of the License, or
* (at your option) any later ... | true |
61557522407648ce9d070f90f103341419069ca7 | PHP | guoyu07/pool-dbm | /src/Pok/PoolDBM/Guesser/TransactionGuesserPass.php | UTF-8 | 527 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace Pok\PoolDBM\Guesser;
/**
* TransactionGuesserPass
*
* @author Florent Denis <dflorent.pokap@gmail.com>
*/
class TransactionGuesserPass extends AbstractGuesserPass
{
/**
* {@inheritdoc}
*/
public function guess($name, $manager)
{
return method_exists('beginTransaction'... | true |
62356688ae46c58dfd8c2a921b4782d2b4fa70f3 | PHP | alphachoi/duobaohui | /package/search/SearchCataExpr.class.php | UTF-8 | 2,785 | 3.03125 | 3 | [] | no_license | <?php
namespace Snake\Package\Search;
/**
* rankModel中类目相关性价值的定义
* @package search
* @author weiwang
* @since 2012.08.13
*/
class SearchCataExpr extends SearchExpr{
/**
* 搜索关键词
*
* @var string
* @access private
*/
private $searchKey = 0;
function __construct(){
}
public function getCataExpr($s... | true |
dc0aa4ce61cee2577fe7e1f1bdf1608686e97532 | PHP | flixromer443/voto-electronico-1.2 | /Acciones/Eliminar.php | UTF-8 | 3,259 | 2.5625 | 3 | [] | no_license | <?php
$identificador=$_POST['id'];
$archivo=fopen("../Archivos/Votos/Votos.txt","r") or die ("error");
while(!feof($archivo)){
$linea=fgets($archivo);
$datos=explode("|",$linea);
if(strlen($linea)>0){
if($identificador==trim($datos[2])){
header("L... | true |
ff50df9549cf72c11d83a4cd5aca198fd41de1d9 | PHP | human-nature-lab/trellis-api | /app/Http/Middleware/BasicAuthMiddleware.php | UTF-8 | 1,345 | 2.546875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Http\Response;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Hash;
use App\Models\User;
use Log;
class BasicAuthMiddleware
{
/**
* @param Request $request
* @param Closure $next
* @param String $type
* @ret... | true |
6b3b5b63c66d3f0c60658036ca2e684d2cb0ba3e | PHP | thumchoontat/ukraine-air | /directory.php | UTF-8 | 547 | 2.59375 | 3 | [] | no_license | <?php
$pageDir = str_replace('?'.$_SERVER['QUERY_STRING'],'','pages'.$_SERVER['REQUEST_URI']);
// Add trailing slash if absent
if (!preg_match('(\/$)',$pageDir)){
$pageDir .= '/';
}
// Redirect home and index to home page, with or without trailing slash
if (preg_match('/pages\/(index|home|)(\/|)$/',$pageDir)... | true |
1adb64f6f25f93e455dd77e2b8532aa2cf5c703c | PHP | berylsheep-up/Library-system | /tp5/application/index/controller/Book.php | UTF-8 | 8,835 | 2.515625 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\index\controller;
use think\Console;
use think\Controller;
use think\Request;
use think\Db;
function object_to_array($obj) {
$obj = (array)$obj;
foreach ($obj as $k => $v) {
if (gettype($v) == 'resource') {
return;
}
if (gettype($v) == 'object' || getty... | true |
aa23fe3e28405509d9292770f748459fbc10b22f | PHP | mrdinkelman/self-3099 | /src/ImportBundle/Result.php | UTF-8 | 1,064 | 2.734375 | 3 | [] | no_license | <?php
/**
* PHP version: 5.6+
*/
namespace ImportBundle;
/**
* Class Result
* Sadly, but base result of data import not provide info about
* not accepted rows by filters. Fix this and add this feature.
*
* @package ImportBundle
*/
class Result extends \Ddeboer\DataImport\Result
{
/**
* Filtered rows
... | true |
952cc67ded7af246eaf60e8be2197770fa5e5cef | PHP | amandamerrifield/FitnessBlog | /models/Login.php | UTF-8 | 1,970 | 3 | 3 | [] | no_license | <?php
require_once 'password/Hashing.php';
class Login
{
protected $id;
protected $admin;
protected $username;
protected $email;
protected $password;
public function __construct($id, $admin, $username, $email, $password)
{
$this->id = $id;
$this->admin = $admin;
$... | true |
78aa0b8169890c105627371d3435043416bd995a | PHP | Sideswipe47/ProjectTotesLab | /database/seeds/SizeSeeder.php | UTF-8 | 818 | 2.53125 | 3 | [] | no_license | <?php
use Carbon\Carbon;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class SizeSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$size_data = [
[
'width' => 30,
... | true |
76bf3aaeb2df00ad32aa0d8ca42349074a35cdd2 | PHP | adamOSU/FinalProject | /create100Table.php | UTF-8 | 881 | 2.84375 | 3 | [] | no_license | <?php
ini_set('display_errors', 'On');
$mysqli = new mysqli("oniddb.cws.oregonstate.edu", "dejonga-db", "KlZLMGQrHb0blbkw", "dejonga-db");
if ($mysqli->connect_errno)
{
echo "Connection error ".$mysqli->connect_errno ." ".$mysqli->connect_error;
}
else
{
echo "Connection worked!";
}
$createTable = "CRE... | true |
d9d7f3205c9da953c0db98a97e5b35a764ec9a8e | PHP | timostamm/websocket-server | /src/Controller/Delegations/LoopAwareInterface.php | UTF-8 | 536 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: ts
* Date: 11.09.18
* Time: 23:55
*/
namespace TS\WebSockets\Controller\Delegations;
use React\EventLoop\LoopInterface;
/**
*
* Implement this interface to get access to the loop
* in your controller.
*
* If you use loop timers, your timers must not throw
* excep... | true |
0b7b92acacad7cdb926c908cb53ab3fe017884f7 | PHP | aileensoul/aileensoul | /admin_main/application/admin/models/common.php | UTF-8 | 19,146 | 2.609375 | 3 | [] | no_license | <?php
Class Common extends CI_Model
{
function __construct()
{
// Call the Model constructor
parent::__construct();
}
//This function get all records from table by name
function getallrecordbytablename($tablename,$data,$limit = '', $offset = '', $sortby = '', ... | true |
e376b50f5c04fab920e09acb9e11c0f71525167e | PHP | phelied/E-commerce | /api/src/DataFixtures/UserFixtures.php | UTF-8 | 2,504 | 2.515625 | 3 | [] | no_license | <?php
/* ----------------------------------------------------------------------------------------- */
/* NAMESPACE */
/* ----------------------------------------------------------------------------------------- */
namespace App\DataFixtures;
/* -------------------------------------------------------... | true |
0b7fe14562e7a43ed2471a682d3bfbd42c3ca18c | PHP | ferimer-dev/escpos-tools | /src/Parser/Command/DataSubCmd.php | UTF-8 | 493 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace ReceiptPrintHq\EscposTools\Parser\Command;
use ReceiptPrintHq\EscposTools\Parser\Command\Command;
class DataSubCmd extends Command
{
private $data = "";
private $dataSize;
public function __construct($dataSize)
{
$this -> dataSize = $dataSize;
}
public function addCha... | true |
0621b0a53eb01762f99ec46b8499b4af51d003b3 | PHP | zhangyue0503/designpatterns-php | /17.memento/source/memento-message.php | UTF-8 | 2,151 | 3.390625 | 3 | [] | no_license | <?php
class Message
{
private $content;
private $to;
private $state;
private $time;
public function __construct($to, $content)
{
$this->to = $to;
$this->content = $content;
$this->state = '未发送';
$this->time = time();
}
public function Show()
{
... | true |
628b4510cd62d8a301d9650266c3c7f98ca83fd6 | PHP | clamWell/learningPHP | /3.php | UTF-8 | 981 | 3.5625 | 4 | [] | no_license | <!doctype html>
<html>
<body>
<h1>PHP의 변수</h1>
<p>PHP에서는 달러표시($)로 변수를 지정한다. 즉 PHP 코드안에서 $로 시작하는 것은 다 변수이다. </p>
<?php
$a = 1;
echo $a + 1;
?>
<p> 문자열을 변수안에 담아 활용하기</p>
<p> $name = "EUGENE";</p>
<p>이후 문자열 데이터 사이사이에 변수($name)를 결합 연산자를 이용해 연결해준다.</p>
<?php
$name = "EUGENE";
echo "결과: "."Lorem ipsum... | true |
1ebfb4ead6d1cbc6faffa0db756ee63a696761e2 | PHP | SerhatYaren09/Teknasyon-PHP | /homework5-hw5_grup1-main/class/Section.class.php | UTF-8 | 1,012 | 3.125 | 3 | [] | no_license | <?php
class Section
{
public $db;
public function __construct()
{
$this->db = new database\Database();
}
//tabloda sütun adına göre sorgu yapılabilecek method
public function FindAll(array $data)
{
return $this->db->findAll("section",$data);
}
//tablodaki tüm section... | true |
8ce09b242cc7837f82b977dd369c81e5946f71f0 | PHP | avrilko-go/tpshop | /application/admin/model/Link.php | UTF-8 | 1,316 | 2.609375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace app\admin\model;
use app\lib\ImageHandler;
use think\facade\Request;
use think\Model;
class Link extends Model
{
protected static function init()
{
self::observe(\app\admin\event\Link::class);
}
public function getLogoAttr($value)
{
if($value){
return ... | true |
8bb33f1a56a2b5c1245423843dbaf909dc345d90 | PHP | hieubui1195/seminar | /app/Repositories/Eloquents/ReportRepository.php | UTF-8 | 2,588 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Eloquents;
use App\Repositories\Contracts\ReportRepositoryInterface;
use App\Repositories\Eloquents\BaseRepository;
use App\Models\Report;
class ReportRepository extends BaseRepository implements ReportRepositoryInterface
{
protected $model;
public function __construct(Rep... | true |
80f39d7334ba76c93efaf0aa37de813373f87522 | PHP | surajpaul2412/crypto | /app/Http/Controllers/Admin/FaqCareerController.php | UTF-8 | 2,775 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use App\FaqCareer;
class FaqCareerController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
... | true |
6c5662a43aff982d443848e1cf482c6822704b87 | PHP | klim2020/quiz3 | /src/BWTQuiz.php | UTF-8 | 4,834 | 3.953125 | 4 | [] | no_license | <?php
namespace app;
/**
* Class BWTQuiz
* @package app
*/
class BWTQuiz{
/**
* 1.Returns max element from arrray
* @param array $arr
* @return mixed returns max element from array, if no returns false;
*/
public function firstTask(array $arr){
if ((!is_array($arr))|(count($arr... | true |
40fc9e6f6342e74ff9112aaac35e983529705e75 | PHP | freshy969/diggit | /functions/links.php | UTF-8 | 4,381 | 2.9375 | 3 | [] | no_license | <?php
/* --------- Link input validation/cleaning functions --------- */
function linkErrors($input) { // Takes an array of link input, returns array of errors (if any) or false on no errors.
if(trim($input[title]) == "") { $error[title] = "You must enter a link title"; }
if(!filter_var(trim($input[url]),FILTER_VAL... | true |
fa5b37847863bac075785ff5e88d6d9a89d047a4 | PHP | n-dw/goodseeds | /craft/plugins/commerce/services/Commerce_CurrenciesService.php | UTF-8 | 1,315 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Craft;
/**
* Currency service.
*
* @author Pixel & Tonic, Inc. <support@pixelandtonic.com>
* @copyright Copyright (c) 2015, Pixel & Tonic, Inc.
* @license https://craftcommerce.com/license Craft Commerce License Agreement
* @see https://craftcommerce.com
* @package craft.plugins.com... | true |
22c65e5652eef38aa01e992514af3750e2d55612 | PHP | kaystrobach/FLOW.LDAP | /Classes/KayStrobach/Ldap/Service/Ldap/PasswordUtility.php | UTF-8 | 3,675 | 3.03125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: kay
* Date: 22.10.14
* Time: 15:21
*/
namespace KayStrobach\Ldap\Service\Ldap;
/**
* Class PasswordUtility
*
* @package KayStrobach\Ldap\Service\Ldap
*/
class PasswordUtility {
public static $algorithms = array(
'MD4',
'MD5',
'SMD5',
'NTLM',
'SHA',
'SSHA'... | true |
cb6fc1d2dd437e79040905a807dc367fd97a40db | PHP | wecodemore/wcm-termlimit | /src/RangeLimitInterface.php | UTF-8 | 298 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
namespace WCM\TermLimit;
/**
* Interface RangeLimitInterface
* @package WCM\TermLimit
*/
interface RangeLimitInterface
{
/**
* @param array $range
* @return void
*/
public function setRange( Array $range = [ 0, 1, 2, ] );
/**
* @return bool
*/
public function inRange();
} | true |
4a3631194f0289f3fdd6a475cb91fe05471385d6 | PHP | pasoonate/pasoonate-php | /src/Traits/Difference.php | UTF-8 | 3,106 | 3.078125 | 3 | [
"MIT"
] | permissive | <?php
namespace Pasoonate\Traits;
use Pasoonate\Calendars\CalendarManager;
use Pasoonate\Constants;
trait Difference
{
public function diff(CalendarManager $instance)
{
$diffInSeconds = $this->diffInSeconds($instance);
$diffInDays = $diffInSeconds / Constants::DAY_IN_SECONDS;
$years ... | true |
399f6a7aeb3958e8b9c0a1f24f430c0c10f56f28 | PHP | musichopin/TutsPlus_PHP-Fundamentals | /21. file/file.php | UTF-8 | 1,901 | 3.53125 | 4 | [] | no_license | <?php
// file_get_contents, file_put_contents gibi fonksiyonlar kullanılır
class File {
public static function exists($file)
{
return file_exists($file);
}
public static function size($file)
{
return filesize($file);
}
public static function name($file)
{
return pathinfo($file, PATHINFO_FILENAME);
}
... | true |
9118a455ac1a9a9971fee0e88a2e2f0516042d90 | PHP | popsorin/quiz | /src/Service/Parameter.php | UTF-8 | 1,352 | 3.296875 | 3 | [] | no_license | <?php
namespace Quiz\Service;
class Parameter
{
/**
* @var string
*/
private $operation;
/**
* @var string
*/
private $field;
/**
* @var string
*/
private $value;
/**
* Parameter constructor.
* @param string $operation
* @param string $fiel... | true |
1316b48e30882725652e8983723d8592956d7d76 | PHP | justicafederalRN/hackathonjfrn | /Grupo 07/system/src/W5n/Model/Field/Validation/Max.php | UTF-8 | 1,329 | 2.65625 | 3 | [] | no_license | <?php
namespace W5n\Model\Field\Validation;
class Max extends \W5n\Model\Field\Validation\Validation
{
public function __construct($value, $allowEquals = true)
{
$this->setOption('value', $value);
$this->setOption('allowEquals', $allowEquals);
}
public function getErrorMessage(\W5... | true |
6b081113071f41ae58c214b2fa0bdb3624910ae5 | PHP | BadStark/php1_2 | /index.php | UTF-8 | 5,492 | 3.140625 | 3 | [] | no_license | <!doctype html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>PHP-1</title>
</head>
<body>
<!--
... | true |
9c34819e8d1572ff41d894bb2a45e62d15d64449 | PHP | magium/MagiumMagento | /lib/Magento/Cli/Command/ListProductsInCategory.php | UTF-8 | 2,103 | 2.75 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace Magium\Magento\Cli\Command;
use Magium\Magento\Cli\Command\Test\ListProductsInCategoryTest;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony... | true |
7328019605c106744715a30280097e361425d912 | PHP | emoretticom/href-count | /src/hrefCountEndpoint.php | UTF-8 | 1,142 | 2.875 | 3 | [
"MIT"
] | permissive | <?php
namespace emoretti\hrefcount;
use emoretti\hrefcount\hrefCountConfig;
require_once(__DIR__."/hrefCountConfig.php");
class hrefCountEndpoint
{
protected $configuration;
protected $db;
protected $table;
protected $link;
protected $alias;
function __construct()
{
$this->configuration ... | true |
e1ae746001c4c66fb2f72287f882b0bdc16a17fd | PHP | nipunapiumal/soundkade_new | /my_Acc/connection/remove_ad_data.php | UTF-8 | 9,366 | 2.65625 | 3 | [] | no_license | <?php
date_default_timezone_set('Asia/Colombo');
include '../../db/db.php';
$date = date('Y-m-d');
if (array_key_exists('accept_ad', $_POST)) {//delete button of data table
//$ebro = $_POST['ebro_id'];
$add_id_1 = htmlspecialchars(trim($_POST['ad_id']), ENT_QUOTES, 'UTF-8');
//UDARA'S CODE FOR UPDATE AD E... | true |
f910a4d145dd5ecccb3f7706db859972ee33af55 | PHP | cidilabs/phpally | /tests/ParagraphNotUsedAsHeaderTest.php | UTF-8 | 1,539 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
use CidiLabs\PhpAlly\Rule\ParagraphNotUsedAsHeader;
class ParagraphNotUsedAsHeaderTest extends PhpAllyTestCase {
public function testCheckTrue()
{
$html = '<div><p>Hey</p></div>';
$dom = new \DOMDocument('1.0', 'utf-8');
$dom->loadHTML($html);
$rule = new ParagraphNotUsed... | true |
3939f8d75201fca0bbf5b2d7df6b3f0c6ed09f41 | PHP | denismacedo/secretaria | /src/sql/classCracha.php | UTF-8 | 4,474 | 2.65625 | 3 | [] | no_license | <?php
class classCracha {
public $evento;
public $ocorrencia;
public $tamanho_fonte;
public $largura;
public $altura;
public $margem_superior;
public $margem_esquerda;
public $fonte_nome;
public $fonte_cidade;
public $cursos;
public $objPF;
public $objInscricao;
public $nomeCracha;
public $tipoInscricao;
... | true |
ce846316b2664077a8023d7fecc90244a099caf6 | PHP | emissarman/pkge-php-sdk | /src/Common/ResponseMetaData.php | UTF-8 | 967 | 2.765625 | 3 | [] | no_license | <?php namespace Pkge\Common;
use Psr\Http\Message\ResponseInterface;
/**
* Class ResponseMetaData
* @package Pkge\Common
*
* @property-read int $responseStatusCode Last response status code
* @property-read \Pkge\Common\ResponsePagination|false $pagination Meta-data about objects pagination
* @property-read \Pk... | true |
47c62de947d33f669a0a2ba815de33478f646436 | PHP | liip/LiipFunctionalTestBundle | /tests/App/Entity/User.php | UTF-8 | 5,873 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
/*
* This file is part of the Liip/FunctionalTestBundle
*
* (c) Lukas Kahwe Smith <smith@pooteeweet.org>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace Liip\Acme\Tests\App\Entity;
use Doctrine\ORM\Map... | true |
c163f059c2ef1d243dcc2c6c1fac0751688e4dc3 | PHP | alexzvn/moneybooster-mcpe | /src/Alexzvn/MoneyBooster/MoneyBooster.php | UTF-8 | 2,507 | 2.546875 | 3 | [] | no_license | <?php
namespace Alexzvn\MoneyBooster;
use Alexzvn\MoneyBooster\Commands\NaptheCommand;
use Alexzvn\MoneyBooster\Drivers\Cardvip\CardvipDriver;
use Alexzvn\MoneyBooster\Drivers\Driver;
use Alexzvn\MoneyBooster\Web\AsyncServer;
use Alexzvn\MoneyBooster\Web\WebServer;
use pocketmine\command\Command;
use pocketmine\comma... | true |
98b3678bf609eed3f8b9db41ad97448fa77a9f97 | PHP | freedommmoto/amado | /api/app/Http/Controllers/AuthController.php | UTF-8 | 1,643 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use Carbon\Carbon;
use Illuminate\Http\Request;
use App\Models\User;
use Auth;
use Illuminate\Http\JsonResponse;
class AuthController extends Controller
{
/**
* Get a JWT via given credentials.
* @param Request $request
* @return \Illuminate\Http\JsonResponse... | true |
9c783f3f1a52769eae0bf76ac81d6fa1d2cb44d0 | PHP | stfns2896/rekapsdm2 | /backup/ajax.php | UTF-8 | 3,820 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
if (isset($_POST['key'])) {
$conn = new mysqli('localhost', 'root', '', 'datapegawaisdm');
if ($_POST['key'] == 'getRowData') {
$rowID = $conn->real_escape_string($_POST['rowID']);
$sql = $conn->query("SELECT namaPelatihan, bidang, tglAwal, tglAkhir, klasifikasi, vendor, jmlPeserta, durasi FROM pelat... | true |
9ed2399930de7b01cee1bc915793e21143292009 | PHP | vlzangel/kmimos.mx | /wp-content/plugins/kmimos/subscribe/includes/class/class_subscribe.php | UTF-8 | 995 | 2.546875 | 3 | [] | no_license | <?php
class Class_Subscribe{
var $args;
function __construct($args=array()){
global $wpdb, $_GET, $_SESSION, $_COOKIE;
if (!isset($_SESSION)) {
session_start();
}
$this->args = $args;
$this->wpdb = $wpdb;
$this->table = $this->wpdb->prefix.'kmimos_s... | true |
302c60f9a83f54b0aab1ee3c85b61788a90b40e3 | PHP | emailoflvs/HR-department--stopped-before-correctly-right-finish | /database/seeds/FiliationsTable.php | UTF-8 | 634 | 2.6875 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
class FiliationsTable extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$filiations = ['Сумы',
'Киев',
'Николаев',
'удаленный филиал',
];
foreach ... | true |
43e42835423693c0a564a97b9674f992fa371177 | PHP | gaswelder/havana | /lang.php | UTF-8 | 3,061 | 3.15625 | 3 | [
"MIT"
] | permissive | <?php
namespace havana;
/*
The `lang` extension is a simpler alternative to `gettext`. It may be chosen for
smaller sites where setting up `gettext` wouldn't give much advantage or on
hostings where `gettext` isn't available or doesn't work properly.
The functions that accept a `lang` argument expect it to be in the... | true |
77c4a4e7d7a4ce8a03761322da5a82a1b1f14e8f | PHP | Developer-Stanislav/aimprosoft-test-task | /system/halper/task_e.php | UTF-8 | 3,207 | 2.9375 | 3 | [] | no_license | <?php
namespace library;
class TaskE
{
private $position = 'left';
private $log_display = array();
private $cnt_people_left;
private $cnt_children_left;
private $cnt_people_right = 0;
private $cnt_children_right = 0;
private $i = 0;
public function __construct()
{
$children... | true |
31bee3dc8b5381a42e1a233ec45535c24ff82109 | PHP | bakaphp/inventory | /src/Channels/Actions/CreateChannelAction.php | UTF-8 | 1,049 | 2.703125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace Kanvas\Inventory\Channels\Actions;
use Baka\Contracts\Auth\UserInterface;
use Canvas\Enums\App;
use Kanvas\Inventory\Channels\Models\Channels as ModelsChannels;
use Kanvas\Inventory\Enums\State;
class CreateChannelAction
{
/**
* Create new Channel.
*
* @par... | true |
25bba1adcc22dc065c8fbde705aa76951ec0968a | PHP | asmproger/bigfish_probation | /src/DataFixtures/BaseFixtures.php | UTF-8 | 2,565 | 2.5625 | 3 | [] | no_license | <?php
/**
* @author asmproger <asmproger@gmail.com>
* @copyright (c) 2019, asmproger
*/
namespace App\DataFixtures;
use App\Entity\Category;
use App\Entity\Image;
use App\Entity\Material;
use App\Entity\User;
use Doctrine\Bundle\FixturesBundle\Fixture;
use Doctrine\Common\Persistence\ObjectManager;
class BaseFix... | true |
d71d575e1523119afc33ad0178fb71d4bcea4393 | PHP | ayeahgodlove/iutbandjoun-dms | /account/profile.php | UTF-8 | 6,394 | 2.609375 | 3 | [] | no_license | <?php
//include 'connection.php';
session_start();
if (isset($_POSTE['user']))
{
$user = $_POST['user'];
$get_user = $mysqli->query("SELECT * FROM users WHERE username = '$user'");
if ($get_user->num_rows == 1)
{
$profile_data = $get_user->fetch_assoc();
}
// Redirect the user... | true |
9d84bca6928f1e29bfa88526d9ed63286000f407 | PHP | dohorcadrg/PsyPets | /lib/actions/bricks.php | UTF-8 | 2,410 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
if($okay_to_be_here !== true)
exit();
$command = '
SELECT COUNT(idnum) AS c
FROM monster_inventory
WHERE
user=' . quote_smart($user['user']) . ' AND
location=' . quote_smart($this_inventory['location']) . ' AND
itemname=\'Bricks\'
';
$data = $database->FetchSingle($command, 'fetching brick c... | true |
c806e891ee6d6a8bdd50dba82466a9228e15fb5f | PHP | crazynds/CryptoCache-Laravel | /src/Cache/CryptoCache.php | UTF-8 | 4,024 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace Crazynds\CryptoCache\Cache;
use Illuminate\Cache\CacheLock;
use Illuminate\Contracts\Cache\LockProvider;
use Illuminate\Support\Facades\Cache;
use Illuminate\Contracts\Cache\Store;
use Illuminate\Contracts\Encryption\DecryptException;
use Illuminate\Contracts\Encryption\EncryptException;
use Illuminat... | true |
a076e0d6685b67defaa570dead61d753fe2de46e | PHP | cosmocode/webdav | /Sabre/DAV/LockManager/FS.php | UTF-8 | 3,852 | 3.046875 | 3 | [] | no_license | <?php
/**
* The Lock manager allows you to handle all file-locks centrally.
*
* This Lock Manager stores all its data in the filesystem. By default it will do this in PHP's standard temporary session directory,
* but this can be overriden by specifiying an alternative path in the contructor
*
* @package Sabre
... | true |
8bac8d818960cacc8b1b95872a4451a00f0872da | PHP | WPMagnify/core | /src/Logger/AbstractLogger.php | UTF-8 | 876 | 2.765625 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is part of the wp-magnify/core package.
*
* (c) Christopher Davis <http://christopherdavis.me>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Magnify\Core\Logger;
abstract class AbstractLogger exte... | true |
a1b6f334d73a257374a4f4daf87a7fcc8ad9c423 | PHP | comely-io/cache | /src/Cache.php | UTF-8 | 6,478 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
/*
* This file is a part of "comely-io/cache" package.
* https://github.com/comely-io/cache
*
* Copyright (c) Furqan A. Siddiqui <hello@furqansiddiqui.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code or visit following link:
... | true |