Example #1
0
                    $page = oneQuery('permalink', 'link', "'?app=pdf&view=category&id={$vcat}'", 'pid');
                }
                $ncat = oneQuery('pustaka_category', 'id', $id, 'name');
                if (url_param('feed') == 'rss') {
                } else {
                    add_permalink("{$sef_prefix}/{$id}-{$ncat}");
                }
            } else {
                if (app_param('view') == 'default') {
                    add_permalink("{$sef_prefix}");
                } else {
                    if (app_param('label') != null) {
                        $tag = app_param('label');
                        if (url_param('feed') == 'rss') {
                        } else {
                            add_permalink("{$sef_prefix}/label/{$tag}", '', $page);
                        }
                    }
                }
            }
        }
    }
}
/****************************************/
/*			 pdf Title				*/
/****************************************/
if ($id > 0) {
    $a = FQuery("pustaka_category", "id={$id}", '', 1);
    if (!$a) {
        $a = FQuery("pdf", "id={$id}", '', 1);
    }
Example #2
0
            add_permalink('user/logout');
        } else {
            if ($view == 'edit') {
                add_permalink('user/edit');
            } else {
                if ($view == 'login') {
                    add_permalink('user/login');
                } else {
                    if ($view == 'register') {
                        add_permalink('user/register');
                    } else {
                        if ($view == 'lost_password') {
                            add_permalink('user/remember');
                        } else {
                            if (empty($view)) {
                                add_permalink('user');
                            }
                        }
                    }
                }
            }
        }
    }
}
/************* App User Page Title ******************/
if ($view == 'register') {
    define('PageTitle', 'User Register');
} else {
    if ($view == 'login') {
        define('PageTitle', 'User Login');
    } else {
Example #3
0
    return $value;
}
function explode_query($q, $target)
{
    $q = trim($q);
    if (strpos($q, ",")) {
        $q = explode(",", $q);
    } else {
        $q = explode(" ", $q);
    }
    $value = '';
    foreach ($q as $v) {
        if (strlen($v) > 2) {
            if (empty($value)) {
                $value .= " OR (`{$target}` LIKE '%{$v}%' ";
            } else {
                $value .= " OR `{$target}` LIKE '%{$v}%' ";
            }
        }
    }
    if (!empty($value)) {
        $value .= ") ";
    }
    return $value;
}
/* add search permalink */
if (getLink() == '?app=search') {
    add_permalink('search');
}
/* define search page title */
define('PageTitle', 'Search Page');
Example #4
0
    if ($view == 'person') {
        $item = oneQuery('contact', 'id', $id, 'name');
        $vcat = oneQuery('contact', 'id', $id, 'group_id');
        $ncat = oneQuery('contact_group', 'id', $vcat, 'name');
        $page = oneQuery('menu', 'link', "'?app=contact&view=person&id={$vcat}'", 'id');
        if (!$page) {
            $page = oneQuery('permalink', 'link', "'?app=contact&view=person&id={$vcat}'", 'pid');
        }
        add_permalink($item, "contact/" . $ncat, $page);
    } else {
        if ($view == 'group') {
            $ncat = oneQuery('contact_group', 'id', $id, 'name');
            add_permalink("contact/" . $ncat);
        } else {
            if (app_param() == 'contact' and empty($id) and empty($view)) {
                add_permalink("contact");
            }
        }
    }
}
/****************************************/
/*			 Contact Title				*/
/****************************************/
if (!checkHomePage()) {
    if ($view == "person") {
        define('PageTitle', contactInfo('name'));
    } else {
        if ($view == "group") {
            define('PageTitle', groupInfo('name') . ' Contacts');
        } else {
            define('PageTitle', 'Contact');
Example #5
0
                        add_permalink("archives");
                    }
                } else {
                    if ($view == "featured") {
                        if (_FEED_ == 'rss') {
                            add_permalink("featured", "", "", "rss");
                        } else {
                            add_permalink("featured");
                        }
                    } else {
                        if (app_param('tag') != null) {
                            $tag = app_param('tag');
                            if (_FEED_ == 'rss') {
                                add_permalink("tag/{$tag}", "", "", "rss");
                            } else {
                                add_permalink("tag/{$tag}");
                            }
                        }
                    }
                }
            }
        }
    }
}
/****************************************/
/*			 Article Title				*/
/****************************************/
if ($id > 0) {
    $follow = true;
    $a = FQuery("article_category", "id={$id}", '', 1);
    if (!$a) {