vici admin them

Any and all non-support discussions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

vici admin them

Postby mattyou1985 » Fri Apr 28, 2017 7:07 pm

first of thanks you to the creator

fperdomo wrote:Hello @mflorell and vici forum, i find a way with just one field require to change all the design of the vicidial admin using jquery and boostrap css. I almost finish with this implmentation, when i finish i will share with you
https://github.com/masterfermin02/vici-admin-them
Image
Image
Image


now ive started this thred as i need to ask some questions on the matter..

i did coppy the vici-admin-them to /root and to /usr/src/astguiclient/trunk/www

then coppyed the require("vici-admin-them/template.php"); to admin.php

require("dbconnect_mysqli.php");
require("functions.php");
require("vici-admin-them/template.php");

then did cd /usr/src/astguiclient/trunk

perl install.pl

then loged in to vici but all i got is a wight screen ... now ime stuk eney thorts ?
mattyou1985
 
Posts: 111
Joined: Tue Apr 19, 2016 3:30 pm

Re: vici admin them

Postby fperdomo » Sun Apr 30, 2017 11:35 am

Hello matt, thanks.
the was some an issue, i have fixed now and there is new instructions so you need to pull to get new changes:
new instructions:
1. open admin.php
2. look for vicidial auth
```
Code: Select all
if ($user_auth > 0)

```
3. add after the if $user_auth add
```
Code: Select all
require("vici-admin-them/template.php");

```
4. on each file you like the new design you need to add this line after the vicidial auth
For example: user_status.php, AST_agent_time_sheet.php, user_stats.php
```
Code: Select all
require("vici-admin-them/template.php");

```
fperdomo
 
Posts: 3
Joined: Fri May 20, 2016 8:43 pm

Re: vici admin them

Postby mattyou1985 » Sun Apr 30, 2017 7:05 pm

fperdomo wrote:Hello matt, thanks.
the was some an issue, i have fixed now and there is new instructions so you need to pull to get new changes:
new instructions:
1. open admin.php
2. look for vicidial auth
```
Code: Select all
if ($user_auth > 0)

```
3. add after the if $user_auth add
```
Code: Select all
require("vici-admin-them/template.php");

```
4. on each file you like the new design you need to add this line after the vicidial auth
For example: user_status.php, AST_agent_time_sheet.php, user_stats.php
```
Code: Select all
require("vici-admin-them/template.php");

```



cool well i gave it a go and failed ....

vicibox*1:~ # git clone git@github.com:masterfermin02/vici-admin-them.git
Cloning into 'vici-admin-them'...
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists. <<<<< no matter ill FTP it


cd to your vicidial root dir <<< you mean /root .... or .... /usr/src/astguiclient/trunk/www/vicidial

well ither way i added it to both..... by FTP

look for vicidial auth "if ($user_auth > 0)" <<< found it


