I have 2 tables named authors & books. Authors must have a logo. I have to display this like author name , logo,then all the books of that author and so on. books table contain a field (show_logo), if the show_logo is 0 for all the books of that author then the logo will display at the begining (ie after author name) else logo will display after that book(show_logo 1). If the show_logo is 1 for any book then it will display properly after that book, Otherwise won't..am using the code below
<?php
if ($author) {
foreach ($$author as $key => $val) {
?>
<tr style="background-color: #58353C;"><?php
if ($val['$author_image']) {
?>
<td><img src="<?= base_url(); ?>uploads/<?= $author; ?>" style="width: 90px;height: 90px;"/></td>
<td style="color: #F5E78F;" colspan="4"><b><?= $val['$author_name']; ?></td>
<?
foreach ($val['books'] as $key => $val1) {
?>
<tr style="background-color:<?= $color ?>">
<?php
if ($val1['author_image']) {
?>
<td style="padding-left: 20px;color: black; "><img src="<?= base_url(); ?>uploads/<?= $val1['author_image']; ?>" style="width: 75px;height: 75px;" /></td>
<?php } ?>
<td style="color: black;"><?= $val1['author_title']; ?></td>
<td width="150px" style="text-align: left;color: black;"><a class="more" style="color: black;font-size: 11px;" href="<?= site_url('author/author_view/' . $key); ?>" rel="facebox">More Details..</a></td>
<?
if ($val1['show_logo'] == '1') {
if ($val['author_logo']) {
?></tr>
<tr style="background-color:<?= $color; ?>" on>
<td colspan="5"><img src="<?= base_url(); ?>uploads/<?= $val['author_logo']; ?>" style="width: 998px;height: 175px;" /></td>
</tr>
<?
}
} else {
?></tr> <?
}
$counter++;
}
}
}
}
?>
why don't you use the HTML Table Library that CodeIgniter 2.x includes in default package? Just pre-format you arrays to reach proper structure.
Related
I am trying to align data list like this.
But I get output like this
I tried following code
$rawResult = unserialize($rawResult->sections);
$ans = array(0,1,2,3,4,5);
foreach ($rawResult as $questionKey => $questionArray) {
foreach ($questionArray['answers'] as $key => $value) {
if(in_array($value['given'][0], $ans)){
$answers[$key] = $value['given'][0];
}
}
foreach ($questionArray['questions'] as $id => $val) {
if (!preg_match("/How stressful has it been/i", $val['name'])) {
/*if($val['type'] == 'Single'){*/
$questions[$val['id']] = $val['name'];
}
}
}
ob_start();
global $csa_answers;
asort($answers);
$i=0;
$m=0;
$l=0;
$y=0;
global $pdf;
?>
<table class="progress-bar-container assessment-result" style="text-align:center;">
<tr>
<td><h3 style="font-weight: 700;font-size: 25px;line-height: 32px;color: #000;margin-bottom: 6px;font-family: 'Karla';">CSA Questions/Ratings</h3></td>
</tr>
<tr>
<td><span style="text-align: center;">Every CSA question and your response is listed below. Each question started out with the phrase,<br>
"How much have you been stressed by.....?"</span></td>
</tr>
</table>
<table class="table table-striped table-bordered" style="text-align:left;" width="620">
<tr>
<td><table width="310"><tr>
<td width="225" style="background-color: #EAE9E8;font-size:12px;">QUESTION</td>
<td width="80" style="background-color: #EAE9E8;font-size:12px;">RATING</td>
</tr>
<tr>
<?php foreach ($answers as $id => $ans) {
if(isset($questions[$id])){
$i++; ?>
<td style="<?php echo $c;?>"><span style="font-size:10px;"><?php echo str_replace('How much have you been stressed by ','',stripslashes($questions[$id]));?></span></td>
<td style="<?php echo $c;?>"><span style="font-size:10px;"><i><?php echo $csa_answers[$ans];?></i></span></td>
<?php
if ($l==0) {
$c= "background-color: #EAE9E8;";
$l++;
}
else{
$c="";
$l=0;
}
$i = 0;
$m++;
echo "</tr><tr >";
$y++;
if ($y==34) {
$l==0;
echo '<td></td><td></td></tr></table></td><td ><table width="310"><tr>
<td width="225" style="background-color: #EAE9E8;font-size:12px;">Question</td>
<td width="80" style="background-color: #EAE9E8;font-size:12px;">Rating</td>
</tr><tr>';
}
}
}
?>
<td></td><td></td></tr></table></td></tr><tr>
<?php echo '<td colspan="2" style="text-align:center;"><span class="score-desc" style="font-size:9px;">The choices for answering each question were:</span><br>
<span class="csmith-right-margin" style="font-size:9px;"> Not at all (Stress Free) </span>
<span class="csmith-right-margin" style="font-size:9px;"> A little bit </span>
<span class="csmith-right-margin" style="font-size:9px;"> Moderately </span>
<span class="csmith-right-margin" style="font-size:9px;"> Quite a bit </span>
<span class="csmith-right-margin" style="font-size:9px;"> Extremely </span>
<span class="csmith-right-margin" style="font-size:9px;"> Does not apply </span></td></tr>';
?>
</table>
<?php
$content = ob_get_clean();
return $content;
I tried many times to change the code but still get the wrong output. How can I fix this issue?
Table is not good for this, you can use:
1. <div style='display:inline-block'>Column 1</div> <div style='display:inline-block'>Column 2</div>
2. Use css flex box (prefer for responsive page reason).
3. Or if you familiar with table use <div style='display:table'></div> as css table not HTML table
needing some help reviewing some code a previous developer did. this code is on various sites and all seem to be working except for one. This company is expired and not showing up red when doing a search.
<?php
//$today = date ('Y-m-d');
//$expire_date = date ('Y-m-d', strtotime ( '-90 day' . $today));
if($result){
echo
'<table class="" style="margin:0 0 !important;">
<tr>
<th class="center hide" style="width:5px!important;">X2Pay</th>
<th class="header" > Company</th>
<th class="header"><a href="javascript:;" id="header_type">Type</th>
<th class="header"><a href="javascript:;" id="header_country">Country</th>
<th class="header"><a href="javascript:;" id="header_city">City</th>
<th class="header"><a href="javascript:;" id="header_quality">Quality<br />&Risk</th>
</tr>';
foreach ($result as $row) { //echo $row->x2paystatus.'<br />';
?>
<?php
//if($row->x2paystatus == 'Active (Y)'){
if($row->status == 'Active'){
//echo $row->x2paystatus;
$color = null;
}else{
$color = 'color:#dd2644;';
}
//echo $row->memberid;
?>
<tr style="<?php echo $color;?>" class="<?php echo $row->HQ_Br;?>">
<td class="center hide" style="vertical-align:middle;">
<?php if(trim($row->x2paystatus) == 'Active (Y)'){?>
<div style="border:0px solid red;">
<a href="http://x2payonline.com" target="_blank">
<img class="" style="width:25px;" src="<?php echo $wp_upload_dir.'/2015/10/x2pay.png';?>" alt="">
</a>
</div>
<?php } ?>
</td>
<td>
<a href="<?php echo site_url('member-area/view-company-profile?id='.$row->memberid);?>">
<?php echo $row->membername;?></a>
</td>
<td class="" ><?php echo $row->HQ_Br;?></td>
<td><?php echo $row->country;?></td>
<td><?php echo $row->city;?></td>
<td class="center hide">
<span class="tooltip tooltip-effect-5">
<a class="tooltiplink" href="<?php echo site_url('member-area/view-company-profile?id='.$row->memberid);?>"><span class="tooltip-item">View</span></a>
<span class="tooltip-content clearfix">
<span class="tooltip-text">
<p>Tier : <?php if($row->tierlevel){echo $row->tierlevel;}else{echo '-';}?></p>
<p>Risk level : <?php if($row->quality_risk_level){echo $row->quality_risk_level;}else{ echo '8'; }?></p>
<p class="img">
<?php
for($i=1;$i<=$row->quality_risk_startrating;$i++)
{
echo '<img style="width:16px!important;height:16px!important;margin:0;" src="'.$img_dir.'star-active.png" />';
}
?>
</p><br /><br />
<p>Since : <?php echo date('Y', strtotime($row->enrollment_date));?></p>
</span>
</span>
</span>
</td>
</tr>
<?php
}
echo '</table>';
}else{
//echo 'No result';
}
?>
Since it is rendering red on other sites that means this is clearly a css styling rule override which is preventing it from rendering red. I'd look into the style sheet for that site and see if background has tr css rule with the !important declaration. Many times when your dealing with tables people write css rules and accidentally override css on other tables unintentionally.
I would use F12 on table element and see what css rules are being applied to that element on the site in question.
I want to print binary tree (Below Image) in php from database value
And above is my database table structure
Here is what I tried, In this code I want to display binary tree of user id PX100
<?php
include 'db_connect.php';
$user_id = 'PX100';
$select_right_tree = $con->prepare("SELECT * FROM tbl_user_postion WHERE user_id=:user_id");
$select_right_tree->bindParam(":user_id", $user_id);
$select_right_tree->execute();
$fetch_right_tree = $select_right_tree->fetch(PDO::FETCH_ASSOC);
$ex_pos_right = $fetch_right_tree['pos_right'];
$ex_pos_left = $fetch_right_tree['pos_left'];
function right_part($pos_right) {
if(!empty($pos_right)) {
$select_left_tree = $con->prepare("SELECT pos_right, pos_left FROM tbl_user_postion WHERE user_id=:user_id");
$select_left_tree->bindParam(":user_id", $pos_right);
$select_left_tree->execute();
$fetch_left_tree = $select_left_tree->fetch(PDO::FETCH_ASSOC);
$user_right = $fetch_left_tree['pos_right'];
$user_left = $fetch_left_tree['pos_left'];
return array($user_right, $user_left);
if(!empty($user_right)) {
right_part($user_right);
}
if(!empty($user_left)) {
left_part($user_left);
}
}
}
function left_part($pos_left) {
if(!empty($pos_left)) {
$select_left_tree = $con->prepare("SELECT pos_right, pos_left FROM tbl_user_postion WHERE user_id=:user_id");
$select_left_tree->bindParam(":user_id", $pos_left);
$select_left_tree->execute();
$fetch_left_tree = $select_left_tree->fetch(PDO::FETCH_ASSOC);
$user_right = $fetch_left_tree['pos_right'];
$user_left = $fetch_left_tree['pos_left'];
return array($user_right, $user_left);
if(!empty($user_left)) {
left_part($user_left);
}
if(!empty($user_right)) {
right_part($user_right);
}
}
}
?>
<div class="tree">
<ul>
<li>
<img src="image/user.png" ><br/><?php echo $user_id; ?>
<ul>
<li>
<img src="image/user.png"><br/><?php echo $ex_pos_right; ?>
<?php
if(!empty($ex_pos_right))
{
list($pos_right1, $pos_left1) = right_part($ex_pos_right);
?>
<ul>
<li> <img src="image/user.png"><br/><?php echo $pos_right1; ?> </li>
<li> <img src="image/user.png"><br/><?php echo $pos_left1; ?> </li>
</ul>
<?php
}
?>
</li>
<li>
<img src="image/user.png"><br/><?php echo $ex_pos_left; ?>
<?php
if(!empty($ex_pos_left))
{
list($pos_right2, $pos_left2) = left_part($ex_pos_left);
?>
<ul>
<li> <img src="image/user.png"><br/><?php echo $pos_right2; ?> </li>
<li> <img src="image/user.png"><br/><?php echo $pos_left2; ?> </li>
</ul>
<?php
}
?>
</li>
</ul>
</li>
</ul>
</div>
Output of the above code is Here,
From database table, PX103 is a parent of PX108 and PX110, PX105 is parent of PX107 and PX111 , PX106 is parent of PX109. But PX108, PX110, PX107, PX111 and PX109 are not displaying in tree.
Please help me to sort out this problem.
Thankyou.
<table class="table table-bordered table-striped">
<tr>
<td width="950" >
<?php $m_id=NULL;$m_id=$_SESSION['id'];
$width=580;
for($lopp=0;$lopp<=3;$lopp++){
$tree=mysqli_query($sql,"select * from tree where distributer_id='".$m_id."'");
$m_id_fetch=mysqli_fetch_assoc($tree);
$left_m_id=$riggt_m_id="";
$tree_detaila=mysqli_query($sql,"select Name,yo_id from registration where yo_id='".$m_id."'");
if(!$tree_detaila) print mysqli_error($sql);
$detail=mysqli_fetch_assoc($tree_detaila);
if(!empty($m_id_fetch['pos_left'])) $left_m_id=$m_id_fetch['pos_left'];if(!empty($m_id_fetch['pos_right'])) $riggt_m_id=$m_id_fetch['pos_right'];
?> <table class="table-responsive" width="850" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2" valign="top" align="center"> <table class="table-responsive" width="<?php print $width; ?>" border="0" align="<?php if(!empty($m_id_fetch['pos_left']) && $lopp>0) print "left"; elseif(!empty($m_id_fetch['pos_right']) && $lopp>0) print "right" ?> " cellpadding="0" cellspacing="0">
<?php if($lopp==0) { ?> <tr>
<td width="<?php print $width; ?>" align="center"> <img src="dashboard/images/user.jpg" width="45" height="50" class="img-circle" />
</td>
</tr>
<tr>
<td align="center"><?php print strtoupper($detail['Name']); ?></td>
</tr>
<tr>
<td align="center"><?php print $detail['yo_id']; ?></td>
</tr><?php } else { print ' <tr>
<td colspan="2" align="left"></td>
</tr>'; } ?>
<tr>
<td align="center">
<tr>
<td colspan="2" align="<?php if(!empty($m_id_fetch['pos_left']) && $lopp>0) print "left"; elseif(!empty($m_id_fetch['pos_right']) && $lopp>0) print "right" ?>"><img src="img/p.png" width="<?php print $width=$width-90; ?> " height="5" /></td>
</tr>
<?php
if($left_m_id!="" )
{
$tree_detaila_l=mysqli_query($sql,"select Name,yo_id from registration where yo_id='".$m_id_fetch['pos_left']."'");
$detail_l=mysqli_fetch_assoc($tree_detaila_l);
}
if($riggt_m_id!="")
{
$tree_detaila_r=mysqli_query($sql,"select Name,yo_id from registration where yo_id='".$m_id_fetch['pos_right']."'");
$detail_r=mysqli_fetch_assoc($tree_detaila_r);
}
?>
<tr>
<?php if($left_m_id!="" ){ ?> <td align="left">
<a href='#' class='tt'> <img src="dashboard/images/user.jpg" width="45" height="50" class="img-circle" /> </a></td><?php } ?>
<?php if($riggt_m_id!="" ){ ?> <td align="right">
<a href='#' class='tt'> <img src="dashboard/images/user.jpg" width="45" height="50" class="img-circle" /> </a></td><?php } ?>
</tr>
<tr>
<?php if($left_m_id!="") { ?><td align=" left"><?php print $detail_l['Name']; ?></td><?php } ?> <?php if($riggt_m_id!="") { ?><td align=" right"><?php print $detail_r['Name']; ?></td><?php } ?>
</tr>
<tr>
<?php if($left_m_id!="") { ?><td align=" left">
<?php print $detail_l['yo_id']; ?>
</td><?php } ?> <?php if($riggt_m_id!="") { ?><td align=" right">
<?php print $detail_r['yo_id']; ?>
</td><?php } ?>
</tr>
</table></td>
</tr>
</table><?php $width=$width-100;$m_id=$m_id_fetch['pos_right']; } ?>
</td>
</tr>
</table>`enter code here`
I can't get <?php $row->entryData; ?></td> to output. If I have two rows in the database I need it to iterate over each instance of the Html. It's not doing that though. It is outputting all the rows in one box. How can I get it to output in the correct box?
<?php $userid = $this->session->userdata('userid');
$query = $this->db->query("SELECT * FROM churchMembers WHERE cMuserId = '{$userid}'");
$row = $query->row();
$membersChurchId = $row->cMchurchId;
$query = $this->db->query("SELECT wp.entryData, wp.entryCreationDateTime, u.firstname, u.lastname, u.userid, u.defaultImgURI FROM users u
INNER JOIN wallPosts wp ON wp.postingUserid = u.userid
WHERE wp.wpChurchId = '{$membersChurchId}'");
foreach ($query->result() as $row) { ?>
<table cellpadding="0" cellspacing="0" style="width: 500px; height: 107px" align="left">
<td valign="top" style="padding: 3px; width: 101px;" rowspan="2">
<img id="defaultImg a0" src="<?php echo base_url().$row->defaultImgURI; ?>" width="95" height="96" /></td>
<td valign="top" class="style1" style="width: 124px">
<a class="font1"><?php echo $row->firstname . " " . $row->lastname; ?></a>
</td>
<td valign="top" class="right-align-button1" style="height: 35px; width: 269px;">
<a class="link-font1" id="like" href="#" style="width: 138px">Like</a> </span>
<span class="font2"> | </span>
<a id="comment" href="#" style="width: 138px" class="link-font1">Comment</a><br />
<span class="font2"><?php echo $row->entryCreationDateTime; ?></span>
</td>
<tr>
<td valign="top" colspan="2" style="height: 72px">
<?php $row->entryData; ?></td>
</tr>
</table>
<?php } ?>
I guess you have to change:
<?php $row->entryData; ?>
To
<?php echo $row->entryData; ?> //you missed echo i guess
If everything else if fine in your code.
This is a voting plugin for Wordpress, but I think the problem is PHP, so I posted it here.
3 fields allow the user to paste HTML code (Voting up, Voting down, and HTML displayed after voting):
value="<?php echo htmlentities(get_option('voteiu_sinktext')); ?>"
value="<?php echo htmlentities(get_option('voteiu_votetext')); ?>"
value="<?php echo htmlentities(get_option('voteiu_aftervotetext')); ?>"
I added an <img> tag to the first two fields. And they are displayed correctly but when I add an image to the last one voteiu_aftervotetext (<img src="http://localhost/taiwantalk/wp-content/plugins/vote-it-up/voting-disabled.png" />) . The first two fields (Vote Up and Vote Down) output like this:
<a voting-disabled.png"="" vote-it-up="" plugins="" wp-content="" taiwantalk=""
localhost="" http:="" href="javascript:vote('votecount47','voteid47','<img
src=">',47,1,'http://localhost/taiwantalk/wp-content/plugins/vote-it-up');"><img
src="http://localhost/taiwantalk/wp-content/plugins/vote-it-up/uparrow.png"></a>
config file:
<?php
/* VoteItUp configuration page */
function VoteItUp_options() {
if (function_exists('add_options_page')) {
add_options_page("Vote It Up", "Vote It Up", 8, "voteitupconfig", "VoteItUp_optionspage");
add_options_page("Edit Votes", "Edit Votes", 8, "voteitupeditvotes", "VoteItUp_editvotespage");
}
}
/* Wordpress MU fix, options whitelist */
if(function_exists('wpmu_create_blog')) {
add_filter('whitelist_options','voteitup_alter_whitelist_options');
function voteitup_alter_whitelist_options($whitelist) {
if(is_array($whitelist)) {
$option_array = array('voteitup' => array('voteiu_initialoffset','voteiu_votetext','voteiu_sinktext','voteiu_aftervotetext','voteiu_allowguests','voteiu_allowownvote','voteiu_limit','voteiu_widgetcount','voteiu_skin'));
$whitelist = array_merge($whitelist,$option_array);
}
return $whitelist;
}
}
//Page meant for administrators
function VoteItUp_optionspage() {
?>
<div class="wrap">
<div id="icon-options-general" class="icon32"><br /></div>
<h2><?php _e('Voting options'); ?></h2>
<form method="post" action="options.php">
<?php
/* bugfix for wordpress mu */
if(function_exists('wpmu_create_blog')) {
wp_nonce_field('voteitup-options');
echo '<input type="hidden" name="option_page" value="voteitup" />';
} else {
wp_nonce_field('update-options');
}
?>
<h3>General</h3>
<table class="form-table" border="0">
<tr valign="top">
<th scope="row" style="text-align: left;">Initial vote count</th>
<td>
<input type="text" name="voteiu_initialoffset" id="voteiu_initialoffset" value="<?php if (get_option('voteiu_initialoffset')=='') { echo '0'; } else { echo get_option('voteiu_initialoffset'); } ?>" />
</td></tr>
<tr valign="top">
<th scope="row" style="text-align: left;">Name of positive votes</th>
<td>
<input type="text" name="voteiu_votetext" id="voteiu_votetext" value="<?php echo htmlentities(get_option('voteiu_votetext')); ?>" /><br />
You can use <code><img></code> to use images instead of text. Example: <code><img src="<?php echo VoteItUp_ExtPath(); ?>/uparrow.png" /></code><br />
Default: <code>Vote</code>
</td>
</tr>
<tr valign="top">
<th scope="row" style="text-align: left;">Name of negative votes</th>
<td>
<input type="text" name="voteiu_sinktext" id="voteiu_sinktext" value="<?php echo htmlentities(get_option('voteiu_sinktext')); ?>" <?php if (!GetCurrentSkinInfo('supporttwoway')) { echo 'disabled="disabled" '; }?>/><br />
<?php if (GetCurrentSkinInfo('supporttwoway')) { ?>You can use <code><img></code> to use images instead of text. Example: <code><img src="<?php echo VoteItUp_ExtPath(); ?>/downarrow.png" /></code><br />
If this is left blank two-way voting is disabled.<?php } else {
?>Current widget template does not support two-way voting<?php } ?>
</td>
</tr>
<tr valign="top">
<th scope="row" style="text-align: left;">Text displayed after vote is cast</th>
<td>
<input type="text" name="voteiu_aftervotetext" id="voteiu_aftervotetext" value="<?php echo htmlentities(get_option('voteiu_aftervotetext')); ?>" /><br />
You can use <code><img></code> to use images instead of text. Text is displayed after user casts a vote. If this is left blank the vote button disappears.
</td>
</tr>
</table>
<h3>Permissions</h3>
<table class="form-table" border="0">
<tr valign="top">
<th scope="row" style="text-align: left;">Allow guests to vote</th>
<td>
<input type="checkbox" name="voteiu_allowguests" id="voteiu_allowguests" value="true" <?php if (get_option('voteiu_allowguests') == 'true') { echo ' checked="checked"'; } ?> />
</td></tr>
<tr valign="top">
<th scope="row" style="text-align: left;">Post author can vote own post</th>
<td>
<input type="checkbox" name="voteiu_allowownvote" id="voteiu_allowownvote" value="true" <?php if (get_option('voteiu_allowownvote') == 'true') { echo ' checked="checked"'; } ?> />
</td></tr>
</table>
<h3>Theming</h3>
<p>External templates for the voting widgets can be installed via the "skin" directory. Voting widgets using <code><?php DisplayVotes(get_the_ID()); ?></code> will use the new themes. Setting this to "none" will result in the default bar theme being used.</p>
<?php SkinsConfig(); ?>
<h3>Widget</h3>
<p>The widget shows posts which have the most votes. Only new posts are considered to keep the list fresh.</p>
<p>The widget can be displayed to where you want by using the following code: <code><?php MostVotedAllTime(); ?></code>, or if your template supports widgets it can be added via the widgets panel.</p>
<table class="form-table" border="0">
<tr valign="top">
<th scope="row" style="text-align: left;">No. of most recent posts to be considered</th>
<td><input type="text" name="voteiu_limit" id="voteiu_limit" value="<?php echo get_option('voteiu_limit'); ?>" /><br />
Default: <code>100</code>
</td>
</tr>
<tr valign="top">
<th scope="row" style="text-align: left;">No. of posts shown in widget</th>
<td><input type="text" name="voteiu_widgetcount" id="voteiu_widgetcount" value="<?php if (get_option('voteiu_widgetcount')=='') { echo '10'; } else {echo get_option('voteiu_widgetcount');} ?>" /><br />
Default: <code>10</code>
</td>
</tr>
</table>
<input type="hidden" name="action" value="update" />
<input type="hidden" name="page_options" value="voteiu_initialoffset,voteiu_votetext,voteiu_sinktext,voteiu_aftervotetext,voteiu_allowguests,voteiu_allowownvote,voteiu_limit,voteiu_widgetcount,voteiu_skin" />
<h3>Voting code</h3>
<p>The following code should be added in your index.php and single.php. This displays the vote buttons.</p>
<p><strong>Themable Version</strong><br />
<code><?php DisplayVotes(get_the_ID()); ?></code></p>
<p class="submit">
<input type="submit" name="Submit" value="<?php _e('Update Options ยป') ?>" />
</p>
</form>
</div>
<?php
}
the file which controls the output:
<span class="barcontainer"><span class="barfill" id="votecount<?php echo $postID ?>" style="width:<?php echo round($barvotes[0] * 2.5); ?>%;"> </span></span>
<?php if ($user_ID != '') {
if (!($user_login == get_the_author_login() && !get_option('voteiu_allowownvote'))) { ?>
<span>
<?php if(!UserVoted($postID,$user_ID)) { ?><span class="bartext" id="voteid<?php the_ID(); ?>">
<?php echo get_option('voteiu_votetext'); ?><?php if (get_option('voteiu_sinktext') != '') { ?><?php echo get_option('voteiu_sinktext'); ?>
<?php } ?>
</span>
<?php } else { ?>
<?php if (get_option('voteiu_aftervotetext') != '') { ?><span class="bartext" id="voteid<?php the_ID(); ?>"><?php echo get_option('voteiu_aftervotetext'); ?></span><?php } ?>
<?php } ?>
</span>
<?php } } else {
if (get_option('voteiu_allowguests') == 'true') { ?>
<span>
<?php if(!GuestVoted($postID,md5($_SERVER['REMOTE_ADDR']))) { ?><span class="bartext" id="voteid<?php the_ID(); ?>">
<?php echo get_option('voteiu_votetext'); ?><?php if (get_option('voteiu_sinktext') != '') { ?><?php echo get_option('voteiu_sinktext'); ?>
<?php } ?>
</span>
<?php } ?>
</span>
Is like the third field inserts itself in the anchor tag of the first two.
Is the problem spot-able with the information provided above?