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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
c78d17e74c19aed74177395ab08bf9a2b7be8516 | PHP | rapidadress/hetic-p2017 | /exercices/exercice-silex/deverriere-combes/web/models/snippets.class.php | UTF-8 | 3,469 | 3.203125 | 3 | [] | no_license | <?php
class Snippets_Model
{
function __construct($pdo)
{
$this->pdo = $pdo;
}
function get()
{
return $this->get_by_page();
}
function get_by_page($page = 1, $limit = 4)
{
$start = ($page - 1) * $limit;
$prepare = $this->pdo->prepare('
SELECT
s.id,
s.title,
s.co... | true |
5ce5216255ce7016c9a3c6cc41e981dd90867ec4 | PHP | shakib-007/learning-web-technologies-spring-2020-2021-sec-h | /MID_LAB_TASK_PHP_04/AreaPerimeter.php | UTF-8 | 191 | 3.71875 | 4 | [] | no_license | <?php
$length=20;
$width=10;
$area=$length*$width;
$perimeter=2*($length+$width);
print("The area of Rectangle = ".$area."\n");
print("The perimeter of Rectangle = ".$perimeter);
?> | true |
32977ac0623f568f8de020a0111c20129df52614 | PHP | airraaaaa/zalora_pullout | /frontend/models/Account.php | UTF-8 | 1,324 | 2.625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
use Yii;
/**
* This is the model class for table "account".
*
* @property integer $id_account
* @property string $username
* @property string $password
* @property string $account_name
* @property string $department
*
* @property AccountHistory[] $accountHistories
*/
class Accou... | true |
8fb1492835d8e936ae8a7f9432c932284d831be4 | PHP | CuongMark/payout | /app/code/Angel/Payout/Model/Payout.php | UTF-8 | 1,825 | 2.515625 | 3 | [] | no_license | <?php
namespace Angel\Payout\Model;
use Magento\Framework\Api\DataObjectHelper;
use Angel\Payout\Api\Data\PayoutInterface;
use Angel\Payout\Api\Data\PayoutInterfaceFactory;
class Payout extends \Magento\Framework\Model\AbstractModel
{
protected $_eventPrefix = 'angel_payout_payout';
protected $payoutDataFa... | true |
5414c71fb54e47caa6c14ce27d046f709c7b4dc6 | PHP | chengxiansheng/yii2-wx | /src/mini/qrcode/QrcodeFromB.php | UTF-8 | 1,619 | 2.640625 | 3 | [] | no_license | <?php
namespace wx\mini\qrcode;
use wx\base\Exception;
use Yii;
use yii\httpclient\Client;
/**
* 获取小程序二维码接口B类
* 适用于需要的码数量极多的业务场景
* @Author Cheng
* @Date 2018-09-15
*/
class QrcodeFromB extends BaseQrcode implements CreateInterface
{
const API_UMLIMIT_PRE_URL = 'https://api.weixin.qq.com/wxa/getwxacodeunlim... | true |
bc08f5c4109f2ca79746d0ced1ff9d0c3401b047 | PHP | biletnam/theater-manager-final | /helpers.php | UTF-8 | 1,580 | 2.984375 | 3 | [] | no_license | <?php
include("database.php");
// Use this to check if user is logged in
function is_logged() {
if (isset($_SESSION['username']) && isset($_SESSION['password'])) {
return true;
} else {
return false;
}
}
// Redirect if not logged
function auth_check() {
if (!is_logged()) {
heade... | true |
cef92f2f3dd3ca86cd4afe9f05d73238ea387e91 | PHP | kyussfia/PHPTools | /Other/Dependency/DependencyContext.php | UTF-8 | 3,197 | 2.671875 | 3 | [
"MIT"
] | permissive | <?php
namespace PlanBundle\Schedule\Dependency;
use PlanBundle\Schedule\Common\Configuration;
class DependencyContext
{
/**
* @var \PlanBundle\Schedule\Dependency\DependencyWalker
*/
private $walker;
/**
* @var \PlanBundle\Schedule\Common\Configuration
*/
private $configuration;
... | true |
6ef3bfdd88b311a9eaad095eed03045905ed38bb | PHP | ab2021-dev/test-task | /src/Service/Factory/TimeFactory.php | UTF-8 | 1,446 | 3.21875 | 3 | [] | no_license | <?php
namespace App\Service\Factory;
use App\Value\Time;
use DateInterval;
use DateTime;
use Exception;
use http\Exception\BadMethodCallException;
class TimeFactory implements TimeFactoryInterface
{
public const DAY_START_TIME = "00:00";
public const DAY_END_TIME = "24:00";
public function createFromStr... | true |
6fb50dcccb9eb211aaa4aac4f1f6fabf367544c5 | PHP | NAONAOx1126/clay_plugins | /clay_order/modules/Summery/SliceRepeat.php | UTF-8 | 1,974 | 2.828125 | 3 | [] | no_license | <?php
/**
* ### Order.Summery.SliceRepeat
* 受注データでのサマリを取得する。
* @param title タイトルに相当するカラムを指定
* @param summery サマリーに相当するカラムを指定
* @param result 結果を設定する配列のキーワード
*/
class Order_Summery_SliceRepeat extends Clay_Plugin_Module{
function execute($params){
if($params->check("key")){
// まず、リストを前月と当月のデータに絞り込む
$list ... | true |
e54162877731fb4b76530501eb1276e2fc020292 | PHP | eineguez87/weecare-challenge | /models/albumsModel.php | UTF-8 | 5,643 | 2.921875 | 3 | [
"MIT"
] | permissive | <?php
class AlbumsModel
{
private $db;
public function __construct()
{
$this->db = Flight::db();
}
/**
* Method to get albums from url.
* @id int Optional. Is the album id.
* @params mixed Array of params that can be passed for order and limit.
* @return array
*/
... | true |
cc54b08acc169758d53d81ea90d6f44b7c6a693a | PHP | YHF7/PHP | /PHP3/1.oop.php | UTF-8 | 5,688 | 3.40625 | 3 | [] | no_license | <?php
/*一、OOP(Object-Oriented Programming)面向对象编程
OOP达到了软件工程的三个目标:重用性、灵活性和扩展性。
采用面向对象方法可以使系统各部分各司其职、各尽所能; 使其编程的代码更简洁、更易于维护,并且具有更强的可重用性。
类 (class)
日常环境由无数实体组成:植物,人群,交通工具,食物...
每个实体都由一组性质和行为来定义。
例如: 男人 可以定义有:身高,体重,是否帅,肤色等性质,并且定义有能赚钱,能下厨,能开车等行为。在OOP术语中,实体的性质和行为的具体定义称为类
对象 (object)
通... | true |
0c9c295f756aba6b5d6b34b9bb66057bb0ef1812 | PHP | Pyro-San/BeeHiveInterface | /BeeHiveInterface/send_email.php | UTF-8 | 6,998 | 2.75 | 3 | [] | no_license | <?php
ini_set('max_execution_time', 300);
require_once('database_files/database_connection.php');
require('database_files/database_queries.php');
// Get the temperature values for the bee hives (ids 1-6)
$temperature_values = get_temperature_values();
// Stores the hive ids that have recorded values.
$hive... | true |
1a0b1c03b7acd439d26c21c7315208c2c499c15e | PHP | bpstr/elements-php | /tests/Html/FormTest.php | UTF-8 | 903 | 2.8125 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types=1);
use Bpstr\Elements\Html\Form;
use Bpstr\Elements\Html\Input;
use PHPUnit\Framework\TestCase;
final class FormTest extends TestCase {
public function testNewInstance(): void {
$input = new Input(Input::TYPE_TEXT, 'dummy', 'This __ rocks!');
$this->assertSame('<input type="text" na... | true |
29b00e74da450ef8da38283eec97ee8d8b119206 | PHP | VincentJaubert88/EductationalWebsite | /view/frontend/minichat_post.php | UTF-8 | 2,345 | 2.703125 | 3 | [] | no_license | <?php
echo $_POST['Nom'] . ' ' . $_POST['Message'];
$bdd = new PDO('mysql:host=localhost;dbname=myWebSite;charset=utf8','root','', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
//$bdd->exec('INSERT INTO LivreDOr(Nom,Message) VALUES(\'Vincent\', \'Le site marche\')');
$req = $bdd->prepare('INSERT INTO g... | true |
e0b5822b02370c73a1cd9778af965b2672e9804a | PHP | kache96/BABLE-PROJECT | /calendar/include/calendarEvents.php | UTF-8 | 3,747 | 2.6875 | 3 | [] | no_license | <?php
include_once 'db.php';
header('Content-Type: application/json');
class CalendarEvent extends DB{
public function events(){
$action = (isset($_GET['action']))?$_GET['action']:'read';
switch($action){
case 'create':
echo "INSERTING D... | true |
0d1d0f1cade4e6680d94cf557ceffd07c201d4ec | PHP | andi-wijaya/uiux | /send-wa.php | UTF-8 | 566 | 2.671875 | 3 | [] | no_license | <?php
$phone = $_GET['phone'];
$text = $_GET['text'];
$data = [
'phone' => $phone, // Receivers phone
'body' => $text // Message
];
$json = json_encode($data); // Encode data to JSON
// URL for request POST /message
$url = 'https://eu2.chat-api.com/instance2611/message?token=wavhizrhcmm9x32s';
// Make a POST re... | true |
95af2588306e1fb991905abbf5d910e0b2a9d1fe | PHP | mangopop/laravel_blog | /app/routes.php | UTF-8 | 5,286 | 2.90625 | 3 | [
"MIT"
] | permissive | <?php
/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond ... | true |
8cb7c82cec58f1a5a351b72c748e536498083d56 | PHP | PanYiren/TP-Fonction | /Exercice3/exFtoC.php | UTF-8 | 180 | 3.28125 | 3 | [] | no_license | <?php
$f = readline("Entrer une valeur Farenheit : ");
include("FtoC.php");
$result = ftoc("$f");
echo "Conversion Farenheit To Celsius: \n";
echo "$f ° = ";
echo "$result °";
?> | true |
2ec62292d18807317fad373b0f9d65e0428b5b65 | PHP | harunaltun38/PHP-Projekte | /dashboard/Blumenshop/src/Besitzer/Views/blume/blumeLoeschen.php | UTF-8 | 958 | 2.53125 | 3 | [] | no_license | <?php
namespace MyBlumenshopApp\Besitzer\Views\blume;
/**
* @var $blumen array
*/
$blumenArray = $blumen; ?>
<form action="/dashboard/Blumenshop/src/Besitzer/Controller/blume/BlumeLoeschenController.php" method="post">
<label for="loescheBlumeAusDerAuswahlid">Aus der Auswahl die Blume löschen</label>
<select... | true |
6c4d04e1425c5dc399b3a0e60ec8ac7b7c8e234d | PHP | localmedialabs/inquiry_learning_map_application | /application/application/handler.php | UTF-8 | 10,749 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
require_once( dirname(__FILE__) .'/vendor/autoload.php' );
require_once( dirname(__FILE__) .'/lib/common/common_model_exec.php' );
require_once( dirname(__FILE__) .'/lib/common/common.php' );
require_once( dirname(__FILE__) .'/lib/common/common_authentication.php' );
/**
* アプリケーションクラス
*
* Webアプリケーションの制御の基底となる... | true |
61ea416c662f8f2c878f1f69b52f38d02dc28768 | PHP | Shaihulud1/bj-test | /app/src/controller/Auth.php | UTF-8 | 1,296 | 2.8125 | 3 | [] | no_license | <?php
namespace controller;
use core\AppController;
use core\Repository;
use model\User;
class Auth extends AppController
{
public function login()
{
if ($_SERVER['REQUEST_METHOD'] == 'GET') {
return $this->renderView('login');
}
$name = trim(htmlspecialchars($_POST['... | true |
c8076f3b3921cf97b94e5c3f713521ac177cbaf7 | PHP | beedigital2019/bisagnse | /src/Entity/Pin.php | UTF-8 | 5,230 | 2.53125 | 3 | [] | no_license | <?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Repository\PinRepository;
use Doctrine\Common\Collections\Collection;
use ApiPlatform\Core\Annotation\ApiProperty;
use ApiPlatform\Core\Annotation\ApiResource;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ApiResource()
* @ORM\Entity(re... | true |
bbd239df1b548a5fc2faf310ffa46dc9cf09a6d8 | PHP | djungowski/Score11 | /models/OnTv.php | UTF-8 | 1,224 | 2.75 | 3 | [] | no_license | <?php
namespace Score11\Models;
use Score11\Api;
class OnTv extends Api\Transformator
{
private $_tvMovies = array();
public function transform($params = array())
{
$onTv = $this->getApi()->get(array('limit' => 8));
$config = \Zend_Registry::get('config');
$router = $this->getF... | true |
54e32a6d2987a8ebc9ab08fab6755d5882a020c0 | PHP | S0hiba/portfolio | /source/phplib/class_QueryBuilderWithPhpRedisDataStore.php | UTF-8 | 4,558 | 3.1875 | 3 | [] | no_license | <?php
# -----------------------------
# 自作クエリビルダとPHPRedisを用いた、データストアクラス
# 2021.05.17 s0hiba 初版作成
# -----------------------------
class QueryBuilderWithPhpRedisDataStore
{
/**
* キャッシュ接続オブジェクト
* @var Redis
*/
private Redis $cacheObj;
/**
* SQLクエリの実行用オブジェクト
* @var PDOQueryRunner
... | true |
52b9c6c051b75978e0b20d1766dd2b478897c791 | PHP | ericsonmatheus250/sistemaAcril | /vendor/acrilbox/php-classes/src/Model/Client.php | UTF-8 | 2,953 | 2.640625 | 3 | [
"MIT"
] | permissive | <?php
namespace Acrilbox\Model;
use \Acrilbox\Database\Sql;
use \Acrilbox\Model;
class Client extends Model
{
public static function listAll()
{
$sql = new Sql();
return $sql->select("SELECT * FROM tb_endereco e INNER JOIN tb_pessoa p USING(id_endereco)
INNER JOIN tb_client... | true |
03fc3b8470cd3748e894a11bac4bcafe8a121693 | PHP | publicwhip/publicwhipv2 | /src/Providers/DatabaseProvider.php | UTF-8 | 6,445 | 2.625 | 3 | [
"MIT"
] | permissive | <?php
declare(strict_types = 1);
namespace PublicWhip\Providers;
use DebugBar\DataCollector\PDO\PDOCollector;
use DebugBar\DataCollector\PDO\TraceablePDO;
use DebugBar\DebugBarException;
use Illuminate\Container\Container;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Database\Connection;
use Illumi... | true |
f50475af00dc906798ac9675f3e4d2fee94bb23f | PHP | shiroscout/php-book | /chp09/9.12_to_9.14/controller_users.php | UTF-8 | 545 | 2.65625 | 3 | [] | no_license | <?php include_once("a_first.php");?>
<?php
if (array_key_exists('AddUser', $_POST)) {
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$query = "INSERT INTO Users
(`id`, `first_name` ,`last_name`)
VALUES ('', '$first_name' , '$last_name')";
if (mysqli_query($db1, $query)) {
hea... | true |
c3e52f6ddddee8d8919f23e168904d6d8aaa6ac5 | PHP | NidhiUday/bmsce_pes_squad | /verification.php | UTF-8 | 1,583 | 2.71875 | 3 | [] | no_license | <?php
//connecting to the database
include 'partials/_dbconnect.php';
//sets the timezone
date_default_timezone_set("Asia/Kolkata");
//default message printed as soon as the mail is shooted
$msg = "please check your mail to verify email!!";
if (!empty($_GET['vkey']) && isset($_GET['vkey'])) {
$vkey = $_GE... | true |
1e31a65de1edba1410d4b3145f02602a57a56216 | PHP | shirokovnv/laravel-query-api-backend | /src/QueryResult.php | UTF-8 | 4,647 | 2.828125 | 3 | [
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | <?php
namespace Shirokovnv\LaravelQueryApiBackend;
use Illuminate\Contracts\Support\Arrayable;
use JsonSerializable;
use Shirokovnv\LaravelQueryApiBackend\Support\Models\QueryChainLog;
/**
* Class QueryResult.
*/
class QueryResult implements JsonSerializable, Arrayable
{
/**
* Success status for runned qu... | true |
92c579f16157b78b654273e458eb2641e1c19fa0 | PHP | ns-system/jf | /app/Http/Requests/Roster/WorkPlan.php | UTF-8 | 1,273 | 2.609375 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Requests\Roster;
use App\Http\Requests\Request;
class WorkPlan extends Request
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize() {
return true;
}
/**
* Get the validation rules ... | true |
099f0006ffa79dadf6252b84a42167f00bc6103e | PHP | Nerijusanz/codearchitect_plugin | /inc/modules/gmap/table/TableSetup.php | UTF-8 | 5,596 | 2.65625 | 3 | [] | no_license | <?php
/**
* @package codearchitect
*/
namespace CA_Inc\modules\gmap\table;
use CA_Inc\setup\Settings;
use CA_Inc\modules\gmap\Setup;
use CA_Inc\modules\api\ModulesSetup;
class TableSetup {
public static $module;
public static $page;
public static $table_name; //unique table name
public static $... | true |
88390e18e85558a058b8a9bd0f2d40af7f6aecf9 | PHP | klokie/foafssl-drupal | /foafssl.inc | UTF-8 | 5,976 | 2.984375 | 3 | [] | no_license | <?php
// $Id$
/**
* @file
* Library functions for FOAF+SSL.
*/
include_once(dirname(__FILE__) . "/arc/ARC2.php");
/**
* Get all the RDF resources matching a set of (predicate, object) conditions.
*
* @param $rdf_index
* The simple-indexed RDF graph returned by ARC_Parser::getSimpleIndex().
* @param $condit... | true |
2d85df048fb74a0939d6a5f1fef1cf55059cfe77 | PHP | oliviermadre/project-management | /src/Collection/ImputationCollection.php | UTF-8 | 1,080 | 3.015625 | 3 | [] | no_license | <?php
namespace ProjectManagement\Collection;
use ProjectManagement\Imputation;
class ImputationCollection
{
/**
* @var Imputation[]
*/
private $col = [];
public function add(Imputation $e)
{
$this->col[$e->getId()] = $e;
uasort($this->col, function(Imputation $a, Imputati... | true |
40c4651e6bb8d98b469e0ac11058180a6ea3c6c0 | PHP | rahulyhg/happy-giraffe | /site/frontend/modules/posts/models/TemplateInfo.php | UTF-8 | 498 | 2.625 | 3 | [] | no_license | <?php
namespace site\frontend\modules\posts\models;
/**
* Description of ManageInfo
*
* @author Кирилл
*/
class TemplateInfo extends SerializedModel
{
public $layout = '';
public $data = array();
public function attributeNames()
{
return array(
'layout',
'data',
... | true |
1020e9e582da204ec83359bc28f1633d45d88129 | PHP | VlPetukhov/shop | /modules/backend/controllers/CatalogController.php | UTF-8 | 3,009 | 2.578125 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
/**
* @filename CatalogController
* @namespace app\modules\backend\controllers
* @class CatalogController
*/
namespace app\modules\backend\controllers;
use app\models\CatalogItem;
use app\modules\backend\components\Catalog;
use HttpInvalidParamException;
use Yii;
use yii\web\BadRequestHttpExcep... | true |
0fd39f73c79b65a7f991d462251d73a3fa79f78b | PHP | zoheirmaz/arven-wallet | /app/Services/Coupon/FieldOutput/Amount.php | UTF-8 | 366 | 2.53125 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Services\Coupon\FieldOutput;
use App\Entities\Credit;
use Infrastructure\Interfaces\Services\Coupon\FieldOutput\FieldOutputInterface;
class Amount implements FieldOutputInterface
{
public function output($input)
{
return [
Credit::AMOUNT => $input,
Credit::... | true |
f4020536862f21a2b53738801161ca07fce917e1 | PHP | yanthink/browser | /src/Simulation.php | UTF-8 | 5,632 | 2.765625 | 3 | [] | no_license | <?php
namespace Yanthink\Browser;
use Closure;
use Facebook\WebDriver\Chrome\ChromeOptions;
use ReflectionFunction;
use Illuminate\Support\Collection;
use Facebook\WebDriver\Remote\RemoteWebDriver;
class Simulation
{
use SupportsChrome;
/**
* 自启动chromeDriver服务
* @var bool
*/
protected sta... | true |
06e2fc2220dcb23538a749abf281476430e58dee | PHP | Nebo15/mbank.tests | /src/MBank/Services/MBankAPIService.php | UTF-8 | 6,190 | 2.671875 | 3 | [] | no_license | <?php
namespace MBank\Services;
class MBankAPIService
{
protected $client;
protected $api_url = 'https://www.synq.ru/mserver2-dev/';
protected $admin_login = 'reaper';
protected $admin_password = 'AefGYU7343';
public function __construct()
{
$this->client = new \GuzzleHttp\Client();
$this-... | true |
b5c6da22a78015e56cc15f9e285fbe6c7efa8b0d | PHP | rayanechaoub/Manipulation | /PhpClient/src/phpClient.php | UTF-8 | 409 | 2.671875 | 3 | [] | no_license | <?php
$mt=$_GET['mt'];
$clientSOAP = new SoapClient("http://localhost:8686/?wsdl");
$param= new stdClass();
$param->mt=$mt;
$res=$clientSOAP->__soapCall("convertir", array($param));
?>
<html>
<form action="phpClient.php" method="get">
<input type="text" name="mt"> </input>
<button> Convertir </button>
... | true |
8bdd9238b7cf699ab37553e9d93fa0a44de0cbd8 | PHP | LucasPires50/php_alura_primeiros_passos | /primeriosPassos/operacoesMat.php | UTF-8 | 228 | 3.53125 | 4 | [] | no_license | <?php
$idade = 21;
$idadeDaqui10Anos = $idade + 10;
$idadeHa5Anos = $idade - 5;
$soma = 2 + 2;
$subtracao = 2 - 2;
$multiplicacao = 2 * 2;
$divisao = 2 / 2;
$potencia = 2 ** 3;
$restaDaDivisao = 10 % 3;
echo $restaDaDivisao; | true |
f6bfca16006e1ff29b5440164b9140c6b2a4891f | PHP | ArnoBrusman/gaminizer | /app/Http/Controllers/RestApi/ClassesController.php | UTF-8 | 1,779 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Controllers\RestApi;
use Gaminizer\CharacterClass;
class ClassesController extends RestApiController
{
//-----------------------------------------------------
// Getters
//-----------------------------------------------------
function index()
{
$response... | true |
8555aab81349f7b17e53e0da0e9ac1f541146db5 | PHP | tino6225/MoobysDatabase | /Moobys Restaurant Database/files/brian files/includes/menu.inc.php | UTF-8 | 1,120 | 2.609375 | 3 | [] | no_license | <div class="table-responsive">
<table class="table table-striped">
<thead>
<tr>
<th>ID</th>
<th>Name</th>
<th>Price</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<?php
if (!($stmt = $mysqli->prepare("SELECT M... | true |
d1185668a9c853ff32f21afa4382e042cdbf0072 | PHP | giannini5/fields | /trunk/src/lib/model/fields/field.php | UTF-8 | 6,584 | 2.96875 | 3 | [
"MIT"
] | permissive | <?php
/**
* This file contains Model_Fields_Field
*/
/**
* Model_Fields_Field class
*/
class Model_Fields_Field extends Model_Fields_Base implements SaveModelInterface {
public $m_facility;
/**
* @brief: Constructor
*
* @param $facility - Model_Fields_Facility instance
* @param $id - ... | true |
00a26bf12235a59a8359e00788f0b788170ed708 | PHP | LFValio/aprendendo-php-iniciante | /www/aula-17-funcoes-string-em-php-parte-2/21-substr_count.php | UTF-8 | 533 | 2.984375 | 3 | [
"MIT"
] | permissive | <!DOCTYPE html>
<html lang="pt-br">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="../_css2/estilo.css"/>
<title>Curso em Vídeo - PHP</title>
</head>
<body>
<div>
<?php
$nome = "Estou aprendendo P... | true |
f4eb5101045fe57725bff8c1055c4ffb6462a555 | PHP | sedoyehoue/HMED | /_framework/class/class.permalinks.php | UTF-8 | 911 | 2.921875 | 3 | [] | no_license | <?php
class Permalinks
{
private $site_path;
public function __construct($site_path){
#code ...
}
public function __toString(){
return $this->site_path;
}
public static function site_path($site_path){
self::removeSlash($site_path);
}
public static function removeSlash($x)... | true |
e4082cc2cf22797e2684887d08103d5d6f921cfa | PHP | haithemhcini/back-end | /app/Http/Controllers/RecordsApiController.php | UTF-8 | 1,231 | 2.609375 | 3 | [] | no_license | <?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Record;
class RecordsApiController extends Controller
{
//Display a listing of the resource.
public function index()
{
return Record::all();
}
//Store a newly created resource in storage.
public functi... | true |
d99b2010468c713d7148f4d0124909ec4fe234bc | PHP | Projeto-HEiMDaLL/projeto-heimdall | /projeto_assistant.php | UTF-8 | 2,259 | 2.859375 | 3 | [] | no_license | <?php
if($_POST){
$target_dir = "uploads/";
$target_file = $target_dir . basename($_FILES["chave_json"]["name"]);
$uploadOk = 1;
$fileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION));
if (!file_exists($target_dir)) {
mkdir($target_dir, 0777, true);
... | true |
781dafbd28792d4d08b1a5b32745f24b7ce59f1f | PHP | mateusjatenee/programming-exercises | /project-euler/001/PHP/solution.php | UTF-8 | 210 | 4.0625 | 4 | [] | no_license | <?php
function sumAllMultiples(int $limit): int
{
$sum = 0;
foreach (range(0, $limit - 1) as $i) {
if ($i % 3 == 0 || $i % 5 == 0) {
$sum += $i;
}
}
return $sum;
}
| true |
c803072c39a94a98666e63c53b70681e8c201f7c | PHP | gorbunov/advent-of-code | /2019/shared/Validator/Rules/HasDoubleDigits.php | UTF-8 | 518 | 3.125 | 3 | [] | no_license | <?php declare(strict_types=1);
namespace Validator\Rules;
final class HasDoubleDigits implements Validation
{
public function validate(int $value): bool
{
$digits = str_split((string)$value, 1);
for ($pos = 1, $digitsCount = count($digits); $pos < $digitsCount; $pos++) {
if ($digit... | true |
f3f0d09a5e2b8aa0da8d15676eb1bfa9875528de | PHP | wolfy12345/zb-backend | /application/play/controller/Pingzi.php | UTF-8 | 1,713 | 2.59375 | 3 | [
"Apache-2.0"
] | permissive | <?php
/**
* 彩色瓶子表白生成器
*
* @author chenfenghua<843958575@qq.com>
* @copyright Copyright 2014-2017
* @version 2.0
*/
namespace app\play\controller;
use think\Request;
class Pingzi
{
/**
* 入口页
*/
public function index()
{
$this->data['title'] = '彩色瓶子表白生成器';
$this->rende... | true |
3e8dee9f1ad4d67763d43dec6ea999ee8f5c8c95 | PHP | arsen-aliev/tonic-health-test-task | /RefTrackerBundle/Entity/RefCode.php | UTF-8 | 1,477 | 2.5625 | 3 | [] | no_license | <?php
namespace Ars\RefTrackerBundle\Entity;
use Doctrine\ORM\Mapping as ORM;
use FOS\UserBundle\Model\User as AbstractUser;
/**
* RefCode
*
* @ORM\Table()
* @ORM\Entity()
*/
class RefCode
{
/**
* @var integer
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValu... | true |
a422af8d96dcb6ef1ab23b2404bcf46418921bab | PHP | rs-saunders/demo-news-scraper | /src/Demo/NewsScraper/NewsScraper.php | UTF-8 | 832 | 3.25 | 3 | [] | no_license | <?php
namespace Demo\NewsScraper;
use Symfony\Component\DomCrawler\Crawler;
/**
* Privides helper methods for news scraper classes
*
* @author Richard Saunders
*
*/
abstract class NewsScraper {
/**
* Returns a Crawler instance for the given html
*
* @param string $html
* @return \Symfony\Component\D... | true |
eeac029a4ca2938600fa0e7ecaef1c796079e70c | PHP | butschster/sputnik | /modules/Mysql/ValueObjects/Database.php | UTF-8 | 1,490 | 3.21875 | 3 | [] | no_license | <?php
namespace Module\Mysql\ValueObjects;
class Database
{
/**
* @var string
*/
protected $name;
/**
* @var User
*/
protected $user;
/**
* @var string|null
*/
protected $characterSet;
/**
* @var string|null
*/
protected $collation;
/**
... | true |
f20b3bd1d66ec0b17d535a739fa65be6813d4ab9 | PHP | bodii/test-code | /PHP/Learning_PHP_Design/05MySQL与PHP设计模式/13_.php | UTF-8 | 3,088 | 3.359375 | 3 | [] | no_license | <?php
/*
【 使用SPL实现观察者模式 】
可用于观察者设计模式的3个SPL接口/类:
SplSubject
SplObserver
SplObjectStorage
*/
/* SplObjectStorage类最重要的方法是内置attach()和detach()方法,利用这两个方法
,可以很容易地指定哪些观察者将“订阅”和“解除订阅”更新通知
*/
class ConcreteSubject implements SplSubject
{
private $observers;
private $data;
public function set... | true |
74af983c7988f4318bc632f9e3bada0485862f29 | PHP | Nivesh-2/Login-Page | /signup.php | UTF-8 | 2,378 | 3 | 3 | [] | no_license | <?php
$msg = '';
$msgClass = '';
if(filter_has_var(INPUT_POST, 'creat')){
$email = htmlspecialchars($_POST['email']);
$password = htmlspecialchars($_POST['pass']);
$conPass = htmlspecialchars($_POST['pass-con']);
if(!empty($email) && !empty($password) && !empty($conPass)){
if(strlen($password) < 6){
... | true |
d4d2009391c6fe90fa89958323e25534039c8d50 | PHP | nemundo/iso | /src/Content/Country/CountryContentType.php | UTF-8 | 2,210 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
namespace Nemundo\Iso\Content\Country;
use Nemundo\Content\Index\Tree\Com\Form\ContentSearchForm;
use Nemundo\Content\Type\AbstractContentType;
use Nemundo\Content\Type\AbstractSearchContentType;
use Nemundo\Iso\Data\Country\Country;
use Nemundo\Iso\Data\Country\CountryCount;
use Nemundo\Iso\Data\Country\Countr... | true |
d80eec35f901dda7ecd5ac2c383686310b5a3a93 | PHP | JulienLeforestier/Room | /admin/gestion_commandes.php | UTF-8 | 3,567 | 2.796875 | 3 | [] | no_license | <?php
require_once('../inc/init.php');
$title = 'Gestion des commandes';
if (!isAdmin()) {
header('location:' . URL . 'compte.php');
exit();
}
if (isset($_GET['action']) && $_GET['action'] == 'delete' && !empty($_GET['id_commande']) && is_numeric($_GET['id_commande'])) {
// delete en BDD
execRequete... | true |
97fc99bde9550be21f8f6698c13ef6a28d54bd8e | PHP | olive007/swad | /src/Swad/Modeler/Provider/Css.php | UTF-8 | 5,718 | 2.828125 | 3 | [] | no_license | <?php
namespace Modeler\Provider;
use Pimple\Container;
use Pimple\ServiceProviderInterface;
use Modeler\Color;
use Modeler\Font;
class Css implements ServiceProviderInterface {
// Attribute
private $app;
private $scssc;
private $htmlClass;
/**
* @param Container $container
*/
public function register... | true |
b2cf512c7ee3fc446dfe2abdb60d9a1eb937013c | PHP | lanlangdeai/WebTool | /src/EncryptDecrypt.php | UTF-8 | 1,862 | 3 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace WebTool;
/**
* 常用加解密方法
* X-Wolf
* 2019-1-12
*/
class EncryptAndDecrypt
{
/**
* 加解密算法
* @param string $string 加密数据
* @param string $rand 加密随机字符串
* @param string $action 加解密方式标识
* @return string 加解密之后数据
*/
public static function mymd5... | true |
0f71dc91c539d5b0b2bd3b84b0cd88265fc4f10a | PHP | bronco-one/blog_przyklady | /php_Labs/stale/konwerter2.php | UTF-8 | 895 | 3.265625 | 3 | [] | no_license | <?php
class Konwerter2 {
const JEDNOSTKA =['MILA'=>1.609,/*km*/
'JARD'=>91.44,/*cm*/
'STOPA'=>30.48,/*cm*/
'CAL'=>2.54 /*cm*/];
public function __construct() {
}
public function konwerter($jednostka,$wartosc) {
... | true |
5c1fa2dc626f86a0056bce29e7bad2ebec9247bf | PHP | SEJeff/mango | /www/new_ftpmirror.php | UTF-8 | 2,868 | 2.53125 | 3 | [] | no_license | #!/usr/bin/php-cgi
<?php
require_once("../lib/page.php");
require_once("../lib/ftpmirror.php");
define('STYLESHEET', 'new_ftpmirror.xsl');
define('SESSIONID', 'new_ftpmirror');
define('GROUP', 'sysadmin');
class NewFTPMirror {
// Details for the ftpmirror being created
var $ftpmirror;
function NewFTPMirror() {
... | true |
238ca7760086b836c5b9014ea77faf4ba31a707f | PHP | RodrigoSchmitz/PokeApi | /src/Controllers/PokemonController.php | UTF-8 | 956 | 2.5625 | 3 | [
"MIT"
] | permissive | <?php
require 'env.php';
use Silex\Application;
use Symfony\Component\HttpFoundation\Response;
$pokemon = $app['controllers_factory'];
$pokemon->get('/{id}', function($id, Application $app){
if(is_null($id))
return new Response('Não foi passado nenhum parametro de busca', 403);
return new Response(getPokemonByI... | true |
12e276c8368d500cc2a84e138260d60eba12eee5 | PHP | makcent/1688sdk | /src/cn/alibaba/open/param/CaigouDomainProductProductAttribute.class.php | UTF-8 | 3,232 | 2.71875 | 3 | [] | no_license | <?php
include_once ('com/alibaba/openapi/client/entity/SDKDomain.class.php');
include_once ('com/alibaba/openapi/client/entity/ByteArray.class.php');
class CaigouDomainProductProductAttribute extends SDKDomain {
private $name;
/**
* @return 属性名
*/
public function getName() {... | true |
6309e531d0b7b69a908a1fbb18e5203556621715 | PHP | whoamedia/api.turboship.com | /database/seeds/IntegrationSeeder.php | UTF-8 | 659 | 2.515625 | 3 | [] | no_license | <?php
use Illuminate\Database\Seeder;
use \App\Utilities\IntegrationUtility;
class IntegrationSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('Integration')->insert(
$this->getIntegrations()
);
... | true |
afd156fdb0d67bcb5f0aab5a15a9373c3571d3f7 | PHP | DISCOOS/rescue-me | /src/classes/RescueMe/AbstractModule.php | UTF-8 | 7,890 | 2.9375 | 3 | [
"BSD-2-Clause"
] | permissive | <?php
/**
* File containing: AbstractModule class
*
* @copyright Copyright 2015 {@link http://www.discoos.org DISCO OS Foundation}
*
* @since 01. March 2015
*
* @author Kenneth Gulbrandsøy <kenneth@discoos.org>
*/
namespace RescueMe;
use Exception;
use Psr\Log\LogLevel;
use RescueMe\Log\Logger;
use RescueMe\L... | true |
83df991f821ac3d507ad38ddd7eb11dc98e505e7 | PHP | TanguyScholtes/Oufti | /src/edit_profile.php | UTF-8 | 2,418 | 2.703125 | 3 | [] | no_license | <?php
require 'config.php';
if(isset($_SESSION['id']))
{
$usermodel= new User;
$user = $usermodel -> getUser( $_SESSION['id'] );
if(isset($_POST['newpseudo']) && $_POST['newfirstname'] && $_POST['newname'] && $_POST['newmail']){
if(isset($_POST['newpsw'])){
if($_POST['newpsw']==$_POST[... | true |
3d09404da5a18d180e94c430bb501c8c8ea77876 | PHP | iouaydah/eduplaycloud_v1 | /app/Http/Requests/ExercisesetRequest.php | UTF-8 | 2,078 | 2.515625 | 3 | [] | no_license | <?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Support\Facades\Lang;
class ExercisesetRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
*
* return bool
*/
public function authorize()
{
... | true |
755d6564e82eb165534f25562937420476032358 | PHP | rockman84/yii2-starter | /client/google/Client.php | UTF-8 | 1,134 | 2.546875 | 3 | [
"Apache-2.0"
] | permissive | <?php
namespace sky\yii\client\google;
use yii\base\Component;
use Yii;
/**
* Class Google
* @package common\components\google
*
* @property GoogleCalendar $calendar
*/
class Google extends Component
{
private $_calendar;
public $authConfig = '@app/config/googleServiceAccount.json';
public $appNam... | true |
96faf5cedb6914b9ad1c7bbd5778361309149f82 | PHP | hacky1610/valsnaturalyourney | /wp-content/plugins/shop-notify/private/adapter/WpAdapter.php | UTF-8 | 1,957 | 2.53125 | 3 | [] | no_license | <?php
include_once dirname( __FILE__ ) . '/../logger.php';
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
class WpAdapter {
/**
* Action argument used by the nonce ... | true |
ceec1e543a0582da47fb567e6f73c064936c0648 | PHP | LeonardoMoura04/NUASP | /Desenvolvimento/NUASP/php/nuasp/aluno/activate.php | UTF-8 | 906 | 2.640625 | 3 | [] | no_license | <?php
include_once '../config/database.php';
include_once '../objects/aluno.php';
$database = new Database();
$db = $database->getConnection();
$aluno = new Aluno($db);
// Setar o Id que será ativado
$aluno->id = isset($_GET['id']) ? $_GET['id'] : die();
// Setar val... | true |
a4f7fc02febba350d431d24ef09f1ded5e8d0ff2 | PHP | jackGetDev/Basic-log-php | /Basic_log.php | UTF-8 | 420 | 2.703125 | 3 | [] | no_license | <?php
date_default_timezone_set('Asia/Jakarta');
$user="user";
$date=date("Y-m-d h:i:sa");
echo "Created_at : ".$date;
echo "\n";
$role="admin";
$pass="pass";
if($role=="admin" && $pass=="pass"){
echo "Created_by : ".$role; echo "\n";
}
else if($role=="user"){ ... | true |
bee8211aa3ec4b947ed325d90fa1dc54a7f3aa68 | PHP | ed2321/gestor-documental | /app/models/DTO/documentosMetadata.php | UTF-8 | 502 | 2.84375 | 3 | [] | no_license | <?php
namespace App\Models\DTO;
class documentosMetadata {
private $_id_doc_meta;
private $_name_meta;
function __construct($name_meta) {
$this->_name_meta = $name_meta;
}
function set_id_doc_meta($id_doc_meta) {
$this->_id_doc_meta = $id_doc_meta;
}
function get_id_doc_meta() {
... | true |
149cd8e1d812a620a7f804acc17c9dc11fc362cf | PHP | colinblack/game_server | /fmh5_m/tools/readRank.php | UTF-8 | 974 | 2.65625 | 3 | [] | no_license | <?php
header("Access-Control-Allow-Origin: *");
date_default_timezone_set('Asia/Shanghai');
//判断参数是否存在
/*
type:1 等级排行榜
type:2 繁荣度排行榜
type:3 累积被点赞排行榜
type:4 昨日金币收入排行榜
type:5 近七天金币收入排行榜
type:6 近三十天金币收入排行榜
*/
if (!array_key_exists('type', $_GET))
{
throw new Exception("need param ... | true |
ecc62c04c2fde2b46c65725616e056fc094812c8 | PHP | CarlosVega250/sfgym | /php/clientes/get-datos-cliente.php | UTF-8 | 1,326 | 2.5625 | 3 | [] | no_license | <?php
include '../conexion.php';
$conex = $conn;
$array = array();
try {
$idC = $_POST["id-cliente"];
$preparar = "SELECT nombre_cliente, apellido_paterno, apellido_materno, edad, numero, colonia, Id_Genero,
calle, numero_exterior, numero_interior
FROM Clientes, Telefono... | true |
35d3993f190545e4082c13710abd23053f1515f4 | PHP | teymur-valiyev/api | /www/app/Models/AbstructModel.php | UTF-8 | 1,506 | 3.03125 | 3 | [
"MIT"
] | permissive | <?php
namespace Models;
class AbstructModel {
protected $tableName;
protected $primaryField;
protected $fileds = [];
private $connection;
public function __construct() {
$this->connection = \Core\Database::getConnection();
}
public function getConnection() {
return $this->connection;
}
pu... | true |
65ce392bb44aff275c0772ba651b820818d698b4 | PHP | mithila1422/learning-web-technologies-summer-2020-2021-sec-A | /lab_tasks_4_php_from/TASK5/B/FROM5_B.php | UTF-8 | 840 | 2.6875 | 3 | [] | no_license | <?php
$degree ="";
if(isset($_POST['Submit'])){
$degree=$_POST['degree'];
if($degree==""){
echo"invalid degree!";
}
else{
echo'invalid request';
}
}
?>
<!DOCTYPE html>
<head>
<title>ASSESSMENT TASK</title>
</head>
<b... | true |
40c0bd2fd0c7b110a30242c3009b67ce581958cf | PHP | alldeads/connectioncoin | /app/StoryImage.php | UTF-8 | 618 | 2.59375 | 3 | [
"MIT"
] | permissive | <?php
namespace App;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\Storage;
class StoryImage extends Model
{
protected $fillable = [
'story_id',
'filepath'
];
public function story()
{
return $this->belongsTo('App\Story');
}
public function ... | true |
d705fd8e03154f944bd9cc72c95eee2d64082067 | PHP | artem-bazykin-ddi/example-code | /Services/PushService/PushNotificationService.php | UTF-8 | 3,871 | 2.734375 | 3 | [] | no_license | <?php
declare(strict_types=1);
namespace App\Services\PushService;
use App\Models\ContentItem;
use App\Models\Interfaces\ContentItemTypeInterface;
use App\Services\Azure\NotificationHubService\NotificationHubService;
use App\Services\PushService\Types\NotificationInterface;
use LogicException;
use RuntimeException;
... | true |
46cbcccf92d8b1eaadb8030f2550555b1d374bbf | PHP | iwemuiser/VerhalenLinker | /plugin.php | UTF-8 | 2,962 | 2.625 | 3 | [] | no_license | <?php
add_filter(array('Display', 'Item', 'Dublin Core', 'Type'), 'my_type_link_function');
add_filter(array('Display', 'Item', 'Item Type Metadata', 'Text'), 'my_text_link_function');
function get_type_info($search_string)
{
$instance = Omeka_Context::getInstance();
# $db = get_db();
$db = $instance->get... | true |
76485609ac1bce561cbf5206198961cb10cfcef0 | PHP | gourisnair/Calculator | /info.php | UTF-8 | 628 | 2.9375 | 3 | [] | no_license | <html>
<head>
<title>Sum</title>
</title>
<style>
body{
background-color:lightblue;
}
h1{
color:white;
text-align:center;
}
</style>
</head>
<body>
<h1>ADD TWO NUMBERS</h1>
<form action ="" method ="GET">
Number1:<input type="number" placeholder ="first number" name ="n1">... | true |
78f3e3e2e84dfaf4fc2773c50ad1e917eeea825e | PHP | rborges/PDO | /vendor/framework/Model/Table.php | UTF-8 | 7,442 | 3.140625 | 3 | [] | no_license | <?php
namespace framework\Model;
use App\Model\IDao;
/**
* @Description of Table
* Classe responsavél por gerenciar o CRUD básico
* @author Rodrigo Borges
*/
class Table implements IDao
{
protected $db;
protected $table;
public function __construct($table)
{
$this->db = Config::getDa... | true |
91f482181b17fb7e51a4b4e056d8dfb08878b7d4 | PHP | matthillman/schwartz | /app/Console/Commands/PullUnits.php | UTF-8 | 2,414 | 2.640625 | 3 | [] | no_license | <?php
namespace App\Console\Commands;
use DB;
use App\Unit;
use App\Zeta;
use Illuminate\Console\Command;
class PullUnits extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'swgoh:units';
/**
* The console command des... | true |
e6e42a847a7565548fbb290952b945f4058d86a7 | PHP | oboynitro/flexy-orm | /example.php | UTF-8 | 1,751 | 2.890625 | 3 | [] | no_license | <?php
require_once "./vendor/autoload.php";
require_once "./src/FlezyORM.php";
use Oboynitro\FlezyORM\FlezyORM;
$db = new FlezyORM();
$db->createConnection("localhost", "root", "", "test");
echo "<pre>";
// TODO: selecting data
// methods {distinct, }
//$db->table("users");
// fetching all data
// print_r($db-... | true |
534c56f6275e034a5664af29931899872aaf5b65 | PHP | athlan/biai-crawler | /module/Application/src/Application/Model/Util/AbstractWebContentGrabberModel.php | UTF-8 | 1,752 | 2.640625 | 3 | [] | no_license | <?php
namespace Application\Model\Util;
class AbstractWebContentGrabberModel implements \Zend\ServiceManager\ServiceLocatorAwareInterface
{
use \Application\Util\CliOutput;
use \Application\Util\ServiceLocatorInterfaceImpl;
public function createCache() {
return $this->getServiceLocator()->get... | true |
90edcf41a04485e6f121b51ad80576eb2a537eff | PHP | CentaureChris/Gamestore | /models/Console.php | UTF-8 | 2,323 | 3.34375 | 3 | [] | no_license | <?php
class Console{
private $id;
private $image;
private $marque;
private $type;
private $modele;
private $prix;
private $quantite;
private $capacite;
private $nbrarticle;
public function __construct()
{
$this->marque = new Marque;
$this->type = new Type;
}
/**
* Get the value of id
*/
... | true |
06e857ca42464707beabc61fd8c7872d88591a98 | PHP | siwaphol/newhw_theme | /app/Http/Requests/AsistantRequest.php | UTF-8 | 1,096 | 2.578125 | 3 | [
"MIT"
] | permissive | <?php namespace App\Http\Requests;
use App\Http\Requests\Request;
use Illuminate\Contracts\Validation\Validator;
use DB;
use App\Http\Requests\Input;
class AsistantRequest extends Request {
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public functio... | true |
e68f4cfdb569bbbf9f724afdfae3d382bb0eb098 | PHP | bnk4455/bnk4455.github.io | /tem.php | UTF-8 | 904 | 2.53125 | 3 | [] | no_license | <!--<link rel="stylesheet" href="main.css"> -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<div class="container">
<h1>Fahrenheit to Celsius</h1>
<h4... | true |
010d0b65ff7dc00ba67b1223edd35f4b680f4642 | PHP | hetaldobariya/timestamp | /index.php | UTF-8 | 2,009 | 3.5 | 4 | [] | no_license | <?php
include 'db.php';
$query = mysqli_query($db, 'SELECT * FROM contact');
?>
<table>
<?php
while($row = mysqli_fetch_array($query,MYSQLI_ASSOC))
{
?>
<tr>
<td><?php echo $row['name']; ?></td>
<td><?php echo $row['email']; ?></td>
<td><?php echo $row['message']; ?></td>
<?php
$session_time = $row['create... | true |
43095421703e5be0bf75e3f1806720ffe4585855 | PHP | radoshordos/sautoppc | /11application/modules/sklik/models/map/Api2campaign.php | UTF-8 | 3,091 | 2.65625 | 3 | [] | no_license | <?php
class Sklik_Model_Map_Api2campaign {
protected $_status;
protected $_dayBudget;
protected $_totalBudget;
protected $_premiseId;
protected $_exhaustedDayBudget;
protected $_name;
protected $_createDate;
protected $_exhaustedTotalClicks;
protected $_totalClicks;
protected $... | true |
deef0bccf91a1f27bd91b2ae928a3210aa6127df | PHP | k-bigboss99/PHP-MySQL | /本書範例程式/samples/ch15/news/show_news.php | UTF-8 | 4,055 | 2.890625 | 3 | [] | no_license | <!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>娛樂討論區</title>
<script type="text/javascript">
function check_data()
{
if (document.myForm.author.value.length == 0)
alert("作者欄位不可以空白哦!");
else if (document.myForm.subject.value.length == 0)
... | true |
9b84320dbe0757c7fbf0a83ba4a68fa07da866eb | PHP | alexislesa/CubePHP | /includes/templates/noticia/objetos/galeria-inc-more-lightbox.inc.php | ISO-8859-1 | 3,159 | 2.5625 | 3 | [] | no_license | <?php
/**
* ***************************************************************
* @package GUI-WebSite
* @access public
* @author Alexis Lesa
* @copyright Advertis Web Factory
* @licence Comercial
* @version 1.0
* @revision 24.08.2010
* **************************************************************... | true |
1040a18edaaf6c955e227c494026d3440a2c1526 | PHP | ronalvique/ClinicaDental | /includes/functions.php | UTF-8 | 3,137 | 2.828125 | 3 | [] | no_license | <?php
/*
* Funcion que devuelve el url del site
* ejemplo http://clinicadental/
*/
function siteURL()
{
$protocol = 'http://';
$domainName = $_SERVER['HTTP_HOST'].'/';
return $protocol.$domainName;
}
define( 'SITE_URL', siteURL() );
/*
* Funcion para incluir el script
* de validacion de jquery. El cu... | true |
6e7d1c0abe5debe303aa91e182e28546b418b3a5 | PHP | Farruggia27/hello | /risposta.php | UTF-8 | 3,510 | 2.9375 | 3 | [] | no_license | <?php
function contrpass($login, $pass)
{
if (($login=='mamma') and ($pass=='ciao'))
{
echo"Password corretta <br> puoi entrare <br><br> $login $pass";
}
else
{
echo"Login o Password SBAGLIATA";
};
}
function dati($nome, $cognome, $data,$giorno,$mese,$anno,$indirizzo,$email)
{
$j=true;
$date = strtotime($d... | true |
ffcd172f719788e8c2fb93d678ff186101d99814 | PHP | bluestar0505/LaraSubscribtion | /app/Models/Agent.php | UTF-8 | 1,081 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Agent extends Model
{
protected $table = 'agents';
protected $commisionTypes = [
'flat' => 'Flat rate',
'percentage' => 'Percentage',
];
protected $fillable = [
'remote_id',
'name',
'is_active',
'email',
'phone',
'address',... | true |
01716d7db025f5fed1baa052db292551898a36d6 | PHP | neogazebo/panel | /models/CompanyCategory.php | UTF-8 | 2,001 | 2.640625 | 3 | [
"BSD-3-Clause"
] | permissive | <?php
namespace app\models;
/**
* This is the model class for table "tbl_company_category".
*
* @property integer $com_category_id
* @property string $com_category
* @property integer $com_parent_category_id
* @property string $com_icon
* @property string $com_category_type
*/
class CompanyCategory extends \y... | true |
fbb0e9d7b24eff6d3e8cc9b547291ac8096a0db9 | PHP | lukaswhite/token-strings | /src/Substitutor.php | UTF-8 | 5,635 | 3.46875 | 3 | [] | no_license | <?php
namespace Lukaswhite\TokenStrings;
/**
* Class Substitutor
*
* This class replaces tokens within a string at runtime.
*
* For example, suppose you have the following string:
*
* Dear [[FORENAME]] [[SURNAME]],
*
* The idea is that you can provide the forename and surname at runtime, e.g.
*
* [
* 'FO... | true |
8e2c25a5a1729af5aaf53f6f76f86e053682b803 | PHP | AxelDevelop/All_Programming_Code | /PHP/Functions/Function_Parameters/Argumentos_predeterminados.php | UTF-8 | 537 | 3.78125 | 4 | [] | no_license | <!-- Default arguments can be defined for the function arguments.
In the example below, we're calling the function setCounter(). There are no arguments, so it will take on the default values that have been defined. -->
<?php
function setCounter($Num = 10){
echo "Counter is ".$Num;
}
setCounter(42... | true |
9d4d3fff9730ba505b50278bcc23def59f6245a1 | PHP | kunalmestri9/laurus-file | /com/laurus/core/service/api/IFileManagerService.inc | UTF-8 | 487 | 2.796875 | 3 | [] | no_license | <?php
/**
*
* @author kunal.mestri
*/
interface IFileManagerService {
const FILER_CONFIGURATION_PATH="FILER_CONFIGURATION_PATH";
public function init($config);
public function createFileStoragePath();
public function createFolder($folderName);
public function createFile($filepath,$type)... | true |
05fa47e44bbb6d8ec984fdd4ae458a0634462777 | PHP | Tjoosten/Lissar | /app/Http/Controllers/ProductsController.php | UTF-8 | 2,972 | 2.65625 | 3 | [
"MIT"
] | permissive | <?php
namespace App\Http\Controllers;
use App\Http\Requests\ProductValidator;
use App\Repositories\ProductRepository;
use Illuminate\Http\{RedirectResponse, Response};
use Illuminate\View\View;
/**
* Class ProductsController
*
* @package App\Http\Controllers
*/
class ProductsController extends Controller
{
p... | true |
63c1cc62ad03dd40cab1ca6c712fa931edb81261 | PHP | mkhabelaj/budget | /classes/Photos.php | UTF-8 | 511 | 2.6875 | 3 | [] | no_license | <?php
/**
* Created by PhpStorm.
* User: JacksonM
* Date: 2017-01-20
* Time: 01:29 PM
*/
require_once ("../interfaces/Include.php");
class Photos implements IncludeStatement
{
public $url = "";
public $user_id = 0;
public $status = "";
public function __construct($url,$user_id,$status)
{
... | true |