if ($user_auth > 0)require("vici-admin-them/template.php");
{
$stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 7;";
if ($DB) {echo "|$stmt|\n";}
$rslt=mysql_to_mysqli($stmt, $link);
$row=mysqli_fetch_row($rslt);
$auth=$row[0];

did i add it to the right place ???

moved admin.php to server

cd /usr/src/astguiclient/trunk
perl install.pl

then login to server .... wight page agen ...
mattyou1985
 
Posts: 111
Joined: Tue Apr 19, 2016 3:30 pm

Re: vici admin them

Postby fperdomo » Mon May 01, 2017 10:02 am

this will give you an error
Code: Select all
if ($user_auth > 0)require("vici-admin-them/template.php");
{

you must place after the else of the auth
must look like this
Code: Select all
if ($user_auth > 0)
{
   $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 7 and api_only_user != '1';";
   if ($DB) {echo "|$stmt|\n";}
   $rslt=mysql_to_mysqli($stmt, $link);
   $row=mysqli_fetch_row($rslt);
   $auth=$row[0];

   $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 6 and view_reports='1' and api_only_user != '1';";
   if ($DB) {echo "|$stmt|\n";}
   $rslt=mysql_to_mysqli($stmt, $link);
   $row=mysqli_fetch_row($rslt);
   $reports_auth=$row[0];

   $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 1 and qc_enabled='1' and api_only_user != '1';";
   if ($DB) {echo "|$stmt|\n";}
   $rslt=mysql_to_mysqli($stmt, $link);
   $row=mysqli_fetch_row($rslt);
   $qc_auth=$row[0];

   $reports_only_user=0;
   $qc_only_user=0;
   if ( ($reports_auth > 0) and ($auth < 1) )
   {
      $ADD=999999;
      $reports_only_user=1;
   }
   if ( ($qc_auth > 0) and ($reports_auth < 1) and ($auth < 1) )
   {
      if ( ($ADD != '881') and ($ADD != '100000000000000') )
      {
         $ADD=100000000000000;
      }
      $qc_only_user=1;
   }
   if ( ($qc_auth < 1) and ($reports_auth < 1) and ($auth < 1) )
   {
      $VDdisplayMESSAGE = _QXZ("You do not have permission to be here");
      Header ("Content-type: text/html; charset=utf-8");
      echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
      exit;
   }
}
else
{
   $VDdisplayMESSAGE = _QXZ("Login incorrect, please try again");
   if ($auth_message == 'LOCK')
   {
      $VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes");
      Header ("Content-type: text/html; charset=utf-8");
      echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
      exit;
   }
   Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
   Header("HTTP/1.0 401 Unauthorized");
   echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n";
   exit;
}
require("vici-admin-them/template.php");
fperdomo
 
Posts: 3
Joined: Fri May 20, 2016 8:43 pm

Re: vici admin them

Postby mattyou1985 » Mon May 01, 2017 4:52 pm

fperdomo wrote:this will give you an error
Code: Select all
if ($user_auth > 0)require("vici-admin-them/template.php");
{

you must place after the else of the auth
must look like this
Code: Select all
if ($user_auth > 0)
{
   $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 7 and api_only_user != '1';";
   if ($DB) {echo "|$stmt|\n";}
   $rslt=mysql_to_mysqli($stmt, $link);
   $row=mysqli_fetch_row($rslt);
   $auth=$row[0];

   $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 6 and view_reports='1' and api_only_user != '1';";
   if ($DB) {echo "|$stmt|\n";}
   $rslt=mysql_to_mysqli($stmt, $link);
   $row=mysqli_fetch_row($rslt);
   $reports_auth=$row[0];

   $stmt="SELECT count(*) from vicidial_users where user='$PHP_AUTH_USER' and user_level > 1 and qc_enabled='1' and api_only_user != '1';";
   if ($DB) {echo "|$stmt|\n";}
   $rslt=mysql_to_mysqli($stmt, $link);
   $row=mysqli_fetch_row($rslt);
   $qc_auth=$row[0];

   $reports_only_user=0;
   $qc_only_user=0;
   if ( ($reports_auth > 0) and ($auth < 1) )
   {
      $ADD=999999;
      $reports_only_user=1;
   }
   if ( ($qc_auth > 0) and ($reports_auth < 1) and ($auth < 1) )
   {
      if ( ($ADD != '881') and ($ADD != '100000000000000') )
      {
         $ADD=100000000000000;
      }
      $qc_only_user=1;
   }
   if ( ($qc_auth < 1) and ($reports_auth < 1) and ($auth < 1) )
   {
      $VDdisplayMESSAGE = _QXZ("You do not have permission to be here");
      Header ("Content-type: text/html; charset=utf-8");
      echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
      exit;
   }
}
else
{
   $VDdisplayMESSAGE = _QXZ("Login incorrect, please try again");
   if ($auth_message == 'LOCK')
   {
      $VDdisplayMESSAGE = _QXZ("Too many login attempts, try again in 15 minutes");
      Header ("Content-type: text/html; charset=utf-8");
      echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$auth_message|\n";
      exit;
   }
   Header("WWW-Authenticate: Basic realm=\"CONTACT-CENTER-ADMIN\"");
   Header("HTTP/1.0 401 Unauthorized");
   echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n";
   exit;
}
require("vici-admin-them/template.php");


now i see thank you but addin in ^

echo "$VDdisplayMESSAGE: |$PHP_AUTH_USER|$PHP_AUTH_PW|$auth_message|\n";
exit;
}
require("vici-admin-them/template.php");

gives error .. not working :( result wight screen

removing >> require("vici-admin-them/template.php"); ......reterns to defalt

VERSION: 2.14-583a
BUILD: 161226-2224

i wonder if difrent build might have some think to do with it ???
mattyou1985
 
Posts: 111
Joined: Tue Apr 19, 2016 3:30 pm


Return to General Discussion

Who is online

Users browsing this forum: Bing [Bot] and 13 guests