Example #1
0
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
/**
 * Xoops header
 */
include_once "../../mainfile.php";
$xoopsOption['template_main'] = 'yogurt_index.html';
include_once "../../header.php";
include_once "class/yogurt_controler.php";
if (!@(include_once XOOPS_ROOT_PATH . "/language/" . $GLOBALS['xoopsConfig']['language'] . "/user.php")) {
    include_once XOOPS_ROOT_PATH . "/language/english/user.php";
}
$controler = new YogurtControlerIndex($xoopsDB, $xoopsUser);
/**
 * Fecthing numbers of tribes friends videos pictures etc...
 */
$nbSections = $controler->getNumbersSections();
/**
 * This variable define the beggining of the navigation must b
 * setted here so all calls to database will take this into account
 */
$start = isset($_GET['start']) ? intval($_GET['start']) : 0;
/**
 * Filter for new friend petition
 */
$petition = 0;
if ($controler->isOwner == 1) {
    $criteria_uidpetition = new criteria('petioned_uid', $controler->uidOwner);
Example #2
0
//  but WITHOUT ANY WARRANTY; without even the implied warranty of           //
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            //
//  GNU General Public License for more details.                             //
//                                                                           //
//  You should have received a copy of the GNU General Public License        //
//  along with this program; if not, write to the Free Software              //
//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA //
//  ------------------------------------------------------------------------ //
include '../../mainfile.php';
$op = "form";
$op = isset($_POST['op']) ? trim(htmlspecialchars($_POST['op'])) : 'form';
if (isset($_POST['op']) && $_POST['op'] == 'submit') {
    $op = 'submit';
}
include_once 'class/yogurt_controler.php';
$controler = new YogurtControlerIndex($xoopsDB, $xoopsUser);
/**
* Fecthing numbers of tribes friends videos pictures etc...
*/
$nbSections = $controler->getNumbersSections();
if ($op == 'form') {
    $xoopsOption['template_main'] = 'yogurt_searchform.html';
    include XOOPS_ROOT_PATH . '/header.php';
    $member_handler =& xoops_gethandler('member');
    $total = $member_handler->getUserCount(new Criteria('level', 0, '>'));
    include_once XOOPS_ROOT_PATH . '/class/xoopsformloader.php';
    $uname_text = new XoopsFormText('', 'user_uname', 30, 60);
    $uname_match = new XoopsFormSelectMatchOption('', 'user_uname_match');
    $uname_tray = new XoopsFormElementTray(_MD_YOGURT_UNAME, ' ');
    $uname_tray->addElement($uname_match);
    $uname_tray->addElement($uname_text);