function getResultAction($result, $fullName, $action) { if (!isSuccess($result)) { echo "\nError"; echo "\n" . extractMessage($result) . "\n"; } else { echo $fullName . " - " . $action . " " . date("H:i:s", time()) . "\n"; } }
function getResult($result, $fullName) { if (!isSuccess($result)) { echo "\nError"; echo "\n" . extractMessage($result) . "\n"; } else { echo $fullName . " Page Added\n"; } }
function formGenerator() { $myForm = ''; $pName = nameValue(); $pEmail = emailValue(); $message = isSuccess(); $myForm .= $message; $myForm .= '<form method="post" class="myForm" action="process.php"> <h1>Sign Up Form</h1> <h2><span class="circle">-></span> Your Info</h2> <label for="name">Name:</label></br> <input type="text" id="name" name="name" value="' . $pName . '"></input> </br></br> <label for="email">Roll no.:</label></br> <input type="text" id="email" name="emailid" value="' . $pEmail . '"></input> </br> </br> <label for="password">Password:</label></br> <input type="password" id="password" name="password"></input> </br></br> <button id="submit">Submit</button>'; return $myForm; }
/** * @expectedException \PHPUnit_Framework_AssertionFailedError */ public function testIsSuccessCanFail() { assertThat(new Response(404), isSuccess()); }
// Read asset $reply = $client->read($params); if ($reply->readReturn->success == 'true') { $asset = (array) $reply->readReturn->asset->page; print_r($asset); // Get its title $metadata = $asset["metadata"]; $title = $metadata->title; // Null values nullPageValues($asset); // Update title $title = date('l dS \\of F Y h:i:s A'); $metadata->title = $title; // Edit page $params = array('authentication' => $auth, 'asset' => array('page' => $asset)); try { $reply = $client->edit($params); } catch (Exception $e) { echo "\r\nProblem: {$e->getMessage()}\n"; } $result = $client->__getLastResponse(); if (!isSuccess($result)) { echo "\r\nError occured:"; echo "\r\n" . extractMessage($result) . "\r\n"; } else { echo "\r\nAsset updated successfully\r\n"; } echo "Done"; } else { echo "Problem occured\n"; }
setError(t("problem_creating_your_account_try_again_later", "There was a problem creating your account, please try again later")); } } } else { $title = $user->title; $firstname = $user->firstname; $lastname = $user->lastname; $emailAddress = $user->email; } require_once '_header.php'; ?> <div class="contentPageWrapper"> <?php if (isSuccess()) { echo outputSuccess(); } elseif (isErrors()) { echo outputErrors(); } ?> <!-- register form --> <div class="pageSectionMain ui-corner-all"> <div class="pageSectionMainInternal"> <div id="pageHeader"> <h2><?php echo t("account_details", "Account Details"); ?> </h2> </div>