function globallink_interface_preview_content in GlobalLink Connect for Drupal 7.7
Helper function
1 string reference to 'globallink_interface_preview_content'
- globallink_interface_preview in globallink_interface/
globallink_interface_send.inc - Helper function
File
- globallink_interface/
globallink_interface_send.inc, line 535
Code
function globallink_interface_preview_content() {
$id = arg(5);
$output = "";
$query = db_select('locales_source', 'ls')
->fields('ls')
->condition('lid', $id, '=');
$result = $query
->execute();
$result = $result
->fetchAll();
if (count($result) > 0) {
$output .= "<table><tr><th>Fields</th><th>Source Contents</th></tr>";
foreach ($result as $val) {
$output .= "<tr><td><strong>Interface</strong></td><td>" . check_plain(truncate_utf8($val->source, 150, FALSE, TRUE)) . "</td></tr>";
}
$output .= "</table>";
}
$form['preview'] = array(
'#markup' => $output,
);
return $form;
}