Пример #1
0
     $ret .= urldecode($_REQUEST['webid']);
 }
 $ret .= "</a></h3><p>(view  <a href=\"view.php?html=0&webid=" . urlencode($_REQUEST['webid']) . "\">RDF</a> or \n";
 $ret .= "</a></h3><a href=\"view.php?html=1&webid=" . urlencode($_REQUEST['webid']) . "\">normal</a>?)</p><br/>\n";
 // graph
 $person = new MyProfile(urldecode($_REQUEST['webid']), BASE_URI, SPARQL_ENDPOINT);
 $person->load(true);
 $graph = $person->get_graph();
 $profile = $person->get_profile();
 // sameAs is disabled until further notice
 //$profile->loadSameAs();
 // check if the user has subscribed to local messages
 $is_subscribed = strlen($person->get_hash()) > 0 ? true : false;
 $ret .= "<table><tr>\n";
 // add or remove friends if we have them in our list
 if (isset($_SESSION['webid']) && webid_is_local($_SESSION['webid'])) {
     if ($_SESSION['myprofile']->is_friend($_REQUEST['webid'])) {
         // remove friend
         $ret .= "<td style=\"padding-right: 10px; float: left;\"><form action=\"friends.php\" method=\"POST\">\n";
         $ret .= "<input type=\"hidden\" name=\"action\" value=\"delfriend\">\n";
         $ret .= "<input type=\"hidden\" name=\"webid\" value=\"" . $_REQUEST['webid'] . "\">\n";
         $ret .= "<input src=\"img/actions/remove.png\" type=\"image\" title=\"Remove friend\" name=\"submit\" value=\" Remove \">\n";
         $ret .= "</form></td>\n";
     } else {
         // add friend
         $ret .= "<td style=\"padding-right: 10px; float: left;\"><form action=\"friends.php\" method=\"POST\">\n";
         $ret .= "<input type=\"hidden\" name=\"action\" value=\"addfriend\">\n";
         $ret .= "<input type=\"hidden\" name=\"webid\" value=\"" . $_REQUEST['webid'] . "\">\n";
         $ret .= "<input src=\"img/actions/add.png\" type=\"image\" title=\"Add friend\" name=\"submit\" value=\" Add \">\n";
         $ret .= "</form></td>\n";
     }
Пример #2
0
 *  to do so, subject to the following conditions:
 *  The above copyright notice and this permission notice shall be included in all 
 *  copies or substantial portions of the Software.
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
 *  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
 *  PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
 *  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 
 *  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 
 *  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
require_once 'include.php';
$title = "Account Recovery";
$ret = '';
$ret .= "<div class=\"content relative shadow clearfix main\">\n";
// Recover account
if (webid_is_local($_REQUEST['webid'])) {
    if (isset($_REQUEST['recovery_webid'])) {
        $recovery = new Recovery();
        $ret .= $recovery->recover($_REQUEST['recovery_webid']);
    }
} else {
    $ret .= "The account recovery is only available for local users.";
}
if (isset($_REQUEST['recovery_code']) && isset($_SESSION['recovery_status'])) {
    $ret .= $_SESSION['recovery_status'];
}
// display recovery options
$ret .= "<p></p>\n";
$ret .= "<h2><strong>Recover Your Account</strong></h2>\n";
$ret .= "<form method=\"post\">\n";
$ret .= "<table><tr>\n";
Пример #3
0
function webid_get_local_path($webid)
{
    // verify if it's local or not
    if ($loc = webid_is_local($webid)) {
        $path = explode('/', $loc);
        $path = $path[1] . "/" . $path[2];
        return $path;
    } else {
        return false;
    }
}
Пример #4
0
$ret .= "<p>This feature allows you to reuse your current WebID in order to login using a different browser!</p>";
$ret .= "<table>\n";
if (isset($pin)) {
    $ret .= "<tr><td>\n";
    $ret .= "<pre class=\"pin\">" . $pin . "</pre>\n";
    $ret .= "</td></tr>\n";
}
$ret .= "<tr><td>\n";
$ret .= "<form method=\"post\">\n";
$ret .= "<input class=\"btn margin-5\" type=\"submit\" name=\"generate_pin\" value=\"Generate a new PIN\">\n";
$ret .= "</form> \n";
$ret .= "</td></tr>\n";
$ret .= "</table>\n";
$ret .= "<p><strong>Note!</strong> This pin number will only be valid for 1 minute!</p>";
// display options for local users only
if (webid_is_local($_SESSION['webid'])) {
    if (isset($_REQUEST['recovery_email'])) {
        $email = $_REQUEST['recovery_email'];
    } else {
        $email = $_SESSION['myprofile']->get_recovery_email();
    }
    $ret .= "<p></p>\n";
    $ret .= "<h2><strong>Recovery Email</strong></h2>\n";
    $ret .= "<table><tr>\n";
    $ret .= "<td>\n";
    $ret .= "<form method=\"post\">\n";
    $ret .= "<input type=\"text\" class=\"recovery\" name=\"recovery_email\" value=\"" . $email . "\" />\n";
    $ret .= "<input class=\"btn margin-5\" type=\"submit\" name=\"update_recovery\" value=\"Update\">\n";
    $ret .= "</form> \n";
    $ret .= "</td>\n";
    $ret .= "</tr></table>\n";