EIOS/integration/inc/class_CHPU.php

28 lines
799 B
PHP
Raw Normal View History

2023-12-28 15:39:22 +03:00
<?php
class class_CHPU{
public $UParts = array();
public $workDIR = '';
function __construct($WorkDIR=''){
$this->workDIR = $WorkDIR;
$this->init();
}
function init(){
$urlparts = explode( "/", $_SERVER['REQUEST_URI'] );
$wd = str_replace('/','',$this->workDIR);
foreach($urlparts as $k => $v){
if($v!=''&&$v!=$wd) {
//для страничной навигации уберем p
if($v[0]=='p'&&is_numeric($v[1])) {
$v = str_replace('p','',$v);
$this->UParts['navpage'] = $v;
}else{
$this->UParts[] = $v;
}
}
}
}
public function uri(){
return $this->UParts;
}
}