Beispiel #1
0
</option>
<?php 
    }
    ?>
			</select>
		</fieldset>
		<h3>Recipient</h3>
		<fieldset class="vbx-input-container">
			<input type="text" name="recipient" class="medium" value="<?php 
    echo AppletInstance::getValue('recipient');
    ?>
" />
		</fieldset>
		<h3>Message</h3>
<?php 
    if (AppletInstance::getFlowType() == 'voice') {
        ?>
		<p>Use %caller% to substitute the caller's number or %number% for the number called.</p>
<?php 
    } else {
        ?>
		<p>Use %sender% to substitute the sender's number, %number% for the number texted or %body% for the message body.</p>
<?php 
    }
    ?>
		<fieldset class="vbx-input-container">
			<textarea name="sms" class="medium"><?php 
    echo AppletInstance::getValue('sms');
    ?>
</textarea>
		</fieldset>
Beispiel #2
0
        ?>
"<?php 
        echo $flow->values['id'] == $selected_flow ? ' selected="selected" ' : '';
        ?>
><?php 
        echo $flow->values['name'];
        ?>
</option>
<?php 
    }
    ?>
			</select>
		</fieldset>
		<h3>Recipient</h3>
<?php 
    if (AppletInstance::getFlowType() == 'sms') {
        ?>
		<p>Use %sender% to substitute the sender's number.</p>
<?php 
    }
    ?>
		<fieldset class="vbx-input-container">
			<input type="text" name="recipient" class="medium" value="<?php 
    echo AppletInstance::getValue('recipient');
    ?>
" />
		</fieldset>
	</div>
	<h2>Next</h2>
	<p>After initiating the call, continue to the next applet</p>
	<div class="vbx-full-pane">
Beispiel #3
0
<?php

$flow_type = AppletInstance::getFlowType();
$vp = AppletInstance::getValue('prompt-text');
?>
<div class="vbx-applet monkey-applet">
    <h2>Order Tracking</h2>
    <p>Enter  a custom message that your callers will be greeted by.</p>
    <textarea class="medium" name="prompt-text"><?php 
echo !empty($vp) ? AppletInstance::getValue('prompt-text') : 'Please enter your order id';
?>
</textarea>
<?php 
if ($flow_type == 'voice') {
    ?>
	<br/>
	<h2>Next</h2>
	<p>After retrieving the order id, continue to the next applet</p>
	<div class="vbx-full-pane">
		<?php 
    echo AppletUI::DropZone('next');
    ?>
	</div>
<?php 
}
?>
</div>
<?php

$ci =& get_instance();
$poll = AppletInstance::getValue('poll');
$option = AppletInstance::getValue('option');
$number = 'voice' == AppletInstance::getFlowType() ? normalize_phone_to_E164($_REQUEST['Caller']) : normalize_phone_to_E164($_REQUEST['From']);
$ci->db->delete('polls_responses', array('poll' => $poll, 'value' => $number));
$ci->db->insert('polls_responses', array('poll' => $poll, 'value' => $number, 'response' => $option, 'time' => time()));
$response = new Response();
$next = AppletInstance::getDropZoneUrl('next');
if (!empty($next)) {
    $response->addRedirect($next);
}
$response->Respond();