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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
9c3c06548ba146823777a6849ba906a62cc952a1 | PHP | joker-eph/phabricator | /src/applications/metamta/adapter/PhabricatorMailImplementationAdapter.php | UTF-8 | 1,180 | 2.53125 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
abstract class PhabricatorMailImplementationAdapter extends Phobject {
abstract public function setFrom($email, $name = '');
abstract public function addReplyTo($email, $name = '');
abstract public function addTos(array $emails);
abstract public function addCCs(array $emails);
abstract public function... | true |
0d1456ac0568a78ba575bed70c38713056a38ff2 | PHP | akoimeexx/hacker-application | /code/php/sanitizer.php | UTF-8 | 606 | 3.171875 | 3 | [] | no_license | <?php
/**
* Sanitize input data, return a comma-delimited string if input
* is an array.
*/
function sanitize($input) {
$cleaning = $input;
switch ($cleaning) {
case trim($cleaning) == "":
$clean = false;
break;
case is_array($cleaning):
foreach($cleaning as $key => $value) {
$cle... | true |
476bafd064282c00818a764c370a29898eb72f33 | PHP | tiago-bsantos/g1-fake_back-end | /inc/logica-area-publica.php | UTF-8 | 2,332 | 2.578125 | 3 | [] | no_license | <?php
require_once "inc/conecta.php";
function listaDestaques($conexao){
$noticias = array();
$query = "SELECT noticias.id, data, categoria_id, titulo, resumo, imagem_destaque, categoria ";
$query .= " FROM noticias INNER JOIN categorias ";
$query .= " ON noticias.categoria_id = categorias.id WHERE ";
$query .= "... | true |
65c0b14ceeca2fc983da1d4658a4bb2758b50b72 | PHP | dartharnold/mining-buddy-plus | /Mining/functions/html/showEvents.php | UTF-8 | 4,400 | 2.53125 | 3 | [] | no_license | <?php
/*
* MiningBuddy (http://miningbuddy.net)
* $Header: /usr/home/mining/cvs/mining/functions/html/showEvents.php,v 1.19 2008/01/02 20:01:32 mining Exp $
*
* Copyright (c) 2005-2008 Christian Reiss.
* All rights reserved.
*
* Redistribution and use in source and binary forms,
* with or without m... | true |
1b5abd769c7cea537733f5c5b4b9853ee17468a1 | PHP | matteosister/gitelephant.cypresslab.net | /src/Cypress/GitElephantHostBundle/Git/Content.php | UTF-8 | 2,713 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
/**
* User: matteo
* Date: 30/11/12
* Time: 0.06
*
* Just for fun...
*/
namespace Cypress\GitElephantHostBundle\Git;
use Cypress\GitElephantHostBundle\Git\Base\GitBaseService;
use GitElephant\Objects\Object;
use Symfony\Bridge\Monolog\Logger;
use Symfony\Component\HttpFoundation\Request;
use Cypress\Pygme... | true |
b73047a04a5685dcecb4d64068e2a523ff164a30 | PHP | 865826021/roadrunner-laravel | /src/Console/Commands/StartCommand.php | UTF-8 | 4,494 | 2.71875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
declare(strict_types=1);
namespace Spiral\RoadRunnerLaravel\Console\Commands;
use InvalidArgumentException;
use Spiral\RoadRunnerLaravel\WorkerInterface;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/... | true |
d73189c79b9fca3e99e95380a8be1c39a35c2849 | PHP | Bharadwajg26/ContentManagement-for-College | /load_user_profile.php | UTF-8 | 667 | 2.5625 | 3 | [] | no_license | <center>
<?php
require 'functions/functions.php';
$conn = connect();
$sql = "SELECT * FROM users WHERE user_id=".$_GET['profile_id'];
$res = mysqli_query($conn, $sql);
$row = mysqli_fetch_assoc($res);
$width=180;
$height=180;
include 'includes/profile_picture.php';
echo '<BR><BR>';
echo '<h3>'.$row['user_firs... | true |
35de074a009b1a98122682b132714354abe41d1d | PHP | JanMachEU/contacts | /Contact.php | UTF-8 | 8,944 | 3.375 | 3 | [] | no_license | <?php
/**
* File with Contact class
* @author Jan Mach
* @version v1
*/
/**
* Class for handling contacts
*/
class Contact
{
function __construct()
{
}
/**
* Creates form or adds contact to the list
*
* @param string $name Full name of contact
* @param string $phone Telephone numb... | true |
d2598c04ad6ae9d41ff16a60db67d70b1ae4ba39 | PHP | SaptarshiBagchi/LaravelReact | /routes/web.php | UTF-8 | 935 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Support\Facades\Route;
use Illuminate\Support\Facades\Crypt;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. ... | true |
4d77a305c4a7876f22ca7821207b6d6e3405f450 | PHP | nishat-sayyed/responsive-web-design-sample | /add_to_cart_db.php | UTF-8 | 1,318 | 2.796875 | 3 | [] | no_license | <?php
$servername = "localhost";
$username = "root";
$password = "";
$db_name = "web_design";
$conn = mysqli_connect($servername, $username, $password, $db_name);
if(!$conn)
die("Connecting error");
else
echo "Connected successfully <br>";
session_start();
... | true |
8571ddeb10465ba27f30fc626dcee8ded7fe63d7 | PHP | unimapper/unimapper | /tests/cases/Entity.Collection.phpt | UTF-8 | 3,450 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
use Tester\Assert;
use UniMapper\Entity\Collection;
require __DIR__ . '/../bootstrap.php';
/**
* @testCase
*/
class EntityCollectionTest extends TestCase
{
public function testConstruct()
{
$collection = new Collection("Foo", [["id" => 1]]);
Assert::same(1, count($collection));
... | true |
a165715fe80cc59199a5f95591690f19b411abf9 | PHP | laksanii/share-badokan | /view/posting.php | UTF-8 | 3,043 | 2.515625 | 3 | [] | no_license | <?php
session_start();
require "../db/dbconnect.php";
if (!isset($_SESSION["role"])){
header("Location: login.php");
exit();
}
if(isset($_POST['submit'])){
try
{
$dbc = new PDO('mysql:host=localhost;dbname=socmed','root','');
$statement = $dbc->pr... | true |
1b8b6861271571bd02e25fa57a8557d18d3e18cd | PHP | xiaofight/WeekExam2 | /week2/login.php | UTF-8 | 508 | 2.5625 | 3 | [] | no_license | <?php
// 接值
$name = $_POST['name'];
$pwd = $_POST['pwd'];
// 链接pdo
$pdo = new PDO("mysql:host=127.0.0.1;dbname=1606","root","root");
// 写sql语句
$sql = "SELECT * FROM `user` where name='$name' and pwd='$pwd'";
// 执行sql语句
$sth = $pdo->query($sql);
$res = $sth->fetch(PDO::FETCH_ASSOC);
// 是否成功
if($res){
echo... | true |
440165a25fb1f89812fee569c4bb354487fdbd8d | PHP | andsens/MySQLi_Classes | /MySQLi_Classes/Exceptions/ErrorException.class.php | UTF-8 | 2,523 | 2.875 | 3 | [] | no_license | <?php
namespace MySQLi_Classes\Exceptions;
use MySQLi_Classes\Exceptions\Client as Client;
use MySQLi_Classes\Exceptions\Server as Server;
class ErrorException extends \RuntimeException implements Exception {
public function __construct($message = "", $code = 0, $previous = null, $line = null) {
parent::__construc... | true |
044e3f95f9a5741aed054540b8cd8adbaaa20b47 | PHP | amekkawi/uwebcal | /protected/components/auth/rbac/CalAuthItem.php | UTF-8 | 8,680 | 2.8125 | 3 | [] | no_license | <?php
/**
* CalAuthItem class file.
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @author André Mekkawi <uwebcal@andremekkawi.com>
* @link http://www.yiiframework.com/
* @link http://www.uwebcal.com/
* @copyright Copyright © 2008-2011 Yii Software LLC
* @license http://www.yiiframework.com/license/
*/
/*... | true |
82bedfe56fdf3e96b75a8e52770bf55bdb1ebe5b | PHP | yuuttana1223/laravel_umarche | /database/seeders/ShopSeeder.php | UTF-8 | 736 | 2.578125 | 3 | [] | no_license | <?php
namespace Database\Seeders;
use Illuminate\Database\Seeder;
use Illuminate\Support\Facades\DB;
class ShopSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
for ($i = 1; $i <= 5; $i++) {
DB::table('shops')->insert... | true |
80e8070cd5cd04d7a29d32739a50557832f616a3 | PHP | colonelx/qello-demo | /app/Controller/RegistrationController.php | UTF-8 | 1,698 | 2.734375 | 3 | [] | no_license | <?php
namespace QKidsDemo\Controller;
use Slim\Http\Request;
use Slim\Http\Response;
use QKidsDemo\Exception\QelloApiErrorException;
use QKidsDemo\Validation\UserRegistrationValidator;
/**
* Class RegistrationController
* @package QKidsDemo\Controller
*/
class RegistrationController extends BaseController
{
/... | true |
32727ce6e34bc11b62bbaa7a0f9e5b36c20cc8d3 | PHP | kapke/my-place-example | /backend/src/Kapke/Bundle/MyPlaceBundle/DependencyInjection/ModuleManager.php | UTF-8 | 1,214 | 2.671875 | 3 | [
"MIT",
"BSD-3-Clause"
] | permissive | <?php
namespace Kapke\Bundle\MyPlaceBundle\DependencyInjection;
class ModuleManager
{
private $modules;
private $moduleTree;
public function __construct($modules)
{
$this->moduleTree = null;
$this->modules = array_map(function ($module) {
return new Module($module);
... | true |
0498158580e09d0f88539c74bc1a55f773e51126 | PHP | MMazoni/data-structure | /src/Linear/DeQueue.php | UTF-8 | 1,605 | 3.5 | 4 | [
"MIT"
] | permissive | <?php
namespace MMazoni\DataStructure\Linear;
use MMazoni\DataStructure\Linear\LinkedList;
class DeQueue
{
private LinkedList $queue;
public function __construct(private int $limit = 20)
{
$this->queue = new LinkedList();
}
public function dequeueFromFront(): ?string
{
if (... | true |
bc7b40792b438c5001e1abcb106247eb23d12aed | PHP | gisweb/Praticaweb-2.0 | /utils/testStaticClass.php | UTF-8 | 338 | 2.53125 | 3 | [] | no_license | <?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
require_once '../login.php';
class pippo{
public function __construct($numero) {
$this->numero=$numero;
$this->info=appUtils::getPraticaRole($numero);
}
}
$n=15551;
$a = new pippo($n);
pr... | true |
5e74ed61d5dd1dc935dca93ab65898e209cbb96a | PHP | PHPer-upgrade/Education | /application/library/exception/BaseException.php | UTF-8 | 712 | 2.6875 | 3 | [] | no_license | <?php
namespace app\library\exception;
use think\Exception;
class BaseException extends Exception
{
// http status code
public $code = 400;
// error message
public $msg = 'parameter error';
// error code
public $error_code = 10000;
// constructor
public function __construct($params = ... | true |
fa2c728a0552c4580ec558d51745bd85a4adfcf7 | PHP | N-Silbernagel/AccumulatePHP | /src/Set/functions.php | UTF-8 | 420 | 2.78125 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace AccumulatePHP\Series;
use AccumulatePHP\Set\HashSet;
use AccumulatePHP\Set\MutableSet;
if (!function_exists('AccumulatePHP\Series\mutableSetOf')) {
/**
* @template T
* @param T ...$items
* @return MutableSet<T>
*/
function mutableSetOf(...$items):... | true |
a0cd652c9b8c5b919d0f5c5d92953e5981321107 | PHP | dbakalska/BilliardsGames | /src/BilliardsGames/Ball/BallOn.php | UTF-8 | 503 | 3.125 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: Diana Bakalska
* Date: 11/22/2016
* Time: 2:59 PM
*/
namespace BilliardsGames\Ball;
class BallOn
{
protected $hit = false;
public function setBallOn($ballOn)
{
$this->ballOn = $ballOn;
}
public function getBallOn()
{
return $this-... | true |
20b1628dd042a1dc539ecac9649637ce22b51d1f | PHP | xpy/Project_Euler_php | /036.php | UTF-8 | 466 | 3.203125 | 3 | [] | no_license | <?php
include('includes/functions.php');
ini_set('max_execution_time', 20);
$time_start = microtime_float();
$megaSum = '0';
for($i = 0; $i< 1000000; $i++){
if(isPalindrome($i)){
$bin = decbin($i);
if(isPalindrome((string)$bin)){
echo $i.' - '.$bin.'<br>';
$megaSum += $i;
}... | true |
5f8828809ce3614f86799048a215b9f7f9c5d40c | PHP | bugreportuser/phive | /src/commands/purge/PurgeCommand.php | UTF-8 | 986 | 2.8125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace PharIo\Phive;
use PharIo\Phive\Cli;
class PurgeCommand implements Cli\Command {
/**
* @var PharRegistry
*/
private $repository;
/**
* @var Cli\Output
*/
private $output;
/**
* @param PharRegistry $repository
* @param Cli\Output $output
*
... | true |
81ee45103d6c1081e25b4d23c1f713f949b52e9b | PHP | helhum/TYPO3.IHS | /Packages/Application/TYPO3.IHS/Classes/TYPO3/IHS/Domain/Model/Product.php | UTF-8 | 3,487 | 2.671875 | 3 | [] | no_license | <?php
namespace TYPO3\IHS\Domain\Model;
/* *
* This script belongs to the TYPO3 Flow package "TYPO3.IHS". *
* *
* ... | true |
8ef6ff2a3388aaf100bf706a11cd76e6911be26c | PHP | vrkansagara/zend-framework-enterprise-starter-kit | /sample/Blogwithorm/src/Module.php | UTF-8 | 3,926 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace Blogwithorm;
use Zend\ModuleManager\Feature\ConfigProviderInterface;
use Zend\ModuleManager\ModuleManager;
use Zend\Mvc\MvcEvent;
class Module implements ConfigProviderInterface
{
// The "init" method is called on application start-up and
// allows to register an event listener.
public f... | true |
40b6f67476e257a01ec14be21e4639589f6dea6b | PHP | pyrodie18/Bro-Analysis | /conn_logs.php | UTF-8 | 3,062 | 2.984375 | 3 | [
"Apache-2.0"
] | permissive | <?php
include_once('functions.php');
include_once('config.php');
function LoadBroConnLogs($fileName) {
/**
* This file contains all of the functionality to import bro conn logs into the database
* All CONSTANTS are defined within config.php
*/
$insertStatement = ""; //Holds the overall SQL insert statement
$curr... | true |
bd918d6a2f5332076974d15febc6f0b9a81d15e6 | PHP | shi-heb/ProjetCovoiturage | /src/Cov/UserBundle/Entity/Gouvernorat.php | UTF-8 | 2,081 | 2.578125 | 3 | [
"BSD-3-Clause",
"MIT"
] | permissive | <?php
/**
* Created by PhpStorm.
* User: asuss
* Date: 30/01/2017
* Time: 22:44
*/
namespace Cov\UserBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
* @ORM\Entity
* @ORM\Table(name="gouvernorat")
*/
class Gouvernorat
{
/**
* @ORM\Id
* ... | true |
05dc078fd08796f8cef43d6fa58222ba7d7dfda8 | PHP | paulchamberland/MESTO | /MESTO_WEB_APP/php/DAOUserRole.php | UTF-8 | 2,833 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
class UserRole {
public $id;
public $name;
public $description;
public $lstPermissions;
public $updateBy;
public $updateDate;
public function __construct($objSQL) {
$this->id = $objSQL->id;
$this->name = $objSQL->name;
$this->description = $objSQL->description;
... | true |
cb47e93aedb1b062cd927e4a6e42c5c52cd94417 | PHP | yii-joblo/menubuilder | /extensions/ArrayModel.php | UTF-8 | 31,635 | 2.75 | 3 | [] | no_license | <?php
/**
* EArrayModel class file.
*
* @author Maarten van Bloem <maartenvanbloem@gmail.com>
* @link http://www.yiiframework.com/
* @copyright Copyright © 2011 Maarten van Bloem
*
*
* Modified dataToAttributes(): see //modified by Joe Blocher
*/
/**
*
* //bugfix j.blocher
* modified: getData() check file e... | true |
6a26abbd5abc15f9edc736aceb1057531d0487aa | PHP | ridwansyahrizky/kost | /models/User_model.php | UTF-8 | 4,394 | 2.546875 | 3 | [] | no_license | <?php
/**
*
*/
class User_model
{
private $table = 'ms_user';
private $db;
public function __construct()
{
$this->db = new Database;
}
public function getUserAll()
{
$this->db->query('SELECT * FROM ' . $this->table. ' WHERE seclev <> "CST"');
return $this->db->rs();
}
publi... | true |
20b8e23c7a2cd7855c2d7a09a1912ccda1df5353 | PHP | Yushe/myimouto-plus | /app/helpers/AvatarHelper.php | UTF-8 | 1,601 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
class AvatarHelper extends Rails\ActionView\Helper
{
protected $avatar_posts_registry = [];
# id is an identifier for the object referencing this avatar; it's passed down
# to the javascripts to implement blacklisting "click again to open".
public function avatar(User $user, $id, array $html_... | true |
b8f6210d1e059c5aebe75247a396b5064bce09fc | PHP | hannesjuurma-khk/php_alused | /Oop_iseseisev/classes6.php | UTF-8 | 2,148 | 4.03125 | 4 | [] | no_license | <?php
// When we declare a property or a method as "protected", we can approach it from both the parent and the child classes.
// The parent class
class Car {
//The $model property is now protected, so it can be accessed from within the class and its child classes
protected $model;
//Public setter method
... | true |
c3032bf88649ad3751e675e30f5792f333dfe5e2 | PHP | onetribe/worshipplanner | /app/Observers/AuthorObserver.php | UTF-8 | 585 | 2.796875 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Observers;
use App\Services\ActiveTeam;
use App\Author;
class AuthorObserver
{
use SetsActiveTeamOnCreateTrait;
/**
* @param App\Services\ActiveTeam $activeTeam
*
* @return void
**/
public function __construct(ActiveTeam $activeTeam)
{
$this->activeTea... | true |
bc47c4e59d007e80cb3fde3f1beac29ed0c4ff50 | PHP | h933h944/Game | /src/BankBundle/Entity/User.php | UTF-8 | 1,976 | 2.78125 | 3 | [] | no_license | <?php
namespace BankBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table(name = "user")
*/
class User
{
/**
* @ORM\Column(type = "integer")
* @ORM\Id
* @ORM\GeneratedValue
*/
private $id;
/**
* @ORM\Column(type = "string", length = 30, unique = true)
... | true |
3a97fc49eb63638f01bea4e3befd0944c9a36bea | PHP | Asmaasalem95/Bus_Booking | /app/Http/Services/Contracts/TripServiceInterface.php | UTF-8 | 261 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace App\Http\Services\Contracts;
interface TripServiceInterface
{
/**
* @param $filters
* @return mixed
*/
public function getFilteredTrips($filters);
/**
* @return mixed
*/
public function getAll();
}
| true |
4e4472c97ec5ce4820a3fa7c305ce5b759ee63eb | PHP | anhld/silverstripe-framework | /tests/php/Logging/DebugViewFriendlyErrorFormatterTest.php | UTF-8 | 919 | 2.5625 | 3 | [
"CC-BY-3.0",
"BSD-3-Clause"
] | permissive | <?php
namespace SilverStripe\Logging\Tests;
use SilverStripe\Control\Email\Email;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\Logging\DebugViewFriendlyErrorFormatter;
class DebugViewFriendlyErrorFormatterTest extends SapphireTest
{
public function setUp()
{
parent::setUp();
Email::con... | true |
8f835419a37e86b509f1995f93fdd4ab7453b86b | PHP | chaoukifrej/benzone | /app/controllers/login.php | UTF-8 | 690 | 2.59375 | 3 | [] | no_license | <?php
/**
* controllers/login.php - Controleur accueil pour la page de connexion
*/
/* Namespace */
namespace App\Controllers;
include_once __DIR__ . '/../views/login.view.php';
include_once __DIR__ . "/../models/Users.model.php";
use App\Views\Login as LoginView;
use App\Models\Users;
class Login
{
public... | true |
329156908f61bae74ba2793ae0ebe8f0111e6a33 | PHP | Profvmarques/sysfundec | /classes/questionario.php | UTF-8 | 1,593 | 2.578125 | 3 | [] | no_license | <?php
require_once('conexao.php');
require_once('logs.php');
class Questionario {
//Atributos da classe
private $idquestionarios;
private $idevento_periodo_letivo;
private $idperguntas;
private $periodoletivo;
private $dtreg;
//Método
public function Incluir($idevento_periodo_letivo,... | true |
b3cf6d00df153299f5a5e3a614c0fa7a7ad7c2f0 | PHP | rs-solanki/mmm | /dash/Include/global_dash_ajax.php | UTF-8 | 2,079 | 2.515625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
</head>
<body>
<?php
//print_r($_GET);exit();
$con = mysqli_connect('localhost','root','','mmm');
if (!$con) {
die('Could not connect: ' . mysqli_error($con));
}
mysqli_select_db($con,"ajax_demo");
if (isset($_GET['gh_inbox']))
{
$phid = intval($_GET['gh_inbox']);
$sql="SELECT... | true |
06271d861d326466a03d936e6bf1138a306c4ec2 | PHP | oharatech/Aplikasi-Data-Desa | /fungsi_menu.php | UTF-8 | 741 | 2.5625 | 3 | [] | no_license | <?php
error_reporting(0);
function get_menu($data, $parent = 0) {
static $i = 1;
$tab = str_repeat(" ", $i);
if (isset($data[$parent])) {
$html = "$tab<ul id='menu-tree' class='filetree'>";
$i++;
foreach ($data[$parent] as $v) {
$child = get_menu($da... | true |
018a88e65936c1b185a757443ca6d708081bc575 | PHP | benoitdavidfr/yamldoc | /ydclasses/catalog.inc.php | UTF-8 | 3,036 | 2.671875 | 3 | [] | no_license | <?php
/*PhpDoc:
name: catalog.inc.php
title: catalog.inc.php - classes des catalogues V2
doc: |
<a href='/yamldoc/?action=version&name=catalog.inc.php'>voir le code</a>
*/
{ // doc
$phpDocs['catalog.inc.php']['file'] = <<<'EOT'
name: catalog.inc.php
title: catalog.inc.php - classes YamlCatalog des catalogues V2
jour... | true |
c6a01afd8bef0bae9b19e43adc2c88562d1aa424 | PHP | phacility/phabricator | /src/applications/badges/lipsum/PhabricatorBadgesBadgeTestDataGenerator.php | UTF-8 | 1,987 | 2.59375 | 3 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
final class PhabricatorBadgesBadgeTestDataGenerator
extends PhabricatorTestDataGenerator {
const GENERATORKEY = 'badges';
public function getGeneratorName() {
return pht('Badges');
}
public function generateObject() {
$author = $this->loadRandomUser();
list($name, $description, $quality... | true |
abcc3366f13a40c1e951bfa228dc5941176c1e17 | PHP | srtcbzncr/Bipayco | /app/Repositories/Base/SocialMediaRepository.php | UTF-8 | 5,652 | 2.75 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Base;
use App\Repositories\IRepository;
use App\Models\Base\SocialMedia;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage;
use App\Repositories\RepositoryResponse;
class SocialMediaRepository implements IRepository{
/**
* Return all social medias.
... | true |
c94c8697c2a48e6105e87dd6dfba603179d6f2b1 | PHP | blcx1/KK_browser | /Application/Admin/Model/OperationLogModel.class.php | UTF-8 | 9,301 | 2.59375 | 3 | [] | no_license | <?php
namespace Admin\Model;
use Think\Model;
class OperationLogModel extends Model {
protected $current_time;
protected $current_datetime;
protected $current_date;
protected $default_order_by = 'id';
protected $error_array = array();//错误信息
protected $error_code_array = array();//错误编码
/**
* 初始化
*/
pub... | true |
8e8c57aea70a3a4537ca0526a8a7beaa95e92c4c | PHP | rusinov-artem/ex2 | /src/Entity/YCoordinate.php | UTF-8 | 300 | 2.625 | 3 | [] | no_license | <?php
namespace Rusinov\Ex2\Entity;
class YCoordinate
{
public $id;
public $longitude;
public $latitude;
public function toArray()
{
return [
'id'=>$this->id,
'longitude'=>$this->longitude,
'latitude'=>$this->latitude,
];
}
} | true |
6d6507af24ecd836ae904f38ffdfbe9b8233bc2d | PHP | s-p-ko/hw4.php2 | /App/Controllers/Admin/Rewrite.php | UTF-8 | 562 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Controllers\Admin;
use App\Controller;
use App\Models\Article;
/**
* Class Rewrite
* @package App\Controllers\Admin
*/
class Rewrite extends Controller
{
/**
* @return void
*/
protected function handle()
{
if (isset($_POST['id'], $_POST['title'], $_POST['content']... | true |
c0baa3b036a64020d5ce9d5ca4aabeaad649704c | PHP | Omnimaga/omninet-control-panel | /lib/forms.php | UTF-8 | 2,789 | 2.609375 | 3 | [] | no_license | <?php
require_once(dirname(dirname(__FILE__))."/header.php");
function get_form_html($id,$fields,$sublabel){
array_push($fields,Array(
'type'=>'submit',
'value'=>$sublabel
));
return get_form_html_advanced(Array(
'id'=>$id
),$fields);
}
function get_form_html_advanced($attributes,$fields){
$r = "... | true |
99557e2fcde6d2216d98638228c33b9653bc09de | PHP | nocturne32/nette-tinymce-filemanager | /app/Components/TinyMce.php | UTF-8 | 2,238 | 2.6875 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace App\Components;
use App\Forms\FormFactory;
use Nette\Application\UI\Control;
use Nette\Application\UI\Form;
use Nette\ComponentModel\IComponent;
use Nette\Http\FileUpload;
use Nette\Utils\ArrayHash;
use Nette\Utils\Image;
use Nette\Utils\Strings;
use Ramsey\Uuid\Uuid;
use Tr... | true |
3c55cc13ec101e61358ce26241d5b0a47af7bbfb | PHP | aurelieclavier/portfolio | /models/mail.php | UTF-8 | 722 | 3.078125 | 3 | [] | no_license | <?php
class MailModel {
private $destinataire;
private $expediteur;
private $objet;
private $message;
private $header;
public function __construct($to, $subject, $message){
$this->to = $to;
$this->subject = $subject;
$this->message = $message;
}
public function send(){
$this-... | true |
c1426fb6ac8e197deb8e478427cd24d305bdf220 | PHP | leopoldovirosta/miauto | /dataobject.clase.php | UTF-8 | 2,344 | 3.59375 | 4 | [] | no_license | <?php
require_once "config.php";
// DataObject es una clase abstracta de la que se pueden derivar clases para gestionar el acceso a la BD y recuperar datos
abstract class DataObject {
protected $data = array(); //$data tabla protegida con datos
// Constructor de clase, se llama siempre que se crea un nuevo objeto basa... | true |
cc8b46582685a7449338dacb0f6bcbee6c332fce | PHP | phpfui/PHPFUIWebsite | /Example/View/GPX2CueSheet.php | UTF-8 | 1,343 | 2.859375 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Example\View;
class GPX2CueSheet
{
public function __construct(private \PHPFUI\Page $page, private string $fieldName)
{
}
public function render() : \PHPFUI\Container
{
$parameters = \PHPFUI\Session::getFlash('post');
$container = new \PHPFUI\Container();
$callout = new \PHPFUI\Callou... | true |
80e65c6121489954ec7a4600eb08d757826a0ce5 | PHP | Demoniakillah/page_perso | /mainBundle/Entity/aptitudes.php | UTF-8 | 1,800 | 2.5625 | 3 | [] | no_license | <?php
namespace mainBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* aptitudes
*
* @ORM\Table()
* @ORM\Entity
*/
class aptitudes
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
... | true |
fc8a44f56b0e591b544a3e5278c3aff5ef968e3d | PHP | infostreams/excel-merge | /Tasks/ContentTypes.php | UTF-8 | 643 | 2.703125 | 3 | [
"MIT"
] | permissive | <?php
namespace ExcelMerge\Tasks;
/**
* Modifies the "[Content_Types].xml" file to contain one more worksheet.
*
* @package ExcelMerge\Tasks
*/
class ContentTypes extends MergeTask {
public function merge() {
$filename = "{$this->result_dir}/[Content_Types].xml";
$dom = new \DOMDocument();
$dom->load($file... | true |
1db88f57ed42a792e39407b0d023fd67f8287c79 | PHP | sorokinmedia/yii2-user | /src/handlers/UserInvite/interfaces/Reject.php | UTF-8 | 379 | 2.65625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace sorokinmedia\user\handlers\UserInvite\interfaces;
use sorokinmedia\user\entities\UserInvite\AbstractUserInvite;
/**
* Interface Reject
* @package sorokinmedia\user\handlers\UserInvite\interfaces
*/
interface Reject
{
/**
* @param AbstractUserInvite $invite
* @return bool
*/
... | true |
37c2215a8588ca98f963340165924cf86fe76dba | PHP | philipnorton42/PDFSearch | /library/App/Search/Lucene/Document.php | UTF-8 | 2,655 | 2.890625 | 3 | [] | no_license | <?php
class App_Search_Lucene_Document extends Zend_Search_Lucene_Document
{
/**
* Constructor.
*
* @param array $values An associative array of values to be used
* in the document.
*/
public function __construct($values)
{
// If the Filename or the Ke... | true |
14fdb1679075736a61b487ea1dcfab3a5c696922 | PHP | VictorHugoCardoso/Arquivos-Antigos-Instituto-Federal | /PFC/beans/Post.php | UTF-8 | 1,452 | 2.953125 | 3 | [] | no_license | <?php
class Post{
private $id;
private $id_topico;
private $id_usuario;
private $texto;
private $dt_criacao;
private $avaliacao;
private $ativo;
private $usuario;
private $topico;
public function getUsuario(){
return $this->usuario;
}
public function setUsuario($usuario){
$this->usuar... | true |
fca082798bc9d2dc55638d48e307e4e936de39ef | PHP | pinkybs/cf-cafe | /restaurant/source/app/models/Mbll/Kitchen/Cache.php | UTF-8 | 10,601 | 2.609375 | 3 | [] | no_license | <?php
/**
* Mobile kitchen cache logic
*
* @copyright Copyright (c) 2009 Community Factory Inc. (http://communityfactory.com)
* @create hch 2010-1-7
*/
require_once 'Bll/Cache.php';
class Mbll_Kitchen_Cache
{
/**
* mdal kitchen recipe
*
* @var Mdal_Kitchen_Recipe
*/
private static $_mdalRecipe = ... | true |
3ad00745f3eea478273926adc76d19aed5a08ea2 | PHP | MohammedSalah96/M3rady | /app/Repositories/Backend/Post/PostRepository.php | UTF-8 | 2,616 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Repositories\Backend\Post;
use App\Models\Post;
use Illuminate\Http\Request;
use App\Repositories\Backend\BaseRepository;
use App\Repositories\Backend\BaseRepositoryInterface;
class PostRepository extends BaseRepository implements BaseRepositoryInterface, PostRepositoryInterface{
private $pos... | true |
a4fb4f7cf01fc38f8bf186926490ece65c4c2f37 | PHP | botirkhuja/gulruz | /categoryNames.php | UTF-8 | 1,332 | 2.765625 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");
$servername = "localhost";
$username = "root";
$password = "admin";
$dbname = "gulruz";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connectio... | true |
9a4d82c983d2b2d8a54832287362ae47659e7f44 | PHP | ColeReinhart/Business_App | /app/message-system/check_in_db.php | UTF-8 | 815 | 2.625 | 3 | [] | no_license | <?php
include_once '../db.php';
session_start();
if($_SESSION['loggedIn'] != TRUE){
header('Location: index.php');
}if (!$conn) {
die("Connection failed: " . mysqli_error());
}
if(isset($_POST['user'])) {
$q = 'SELECT * FROM Users
WHERE Users.Fname="'.$_POST['user'].'"
OR Users.... | true |
824f6be21965c3cefd79bd7d5d57c8db22744960 | PHP | Basch/rpgtool-trinite | /src/DataFixtures/Data/JobData.php | UTF-8 | 11,840 | 2.578125 | 3 | [] | no_license | <?php
namespace App\DataFixtures\Data;
class JobData
{
public static $DATA = [
[
'id' => 1,
'name' => 'Avocat',
'skills_array' => [3,10,19],
'wealth' => 8,
'network' => 7,
'influence' => 4,
'numberOfDomains' => 8,
... | true |
7a6c2b712e4c6f43d3b4e2b5c88ef383484a5cb7 | PHP | jpalmer4444/ffm-pricing-2 | /module/Application/src/Validator/RegexValidator.php | UTF-8 | 1,290 | 3.203125 | 3 | [] | no_license | <?php
namespace Application\Validator;
use Zend\Validator\AbstractValidator;
use Zend\Validator\Regex;
/**
* This validator class is designed for checking if there is an existing user
* with such an email.
*/
class RegexValidator extends AbstractValidator {
protected $options = array(
'pattern' => n... | true |
3b9657c740854559b0f973d4bc43b930f258f27c | PHP | loganbogaert/MI3Hybrid | /php/restFull.php | UTF-8 | 9,833 | 2.9375 | 3 | [] | no_license | <?php
//*********************************<RESTFULL API MOBILE & INTERNET 3>***************************
header('Access-Control-Allow-Origin: *');
// server
$servername = "localhost:3307";
// user
$username = "root";
// password
$password = "test";
// name of DB
$database = "project";
// Create connection
$c... | true |
f49651b064846145b51ad76b5fa8753d29d599cb | PHP | barth7/symfony-blog | /src/AppBundle/DataFixtures/ORM/LoadPostData.php | UTF-8 | 566 | 2.515625 | 3 | [] | no_license | <?php
namespace AppBundle\DataFixtures\ORM;
use Doctrine\Common\DataFixtures\FixtureInterface;
use Doctrine\Common\Persistence\ObjectManager;
use AppBundle\Entity\Post;
class LoadPostData implements FixtureInterface
{
public function load(ObjectManager $manager){
$post = new Post();
$po... | true |
af5fa2c3a07ca4ed6ede2665653ffcf16aaa0e36 | PHP | dwnGnL/animehub_new | /Model/Channel.php | UTF-8 | 189 | 2.59375 | 3 | [] | no_license | <?php
namespace Model;
class Channel extends Model
{
public function getChannels(){
$sql = 'SELECT title FROM lite_channel';
return $this->driver->row($sql);
}
} | true |
b1529b521da3d587fd68bf91757ad61f237e7a34 | PHP | shotamestiashvili/hr-Ingress | /app/Services/Statistics/AttOutFactory.php | UTF-8 | 239 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Statistics;
class AttOutFactory extends InoutCreator
{
protected function factoryMethod($userid, $date)
{
$attOut = new AttOut();
return ($attOut->getAtt($userid, $date));
}
}
| true |
4575bb0d1dd761a313db32dd99eb60121f62f8cd | PHP | funcrafts/raent | /components/ErrorableTrait.php | UTF-8 | 375 | 2.765625 | 3 | [] | no_license | <?php
namespace funcraft\raent\components;
/**
* Class ErrorableTrait
* @package funcraft\raent\components
* @author Funcraft <me@funcraft.ru>
*/
trait ErrorableTrait
{
/**
* @param bool $string
* @return string|array
*/
public static function getErrorsPlease($string = false)
{
r... | true |
6d28187019bb78a8d619f9b8a4766f0497e0e259 | PHP | mertcorumlu/KALMUN | /inc/ajax/country-add.php | UTF-8 | 994 | 2.515625 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: MERT
* Date: 10/05/2018
* Time: 18:26
*/
include '../loader.php';
if(empty(post("country_name")) || empty(post("country_iso"))){
http_response_code(400);
exit;
}
//CHECK IF USER LOGGED IN,OR IS AUTHORIZED
check_login($PDO,$auth,array(0,1));
$return = array(
... | true |
2a411452f66246349c8eb818d44023f1337c3740 | PHP | Nantonov2020/Geekbrains_PHP2 | /lesson2/part1/Product.php | UTF-8 | 897 | 3.609375 | 4 | [] | no_license | <?php
namespace antonov;
abstract class Product
{
private $name;
private $price;
private $profit;
public function __construct($name, $price)
{
$this->name = $name;
$this->price = $price;
$this->profit = 0;
}
public function getName(){
return $this->name;
... | true |
234ee77f597af7c9f6ae3cccf86e87b3f6738279 | PHP | ayas-ab/php-framework | /application/core/model.php | UTF-8 | 834 | 2.546875 | 3 | [] | no_license | <?php
// ###################################################################
// ######### Class: Model class ######################################
// ###################################################################
// $q->rowCount()
namespace Core;
use PDOException;
use PDO;
use Zend\Validator\Date;
... | true |
03f610efe9be48f9b9d0e27d6bcecc5ea223a433 | PHP | LasithaPrabodha/calendar-php | /controller/EventsController.php | UTF-8 | 5,934 | 3.1875 | 3 | [] | no_license | <?php
/**
* Class which collects data comming from the db and populate to the view
*
* Inherits controller class
*/
class EventsController extends Controller
{
public function __construct()
{
parent::__construct();
if ($this->session->isEmpty()) {
$response = array("status" =>... | true |
8e53dd67c3b5f65dbc20b9a0d240f2590e884880 | PHP | NathanTraineau/PiscineGroupe7 | /New Piscine/InfoReservation.php | UTF-8 | 6,711 | 2.703125 | 3 | [] | no_license |
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<style>
<table>
{
text-align= center ;
}
</style>
</head>
</html>
<?php
include'inc/header.php';
//$servername = "localhost";
//$username = "root";
//$password = "";
//$dbname = "piscine";
//$editeur= "editeur";
//if ... | true |
fc71a00220c36f4df31a1e56fdbe7b6497384756 | PHP | oasis9594/BloodConnect | /blood_bank/delete_page.php | UTF-8 | 1,246 | 2.5625 | 3 | [] | no_license | <?php require_once("includes/session.php"); ?>
<?php require_once("includes/connection.php"); ?>
<?php require_once("includes/functions.php"); ?>
<?php confirm_logged_in(); ?>
<?php
// make sure the subject id sent is an integer
if (intval($_GET['page']) == 0) {
redirect_to('content.php');
}
$id = mys... | true |
319be45029cff1821a0c661f75f8eebef39742da | PHP | iqbalfarhan/sekolah | /database/migrations/2019_10_17_020500_create_students_table.php | UTF-8 | 1,129 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateStudentsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('students', fun... | true |
44da8b6de241b1d17944904c54e242ebe516086e | PHP | ElHombreSinNombre/laravel-vue | /laravelVue/app/Http/Requests/PersonRequest.php | UTF-8 | 1,338 | 2.78125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Auth;
class PersonRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
return Auth::check();
}
... | true |
2d60a9e43c97498bd9e3f4b7d594c805a59f2354 | PHP | ratebkefi/cooperons | /cooperons.api/src/Apr/CoreBundle/ApiController/LegalController.php | UTF-8 | 5,393 | 2.515625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* This file defines the Legal controller for returning legal HTML page
*
* @category CoreBundle
* @package ApiController
* @author Fondative <devteam@fondative.com>
* @copyright 2015-2016 Fondative
* @version 1.0.0
* @since File available since Release 1.0.0
*/
namespace Apr\CoreBundle\ApiControlle... | true |
05840081c6c29e777c044655031dded30218fe98 | PHP | dcods22/CampusLoops | /bookView.php | UTF-8 | 1,897 | 2.609375 | 3 | [] | no_license | <?php
include('scripts/php/lib_check_login.php');
include('scripts/php/lib_User_model.php');
include('scripts/php/lib_getUser.php');
include("lib/template/bookheader.php");
include('scripts/php/lib_Posts_model.php');
include('scripts/php/bookModel.php');
if(isset($_GET['id'])){
$ID = $_GET['id'];
}else{
... | true |
bff60aa78097d9055db78eec5cf856d6cda1c338 | PHP | moesandar213511/test_meaorg | /app/CustomClass/CompanyData.php | UTF-8 | 1,858 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\CustomClass;
use App\Company;
use App\Company_Gallery;
use App\Member;
use App\Category;
use App\CustomClass\Path;
class CompanyData{
private $company_data;
function __construct($company_id){
$company = Company::findOrFail($company_id);
$this->setCompanyData($company)... | true |
efcafd1fa5cae4ee9e4ba4e049227adc1bcad1e0 | PHP | HomeworkSoftUni/HomeWork | /_01_Semester/_05_PHP/02.PHPWorkingWithForms/01.PrintTags/PrintTags.php | UTF-8 | 565 | 3.21875 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<form method="POST">
Enter Tags:
<input type="text" name="inputs"/>
<input type="submit" />
</form>
<?php
if(isset($_POST['inputs'])){
... | true |
fc00e09f53ed2f8850f8d8e25d86fb88bd3f55e3 | PHP | alyssabiggins/Yelp-2.0 | /restpage.php | UTF-8 | 11,117 | 2.609375 | 3 | [] | no_license | <?php
include('../include/dbconn.php');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Yelp 2.0</title>
<link rel = "stylesheet" href = "yelp.css"/>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<link rel="style... | true |
39f6449a21e8fd90873acdfd87c434be7f463d59 | PHP | correangel/Controle-estoque | /controle de estoque/pages/relatorio/saidas_pdf.php | UTF-8 | 1,108 | 2.515625 | 3 | [
"MIT"
] | permissive | <?php
require "../FPDF/fpdf.php";
require "../config.php";
$pdf = new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B','16');
$pdf->Cell(190,10,utf8_decode("Relatório de Saidas"),0,0,"C");
$pdf->Ln(15);
$pdf->setFont("Arial","",7);
$pdf->Cell(35,7,utf8_decode("Produto"),1,0,"C");
$pdf->Cell(25,7,utf8_decode("Categ... | true |
1bc642a16fe289a8599d5364ff872aa841ab34e4 | PHP | gggordon/artisan | /src/Console/Commands/Init.php | UTF-8 | 1,099 | 2.6875 | 3 | [
"MIT"
] | permissive | <?php
namespace Moon\Artisan\Console\Commands;
use Illuminate\Console\Command;
use Moon\Artisan\Artisan;
class Init extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'artisan:init';
/**
* The console command descript... | true |
da3c10a89decdab5020008513716900fa8c4c372 | PHP | sanketwin/PiSyst-Intern | /codeigniter-crud/application/models/User_model.php | UTF-8 | 745 | 2.546875 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
class User_model extends CI_Model{
public function create($formArray){
$this->db->insert('ci',$formArray);
}
public function all(){
return $users = $this->db->get('ci')->result_array(); // SELECT * FROM ci;
}
public function get... | true |
e9e6a50f29bb5b95bf2cf13a7571734479d8945c | PHP | adrienbrault/kodierungsregelwerksammlung | /src/InterNations/Sniffs/Naming/AliasUseLegacyClassSniff.php | UTF-8 | 2,392 | 2.6875 | 3 | [] | no_license | <?php
use PHP_CodeSniffer_File as CodeSnifferFile;
/**
* @SuppressWarnings(PMD)
*/
// @codingStandardsIgnoreStart
class InterNations_Sniffs_Naming_AliasUseLegacyClassSniff implements PHP_CodeSniffer_Sniff
// @codingStandardsIgnoreEnd
{
public function register()
{
return [T_USE];
}
public fu... | true |
e66065ff1865f0b440bbadc79ce2d612f3249a1f | PHP | borazslo/miserend.hu | /webapp/classes/html/stat.php | UTF-8 | 8,699 | 2.703125 | 3 | [] | no_license | <?php
namespace Html;
use Illuminate\Database\Capsule\Manager as DB;
class Stat extends Html {
public function __construct() {
parent::__construct();
$this->setTitle('Statisztika');
$this->stats = [];
global $user;
/*
if (!$user->loggedin) {
addMess... | true |
999d279e7198fcbfa75111f210c8708728867596 | PHP | NicelyDunn7/Logboat-DBMS | /pages/register.php | UTF-8 | 3,107 | 2.734375 | 3 | [
"MIT"
] | permissive | <?php
//If the user is not connected through HTTPS, redirect into it
if (!isset($_SERVER['HTTPS']) || !$_SERVER['HTTPS']) { // if request is not secure, redirect to secure url
$url = 'https://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
header('Location: ' . $url);
//exit;
}
//If already logged in,... | true |
62a2dcf9696f2e99027b1cad177b2313637d3928 | PHP | lupel31/CodeIgniter-cms | /application/modules/articles/controllers/articles.php | UTF-8 | 3,341 | 2.546875 | 3 | [] | no_license | <?php
class Articles extends Frontend_Controller
{
public function __construct()
{
parent::__construct();
$this->load->model(array('articles/article_model', 'articles/category_model'));
$this->load->helper(array('date', 'articles/article', 'form'));
}
/**
* I... | true |
cb21f79c83b4ab98da56badf23562ae1b296e5e3 | PHP | antoniofran/Lecture-improve-system-app | /app/admin/func/setup_human.php | UTF-8 | 6,467 | 2.578125 | 3 | [] | no_license | <?php
if (session_id()==='') session_start();
/*******************/
//connect to database
include($_SERVER['DOCUMENT_ROOT']."/app/master/actn/app_data_open.php");
/*******************/
if (isset($_POST["submit"])) {
$act_hmn_arr = array();
$iact_hmn_arr = array();
/*********************/
foreach... | true |
dceaa8f8280b2b63b6f28f2750edc5c19e4ed57a | PHP | MoiMemeMoussa/primaire-frontend | /src/Entity/Matricule.php | UTF-8 | 875 | 2.71875 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* Matricule
*
* @ORM\Table(name="matricule")
* @ORM\Entity
*/
class Matricule
{
/**
* @var int
*
* @ORM\Id
* @ORM\Column(name="idMatricule", type="integer", nullable=false)
*/
private $idmatricule;
/**
* ... | true |
f97eb178e6065511ccbc0da46f55bfbff1d258d5 | PHP | rselina/onlinecourse | /login.php | UTF-8 | 2,876 | 2.59375 | 3 | [] | no_license | <?php require_once("includes/init.php") ?>
<?php require_once ('includes/master.inc.php') ?>
<?php
if($session->is_signed_in()){
redirect("index.php");
}
if(isset($_POST['submit'])){
$username = trim($_POST['inputEmail']);
$password = trim($_POST['inputPassword']);
$user_found = User:... | true |
42b4616aad2061bbf3bbae1f460286a7f0275910 | PHP | landrinebeatrice/nuru | /entities/Frais.php | UTF-8 | 1,439 | 3.3125 | 3 | [] | no_license | <?php
class Frais
{
private $id;
private $designation;
private $montant;
private $devise;
/**
* Frais constructor.
* @param $id
* @param $designation
* @param $montant
* @param $devise
*/
public function __construct($id, $designation, $montant, $devise)
{
... | true |
7495be01f7cae6268c2dc6f8e59b45f83052f25a | PHP | LuisGustavoBlockNienkotter/MVC-Estudo | /view/Cadastrar.php | UTF-8 | 7,792 | 2.59375 | 3 | [] | no_license | <?php
require_once "../autoload.php";
require_once "../controller/Controller.class.php";
require_once "../Model/DAO/MySQL/MySQL.class.php";
require_once "../controller/ControllerCliente.class.php";
$idAlt = isset($_GET["idAlt"])?$_GET["idAlt"]:0;
$id = isset($_POST['codigo'])?$_POST['codigo']:0;
$nome = isse... | true |
248225dfec7b93198c810a5786fabe4d28551fb6 | PHP | JefersonConceicao/Teste-transalvador | /app/Http/Requests/TiposDocumentosRequest.php | UTF-8 | 698 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Route;
class TiposDocumentosRequest extends FormRequest
{
/**
* @return bool
*/
public function authorize()
{
return true;
}
/**
* @return array
*/
public... | true |
49e3abe8d7d3c4ae93e20ce7b7546618f5a61525 | PHP | wemecan/Discuz-Q | /app/Api/Serializer/EmojiSerializer.php | UTF-8 | 915 | 2.515625 | 3 | [] | no_license | <?php
/**
* Discuz & Tencent Cloud
* This is NOT a freeware, use is subject to license terms
*/
namespace App\Api\Serializer;
use App\Models\Emoji;
use Discuz\Api\Serializer\AbstractSerializer;
use Illuminate\Contracts\Routing\UrlGenerator;
class EmojiSerializer extends AbstractSerializer
{
protected $url;
... | true |
bc457c333e0ebf0deb5476304f1ddd78507bc991 | PHP | wiz-anzhen/weixin-test | /lib/Bluefin/Exception/ConfigException.php | UTF-8 | 361 | 2.75 | 3 | [] | no_license | <?php
namespace Bluefin\Exception;
class ConfigException extends ServerErrorException
{
public function __construct($message, \Exception $previousException = null)
{
parent::__construct(
"Invalid configuration. " . $message,
\Bluefin\Common::HTTP_INTERNAL_SERVER_ERROR,
... | true |
add4b8b984ee8ba8a10293c5d5028dca55477eda | PHP | taivu/drupalUpstream | /web/modules/contrib/xmlsitemap/tests/src/Kernel/XmlSitemapWriterTest.php | UTF-8 | 2,404 | 2.671875 | 3 | [
"GPL-2.0-only",
"MIT"
] | permissive | <?php
namespace Drupal\Tests\xmlsitemap\Kernel;
use Drupal\Core\StringTranslation\TranslatableMarkup;
use Drupal\Core\Url;
use Drupal\xmlsitemap\Entity\XmlSitemap;
use Drupal\xmlsitemap\XmlSitemapWriter;
/**
* Tests \Drupal\xmlsitemap\XmlSitemapWriter.
*
* @group xmlsitemap
*
* @coversDefaultClass \Drupal\xmlsi... | true |
7bf0417654d68e01100771a3c57f29bfa1ae0e38 | PHP | s0m4/accounting | /app/models/Customer.php | UTF-8 | 2,451 | 2.734375 | 3 | [] | no_license | <?php
class Customer extends Eloquent {
/**
* The database table used by the model.
*
* @var string
*/
protected $table = 'pelanggan';
/**
* Fillable column
*
* @var array
*/
protected $fillable = array('kode', 'nama', 'telp', 'alamat');
/**
* getter semua pelanggan
*
* @... | true |
98f183a0dcaa8e9c08bcd33664eb886241331665 | PHP | venkatsekar/student | /application/models/StudentClass.php | UTF-8 | 1,389 | 2.84375 | 3 | [] | no_license | <?php
class Studentclass extends Model {
//List Class
function list_class()
{
$query = "SELECT DISTINCT * FROM classes
WHERE status = 1";
return $this->db->query($query);
}
//Add Class
function add_class($ClassName, $Remarks)
{
date_default_timezone_set('Asia/Kolkata');
$DateTime = new DateTim... | true |