Changeset 5284
- Timestamp:
- 11/25/07 03:08:50 (5 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.4/timeconditions/functions.inc.php
r5259 r5284 14 14 } else { 15 15 return null; 16 } 17 } 18 19 function timeconditions_getdest($exten) { 20 return array('timeconditions,'.$exten.',1'); 21 } 22 23 function timeconditions_getdestinfo($dest) { 24 global $active_modules; 25 26 if (substr(trim($dest),0,15) == 'timeconditions,') { 27 $exten = explode(',',$dest); 28 $exten = $exten[1]; 29 $thisexten = timeconditions_get($exten); 30 if (empty($thisexten)) { 31 return array(); 32 } else { 33 //$type = isset($active_modules['announcement']['type'])?$active_modules['announcement']['type']:'setup'; 34 return array('description' => 'Time Conditon : '.$thisexten['displayname'], 35 'edit_url' => 'config.php?display=timeconditions&itemid='.urlencode($exten), 36 ); 37 } 38 } else { 39 return false; 16 40 } 17 41 } modules/branches/2.4/timeconditions/page.timeconditions.php
r3204 r5284 124 124 <h2><?php echo ($itemid ? _("Time Condition:")." ". $itemid : _("Add Time Condition")); ?></h2> 125 125 <?php if ($itemid){ ?> 126 <p><a href="<?php echo $delURL ?>"><?php echo _("Delete Time Condition")?> <?php echo $itemid; ?></a></p> 127 <?php } ?> 126 <a href="<?php echo $delURL ?>"><?php echo _("Delete Time Condition")?> <?php echo $itemid; ?></a> 127 <?php 128 $usage_list = framework_display_destination_usage(timeconditions_getdest($itemid)); 129 if (!empty($usage_list)) { 130 ?> 131 <br /><a href="#" class="info"><?php echo $usage_list['text']?>:<span><?php echo $usage_list['tooltip']?></span></a> 132 <?php 133 } 134 } 135 ?> 128 136 <form autocomplete="off" name="edit" action="<?php $_SERVER['PHP_SELF'] ?>" method="post" onsubmit="return edit_onsubmit();"> 129 137 <input type="hidden" name="display" value="<?php echo $dispnum?>">
