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");

```
best regards
fperdomo
 
Posts: 9
Joined: Fri May 20, 2016 8:43 pm
Location: Dominican Republic

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");
best regards
fperdomo
 
Posts: 9
Joined: Fri May 20, 2016 8:43 pm
Location: Dominican Republic

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

Re: vici admin them

Postby buns » Thu Apr 19, 2018 5:01 am

Hi,

Thank you very much for this theme. Is there specific instruction to use this theme with the realtime main report ? Add the require on both realtime_report.php and AST_timeonVDADall.php but i cant see the same design as in you screenshot. Thank's for your help.
Vicidial Consultant in France and Indian Ocean. http://vicidial.fr
buns
 
Posts: 14
Joined: Thu Nov 23, 2017 1:59 am

Re: vici admin them

Postby uncapped_shady » Mon May 28, 2018 3:38 pm

I know this thread is quite old but for the guys that would like to try this theme and do not know the steps to install it, please follow the below steps:

Navigate to /srv/www/htdocs/vicidial/
once in the above location you need to git clone the repo as follows: git clone https://github.com/masterfermin02/vici-admin-them.git
Once the above is done you need to navigate to /srv/www/htdocs/vicidial/admin.php by using vim editor or nano and look for the code if ($user_auth > 0) - You will need to place the following line require("vici-admin-them/template.php"); after the else statement, so in my current version of Vicidial (Vicibox 8.0.1) the code looks 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;
}


You need to place the line require("vici-admin-them/template.php"); after the last curly bracket as per below:

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");


Once you have followed the above steps then your admin page should load with the new theme.

Should you want the theme to show on your other pages you will need to add this line require("vici-admin-them/template.php"); for example: user_status.php, AST_agent_time_sheet.php, user_stats.php

I hope this helps the guys battling with this and give a shout out should you still not come right. Kudos to the developer of this theme. Keep up the good work. Hoping to see more changes coming soon! :wink:
uncapped_shady
 
Posts: 30
Joined: Sat Jan 20, 2018 5:51 pm
Location: South Africa Gauteng

Re: vici admin them

Postby fperdomo » Wed Jun 13, 2018 6:57 pm

Hello i have added some new changes to the vicidial admin theme now you can enjoy the realtime report with the new design follow the instructiions in the repository.
best regards
fperdomo
 
Posts: 9
Joined: Fri May 20, 2016 8:43 pm
Location: Dominican Republic

Re: vici admin them

Postby ramizuabhalim » Wed Aug 10, 2022 10:46 am

Hi Team,

I interested to use this theme. This theme can use vicibox10?
I already did but the problem only showed "DashBoard" only main page.
Where can i see the report,users,admin,inbound and etc from left side?

Thanks in advance.
ramizuabhalim
 
Posts: 97
Joined: Sat Dec 07, 2019 11:14 am

Re: vici admin them

Postby carpenox » Wed Aug 10, 2022 8:13 pm

this is not a "vicidial" supported theme, this was created by one of colleagues, Fermin and can be used in v10. You have to apply the require to all the pages in admin

check out the instructions here:

https://github.com/masterfermin02/vici-admin-them

Chris
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2418
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: vici admin them

Postby ramizuabhalim » Thu Aug 11, 2022 2:26 am

Hi Chris,

Thanks for reply.
Actually I have been through this link and already implement to my server . However, I have issue only display Dashboard details instead can see all the other such as per below :

Reports
Users
Campaigns
Lists
Scripts
Filters
Inbound
User Groups
Remote Agents
Admin


I'm not sure where I need to put the "require("vici-admin-them/template.php");" inside admin.php
As for now I put here

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");


Thanks :)
ramizuabhalim
 
Posts: 97
Joined: Sat Dec 07, 2019 11:14 am

Re: vici admin them

Postby ramizuabhalim » Tue Aug 30, 2022 11:16 am

Hi All,

Just update, this coding are perfect!! The error last time because before we put the coding in admin.php.. make sure admin screen color = default.
Thank you .
ramizuabhalim
 
Posts: 97
Joined: Sat Dec 07, 2019 11:14 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 45 guests