Cheetah
Functions
customFunctions.inc.php File Reference

Go to the source code of this file.

Functions

 loginUser ($sName, $sPassword, $bLogin=false)
 
 loginAdmin ($sLogin, $sPassword)
 
 getUserInfo ($sId, $bNick=false)
 
 getAge ($sDob)
 
 searchUser ($sValue, $sField="ID")
 
 getFriends ($sId)
 

Function Documentation

◆ getAge()

getAge (   $sDob)

Gets user's age Used only in getUserInfo() function

Definition at line 107 of file customFunctions.inc.php.

◆ getFriends()

getFriends (   $sId)

Gets user's friend's IDs

Parameters
$sId- user ID
Returns
$aUsers - friends array

Definition at line 144 of file customFunctions.inc.php.

◆ getUserInfo()

getUserInfo (   $sId,
  $bNick = false 
)

Gets user's information from database by user's id

Parameters
$sId- user ID
Returns
$aInfo - user info

Define photo. If this user has a photo you should define it's uri here. Otherwise a "no_photo" image is used.

Return user info. NOTE. Do not change the return statement order.

Definition at line 61 of file customFunctions.inc.php.

◆ loginAdmin()

loginAdmin (   $sLogin,
  $sPassword 
)

Authorize administrator by specified Login and Password.

Parameters
$sLogin- administrator login
$sPassword- administrator password
Returns
true/false

You might change this query. This query searches for a record in sys_admins' db with specified login and password. If your admin table has different structure/format, your should change the query.

Definition at line 36 of file customFunctions.inc.php.

◆ loginUser()

loginUser (   $sName,
  $sPassword,
  $bLogin = false 
)

This work, "Cheetah - https://www.cheetahwsb.com", is a derivative of "Dolphin Pro V7.4.2" by BoonEx Pty Limited - https://www.boonex.com/, used under CC-BY. "Cheetah" is licensed under CC-BY by Dean J. Bassett Jr. CC-BY License - http://creativecommons.org/licenses/by/3.0/ Authorize user by specified ID and Password or Login and Password.

Parameters
$sName- user login/ID
$sPassword- user password
$bLogin- search for login (true) or ID (false)
Returns
true/false

You might change this query, if your profiles table has different structure.

Definition at line 19 of file customFunctions.inc.php.

◆ searchUser()

searchUser (   $sValue,
  $sField = "ID" 
)

Searches for user by field $sField with value $sValue

Parameters
$sValue- value to search for
$sField- field to search
Returns
$sId - found user ID

Definition at line 127 of file customFunctions.inc.php.