当前位置: 首页>>代码示例>>PHP>>正文


PHP activate函数代码示例

本文整理汇总了PHP中activate函数的典型用法代码示例。如果您正苦于以下问题:PHP activate函数的具体用法?PHP activate怎么用?PHP activate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了activate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: test_activate

 /** 
  * Test activation routine.
  */
 public function test_activate()
 {
     // Setup
     \WP_Mock::wpFunction('flush_rewrite_rules', array('times' => 1));
     // Act
     activate();
     // Verify
     $this->assertConditionsMet();
 }
开发者ID:lkwdwrd,项目名称:wp-doc-tools,代码行数:12,代码来源:Core_Tests.php

示例2: mysql_query

                 mysql_query("UPDATE `main_loop_status` SET `field_data` = '3' WHERE `main_loop_status`.`field_name` = 'foundation_heartbeat_active' LIMIT 1");
                 mysql_query("UPDATE `main_loop_status` SET `field_data` = '3' WHERE `main_loop_status`.`field_name` = 'generation_heartbeat_active' LIMIT 1");
                 mysql_query("UPDATE `main_loop_status` SET `field_data` = '3' WHERE `main_loop_status`.`field_name` = 'genpeer_heartbeat_active' LIMIT 1");
                 mysql_query("UPDATE `main_loop_status` SET `field_data` = '3' WHERE `main_loop_status`.`field_name` = 'peerlist_heartbeat_active' LIMIT 1");
                 mysql_query("UPDATE `main_loop_status` SET `field_data` = '3' WHERE `main_loop_status`.`field_name` = 'queueclerk_heartbeat_active' LIMIT 1");
                 mysql_query("UPDATE `main_loop_status` SET `field_data` = '3' WHERE `main_loop_status`.`field_name` = 'transclerk_heartbeat_active' LIMIT 1");
                 mysql_query("UPDATE `main_loop_status` SET `field_data` = '3' WHERE `main_loop_status`.`field_name` = 'treasurer_heartbeat_active' LIMIT 1");
                 // Stop all other script activity
                 activate(FOUNDATION_DISABLED, 0);
                 activate(GENERATION_DISABLED, 0);
                 activate(GENPEER_DISABLED, 0);
                 activate(PEERLIST_DISABLED, 0);
                 activate(QUEUECLERK_DISABLED, 0);
                 activate(TRANSCLERK_DISABLED, 0);
                 activate(TREASURER_DISABLED, 0);
                 activate(BALANCE_DISABLED, 0);
                 echo 1;
             } else {
                 echo 0;
             }
         }
     } else {
         // Already Stopped
         echo 2;
     }
 }
 // End Stop Main Timekoin
 if ($active == 3) {
     write_log("Watchdog Sent START Command from IP: " . $_SERVER['REMOTE_ADDR'], "AP");
     // Check last heartbeat and make sure it was more than X seconds ago
     $watchdog_heartbeat_active = mysql_result(mysql_query("SELECT field_data FROM `main_loop_status` WHERE `field_name` = 'watchdog_heartbeat_active' LIMIT 1"), 0, 0);
开发者ID:LoveLeAnon,项目名称:timekoin,代码行数:31,代码来源:api.php

示例3: activate

      <div>
          <ul class="nav navbar-nav navbar-right">
            <li <?php 
    echo activate("stream");
    ?>
><a href="stream.php">stream <span class="glyphicon glyphicon-circle-arrow-down"></a></li>
            <li <?php 
    echo activate("profile");
    ?>
><a href="profile.php">profile <span class="glyphicon glyphicon-user"></span></a></li>
            <li <?php 
    echo activate("notifications");
    ?>
><a href="notifications.php">notifications <span class="glyphicon glyphicon-globe"></a></li> 
            <li <?php 
    echo activate("logout");
    ?>
><a href="logout.php">log out <span class="glyphicon glyphicon-log-out"></a></li> 
          </ul>
      </div>
      <?php 
} else {
    if ($_SERVER["PHP_SELF"] != "/login.php" && $_SERVER["PHP_SELF"] != "/register.php") {
        ?>
      <form class="navbar-form navbar-right" action="login.php" method="post">
        <div class="form-group">
          <input type="text" placeholder="Email" name="email" class="form-control">
        </div>
        <div class="form-group">
          <input type="password" placeholder="Password" name="password" class="form-control">
        </div>
开发者ID:hsrinivasulu,项目名称:antisocial,代码行数:31,代码来源:navbar.php

示例4: pass_lost

        break;
    case "pass_lost":
        pass_lost();
        break;
    case "new_user":
        new_user();
        break;
    case "my_headlines":
        if (is_user($user)) {
            if (!empty($url)) {
                my_headlines($hid, $url);
            } else {
                die;
            }
        } else {
            Header("Location: modules.php?name={$module_name}");
        }
        break;
    case "gfx":
        gfx($random_num);
        break;
    case "activate":
        activate($username, $check_num);
        break;
    case "CoolSize":
        CoolSize($size);
        break;
    default:
        main($user);
        break;
}
开发者ID:rotvulpix,项目名称:php-nuke,代码行数:31,代码来源:index.php

示例5: dirname

<?php

/*
 * Created on 17-okt-2011
 * author Paul Wolbers
 */
$current_path = dirname(realpath(__FILE__));
require_once '../include/default.inc.php';
if (isset($_GET['action'])) {
    switch ($_GET['action']) {
        case 'reset':
            forgottenPassword();
            break;
        case 'activate':
            activate();
            break;
        case 'change_password':
            changePassword();
            break;
    }
} else {
    $letters = 'ABCDEFGHKLMNPRSTUVWYZ';
    $_SESSION['cptch'] = rand(10, 99) . substr($letters, rand(1, 20), 1) . substr($letters, rand(1, 20), 1) . rand(10, 99);
    $_SESSION['c_s_id'] = md5($_SESSION['cptch']);
    $obj_smarty->display(FULLCAL_DIR . '/forgotten-password/index.tpl');
    //header('location:'.FULLCAL_DIR.'/get-the-app-and-register');
    exit;
}
function forgottenPassword()
{
    global $error;
开发者ID:ramant15,项目名称:ektimo,代码行数:31,代码来源:index.php

示例6: hash

             }
             // Transaction hash
             $hash = hash('sha256', $hash);
             $sql = "INSERT INTO `transaction_history` (`timestamp` ,`public_key_from` ,`public_key_to` ,`crypt_data1` ,`crypt_data2` ,`crypt_data3` ,`hash` ,`attribute`)\n\t\t\t\tVALUES ('{$second_generation_cycle}', '{$generation_arbitrary}', '{$generation_arbitrary}', '{$generation_arbitrary}', '{$generation_arbitrary}', '{$generation_arbitrary}', '{$hash}', 'H')";
             mysql_query($sql);
             $current_generation_block--;
             $cycles++;
         }
         $current_generation_block++;
         $second_generation_cycle = transaction_cycle(0 - $current_generation_block + 1);
         $hash_check = mysql_result(mysql_query("SELECT hash FROM `transaction_history` WHERE `timestamp` = '{$second_generation_cycle}' AND `attribute` = 'H' LIMIT 1"), 0, 0);
         // Now let's check the results to make sure they match what should be expected
         if ($hash_check == SHA256TEST) {
             // Passed final hash checking.
             // Unlock Treasurer script to allow live processing
             activate(TREASURER, 1);
             // Start a block rebuild from this since a new database is going to be far
             // behind the history of the other active peers
             mysql_query("UPDATE `main_loop_status` SET `field_data` = '3' WHERE `main_loop_status`.`field_name` = 'block_check_start' LIMIT 1");
             mysql_query($sql);
         } else {
             write_log("Server Failed Initial Encryption Generation and Verification Testing", "TC");
         }
     }
 }
 // End database preparation and hash testing
 //***********************************************************************************
 // Check the transaction hash generation
 if ($sql_num_results > 3) {
     //***********************************************************************************
     // Update transaction history hash
开发者ID:LoveLeAnon,项目名称:timekoin,代码行数:31,代码来源:transclerk.php

示例7: trim

    include 'includes/menu.php';
    if (isset($_REQUEST['success']) && empty($_REQUEST['success'])) {
        ?>
			<div class="user_entry">
				<h2>Thanks, We've activated your account and you can now login!</h2>
				<p><a href="index.php">Click here</a> to log in.</p>
			</div>
			<?php 
    } else {
        if (isset($_REQUEST['email'], $_REQUEST['email_code'])) {
            $email = trim($_REQUEST['email']);
            $email_code = trim($_REQUEST['email_code']);
            if (!email_exists) {
                $errors[] = 'Oops, something went wrong and we couldn\'t find that email address!.';
            } else {
                if (!activate($email, $email_code)) {
                    $errors[] = 'Activation Failed!!<br />We could not activate your account as we are facing problems.';
                }
            }
            if (!empty($errors)) {
                ?>
				<div class="user_entry">
				<h2>Oops..</h2>
				<?php 
                echo output_errors();
            } else {
                header("Location: activate.php?success");
                exit;
            }
            ?>
				</div>
开发者ID:arealdeadone,项目名称:Treasurehunt,代码行数:31,代码来源:activate.php

示例8: switch

}
switch ($task) {
    case 'lostPassword':
        lostPassForm($option);
        break;
    case 'sendNewPass':
        sendNewPass($option);
        break;
    case 'register':
        registerForm($option, $mosConfig_useractivation);
        break;
    case 'saveRegistration':
        saveRegistration();
        break;
    case 'activate':
        activate($option);
        break;
}
function lostPassForm($option)
{
    global $mainframe;
    $mainframe->SetPageTitle(_PROMPT_PASSWORD);
    HTML_registration::lostPassForm($option);
}
function sendNewPass($option)
{
    global $database;
    global $mosConfig_live_site, $mosConfig_sitename;
    global $mosConfig_mailfrom, $mosConfig_fromname;
    // simple spoof check security
    josSpoofCheck();
开发者ID:jwest00724,项目名称:Joomla-1.0,代码行数:31,代码来源:registration.php

示例9: activer

 function activer()
 {
     lcm_log("use of deprecated function: activer, use activate instead");
     return activate();
 }
开发者ID:nyimbi,项目名称:legalcase,代码行数:5,代码来源:inc_auth_ldap.php

示例10: activate

                                </li>

                            </ul>

                        </li>

                    <?php 
    }
    ?>

                <?php 
}
?>

                <li class="<?php 
echo activate(2, 'calendar');
?>
 treeview">
                    <a href="<?php 
echo base_url() . 'administrator/calendar';
?>
"><i class='fa fa-calendar'></i> <span>Calendar</span></a>
                </li>

<!--                <li class="--><?php 
//echo activate(2, 'invoice');
?>
<!-- treeview">-->
<!--                    <a href="--><?php 
//echo base_url() . 'administrator/invoice';
?>
开发者ID:manis6062,项目名称:credituniversity,代码行数:31,代码来源:header_back.php

示例11: define

//    You should have received a copy of the GNU Affero General Public License
//    along with this program.  If not, see http://www.gnu.org/licenses/
define('ACTIVATION_CODE_WRONG', 1);
define('RECORD_FOR_OTHER_APP', 2);
define('ACTIVATION_RECORD_NOT_FOUND', 3);
$headers = parseRequestHeaders();
$action = $headers['Action'];
switch ($action) {
    case "checkresponding":
        checkresponding();
        break;
    case "checkuidpresent":
        checkuidpresent($headers);
        break;
    case "activate":
        activate($headers);
        break;
    case "update":
        update($headers);
        break;
    case "event":
        event($headers);
        break;
    case "ensureactivationrecord":
        ensureactivation($headers);
        break;
}
// request to check if the backend is responding
function checkresponding()
{
    header('success: true');
开发者ID:RaviOnline,项目名称:droidactivator,代码行数:31,代码来源:check.php

示例12: alterReason

function alterReason($memNum, $reasonCode, $status = False)
{
    global $sql;
    $username = checkLogin();
    $uid = getUID($username);
    $model = new CustomerAccountSuspensionsModel($sql);
    $model->card_no($memNum);
    $upQ = $sql->prepare("UPDATE suspensions SET reasoncode=? WHERE cardno=?");
    $upR = $sql->execute($upQ, array($reasonCode, $memNum));
    if ($reasonCode == 0) {
        activate($memNum);
    } else {
        $now = date("Y-m-d h:i:s");
        $m_status = 0;
        $insQ = $sql->prepare("INSERT INTO suspension_history (username, postdate, post, cardno, reasoncode) \n                                VALUES (?,?,'',?,?)");
        $insR = $sql->execute($insQ, array($username, $now, $memNum, $reasonCode));
        if ($status) {
            $prep = $sql->prepare("UPDATE custdata SET type=? WHERE cardno=?");
            $sql->execute($prep, array($status, $memNum));
            if ($status == "TERM") {
                $custP = $sql->prepare("UPDATE suspensions SET type='T' WHERE cardno=?");
                $sql->execute($custP, array($memNum));
                $m_status = 2;
            } else {
                $custP = $sql->prepare("UPDATE suspensions SET type='I' WHERE cardno=?");
                $sql->execute($custP, array($memNum));
                $m_status = 1;
            }
        }
        $changed = false;
        $model->active(1);
        // find most recent active record
        $current = $model->find('tdate', true);
        foreach ($current as $obj) {
            if ($obj->reasonCode() != $reasonCode || $obj->suspensionTypeID() != $m_status) {
                $changed = true;
            }
            $model->savedType($obj->savedType());
            $model->savedMemType($obj->savedMemType());
            $model->savedDiscount($obj->savedDiscount());
            $model->savedChargeLimit($obj->savedChargeLimit());
            $model->savedMailFlag($obj->savedMailFlag());
            // copy "saved" values from current active
            // suspension record. should only be one
            break;
        }
        // only add a record if something changed.
        // count($current) of zero means there is no
        // record. once the migration to the new data
        // structure is complete, that check won't
        // be necessary
        if ($changed || count($current) == 0) {
            $model->reasonCode($reasonCode);
            $model->tdate($now);
            $model->username($username);
            $model->suspensionTypeID($m_status);
            $new_id = $model->save();
            // only most recent should be active
            $model->reset();
            $model->card_no($memNum);
            $model->active(1);
            foreach ($model->find() as $obj) {
                if ($obj->customerAccountSuspensionID() != $new_id) {
                    $obj->active(0);
                    $obj->save();
                }
            }
        }
    }
}
开发者ID:phpsmith,项目名称:IS4C,代码行数:70,代码来源:memAddress.php

示例13: cpg_error

if (!$user_cfg['allowuserreg']) {
    cpg_error(_ACTDISABLED);
}
if (Security::check_post()) {
    if (isset($_POST['op']) && $_POST['op'] == 'finish') {
        $pagetitle = _ACCOUNTCREATED;
        require_once 'header.php';
        register_finish();
    } else {
        $pagetitle = _USERFINALSTEP;
        require_once 'header.php';
        register_check();
    }
} else {
    if (isset($_GET['activate'])) {
        activate(intval($_GET['activate']), Fix_Quotes($_GET['check_num']));
    } else {
        if (!isset($_GET['agreed']) && !isset($_POST['agreed']) && $user_cfg['show_registermsg']) {
            $pagetitle = _MA_REGISTRATION;
            require_once 'header.php';
            OpenTable();
            echo '<table width="80%" cellspacing="2" cellpadding="2" border="0" style="margin:auto;">
	  <tr>
		<td><span class="genmed"><br />' . $user_cfg['registermsg'] . '<br /><br />' . _BOUNDREGISTRATION . '<br /><br /></span><div align="center">
		  <a href="' . URL::index("&amp;file=register&amp;agreed=1") . '" class="genmed">' . _MA_AGREE_OVER_13 . '</a><br /><br />
		  <a href="' . URL::index("&amp;file=register&amp;agreed=1&amp;coppa=1") . '" class="genmed">' . _MA_AGREE_UNDER_13 . '</a><br /><br />
		  <a href="' . $mainindex . '" class="genmed">' . _MA_DO_NOT_AGREE . '</a></div><br /></td>
	  </tr>
	</table>';
            CloseTable();
        } else {
开发者ID:cbsistem,项目名称:nexos,代码行数:31,代码来源:register.php

示例14: mysql_query

                 mysql_query("UPDATE `main_loop_status` SET `field_data` = '3' WHERE `main_loop_status`.`field_name` = 'peerlist_heartbeat_active' LIMIT 1");
                 mysql_query("UPDATE `main_loop_status` SET `field_data` = '3' WHERE `main_loop_status`.`field_name` = 'queueclerk_heartbeat_active' LIMIT 1");
                 mysql_query("UPDATE `main_loop_status` SET `field_data` = '3' WHERE `main_loop_status`.`field_name` = 'transclerk_heartbeat_active' LIMIT 1");
                 mysql_query("UPDATE `main_loop_status` SET `field_data` = '3' WHERE `main_loop_status`.`field_name` = 'treasurer_heartbeat_active' LIMIT 1");
                 // Stop all other script activity
                 activate(TIMEKOINSYSTEM, 0);
                 header("Location: index.php?menu=home");
                 exit;
             }
         }
     } else {
         $server_code = '<font color="red"><strong>Timekoin was already Stopped...</strong></font>';
         // Clear transaction queue to avoid unnecessary peer confusion
         mysql_query("TRUNCATE TABLE `transaction_queue`");
         // Stop all other script activity
         activate(TIMEKOINSYSTEM, 0);
     }
 }
 if ($_GET["code"] == "1") {
     $server_code = '<font color="green"><strong>Timekoin Process Started...</strong></font>';
 }
 if ($_GET["code"] == "99") {
     $server_code = '<font color="blue"><strong>Timekoin Process Already Active...</strong></font>';
 }
 if ($_GET["code"] == "2") {
     $server_code = '<font color="green"><strong>Watchdog Process Started...</strong></font>';
 }
 if ($_GET["code"] == "89") {
     $server_code = '<font color="blue"><strong>Watchdog Process Already Active...</strong></font>';
 }
 $body_string = system_screen();
开发者ID:LoveLeAnon,项目名称:timekoin,代码行数:31,代码来源:index.php

示例15: isAllowed

<?php

include 'include.php';
isAllowed();
if (!isset($_GET['id'])) {
    setFlash("action impossible.", "danger");
    redirect("accueil.php");
    die;
}
$asked = $_SESSION['profil']['id'];
$user = $_GET['id'];
$friendship = activate($user, $asked);
if ($friendship == 400) {
    setFlash("action impossible.", "danger");
    redirect('acceuil.php');
} elseif ($friendship == 500) {
    setFlash('Nos services sont en panne, nous faisons notre possible pour régler le problème.', 'danger');
    redirect('serveur_down.php');
} elseif ($friendship == 200) {
    setFlash("Cette personne a bien été ajoutée votre liste d'amis");
    redirect('invitations.php');
} else {
    setFlash('Nos services sont en panne, nous faisons notre possible pour régler le problème.', 'danger');
    redirect('serveur_down.php');
}
开发者ID:Reval63,项目名称:projet_photo,代码行数:25,代码来源:activate.php


注:本文中的activate函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。